musrWiz 0.1.0
Loading...
Searching...
No Matches
PSetup Class Reference

The PSetup class represents a measurement setup configuration. More...

#include <PInstrumentDef.h>

Public Member Functions

 PSetup ()
 Constructor. Initializes all values to -1/empty.
 
 ~PSetup ()
 Destructor.
 
void setName (QString str)
 Sets the setup name.
 
void setNoOfDetectors (int no)
 Sets the total number of physical detectors.
 
void setFgbOffset (int fgbOffset)
 Sets the first good bin offset from t0.
 
void setLgb (int lgb)
 Sets the last good bin.
 
void setBkgRange (int start, int end)
 Sets the background range for asymmetry fits.
 
void addDetector (PDetector detector)
 Adds a logical detector for single-histogram fits.
 
void addAsymDetector (PDetector detector)
 Adds a logical detector for asymmetry fits.
 
QString getName ()
 Returns the setup name.
 
int getNoOfDetectors ()
 Returns the total number of physical detectors.
 
int getNoOfLogicalDetectors ()
 Returns the number of logical detectors for single-histogram fits.
 
int getNoOfLogicalAsymDetectors ()
 Returns the number of logical detectors for asymmetry fits.
 
int getFgbOffset ()
 Returns the first good bin offset.
 
int getLgb ()
 Returns the last good bin.
 
int getBkgStartBin ()
 Returns the background range start bin.
 
int getBkgEndBin ()
 Returns the background range end bin.
 
PDetectorgetDetector (int idx)
 Returns a pointer to a single-histogram logical detector.
 
PDetectorgetAsymDetector (int idx)
 Returns a pointer to an asymmetry logical detector.
 

Private Attributes

QString fName
 setup name
 
int fNoOfDetectors
 total number of physical detectors
 
int fFgbOffset
 first good bin offset from t0
 
int fLgb
 last good bin
 
int fBkgStartBin
 background range start bin
 
int fBkgEndBin
 background range end bin
 
QVector< PDetectorfLogicDetectors
 logical detectors for single-histogram fits
 
QVector< PDetectorfLogicAsymDetectors
 logical detectors for asymmetry fits
 

Detailed Description

The PSetup class represents a measurement setup configuration.

This class defines a specific detector setup for a measurement type (ZF, TF, or LF). It includes information about the number of detectors, good bin ranges, background ranges, and logical detector groupings for both single-histogram and asymmetry fits.

Constructor & Destructor Documentation

◆ PSetup()

PSetup::PSetup ( )

Constructor. Initializes all values to -1/empty.

PSetup::PSetup constructor initializes all values to -1/empty.

◆ ~PSetup()

PSetup::~PSetup ( )
inline

Destructor.

Member Function Documentation

◆ addAsymDetector()

void PSetup::addAsymDetector ( PDetector detector)
inline

Adds a logical detector for asymmetry fits.

Parameters
detectorDetector configuration to add (with forward/backward groups).

◆ addDetector()

void PSetup::addDetector ( PDetector detector)
inline

Adds a logical detector for single-histogram fits.

Parameters
detectorDetector configuration to add.

◆ getAsymDetector()

PDetector * PSetup::getAsymDetector ( int idx)

Returns a pointer to an asymmetry logical detector.

PSetup::getAsymDetector returns a pointer to an asymmetry logical detector.

Parameters
idxIndex of the detector.
Returns
Pointer to PDetector, or nullptr if index out of range.
Parameters
idxIndex of the detector in the asymmetry detector list.
Returns
Pointer to PDetector, or nullptr if index is out of range.

◆ getBkgEndBin()

int PSetup::getBkgEndBin ( )
inline

Returns the background range end bin.

Returns
Background end bin.

◆ getBkgStartBin()

int PSetup::getBkgStartBin ( )
inline

Returns the background range start bin.

Returns
Background start bin.

◆ getDetector()

PDetector * PSetup::getDetector ( int idx)

Returns a pointer to a single-histogram logical detector.

PSetup::getDetector returns a pointer to a single-histogram logical detector.

Parameters
idxIndex of the detector.
Returns
Pointer to PDetector, or nullptr if index out of range.
Parameters
idxIndex of the detector in the logical detector list.
Returns
Pointer to PDetector, or nullptr if index is out of range.

◆ getFgbOffset()

int PSetup::getFgbOffset ( )
inline

Returns the first good bin offset.

Returns
Offset in bins from t0.

◆ getLgb()

int PSetup::getLgb ( )
inline

Returns the last good bin.

Returns
Last good bin number.

◆ getName()

QString PSetup::getName ( )
inline

Returns the setup name.

Returns
Setup name.

◆ getNoOfDetectors()

int PSetup::getNoOfDetectors ( )
inline

Returns the total number of physical detectors.

Returns
Number of detectors.

◆ getNoOfLogicalAsymDetectors()

int PSetup::getNoOfLogicalAsymDetectors ( )
inline

Returns the number of logical detectors for asymmetry fits.

Returns
Number of asymmetry detectors.

◆ getNoOfLogicalDetectors()

int PSetup::getNoOfLogicalDetectors ( )
inline

Returns the number of logical detectors for single-histogram fits.

Returns
Number of logical detectors.

◆ setBkgRange()

void PSetup::setBkgRange ( int start,
int end )
inline

Sets the background range for asymmetry fits.

Parameters
startStart bin for background estimation.
endEnd bin for background estimation.

◆ setFgbOffset()

void PSetup::setFgbOffset ( int fgbOffset)
inline

Sets the first good bin offset from t0.

Parameters
fgbOffsetOffset in bins from t0 to first good bin.

◆ setLgb()

void PSetup::setLgb ( int lgb)
inline

Sets the last good bin.

Parameters
lgbLast good bin number.

◆ setName()

void PSetup::setName ( QString str)
inline

Sets the setup name.

Parameters
strSetup name (e.g., "Default", "Veto").

◆ setNoOfDetectors()

void PSetup::setNoOfDetectors ( int no)
inline

Sets the total number of physical detectors.

Parameters
noNumber of detectors.

Member Data Documentation

◆ fBkgEndBin

int PSetup::fBkgEndBin
private

background range end bin

◆ fBkgStartBin

int PSetup::fBkgStartBin
private

background range start bin

◆ fFgbOffset

int PSetup::fFgbOffset
private

first good bin offset from t0

◆ fLgb

int PSetup::fLgb
private

last good bin

◆ fLogicAsymDetectors

QVector<PDetector> PSetup::fLogicAsymDetectors
private

logical detectors for asymmetry fits

◆ fLogicDetectors

QVector<PDetector> PSetup::fLogicDetectors
private

logical detectors for single-histogram fits

◆ fName

QString PSetup::fName
private

setup name

◆ fNoOfDetectors

int PSetup::fNoOfDetectors
private

total number of physical detectors


The documentation for this class was generated from the following files: