Belle II Software  release-08-01-10
Collaboration diagram for top:

Modules

 top data objects
 
 top modules
 

Classes

class  TOPDatabaseImporter
 TOP database importer. More...
 
class  TOPASICChannel
 Calibration constants of a singe ASIC channel: pedestals, gains and time axis. More...
 
class  TOPASICGains
 Calibration constants of a single ASIC window: gains. More...
 
class  TOPASICPedestals
 Calibration constants of a single ASIC window: pedestals. More...
 
class  TOPCalAsicShift
 Calibration constants for ASIC shifts of all 16 modules. More...
 
class  TOPCalChannelMask
 Channel status for all 512 channels of 16 modules. More...
 
class  TOPCalChannelNoise
 r.m.s. More...
 
class  TOPCalChannelPulseHeight
 Pulse height parameterizations for all 512 channels of 16 modules. More...
 
class  TOPCalChannelRQE
 Class to store relative quantum efficiency of channels w.r.t initial one measured in PMT QA QE is expected to decrease during the experiment due to aging induced by acuumulated charge. More...
 
class  TOPCalChannelT0
 Channel T0 calibration constants for all 512 channels of 16 modules. More...
 
class  TOPCalChannelThreshold
 Value of the threshold (in ADC counts) used for the pulse identification, for all 512 channels of 16 modules. More...
 
class  TOPCalChannelThresholdEff
 Class to store the threshold efficiency (i.e. More...
 
class  TOPCalCommonT0
 Common T0 calibration constant. More...
 
class  TOPCalEventT0Offset
 Class to store the calibrated EventT0 offsets of other detector components The offsets are measured relative to TOP EventT0 (e.g CDC - TOP etc) More...
 
class  TOPCalFillPatternOffset
 Class to store the offset of reconstructed fill pattern. More...
 
class  TOPCalIntegratedCharge
 Class to store integrated charge per channel. More...
 
class  TOPCalModuleAlignment
 Alignment constants for all 16 modules. More...
 
class  TOPCalModuleT0
 Module T0 calibration constants for all 16 modules. More...
 
class  TOPCalPhotonYields
 Class to store photon pixel yields for PMT ageing studies, and equalized alpha ratios for finding optically decoupled PMT's. More...
 
class  TOPCalTimebase
 Sample time calibration constants for all channels. More...
 
class  TOPCalTimeWalk
 Calibration constants for time-walk correction and for tuning of electronic time resolution in digitization. More...
 
class  TOPChannelMap
 Map of pixels and channels within the carrier board. More...
 
class  TOPFrontEndMap
 Mapping of a boardstack number within a module to SCROD and COPPER/Finesse. More...
 
class  TOPFrontEndSetting
 Front-end settings: storage depths, lookback, readout windows etc. More...
 
class  TOPGeoBarSegment
 Geometry parameters of a quartz bar segment. More...
 
class  TOPGeoBase
 Base class for geometry parameters. More...
 
class  TOPGeoColdPlate
 Geometry parameters of cold plate (simplified) More...
 
class  TOPGeoEndPlate
 Geometry parameters of forward end plate (simplified) More...
 
class  TOPGeoFrontEnd
 Geometry parameters of board stack (front-end electronic module) More...
 
class  TOPGeoHoneycombPanel
 Geometry parameters of honeycomb panel. More...
 
class  TOPGeometry
 Geometry parameters of TOP. More...
 
class  TOPGeoMirrorSegment
 Geometry parameters of a mirror segment. More...
 
class  TOPGeoModule
 Geometry parameters of a module (optical components + positioning) More...
 
class  TOPGeoModuleDisplacement
 Displacement parameters of a TOP module. More...
 
class  TOPGeoPMT
 Geometry parameters of MCP-PMT. More...
 
class  TOPGeoPMTArray
 Geometry parameters of MCP-PMT array. More...
 
class  TOPGeoPMTArrayDisplacement
 Displacement parameters of MCP-PMT array. More...
 
class  TOPGeoPrism
 Geometry parameters of prism. More...
 
class  TOPGeoPrismEnclosure
 Geometry parameters of prism enclosure (simplified) More...
 
class  TOPGeoQBB
 Geometry parameters of Quartz Bar Box (mother class) More...
 
class  TOPGeoSideRails
 Geometry parameters of side rails (simplified) More...
 
class  TOPNominalQE
 Nominal quantum efficiency of PMT. More...
 
class  TOPNominalTDC
 Nominal time-to-digit conversion parameters (simplified model) More...
 
class  TOPNominalTTS
 Nominal time transition spread of PMT. More...
 
class  TOPPmtGainPar
 Parameterized PMT gain (from laser testing at Nagoya) More...
 
class  TOPPmtInstallation
 PMT position within a module. More...
 
class  TOPPmtObsoleteData
 PMT specs from Hamamatsu. More...
 
class  TOPPmtQE
 Nagoya measurements of quantum efficiency. More...
 
class  TOPPmtTTSHisto
 Raw measurements of TTS (histograms) for each PMT pixel. More...
 
class  TOPPmtTTSPar
 Parameterized TTS for each PMT pixel. More...
 
struct  TOPPulseHeightPar
 Struct holding the pulse height parameterizations for the TOP counter. More...
 
class  TOPSampleTimes
 Calibration constants of a singe ASIC channel: time axis (sample times) More...
 
class  TOPSignalShape
 Normalized shape of single photon pulse (waveform) Pulse must be positive. More...
 
class  TOPWavelengthFilter
 Bulk transmittance of wavelength filter. More...
 

Typedefs

typedef map< unsigned, size_t >::const_iterator Iterator
 Iteratior for m_map.
 
typedef std::pair< double, double > Pair
 Shorthand for std::pair<double, double>
 

Functions

void importSampleTimeCalibration (std::string fileNames, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import sample time calibration constants to database Output of TOPTimeBaseCalibrator (root files with histograms) More...
 
void importLocalT0Calibration (std::string fileNames, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import channel-by-channel T0 calibration constants to database The input is the root file with ntuple produced by TOPLaserCalibrator. More...
 
void importChannelT0 (std::string fileName, int expNo, int firstRun, int lastRun)
 Import channel T0 calibration constants The input is a root file with 1D histograms (one per slot, named "channelT0_slot*") More...
 
void importAsicShifts_BS13d (double s0, double s1, double s2, double s3, int expNo, int firstRun, int lastRun)
 Import ASIC shifts of BS13d. More...
 
void importOfflineCommonT0Calibration (std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import common T0 calibration constants derived form the offline data reprocessing to database The input is a root file containing a tree (one per run). More...
 
void importCommonT0 (double value, double error, int expNo, int firstRun, int lastRun, bool roughlyCalibrated=false)
 Import common T0 calibration constants. More...
 
void importModuleT0Calibration (std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import module T0 calibration constants to database The input is the text file. More...
 
void importModuleT0 (std::string fileName, int expNo, int firstRun, int lastRun)
 Import module T0 calibration constants The input is a root file with 1D histogram (name is "moduleT0") More...
 
void printSampleTimeCalibrationInfo ()
 Prints sample time calibration info about constants stored in database.
 
void printSampleTimeCalibration ()
 Print sample time calibration constants stored in database.
 
void importChannelMask (std::string fileName, int expNo, int firstRun, int lastRun)
 Import channel mask from a root file (given as 1D histograms, one per slot). More...
 
void generateFakeChannelMask (double fractionDead, double fractionHot, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Generate and import a (random, fake) channel mask for testing. More...
 
void importPmtQEData (std::string fileName, std::string treeName="qePmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import PMT Quantum Efficiency data to database. More...
 
void importPmtGainData (std::string fileName, std::string treeName="gainPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import PMT gain parameters data to database. More...
 
void importPmtInstallationData (std::string fileName, std::string treeName="installationPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import PMT installation data to database. More...
 
void importPmtObsoleteData (std::string fileName, std::string treeName="obsPmtData", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import PMT specifications from Hamamatsu (not to be used!) More...
 
void importPmtTTSPar (std::string fileName, std::string treeName="ttsPmtPar", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import gaussians fitting the TTS distributions. More...
 
void importPmtTTSHisto (std::string fileName, std::string treeName="ttsPmtHisto", int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import histograms used for PMT TTS determination. More...
 
void importPmtPulseHeightFitResult (std::string fileName, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 Import fit results of pulse height disribution for channel gain and threshold efficiency. More...
 
void exportPmtTTSHisto (std::string outFileName="RetrievedHistos.root")
 Example of exporting TTS histograms. More...
 
void importFrontEndSettings (int lookback, int readoutWin, int extraWin, int offset, int expNo, int firstRun, int lastRun)
 Import front-end settings. More...
 
void importDummyCalModuleAlignment (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalModuleAlignment DB objects More...
 
void importDummyCalModuleT0 (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalCalModuleT0 DB objects More...
 
void importDummyCalChannelT0 (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelT0 DB objects More...
 
void importDummyCalTimebase (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalTimebase DB objects More...
 
void importDummyCalChannelNoise (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelNoise DB objects More...
 
void importDummyCalChannelPulseHeight (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelPulseHeight DB objects More...
 
void importDummyCalChannelRQE (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelRQE DB objects More...
 
void importDummyCalChannelThresholdEff (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelThresholdEff DB objects More...
 
void importDummyCalChannelThreshold (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalChannelThreshold DB objects More...
 
void importDummyCalCommonT0 (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalCommonT0 DB objects More...
 
void importDummyCalIntegratedCharge (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalIntegratedCharge DB objects More...
 
void importDummyCalAsicShift (int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 import a dummy payload of TOPCalAsicShift DB objects More...
 
void correctTOPPmtQE ()
 correct QE values in database for the reflection on window surface be sure that you run the function only once! see: BII-4230
 
void importTimeWalk (PyObject *list, double a, double b, int firstExp=0, int firstRun=0, int lastExp=-1, int lastRun=-1)
 payload TOPCalTimeWalk import parameters for time-walk correction and electronic time resolution tuning More...
 
void importTest (int runNumber, double syncTimeBase)
 for testing purposes only! - will be removed ...
 
void importTest ()
 for testing purposes only! - will be removed ...
 
bool setGains (const std::vector< float > &gains, float error=0)
 Set gains. More...
 
int setPedestals (const TProfile *profile, double average=0)
 Set pedestals from profile histogram with c_WindowSize bins. More...
 
unsigned getOptimizedOffset (const std::vector< unsigned > &values, const std::vector< unsigned > &errors, unsigned maxDif, unsigned maxErr)
 Return the offset that can allow for the maximal number of good pedestal samples. More...
 
void setT0 (int moduleID, unsigned asic, double T0)
 Sets calibration for a single ASIC and switches status to calibrated. More...
 
void setUnusable (int moduleID, unsigned asic)
 Switches calibration status to unusable to flag badly calibrated constant. More...
 
double getT0 (int moduleID, unsigned asic) const
 Returns T0 of a single asic. More...
 
bool isCalibrated (int moduleID, unsigned asic) const
 Returns calibration status. More...
 
bool isDefault (int moduleID, unsigned asic) const
 Returns calibration status. More...
 
bool isUnusable (int moduleID, unsigned asic) const
 Returns calibration status. More...
 
void setStatus (int moduleID, unsigned channel, EStatus status)
 Sets the status for a single channel. More...
 
void setActive (int moduleID, unsigned channel)
 Sets a specific channel as active. More...
 
void setDead (int moduleID, unsigned channel)
 Sets a specific channel as dead. More...
 
void setNoisy (int moduleID, unsigned channel)
 Sets a specific channel as noisy. More...
 
EStatus getStatus (int moduleID, unsigned channel) const
 Returns the status of a single channel. More...
 
bool isActive (int moduleID, unsigned channel) const
 Returns false if the channel is dead or noisy, and true is the channel is active. More...
 
bool check (const int module, const unsigned channel) const
 Check input module and channel arguments are sane.
 
int getNumOf (EStatus check) const
 Counts and returns the number of channels having a given status. More...
 
int getNumOf (EStatus check, int moduleID) const
 Counts and returns the number of channels od a module having a given status. More...
 
void setT0 (int moduleID, unsigned channel, double T0, double errT0)
 Sets calibration for a single channel and switches status to calibrated. More...
 
void setUnusable (int moduleID, unsigned channel)
 Switches calibration status to unusable to flag badly calibrated constant. More...
 
void suppressAverage ()
 Subtracts arithmetic average of a module from constants whose status is not c_Default. More...
 
double getT0 (int moduleID, unsigned channel) const
 Returns T0 of a single channel. More...
 
double getT0Error (int moduleID, unsigned channel) const
 Returns error on T0 of a single channel. More...
 
bool isCalibrated (int moduleID, unsigned channel) const
 Returns calibration status. More...
 
bool isDefault (int moduleID, unsigned channel) const
 Returns calibration status. More...
 
bool isUnusable (int moduleID, unsigned channel) const
 Returns calibration status. More...
 
void setAlpha (int moduleID, double alpha, double errAlpha)
 Sets the angle alpha on a single module. More...
 
void setBeta (int moduleID, double beta, double errBeta)
 Sets the angle beta on a single module. More...
 
void setGamma (int moduleID, double gamma, double errGamma)
 Sets the angle gamma on a single module. More...
 
void setX (int moduleID, double x, double errX)
 Sets the displacement x on a single module. More...
 
void setY (int moduleID, double y, double errY)
 Sets the displacement y on a single module. More...
 
void setZ (int moduleID, double z, double errZ)
 Sets the displacement z on a single module. More...
 
void setCalibrated (int moduleID)
 Switches calibration status to calibrated. More...
 
void setUnusable (int moduleID)
 Switches calibration status to unusable to flag badly calibrated constant. More...
 
double getAlpha (int moduleID) const
 Gets the angle alpha on a single module. More...
 
double getBeta (int moduleID) const
 Gets the angle beta on a single module. More...
 
double getGamma (int moduleID) const
 Gets the angle gamma on a single module. More...
 
double getX (int moduleID) const
 Returns the shift x on a single module. More...
 
double getY (int moduleID) const
 Returns the shift y on a single module. More...
 
double getZ (int moduleID) const
 Returns the shift z on a single module. More...
 
double getAlphaErr (int moduleID) const
 Returns the error on alpha on a single module. More...
 
double getBetaErr (int moduleID) const
 Returns the error on beta on a single module. More...
 
double getGammaErr (int moduleID) const
 Returns the error on gamma on a single module. More...
 
double getXErr (int moduleID) const
 Returns the error on x on a single module. More...
 
double getYErr (int moduleID) const
 Returns the error on y on a single module. More...
 
double getZErr (int moduleID) const
 Returns the error on z on a single module. More...
 
bool isCalibrated (int moduleID) const
 Returns calibration status. More...
 
bool isDefault (int moduleID) const
 Returns calibration status. More...
 
bool isUnusable (int moduleID) const
 Returns calibration status. More...
 
bool areAllCalibrated () const
 Returns true if all modules are calibrated.
 
bool areAllPrecise (double spatialPrecision, double angularPrecision) const
 Returns true if calibration precision for all modules is within specified values. More...
 
void setTransformations () const
 Sets the transformation cache.
 
const ROOT::Math::Transform3D & getTransformation (int moduleID) const
 Returns transformation from local to nominal frame. More...
 
void setT0 (int moduleID, double T0, double errT0)
 Sets calibration for a single module and switches status to calibrated. More...
 
void setUnusable (int moduleID)
 Switches calibration status to unusable to flag badly calibrated constant. More...
 
void suppressAverage ()
 Subtracts arithmetic average from constants whose status is not c_Default. More...
 
double getT0 (int moduleID) const
 Returns T0 of a module. More...
 
double getT0Error (int moduleID) const
 Returns error on T0 of a module. More...
 
bool isCalibrated (int moduleID) const
 Returns calibration status. More...
 
bool isDefault (int moduleID) const
 Returns calibration status. More...
 
bool isUnusable (int moduleID) const
 Returns calibration status. More...
 
void set (int slot, const TH1F *photonYields, const TH1F *backgroundYields, const TH1F *alphaRatio, const TH1F *activePixels, const TH2F *pulseHeights, const TH1F *muonZ)
 Sets the data of a given slot. More...
 
void copyContent (const TH1F *input, TH2F &output)
 Copy content of 1D histogram into 2D histogram. More...
 
const TH2F * getPhotonYields (int slot) const
 Returns a 2D histogram of photon pixel yields. More...
 
const TH2F * getBackgroundYields (int slot) const
 Returns a 2D histogram of background pixel yields. More...
 
const TH2F * getAlphaRatio (int slot) const
 Returns a 2D histogram of equalized pixel alpha ratio. More...
 
const TH2F * getActivePixels (int slot) const
 Returns a 2D histogram of active pixels. More...
 
const TH2F * getPulseHeights (int slot) const
 Returns a 2D histogram of pixel pulse-heights. More...
 
const TH1F * getMuonZ (int slot) const
 Returns z distribution of tracks used to determine pixel yields. More...
 
void append (unsigned scrodID, unsigned channel, const std::vector< double > &sampleTimes, bool replace=true)
 Appends calibration of a single ASIC channel. More...
 
const TOPSampleTimesgetSampleTimes (unsigned scrodID, unsigned channel) const
 Returns calibration constants for given SCROD and channel. More...
 
bool isAvailable (unsigned scrodID, unsigned channel) const
 Checks if calibration is available. More...
 
void createMap () const
 Creates a map in cache.
 
void set (const std::vector< double > &timeWalkParams, double noise, double quadratic)
 Sets all the parameters and switches status to calibrated. More...
 
double getTimeWalk (int pulseHeight) const
 Returns time-walk at given pulse height. More...
 
double getSigmaSq (int pulseHeight) const
 Returns an excess of electronic time resolution at given pulse height. More...
 
double getSigma (int pulseHeight) const
 Returns an excess of electronic time resolution at given pulse height. More...
 
void setWindowShifts (std::vector< int > shifts)
 Sets window shifts. More...
 
virtual bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="Bar segment geometry parameters") const override
 Print the content of the class. More...
 
std::vector< std::pair< double, double > > getBrokenGlueContour () const
 Returns the x-y contour of broken glue.
 
void constructContour (double A, double B, double fraction, double angle, std::vector< std::pair< double, double > > &contour) const
 Construct a 2D contour. More...
 
virtual void print (const std::string &title) const
 Print the content of the class. More...
 
void printUnderlined (const std::string &title) const
 Print the content of the class. More...
 
virtual void printSurface (const GeoOpticalSurface &surface) const
 Print the content of optical surface. More...
 
double getReflectivity (const GeoOpticalSurface &surface, double energy) const
 Returns reflectivity of optical surface at given photon energy. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB cold plate geometry parameters") const override
 Print the content of the class. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB forward end plate geometry parameters") const override
 Print the content of the class. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="Front-end geometry parameters") const override
 Print the content of the class. More...
 
void appendContour (std::vector< std::pair< double, double > > &contour, double y0, bool fromLeftToRight) const
 Appends curved surface to contour. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB honeycomb panel geometry parameters") const override
 Print the content of the class. More...
 
void appendModule (const TOPGeoModule &module)
 Appends module (if its ID differs from already appended modules) More...
 
bool isModuleIDValid (int moduleID) const
 Checks if module exists in m_modules. More...
 
const TOPGeoModulegetModule (int moduleID) const
 Returns module. More...
 
const TOPNominalTTSgetTTS (unsigned type) const
 Returns time transition spread of a given PMT type. More...
 
double getPDETuningFactor (unsigned type) const
 Returns photon detection efficiency tuning factor of a given PMT type. More...
 
double getInnerRadius () const
 Returns inner radius of the volume devoted to TOP counter. More...
 
double getOuterRadius () const
 Returns outer radius of the volume devoted to TOP counter. More...
 
double getRadius () const
 Returns average radius of modules. More...
 
double getBackwardZ () const
 Returns backward z of the volume devoted to TOP counter. More...
 
double getForwardZ () const
 Returns forward z of the volume devoted to TOP counter. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="TOP geometry parameters") const override
 Print the content of the class. More...
 
double getZc () const
 Returns spherical mirror center of curvature in z (in local frame of this segment) More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Mirror segment geometry parameters") const override
 Print the content of the class. More...
 
 TOPGeoModule (const TOPGeoModule &module)
 Copy constructor.
 
TOPGeoModuleoperator= (const TOPGeoModule &module)
 Assignment operator.
 
 ~TOPGeoModule ()
 Destructor.
 
void setTransformation () const
 Sets transformation cache.
 
void setBrokenGlue (int glueID, double fraction, double angle, const std::string &material)
 Sets glue to be broken (delaminated) More...
 
void setPeelOffRegions (double thickness, const std::string &material)
 Sets parameters of the peel-off cookie volumes. More...
 
ROOT::Math::XYZPoint pointToGlobal (const ROOT::Math::XYZPoint &point) const
 Transforms 3D point from module internal (= nominal & displaced) frame to Belle II frame. More...
 
ROOT::Math::XYZVector momentumToGlobal (const ROOT::Math::XYZVector &momentum) const
 Transforms momentum vector from module internal (= nominal & displaced) frame to Belle II frame. More...
 
ROOT::Math::XYZPoint pointToLocal (const ROOT::Math::XYZPoint &point) const
 Transforms 3D point from Belle II to module internal (= nominal & displaced) frame. More...
 
ROOT::Math::XYZVector momentumToLocal (const ROOT::Math::XYZVector &momentum) const
 Transforms momentum vector from Belle II to module internal (= nominal & displaced) frame. More...
 
ROOT::Math::XYZPoint pointNominalToGlobal (const ROOT::Math::XYZPoint &point) const
 Transforms 3D point from module nominal frame to Belle II frame. More...
 
ROOT::Math::XYZVector momentumNominalToGlobal (const ROOT::Math::XYZVector &momentum) const
 Transforms momentum vector from module nominal frame to Belle II frame. More...
 
ROOT::Math::XYZPoint pointGlobalToNominal (const ROOT::Math::XYZPoint &point) const
 Transforms 3D point from Belle II to module nominal frame. More...
 
ROOT::Math::XYZVector momentumGlobalToNominal (const ROOT::Math::XYZVector &momentum) const
 Transforms momentum vector from Belle II to module nominal frame. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Module geometry parameters") const override
 Print the content of the class. More...
 
void print (const std::string &title="Module displacement parameters") const override
 Print the content of the class. More...
 
ROOT::Math::Transform3D getTransformation () const
 Returns transformation from local to nominal frame. More...
 
unsigned getPixelColumn (double x) const
 Converts x-coordinate to pixel column (1-based) More...
 
unsigned getPixelRow (double y) const
 Converts y-coordinate to pixel row (1-based) More...
 
unsigned getPixelID (double x, double y) const
 Converts x and y coordinates to PMT pixel ID (1-based) More...
 
double getX (unsigned col) const
 Returns x coordinate of pixel center. More...
 
double getY (unsigned row) const
 Returns y coordinate of pixel center. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="MCP-PMT geometry parameters") const override
 Print the content of the class. More...
 
unsigned getPmtID (unsigned row, unsigned col) const
 Converts row and column numbers to PMT ID (1-based) More...
 
unsigned getRow (unsigned pmtID) const
 Converts PMT ID to row number (1-based) More...
 
unsigned getColumn (unsigned pmtID) const
 Converts PMT ID to column number (1-based) More...
 
int getPixelID (double x, double y, unsigned pmtID) const
 Converts (digitizes) x, y and PMT ID to pixel ID (1-based) More...
 
int getPixelID (unsigned pmtID, unsigned pmtPixelID) const
 Returns pixel ID (1-based) More...
 
void generateDecoupledPMTs (double fraction)
 Generate randomly a fraction of PMT's to be optically decoupled. More...
 
bool isPMTDecoupled (unsigned pmtID) const
 Checks if PMT is optically decoupled. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="PMT array geometry parameters") const override
 Print the content of the class. More...
 
void print (const std::string &title="PMT array displacement parameters") const override
 Print the content of the class. More...
 
 UnfoldedWindow (const ROOT::Math::XYVector &orig, const ROOT::Math::XYVector &dir, const ROOT::Math::XYVector &norm, const ROOT::Math::XYVector &slanted)
 constructor More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Prism geometry parameters") const override
 Print the content of the class. More...
 
void appendPeelOffRegion (unsigned ID, double fraction, double angle)
 Appends peel-off cookie region. More...
 
std::vector< std::pair< double, double > > getPeelOffContour (const PeelOffRegion &region) const
 Returns the x-y contour of the peel-off region. More...
 
void unfold () const
 Unfold prism exit window.
 
void reflect (const ROOT::Math::XYVector *points, const ROOT::Math::XYVector *normals, const ROOT::Math::XYVector &orig, const ROOT::Math::XYVector &surf, const ROOT::Math::XYVector &norm, const ROOT::Math::XYVector &slanted, int k, std::vector< UnfoldedWindow > &result) const
 Do unfolding. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB prism enclosure geometry parameters") const override
 Print the content of the class. More...
 
std::vector< std::pair< double, double > > getForwardContour () const
 Returns forward x-y contour. More...
 
void printForwardContour () const
 Print forward contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getInnerPanelContour () const
 Returns inner honeycomb panel x-y contour. More...
 
void printInnerPanelContour () const
 Print inner honeycomb panel contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getOuterPanelContour () const
 Returns outer honeycomb panel x-y contour. More...
 
void printOuterPanelContour () const
 Print outer honeycomb panel contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getBackwardContour () const
 Returns backward x-y contour. More...
 
void printBackwardContour () const
 Print backward contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getPrismEnclosureContour () const
 Returns prism enclosure wall x-y contour. More...
 
void printPrismEnclosureContour () const
 Print prism enclosure contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getBackPlateContour () const
 Returns prism enclosure back plate x-y contour. More...
 
void printBackPlateContour () const
 Print prism enclosure back plate contour (polygon) - for debugging.
 
std::vector< std::pair< double, double > > getFrontPlateContour () const
 Returns prism enclosure front plate x-y contour. More...
 
void printFrontPlateContour () const
 Print prism enclosure front plate contour (polygon) - for debugging.
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB geometry parameters") const override
 Print the content of the class. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
virtual void print (const std::string &title="QBB side rails geometry parameters") const override
 Print the content of the class. More...
 
void applyFilterTransmission (const TOPWavelengthFilter &filter)
 Multiplies quantum efficiency data points with filter transmission. More...
 
double getQE (double lambda) const
 Returns quantum efficiency at given photon wavelength using linear interpolation. More...
 
double getMinLambda () const
 Returns wavelength of the first nonzero QE data point. More...
 
double getMaxLambda () const
 Returns wavelength of the last nonzero QE data point. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Nominal quantum efficiency") const override
 Print the content of the class. More...
 
 TOPNominalTDC (int numWindows, int subBits, double syncTimeBase, int numofBunches, double offset, double pileupTime, double doubleHitResolution, double timeJitter, double efficiency, const std::string &name="TOPNominalTDC")
 Useful constructor (new xml file version) More...
 
int getTDCcount (double time) const
 Converts time to TDC count. More...
 
int getSample (double time) const
 Converts time to sample number. More...
 
bool isSampleValid (int sample) const
 Check for the validity of sample number. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Nominal time-to-digit conversion parameters") const override
 Print the content of the class. More...
 
void appendGaussian (double norm, double mean, double sigma)
 Append Gaussian. More...
 
double normalize ()
 Normalize the distribution (fractions) More...
 
double generateTTS () const
 Generate time according to TTS distribution. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Nominal TTS distribution") const override
 Print the content of the class. More...
 
void print () const
 Print the class content.
 
const std::vector< float > & getQE (unsigned pmtPixel) const
 Returns quantum efficiency data points for a given pixel. More...
 
double getQE (unsigned pmtPixel, double lambda) const
 Returns quantum efficiency for a given pixel and wavelength, using linear interpolation. More...
 
const std::vector< float > & getEnvelopeQE () const
 Returns envelope quantum efficiency data points (maximum over pixels) More...
 
double getEnvelopeQE (double lambda) const
 Returns envelope quantum efficiency for a given wavelength (maximum over pixels), using linear interpolation. More...
 
double getEfficiency (unsigned pmtPixel, double lambda, bool BfieldOn) const
 Returns quantum times collection efficiency for a given pixel and wavelength, using linear interpolation. More...
 
double getCE (bool BfieldOn) const
 Returns collection efficiency. More...
 
double getLambdaLast () const
 Returns wavelenght of the last data point (maximal of pixels) More...
 
double getLambdaLast (unsigned pmtPixel) const
 Returns wavelenght of the last data point for a given pixel. More...
 
void setEnvelopeQE () const
 Sets envelope quantum efficiency.
 
double interpolate (double lambda, const std::vector< float > &QE) const
 Interpolate between QE datapoints (linear interpolation). More...
 
void setTimeAxis (double syncTimeBase)
 Sets equidistant time axis (uncalibrated). More...
 
void setTimeAxis (const std::vector< double > &sampleTimes, double syncTimeBase)
 Sets time axis from calibration data and switches status to calibrated. More...
 
std::vector< double > getTimeAxis () const
 Returns time axis (sample times) More...
 
double getFullTime (int window, double sample) const
 Returns time with respect to sample 0 of window 0. More...
 
double getSample (int window, double time) const
 Returns sample with respect to sample 0 of the specified ASIC window (inverse of getTime). More...
 
double getTimeBin (int window, int sampleNumber) const
 Returns time bin of a given sample number and window (e.g. More...
 
 TOPSignalShape (std::vector< double > shape, double timeBin, double tau, double pole1, double pole2)
 Full constructor. More...
 
double getValue (double t) const
 Returns value at time t of the normalized waveform using interpolator. More...
 
double getPeakingTime () const
 Returns peaking time of the signal. More...
 
float getBulkTransmittance (double lambda) const
 Returns bulk transmittance at given wavelength using linear interpolation. More...
 
bool isConsistent () const override
 Check for consistency of data members. More...
 
void print (const std::string &title="Wavelength filter bulk transmittance") const override
 Print the content of the class. More...
 

Variables

static double s_unit = Unit::cm
 conversion unit for length
 
static std::string s_unitName
 conversion unit name
 

Detailed Description

Function Documentation

◆ append()

void append ( unsigned  scrodID,
unsigned  channel,
const std::vector< double > &  sampleTimes,
bool  replace = true 
)

Appends calibration of a single ASIC channel.

Parameters
scrodIDSCROD ID
channelchannel number within SCROD (0 - 127)
sampleTimesvector of 256 elements (at least) defining time axis
replacereplace or not if constants for this scrod/channel are already in

Definition at line 24 of file TOPCalTimebase.cc.

27  {
28  // sanitary checks for NaN's
29  for (double t : sampleTimes) {
30  if (isnan(t)) {
31  B2ERROR("TOPCalTimebase::append: sampleTimes contain NaN's - constants rejected."
32  << LogVar("scrodID", scrodID)
33  << LogVar("channel", channel));
34  return;
35  }
36  }
37 
38  // append
39  unsigned key = (scrodID << 16) + (channel % 128);
40  Iterator it = m_map.find(key);
41  if (it == m_map.end()) { // constants not appended yet
42  m_sampleTimes.push_back(TOPSampleTimes(scrodID, channel, m_syncTimeBase));
43  m_sampleTimes.back().setTimeAxis(sampleTimes, m_syncTimeBase);
44  m_map[key] = m_sampleTimes.size() - 1;
45  } else { // constants already there
46  if (replace) {
47  m_sampleTimes[it->second].setTimeAxis(sampleTimes, m_syncTimeBase);
48  B2WARNING("TOPCalTimebase::append: constants replaced."
49  << LogVar("scrodID", scrodID)
50  << LogVar("channel", channel));
51  } else {
52  B2WARNING("TOPCalTimebase::append old constants kept."
53  << LogVar("scrodID", scrodID)
54  << LogVar("channel", channel));
55  }
56  }
57 
58  }
double m_syncTimeBase
synchronization time base (width of 2 ASIC windows)
std::vector< TOPSampleTimes > m_sampleTimes
calibration constants
std::map< unsigned, size_t > m_map
cache for a map
Class to store variables with their name which were sent to the logging service.
map< unsigned, size_t >::const_iterator Iterator
Iteratior for m_map.

◆ appendContour()

void appendContour ( std::vector< std::pair< double, double > > &  contour,
double  y0,
bool  fromLeftToRight 
) const

Appends curved surface to contour.

Parameters
contour2D contour
y0offset in y0
fromLeftToRightif true, going from left to right otherwise oposite

Definition at line 21 of file TOPGeoHoneycombPanel.cc.

24  {
25  if (m_N <= 0) return;
26 
27  typedef std::pair<double, double> Pair;
28 
29  double R = getRadius();
30  double yc = getMaxThickness() - getMinThickness() - R;
31  double x0 = sqrt(R * R - yc * yc);
32  if (!fromLeftToRight) x0 = -x0;
33  double dx = 2.0 * x0 / m_N;
34  double x = -x0;
35  contour.push_back(Pair(x, y0));
36  for (int i = 1; i < m_N; i++) {
37  x += dx;
38  double y = y0 + sqrt(R * R - x * x) + yc;
39  contour.push_back(Pair(x, y));
40  }
41  contour.push_back(Pair(x0, y0));
42 
43  }
double R
typedef autogenerated by FFTW
int m_N
number of flat surfaces to approximate curved surface
double getMaxThickness() const
Returns panel maximal thickness.
double getMinThickness() const
Returns panel minimal thickness.
double getRadius() const
Returns radius of curved surface.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
std::pair< double, double > Pair
Shorthand for std::pair<double, double>

◆ appendGaussian()

void appendGaussian ( double  norm,
double  mean,
double  sigma 
)

Append Gaussian.

Parameters
normnormalization (area)
meanmean value [ns]
sigmasigma (width) [ns]

Definition at line 22 of file TOPNominalTTS.cc.

23  {
24  if (norm <= 0) {
25  B2ERROR("TOPNominalTTS::appendGaussian: normalization is non-positive number");
26  return;
27  }
28  Gauss gauss;
29  gauss.fraction = norm;
30  gauss.position = mean;
31  gauss.sigma = sigma;
32  m_tts.push_back(gauss);
33  m_normalized = false;
34  }
bool m_normalized
normalization flag
std::vector< Gauss > m_tts
TTS distribution composed of a sum of Gaussians.

◆ appendModule()

void appendModule ( const TOPGeoModule module)

Appends module (if its ID differs from already appended modules)

Parameters
modulemodule geometry parameters

Definition at line 22 of file TOPGeometry.cc.

23  {
24  if (isModuleIDValid(module.getModuleID())) {
25  B2ERROR("TOPGeometry::appendModule: module already appended."
26  << LogVar("ID", module.getModuleID()));
27  return;
28  }
29  m_modules.push_back(module);
30  }
std::vector< TOPGeoModule > m_modules
geometry parameters of modules
Definition: TOPGeometry.h:283
bool isModuleIDValid(int moduleID) const
Checks if module exists in m_modules.
Definition: TOPGeometry.cc:33

◆ appendPeelOffRegion()

void appendPeelOffRegion ( unsigned  ID,
double  fraction,
double  angle 
)

Appends peel-off cookie region.

Parameters
IDregion ID (1-based)
fractionfraction of the area
angleangle of the area

Definition at line 94 of file TOPGeoPrism.cc.

95  {
96  for (const auto& region : m_peelOffRegions) {
97  if (region.ID == ID) {
98  B2ERROR("TOPGeoPrism::appendPeelOffRegion: region already appended."
99  << LogVar("region ID", ID));
100  return;
101  }
102  }
103  PeelOffRegion region;
104  region.ID = ID;
105  region.fraction = fraction;
106  region.angle = angle;
107  double halfSize = (getWidth() - getPeelOffSize()) / 2;
108  if (fabs(getPeelOffCenter(region)) > halfSize) {
109  B2ERROR("TOPGeoPrism::appendPeelOffRegion: region doesn't fit into prism."
110  << LogVar("region ID", ID));
111  return;
112  }
113  m_peelOffRegions.push_back(region);
114  }
double getWidth() const
Returns bar segment width.
double getPeelOffCenter(const PeelOffRegion &region) const
Returns peel-off offset in x of the given region.
Definition: TOPGeoPrism.h:198
std::vector< PeelOffRegion > m_peelOffRegions
peel-off regions
Definition: TOPGeoPrism.h:284
double getPeelOffSize() const
Returns cookie size in x (corresponding to 2x2 PMT)
Definition: TOPGeoPrism.h:173

◆ applyFilterTransmission()

void applyFilterTransmission ( const TOPWavelengthFilter filter)

Multiplies quantum efficiency data points with filter transmission.

Parameters
filterwavelength filter

Definition at line 21 of file TOPNominalQE.cc.

22  {
23  for (size_t i = 0; i < m_QE.size(); i++) {
24  double lambda = m_lambdaFirst + m_lambdaStep * i;
25  m_QE[i] *= filter.getBulkTransmittance(lambda);
26  }
27  }
std::vector< float > m_QE
QE data points.
Definition: TOPNominalQE.h:168
float m_lambdaStep
wavelength step [nm]
Definition: TOPNominalQE.h:166
float m_lambdaFirst
wavelength of the first data point [nm]
Definition: TOPNominalQE.h:165
std::map< ExpRun, std::pair< double, double > > filter(const std::map< ExpRun, std::pair< double, double >> &runs, double cut, std::map< ExpRun, std::pair< double, double >> &runsRemoved)
filter events to remove runs shorter than cut, it stores removed runs in runsRemoved
Definition: Splitter.cc:38

◆ areAllPrecise()

bool areAllPrecise ( double  spatialPrecision,
double  angularPrecision 
) const

Returns true if calibration precision for all modules is within specified values.

Parameters
spatialPrecisionprecision for displacements
angularPrecisionprecision for rotations

Definition at line 268 of file TOPCalModuleAlignment.cc.

270  {
271  for (int i = 0; i < c_numModules; i++) {
272  if (m_errAlpha[i] > angularPrecision) return false;
273  if (m_errBeta[i] > angularPrecision) return false;
274  if (m_errGamma[i] > angularPrecision) return false;
275  if (m_errX[i] > spatialPrecision) return false;
276  if (m_errY[i] > spatialPrecision) return false;
277  if (m_errZ[i] > spatialPrecision) return false;
278  }
279  return true;
280  }
float m_errGamma[c_numModules]
error on gamma
float m_errX[c_numModules]
error on the x displacement
float m_errBeta[c_numModules]
error on beta
float m_errY[c_numModules]
error on the y displacement
float m_errZ[c_numModules]
error on the z displacement
float m_errAlpha[c_numModules]
error on alpha

◆ constructContour()

void constructContour ( double  A,
double  B,
double  fraction,
double  angle,
std::vector< std::pair< double, double > > &  contour 
) const
protected

Construct a 2D contour.

Parameters
Adimension in x
Bdimension in y
fractionsurface fraction
angleangle
contourclock-wise polygon to return

Definition at line 70 of file TOPGeoBarSegment.cc.

72  {
73  if (fraction <= 0.) {
74  return;
75  }
76  if (fraction >= 1.) {
77  contour.push_back(Pair(-A, B));
78  contour.push_back(Pair(A, B));
79  contour.push_back(Pair(A, -B));
80  contour.push_back(Pair(-A, -B));
81  return;
82  }
83 
84  double alpha0 = atan(B / A);
85  double halfPi = alpha0 > 0 ? M_PI / 2 : -M_PI / 2;
86  int quadrant = 0;
87  while (fabs(angle) > alpha0) {
88  angle -= halfPi;
89  alpha0 = M_PI / 2 - alpha0;
90  double a = A;
91  A = B;
92  B = a;
93  quadrant++;
94  }
95  quadrant = quadrant % 4;
96  if (halfPi < 0) quadrant = (4 - quadrant) % 4;
97 
98  double tanAngle = tan(fabs(angle));
99  double S0 = A / B * tanAngle / 2;
100  if (fraction <= S0) {
101  double x = sqrt(8 * A * B * fraction / tanAngle);
102  double y = x * tanAngle;
103  if (angle > 0) {
104  contour.push_back(Pair(-A, B - y));
105  contour.push_back(Pair(-A, B));
106  contour.push_back(Pair(-A + x, B));
107  } else {
108  contour.push_back(Pair(A, B - y));
109  contour.push_back(Pair(A - x, B));
110  contour.push_back(Pair(A, B));
111  }
112  } else if (1 - fraction <= S0) {
113  double x = sqrt(8 * A * B * (1 - fraction) / tanAngle);
114  double y = x * tanAngle;
115  if (angle > 0) {
116  contour.push_back(Pair(A, -B + y));
117  contour.push_back(Pair(A - x, -B));
118  contour.push_back(Pair(-A, -B));
119  contour.push_back(Pair(-A, B));
120  contour.push_back(Pair(A, B));
121  } else {
122  contour.push_back(Pair(-A + x, -B));
123  contour.push_back(Pair(-A, -B + y));
124  contour.push_back(Pair(-A, B));
125  contour.push_back(Pair(A, B));
126  contour.push_back(Pair(A, -B));
127  }
128  } else {
129  double y = (1 - 2 * fraction) * B;
130  double dy = angle > 0 ? A * tanAngle : -A * tanAngle;
131  contour.push_back(Pair(-A, y - dy));
132  contour.push_back(Pair(-A, B));
133  contour.push_back(Pair(A, B));
134  contour.push_back(Pair(A, y + dy));
135  }
136 
137  switch (quadrant) {
138  case 0:
139  break;
140  case 1:
141  for (auto& point : contour) {
142  double x = -point.second;
143  double y = point.first;
144  point.first = x;
145  point.second = y;
146  }
147  break;
148  case 2:
149  for (auto& point : contour) {
150  double x = -point.first;
151  double y = -point.second;
152  point.first = x;
153  point.second = y;
154  }
155  break;
156  case 3:
157  for (auto& point : contour) {
158  double x = point.second;
159  double y = -point.first;
160  point.first = x;
161  point.second = y;
162  }
163  break;
164  default:
165  B2ERROR("TOPGeoBarSegment::constructContour: bug!");
166  }
167 
168  }
double atan(double a)
atan for double
Definition: beamHelpers.h:34
double tan(double a)
tan for double
Definition: beamHelpers.h:31

◆ copyContent()

void copyContent ( const TH1F *  input,
TH2F &  output 
)
private

Copy content of 1D histogram into 2D histogram.

Parameters
input1D histogram
output2D histogram

Definition at line 51 of file TOPCalPhotonYields.cc.

52  {
53  for (int bin = 1; bin <= input->GetNbinsX(); bin++) {
54  int row = (bin - 1) / 64 + 1;
55  int col = (bin - 1) % 64 + 1;
56  output.SetBinContent(col, row, input->GetBinContent(bin));
57  output.SetBinError(col, row, input->GetBinError(bin));
58  }
59  }

◆ exportPmtTTSHisto()

void exportPmtTTSHisto ( std::string  outFileName = "RetrievedHistos.root")

Example of exporting TTS histograms.

Parameters
outFileNamename of the root file where data will be saved

Definition at line 1219 of file TOPDatabaseImporter.cc.

1220  {
1221 
1222  // this is just an example on how to retrieve TTS histograms
1223  DBArray<TOPPmtTTSHisto> elements("TOPPmtTTSHistos");
1224 
1225  TFile file(outFileName.c_str(), "recreate");
1226 
1227  // prints serialNum of PMTs and hv setting used, and saves TTS histograms to root file
1228  for (const auto& element : elements) {
1229 
1230  B2INFO("serialNum = " << element.getSerialNumber() << ", HV = " << element.getHV());
1231  for (int ic = 0; ic < element.getNumOfPixels(); ic++) {
1232  const auto* ttsHisto = element.getHistogram(ic + 1);
1233  if (ttsHisto) ttsHisto->Write();
1234  }
1235  }
1236 
1237  file.Close();
1238 
1239  return;
1240  }

◆ generateDecoupledPMTs()

void generateDecoupledPMTs ( double  fraction)

Generate randomly a fraction of PMT's to be optically decoupled.

Parameters
fractiondecoupled fraction

Definition at line 74 of file TOPGeoPMTArray.cc.

75  {
76  if (fraction <= 0) return;
77 
78  for (unsigned i = 0; i < getSize(); i++) {
79  if (gRandom->Rndm() < fraction) setDecoupledPMT(i + 1);
80  }
81 
82  }
void setDecoupledPMT(unsigned pmtID)
Sets PMT as optically decoupled.
unsigned getSize() const
Returns array size.

◆ generateFakeChannelMask()

void generateFakeChannelMask ( double  fractionDead,
double  fractionHot,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Generate and import a (random, fake) channel mask for testing.

Parameters
fractionDeadthe fraction of dead PMs to randomly assign
fractionHotthe fraction of noisy PMs to randomly assign
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 673 of file TOPDatabaseImporter.cc.

◆ generateTTS()

double generateTTS ( ) const

Generate time according to TTS distribution.

Returns
time [ns]

Definition at line 46 of file TOPNominalTTS.cc.

◆ getActivePixels()

const TH2F * getActivePixels ( int  slot) const

Returns a 2D histogram of active pixels.

Parameters
slotslot ID
Returns
pixel image of active pixels (nullptr if N/A)

Definition at line 86 of file TOPCalPhotonYields.cc.

◆ getAlpha()

double getAlpha ( int  moduleID) const

Gets the angle alpha on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
alpha rotation angle around x

Definition at line 119 of file TOPCalModuleAlignment.cc.

◆ getAlphaErr()

double getAlphaErr ( int  moduleID) const

Returns the error on alpha on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errAlpha error on the alpha angle

Definition at line 179 of file TOPCalModuleAlignment.cc.

◆ getAlphaRatio()

const TH2F * getAlphaRatio ( int  slot) const

Returns a 2D histogram of equalized pixel alpha ratio.

For optically well coupled pixels this ratio is around 1 and it is around 0.5 for those which are not.

Parameters
slotslot ID
Returns
pixel image of alpha ratio (nullptr if N/A)

Definition at line 78 of file TOPCalPhotonYields.cc.

◆ getBackgroundYields()

const TH2F * getBackgroundYields ( int  slot) const

Returns a 2D histogram of background pixel yields.

These are inefficiency corrected number of background hits per track in a pixel.

Parameters
slotslot ID
Returns
pixel image of photon yields (nullptr if N/A)

Definition at line 70 of file TOPCalPhotonYields.cc.

◆ getBackPlateContour()

std::vector< std::pair< double, double > > getBackPlateContour ( ) const

Returns prism enclosure back plate x-y contour.

Returns
polygon

Definition at line 174 of file TOPGeoQBB.cc.

175  {
176  typedef std::pair<double, double> Pair;
177  std::vector<Pair> contour;
178 
179  double x1 = getWidth() / 2;
180  double x2 = x1 - m_prismEnclosure.getHeight() * tan(m_prismEnclosure.getAngle());
181  double y1 = m_outerPanel.getY() + m_outerPanel.getMinThickness();
182  double y2 = y1 - m_sideRails.getHeight();
183  double y3 = y2 - m_prismEnclosure.getHeight();
184  contour.push_back(Pair(-x1, y1));
185  contour.push_back(Pair(x1, y1));
186  contour.push_back(Pair(x1, y2));
187  contour.push_back(Pair(x2, y3));
188  contour.push_back(Pair(-x2, y3));
189  contour.push_back(Pair(-x1, y2));
190 
191  return contour;
192  }
double getY() const
Returns y position of the flat surface in local (bar) frame.
double getHeight() const
Returns height up to the side rails.
double getAngle() const
Returns angle of side wall.
double getWidth() const
Returns full width.
Definition: TOPGeoQBB.h:102
TOPGeoPrismEnclosure m_prismEnclosure
prism enclosure
Definition: TOPGeoQBB.h:274
TOPGeoHoneycombPanel m_outerPanel
outer honeycomb panel
Definition: TOPGeoQBB.h:272
TOPGeoSideRails m_sideRails
side rails
Definition: TOPGeoQBB.h:273
double getHeight() const
Returns height.

◆ getBackwardContour()

std::vector< std::pair< double, double > > getBackwardContour ( ) const

Returns backward x-y contour.

Returns
polygon

Definition at line 106 of file TOPGeoQBB.cc.

◆ getBackwardZ()

double getBackwardZ ( void  ) const

Returns backward z of the volume devoted to TOP counter.

Returns
minimal z

Definition at line 102 of file TOPGeometry.cc.

◆ getBeta()

double getBeta ( int  moduleID) const

Gets the angle beta on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
beta rotation angle around y

Definition at line 129 of file TOPCalModuleAlignment.cc.

◆ getBetaErr()

double getBetaErr ( int  moduleID) const

Returns the error on beta on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errBeta error on the beta angle

Definition at line 189 of file TOPCalModuleAlignment.cc.

◆ getBulkTransmittance()

float getBulkTransmittance ( double  lambda) const

Returns bulk transmittance at given wavelength using linear interpolation.

Parameters
lambdaphoton wavelength in [nm]
Returns
bulk transmittance

Definition at line 21 of file TOPWavelengthFilter.cc.

22  {
23  if (m_transmittances.empty()) return 1; // old payload from DB (filter included in QE)
24 
25  double dlam = lambda - m_lambdaFirst;
26  if (dlam < 0) return 0;
27  if (dlam > (m_transmittances.size() - 1) * m_lambdaStep) return m_transmittances.back();
28  unsigned i = int(dlam / m_lambdaStep);
29  if (i > m_transmittances.size() - 2) return m_transmittances.back();
30  return m_transmittances[i] + (m_transmittances[i + 1] - m_transmittances[i]) / m_lambdaStep * (dlam - i * m_lambdaStep);
31  }
float m_lambdaStep
wavelength step [nm]
std::vector< float > m_transmittances
bulk transmittance data points
float m_lambdaFirst
wavelength of the first data point [nm]

◆ getCE()

double getCE ( bool  BfieldOn) const

Returns collection efficiency.

Parameters
BfieldOntrue for magnetic field being ON
Returns
collection efficiency

Definition at line 59 of file TOPPmtQE.cc.

60  {
61  if (BfieldOn) {
62  return m_CE_withB;
63  } else {
64  return m_CE_noB;
65  }
66  }
float m_CE_withB
relative collection efficiency, with B field
Definition: TOPPmtQE.h:160
float m_CE_noB
relative collection efficiency, without B field
Definition: TOPPmtQE.h:159

◆ getColumn()

unsigned getColumn ( unsigned  pmtID) const

Converts PMT ID to column number (1-based)

Parameters
pmtIDPMT ID (1-based)
Returns
column number or 0 for invalid PMT ID

Definition at line 34 of file TOPGeoPMTArray.cc.

◆ getEfficiency()

double getEfficiency ( unsigned  pmtPixel,
double  lambda,
bool  BfieldOn 
) const

Returns quantum times collection efficiency for a given pixel and wavelength, using linear interpolation.

Parameters
pmtPixelpmtPixel number (1-based)
lambdawavelength in [nm]
BfieldOntrue for magnetic field being ON
Returns
quantum efficiency

Definition at line 50 of file TOPPmtQE.cc.

◆ getEnvelopeQE() [1/2]

const std::vector< float > & getEnvelopeQE ( ) const

Returns envelope quantum efficiency data points (maximum over pixels)

Returns
envelope quantum efficiency data points

Definition at line 38 of file TOPPmtQE.cc.

◆ getEnvelopeQE() [2/2]

double getEnvelopeQE ( double  lambda) const

Returns envelope quantum efficiency for a given wavelength (maximum over pixels), using linear interpolation.

Parameters
lambdawavelength in [nm]
Returns
quantum efficiency

Definition at line 44 of file TOPPmtQE.cc.

◆ getForwardContour()

std::vector< std::pair< double, double > > getForwardContour ( ) const

Returns forward x-y contour.

Returns
polygon

Definition at line 21 of file TOPGeoQBB.cc.

◆ getForwardZ()

double getForwardZ ( void  ) const

Returns forward z of the volume devoted to TOP counter.

Returns
maximal z

Definition at line 114 of file TOPGeometry.cc.

◆ getFrontPlateContour()

std::vector< std::pair< double, double > > getFrontPlateContour ( ) const

Returns prism enclosure front plate x-y contour.

Returns
polygon

Definition at line 203 of file TOPGeoQBB.cc.

◆ getFullTime()

double getFullTime ( int  window,
double  sample 
) const

Returns time with respect to sample 0 of window 0.

Note: sample is float - digits that follow the decimal point are used to interpolate the time btw. two samples

Parameters
windowASIC window number
samplesample counted from the first one in the specified ASIC window
Returns
time in [ns]

Definition at line 58 of file TOPSampleTimes.cc.

59  {
60 
61  int sampleNum = int(sample);
62  if (sample < 0) sampleNum--;
63  double frac = sample - sampleNum;
64 
65  sampleNum += window * c_WindowSize; // counted from window 0
66  int n = sampleNum / c_TimeAxisSize;
67  int k = sampleNum % c_TimeAxisSize;
68  if (k < 0) {
69  n--;
70  k += c_TimeAxisSize;
71  }
72 
73  double time = n * getTimeRange() + m_timeAxis[k]; // from sample 0 window 0
74  time += (m_timeAxis[k + 1] - m_timeAxis[k]) * frac; // add fraction
75 
76  return time;
77  }
float m_timeAxis[c_TimeAxisSize+1]
time axis + right border point
double getTimeRange() const
Returns time axis range (time interval corresponding to 4 asic windows)

◆ getGamma()

double getGamma ( int  moduleID) const

Gets the angle gamma on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
gamma rotation angle around z

Definition at line 139 of file TOPCalModuleAlignment.cc.

◆ getGammaErr()

double getGammaErr ( int  moduleID) const

Returns the error on gamma on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errGamma error on the gamma angle

Definition at line 199 of file TOPCalModuleAlignment.cc.

◆ getInnerPanelContour()

std::vector< std::pair< double, double > > getInnerPanelContour ( ) const

Returns inner honeycomb panel x-y contour.

Returns
polygon

Definition at line 54 of file TOPGeoQBB.cc.

◆ getInnerRadius()

double getInnerRadius ( ) const

Returns inner radius of the volume devoted to TOP counter.

Returns
inner radius

Definition at line 64 of file TOPGeometry.cc.

◆ getLambdaLast() [1/2]

double getLambdaLast ( ) const

Returns wavelenght of the last data point (maximal of pixels)

Returns
wavelength in [nm]

Definition at line 68 of file TOPPmtQE.cc.

◆ getLambdaLast() [2/2]

double getLambdaLast ( unsigned  pmtPixel) const

Returns wavelenght of the last data point for a given pixel.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
wavelength in [nm]

Definition at line 78 of file TOPPmtQE.cc.

◆ getMaxLambda()

double getMaxLambda ( ) const

Returns wavelength of the last nonzero QE data point.

Returns
wavelength of the last nonzero QE data point

Definition at line 49 of file TOPNominalQE.cc.

◆ getMinLambda()

double getMinLambda ( ) const

Returns wavelength of the first nonzero QE data point.

Returns
wavelength of the first nonzero QE data point

Definition at line 40 of file TOPNominalQE.cc.

◆ getModule()

const TOPGeoModule & getModule ( int  moduleID) const

Returns module.

Parameters
moduleIDvalid module ID (1-based)
Returns
module geometry parameters

Definition at line 42 of file TOPGeometry.cc.

◆ getMuonZ()

const TH1F * getMuonZ ( int  slot) const

Returns z distribution of tracks used to determine pixel yields.

Parameters
slotslot ID
Returns
z distribution in local frame (nullptr if N/A)

Definition at line 102 of file TOPCalPhotonYields.cc.

◆ getNumOf() [1/2]

int getNumOf ( EStatus  check) const
private

Counts and returns the number of channels having a given status.

Parameters
checkstatus to be checked
Returns
number of channels of this status

Definition at line 99 of file TOPCalChannelMask.cc.

100  {
101  int n = 0;
102  for (const auto& statuses : m_status) {
103  for (const auto status : statuses) {
104  if (status == check) n++;
105  }
106  }
107  return n;
108  }
EStatus m_status[c_numModules][c_numChannels]
channel status
bool check(const int module, const unsigned channel) const
Check input module and channel arguments are sane.

◆ getNumOf() [2/2]

int getNumOf ( EStatus  check,
int  moduleID 
) const
private

Counts and returns the number of channels od a module having a given status.

Parameters
checkstatus to be checked
moduleIDmodule (slot) ID (1-based)
Returns
number of channels of this status

Definition at line 110 of file TOPCalChannelMask.cc.

◆ getOptimizedOffset()

unsigned getOptimizedOffset ( const std::vector< unsigned > &  values,
const std::vector< unsigned > &  errors,
unsigned  maxDif,
unsigned  maxErr 
)
private

Return the offset that can allow for the maximal number of good pedestal samples.

Parameters
valuespedestal values
errorspedestal errors
maxDifmaximal number that can be stored in c_Bits
maxErrmaximal number that can be stored in 16 - c_Bits
Returns
offset value

Definition at line 65 of file TOPASICPedestals.cc.

69  {
70 
71  std::set<unsigned> sortedValues;
72  for (unsigned i = 0; i < values.size(); i++) {
73  if (errors[i] > maxErr) continue;
74  sortedValues.insert(values[i]);
75  }
76 
77  unsigned nprev = sortedValues.size();
78  unsigned nl = 0;
79  for (auto it = sortedValues.begin(); it != sortedValues.end(); ++it) {
80  unsigned nr = 0;
81  for (auto back = sortedValues.crbegin(); *back - *it > maxDif; ++back) {
82  nr++;
83  }
84  unsigned nbad = nl + nr;
85  if (nbad == 0) return *it;
86  if (nbad >= nprev) return *(--it);
87  nprev = nbad;
88  nl++;
89  }
90 
91  return *sortedValues.begin();
92 
93  }

◆ getOuterPanelContour()

std::vector< std::pair< double, double > > getOuterPanelContour ( ) const

Returns outer honeycomb panel x-y contour.

Returns
polygon

Definition at line 80 of file TOPGeoQBB.cc.

◆ getOuterRadius()

double getOuterRadius ( void  ) const

Returns outer radius of the volume devoted to TOP counter.

Returns
outer radius

Definition at line 77 of file TOPGeometry.cc.

◆ getPDETuningFactor()

double getPDETuningFactor ( unsigned  type) const

Returns photon detection efficiency tuning factor of a given PMT type.

Parameters
typePMT type
Returns
tuning factor

Definition at line 57 of file TOPGeometry.cc.

◆ getPeakingTime()

double getPeakingTime ( ) const

Returns peaking time of the signal.

Returns
peaking time [ns]

Definition at line 93 of file TOPSignalShape.cc.

94  {
95  if (m_peakTime == 0) {
96  double t1 = 0;
97  double t2 = 1;
98  while (getValue(t2) > 0.5) t2 += 1;
99  for (int i = 0; i < 20; i++) {
100  double t = (t1 + t2) / 2;
101  if (m_interpolator->Derivative(t) > 0) {
102  t1 = t;
103  } else {
104  t2 = t;
105  }
106  }
107  m_peakTime = (t1 + t2) / 2;
108  }
109 
110  return m_peakTime;
111  }
double m_peakTime
do not write out
TSpline5 * m_interpolator
cache for the interpolator
double getValue(double t) const
Returns value at time t of the normalized waveform using interpolator.

◆ getPeelOffContour()

std::vector< Pair > getPeelOffContour ( const PeelOffRegion region) const

Returns the x-y contour of the peel-off region.

Parameters
regionpeel-off region
Returns
clock-wise polygon

Definition at line 118 of file TOPGeoPrism.cc.

◆ getPhotonYields()

const TH2F * getPhotonYields ( int  slot) const

Returns a 2D histogram of photon pixel yields.

These are background subtracted and inefficiency corrected number of photons per track in a pixel.

Parameters
slotslot ID
Returns
pixel image of photon yields (nullptr if N/A)

Definition at line 62 of file TOPCalPhotonYields.cc.

◆ getPixelColumn()

unsigned getPixelColumn ( double  x) const

Converts x-coordinate to pixel column (1-based)

Parameters
xcoordinate
Returns
pixel column or 0 if x outside sensitive area

Definition at line 21 of file TOPGeoPMT.cc.

22  {
23  x *= s_unit;
24  if (fabs(x) >= m_sensSizeX / 2) return 0;
25  return m_numColumns - int((x + m_sensSizeX / 2) / m_sensSizeX * m_numColumns);
26  }
unsigned m_numColumns
number of pixel columns
Definition: TOPGeoPMT.h:317
float m_sensSizeX
sensitive volume (photo-cathode) size in x
Definition: TOPGeoPMT.h:314
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86

◆ getPixelID() [1/3]

unsigned getPixelID ( double  x,
double  y 
) const

Converts x and y coordinates to PMT pixel ID (1-based)

Parameters
xcoordinate
ycoordinate
Returns
pixel ID or 0 if x or y outside sensitive area

Definition at line 36 of file TOPGeoPMT.cc.

◆ getPixelID() [2/3]

int getPixelID ( double  x,
double  y,
unsigned  pmtID 
) const

Converts (digitizes) x, y and PMT ID to pixel ID (1-based)

Parameters
xcoordinate in PMT local frame
ycoordinate in PMT local frame
pmtIDPMT ID (1-based)
Returns
pixel ID or 0 if (x,y) outside sensitive area or pmtID invalid

Definition at line 40 of file TOPGeoPMTArray.cc.

◆ getPixelID() [3/3]

int getPixelID ( unsigned  pmtID,
unsigned  pmtPixelID 
) const

Returns pixel ID (1-based)

Parameters
pmtIDPMT ID (1-based)
pmtPixelIDPMT pixel ID (1-based)
Returns
pixel ID or 0 for invalid input ID's

Definition at line 58 of file TOPGeoPMTArray.cc.

◆ getPixelRow()

unsigned getPixelRow ( double  y) const

Converts y-coordinate to pixel row (1-based)

Parameters
ycoordinate
Returns
pixel row or 0 if y outside sensitive area

Definition at line 29 of file TOPGeoPMT.cc.

◆ getPmtID()

unsigned getPmtID ( unsigned  row,
unsigned  col 
) const

Converts row and column numbers to PMT ID (1-based)

Parameters
rowrow number (1-based)
colcolumn number (1-based)
Returns
PMT ID or 0 for invalid row or column

Definition at line 21 of file TOPGeoPMTArray.cc.

◆ getPrismEnclosureContour()

std::vector< std::pair< double, double > > getPrismEnclosureContour ( ) const

Returns prism enclosure wall x-y contour.

Returns
polygon

Definition at line 139 of file TOPGeoQBB.cc.

◆ getPulseHeights()

const TH2F * getPulseHeights ( int  slot) const

Returns a 2D histogram of pixel pulse-heights.

Parameters
slotslot ID
Returns
pixel pulse-heights (nullptr if N/A)

Definition at line 94 of file TOPCalPhotonYields.cc.

◆ getQE() [1/3]

double getQE ( double  lambda) const

Returns quantum efficiency at given photon wavelength using linear interpolation.

Parameters
lambdaphoton wavelength in [nm]
Returns
quantum efficiency

Definition at line 30 of file TOPNominalQE.cc.

◆ getQE() [2/3]

const std::vector< float > & getQE ( unsigned  pmtPixel) const

Returns quantum efficiency data points for a given pixel.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
quantum efficiency data points (empty vector for invalid pixel)

Definition at line 21 of file TOPPmtQE.cc.

◆ getQE() [3/3]

double getQE ( unsigned  pmtPixel,
double  lambda 
) const

Returns quantum efficiency for a given pixel and wavelength, using linear interpolation.

Parameters
pmtPixelpmtPixel number (1-based)
lambdawavelength in [nm]
Returns
quantum efficiency

Definition at line 31 of file TOPPmtQE.cc.

◆ getRadius()

double getRadius ( ) const

Returns average radius of modules.

Returns
radius

Definition at line 91 of file TOPGeometry.cc.

◆ getReflectivity()

double getReflectivity ( const GeoOpticalSurface surface,
double  energy 
) const

Returns reflectivity of optical surface at given photon energy.

Parameters
surfaceoptical surface parameters
energyphoton energy in [eV]

Definition at line 72 of file TOPGeoBase.cc.

73  {
74  energy *= Unit::eV;
75  if (surface.hasProperties()) {
76  for (const auto& property : surface.getProperties()) {
77  if (property.getName() == "REFLECTIVITY") {
78  auto energies = property.getEnergies();
79  auto values = property.getValues();
80  if (energies.size() < 2) return 0;
81  if (energy < energies[0] or energy > energies.back()) {
82  B2WARNING("TOPGeoBase::getReflectivity: photon energy out of range - return value not reliable");
83  }
84  auto spline = TSpline3("tmp", energies.data(), values.data(), energies.size());
85  return spline.Eval(energy);
86  }
87  }
88  }
89 
90  B2ERROR("Optical surface " << surface.getName() << " has no property REFLECTIVITY");
91  return 0;
92  }
static const double eV
[electronvolt]
Definition: Unit.h:112

◆ getRow()

unsigned getRow ( unsigned  pmtID) const

Converts PMT ID to row number (1-based)

Parameters
pmtIDPMT ID (1-based)
Returns
row number or 0 for invalid PMT ID

Definition at line 28 of file TOPGeoPMTArray.cc.

◆ getSample() [1/2]

int getSample ( double  time) const

Converts time to sample number.

Use isSampleValid(int) to check the validity of sample number

Parameters
time[ns]
Returns
sample number

Definition at line 67 of file TOPNominalTDC.cc.

68  {
69  time += m_offset;
70  if (time > 0) {
71  return int(time / m_sampleWidth);
72  } else {
73  return int(time / m_sampleWidth) - 1;
74  }
75  }
float m_offset
time offset
float m_sampleWidth
time between two samples

◆ getSample() [2/2]

double getSample ( int  window,
double  time 
) const

Returns sample with respect to sample 0 of the specified ASIC window (inverse of getTime).

Note: sample is float - digits that follow the decimal point are used to interpolate the time btw. two samples

Parameters
windowASIC window number
timetime with respect to SSTin of specified ASIC window
Returns
sample

Definition at line 80 of file TOPSampleTimes.cc.

◆ getSampleTimes()

const TOPSampleTimes * getSampleTimes ( unsigned  scrodID,
unsigned  channel 
) const

Returns calibration constants for given SCROD and channel.

If calibration is not available, return equidistant sample times.

Parameters
scrodIDSCROD ID
channelchannel number (within SCROD or within module)
Returns
calibration constants (always valid pointer)

Definition at line 61 of file TOPCalTimebase.cc.

◆ getSigma()

double getSigma ( int  pulseHeight) const

Returns an excess of electronic time resolution at given pulse height.

Parameters
pulseHeightpulse height [ADC counts]
Returns
excess sigma [ns]

Definition at line 48 of file TOPCalTimeWalk.cc.

49  {
50  return sqrt(getSigmaSq(pulseHeight));
51  }
double getSigmaSq(int pulseHeight) const
Returns an excess of electronic time resolution at given pulse height.

◆ getSigmaSq()

double getSigmaSq ( int  pulseHeight) const

Returns an excess of electronic time resolution at given pulse height.

Parameters
pulseHeightpulse height [ADC counts]
Returns
excess sigma squared [ns^2]

Definition at line 41 of file TOPCalTimeWalk.cc.

◆ getStatus()

TOPCalChannelMask::EStatus getStatus ( int  moduleID,
unsigned  channel 
) const

Returns the status of a single channel.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
status channel status (1: active 0: dead -1: noisy )

Definition at line 61 of file TOPCalChannelMask.cc.

◆ getT0() [1/3]

double getT0 ( int  moduleID) const

Returns T0 of a module.

Parameters
moduleIDmodule ID (1-based)
Returns
T0

Definition at line 63 of file TOPCalModuleT0.cc.

64  {
65  unsigned module = moduleID - 1;
66  if (module >= c_numModules) {
67  B2WARNING("Invalid module number, returning 0 (" << ClassName() << ")");
68  return 0;
69  }
70  return m_T0[module];
71  }
@ c_numModules
number of modules
float m_T0[c_numModules]
calibration constants

◆ getT0() [2/3]

double getT0 ( int  moduleID,
unsigned  asic 
) const

Returns T0 of a single asic.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)
Returns
T0

Definition at line 51 of file TOPCalAsicShift.cc.

52  {
53  unsigned module = moduleID - 1;
54  if (module >= c_numModules) {
55  B2WARNING("Invalid module number, returning 0 (" << ClassName() << ")");
56  return 0;
57  }
58  if (asic >= c_numAsics) {
59  B2WARNING("Invalid asic number, returning 0 (" << ClassName() << ")");
60  return 0;
61  }
62  return m_T0[module][asic];
63  }
float m_T0[c_numModules][c_numAsics]
calibration constants
@ c_numModules
number of modules
@ c_numAsics
number of ASIC's per module

◆ getT0() [3/3]

double getT0 ( int  moduleID,
unsigned  channel 
) const

Returns T0 of a single channel.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
T0

Definition at line 73 of file TOPCalChannelT0.cc.

74  {
75  unsigned module = moduleID - 1;
76  if (module >= c_numModules) {
77  B2WARNING("Invalid module number, returning 0 (" << ClassName() << ")");
78  return 0;
79  }
80  if (channel >= c_numChannels) {
81  B2WARNING("Invalid channel number, returning 0 (" << ClassName() << ")");
82  return 0;
83  }
84  return m_T0[module][channel];
85  }
float m_T0[c_numModules][c_numChannels]
calibration constants
@ c_numChannels
number of channels per module
@ c_numModules
number of modules

◆ getT0Error() [1/2]

double getT0Error ( int  moduleID) const

Returns error on T0 of a module.

Parameters
moduleIDmodule ID (1-based)
Returns
error on T0

Definition at line 74 of file TOPCalModuleT0.cc.

◆ getT0Error() [2/2]

double getT0Error ( int  moduleID,
unsigned  channel 
) const

Returns error on T0 of a single channel.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
error on T0

Definition at line 88 of file TOPCalChannelT0.cc.

◆ getTDCcount()

int getTDCcount ( double  time) const

Converts time to TDC count.

For times being outside TDC range, TDC overflow value is returned.

Parameters
time[ns]
Returns
TDC count

Definition at line 58 of file TOPNominalTDC.cc.

◆ getTimeAxis()

std::vector< double > getTimeAxis ( ) const

Returns time axis (sample times)

Returns
vector of sample times

Definition at line 48 of file TOPSampleTimes.cc.

◆ getTimeBin()

double getTimeBin ( int  window,
int  sampleNumber 
) const

Returns time bin of a given sample number and window (e.g.

time interval to the next sample)

Parameters
windowASIC window number
sampleNumbersample number counted from begin of the specified ASIC window
Returns
time bin in [ns]

Definition at line 104 of file TOPSampleTimes.cc.

◆ getTimeWalk()

double getTimeWalk ( int  pulseHeight) const

Returns time-walk at given pulse height.

Parameters
pulseHeightpulse height [ADC counts]
Returns
time-walk [ns]

Definition at line 27 of file TOPCalTimeWalk.cc.

◆ getTransformation() [1/2]

Transform3D getTransformation ( ) const

Returns transformation from local to nominal frame.

Translation is always given in basf2 units.

Returns
transformation (rotation and then a translation)

Definition at line 37 of file TOPGeoModuleDisplacement.cc.

38  {
39  RotationX Rx(m_alpha);
40  RotationY Ry(m_beta);
41  RotationZ Rz(m_gamma);
42  Translation3D t(m_x, m_y, m_z);
43  return Transform3D(Rz * Ry * Rx, t);
44  }
float m_beta
rotation angle around y
float m_alpha
rotation angle around x
float m_gamma
rotation angle around z

◆ getTransformation() [2/2]

const Transform3D & getTransformation ( int  moduleID) const

Returns transformation from local to nominal frame.

Transformation is: rotation first then translation.

Parameters
moduleIDmodule ID (1-based)
Returns
transformation

Definition at line 298 of file TOPCalModuleAlignment.cc.

◆ getTTS()

const TOPNominalTTS & getTTS ( unsigned  type) const

Returns time transition spread of a given PMT type.

Parameters
typePMT type
Returns
TTS of a given PMT type if found, otherwise nominal TTS

Definition at line 50 of file TOPGeometry.cc.

◆ getValue()

double getValue ( double  t) const

Returns value at time t of the normalized waveform using interpolator.

Parameters
ttime [ns] (t = 0 is at 50% CF leading edge crossing)
Returns
normalized value (normalization: peaking value = 1)

Definition at line 75 of file TOPSignalShape.cc.

◆ getX() [1/2]

double getX ( int  moduleID) const

Returns the shift x on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
x shift along the x direction

Definition at line 149 of file TOPCalModuleAlignment.cc.

◆ getX() [2/2]

double getX ( unsigned  col) const

Returns x coordinate of pixel center.

Parameters
colvalid column number (1-based)
Returns
x coordinate of pixel center

Definition at line 47 of file TOPGeoPMT.cc.

◆ getXErr()

double getXErr ( int  moduleID) const

Returns the error on x on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errX error on the x shift

Definition at line 209 of file TOPCalModuleAlignment.cc.

◆ getY() [1/2]

double getY ( int  moduleID) const

Returns the shift y on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
y shift along the y direction

Definition at line 159 of file TOPCalModuleAlignment.cc.

◆ getY() [2/2]

double getY ( unsigned  row) const

Returns y coordinate of pixel center.

Parameters
rowvalid row number (1-based)
Returns
y coordinate of pixel center

Definition at line 52 of file TOPGeoPMT.cc.

◆ getYErr()

double getYErr ( int  moduleID) const

Returns the error on y on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errY error on the y shift

Definition at line 219 of file TOPCalModuleAlignment.cc.

◆ getZ()

double getZ ( int  moduleID) const

Returns the shift z on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
z shift along the z direction

Definition at line 169 of file TOPCalModuleAlignment.cc.

◆ getZc()

double getZc ( ) const

Returns spherical mirror center of curvature in z (in local frame of this segment)

Returns
center of curvature in z

Definition at line 21 of file TOPGeoMirrorSegment.cc.

22  {
23  double dx = fabs(getXc()) - getWidth() / 2;
24  double dy = fabs(getYc()) - getThickness() / 2;
25  double z = getOuterRadius();
26  if (dx > 0) z = sqrt(z * z - dx * dx);
27  if (dy > 0) z = sqrt(z * z - dy * dy);
28 
29  return getFullLength() / 2 - z;
30  }
double getFullLength() const
Returns bar segment length including glue.
double getThickness() const
Returns bar segment thickness.
double getYc() const
Returns spherical mirror center of curvature in y.
double getOuterRadius() const
Returns spherical mirror outer radius of curvature.
double getXc() const
Returns spherical mirror center of curvature in x.

◆ getZErr()

double getZErr ( int  moduleID) const

Returns the error on z on a single module.

Parameters
moduleIDmodule ID (1-based)
Returns
errZ error on the z shift

Definition at line 229 of file TOPCalModuleAlignment.cc.

◆ importAsicShifts_BS13d()

void importAsicShifts_BS13d ( double  s0,
double  s1,
double  s2,
double  s3,
int  expNo,
int  firstRun,
int  lastRun 
)

Import ASIC shifts of BS13d.

Parameters
s0shift of carrier 0 [ns]
s1shift of carrier 1 [ns]
s2shift of carrier 2 [ns]
s3shift of carrier 3 [ns]
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV

Definition at line 342 of file TOPDatabaseImporter.cc.

◆ importChannelMask()

void importChannelMask ( std::string  fileName,
int  expNo,
int  firstRun,
int  lastRun 
)

Import channel mask from a root file (given as 1D histograms, one per slot).

Parameters
fileNameroot file name
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV

Definition at line 621 of file TOPDatabaseImporter.cc.

◆ importChannelT0()

void importChannelT0 ( std::string  fileName,
int  expNo,
int  firstRun,
int  lastRun 
)

Import channel T0 calibration constants The input is a root file with 1D histograms (one per slot, named "channelT0_slot*")

Parameters
fileNameroot file name
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV

Definition at line 290 of file TOPDatabaseImporter.cc.

◆ importCommonT0()

void importCommonT0 ( double  value,
double  error,
int  expNo,
int  firstRun,
int  lastRun,
bool  roughlyCalibrated = false 
)

Import common T0 calibration constants.

Parameters
valuecentral value of T0
erroruncertainty on T0
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV
roughlyCalibratedif true set payload status to roughly calibrated

Definition at line 446 of file TOPDatabaseImporter.cc.

◆ importDummyCalAsicShift()

void importDummyCalAsicShift ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalAsicShift DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1395 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelNoise()

void importDummyCalChannelNoise ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelNoise DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1318 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelPulseHeight()

void importDummyCalChannelPulseHeight ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelPulseHeight DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1329 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelRQE()

void importDummyCalChannelRQE ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelRQE DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1340 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelT0()

void importDummyCalChannelT0 ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelT0 DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1296 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelThreshold()

void importDummyCalChannelThreshold ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelThreshold DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1362 of file TOPDatabaseImporter.cc.

◆ importDummyCalChannelThresholdEff()

void importDummyCalChannelThresholdEff ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalChannelThresholdEff DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1351 of file TOPDatabaseImporter.cc.

◆ importDummyCalCommonT0()

void importDummyCalCommonT0 ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalCommonT0 DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1373 of file TOPDatabaseImporter.cc.

◆ importDummyCalIntegratedCharge()

void importDummyCalIntegratedCharge ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalIntegratedCharge DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1384 of file TOPDatabaseImporter.cc.

◆ importDummyCalModuleAlignment()

void importDummyCalModuleAlignment ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalModuleAlignment DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1274 of file TOPDatabaseImporter.cc.

◆ importDummyCalModuleT0()

void importDummyCalModuleT0 ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalCalModuleT0 DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1285 of file TOPDatabaseImporter.cc.

◆ importDummyCalTimebase()

void importDummyCalTimebase ( int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

import a dummy payload of TOPCalTimebase DB objects

Parameters
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1307 of file TOPDatabaseImporter.cc.

◆ importFrontEndSettings()

void importFrontEndSettings ( int  lookback,
int  readoutWin,
int  extraWin,
int  offset,
int  expNo,
int  firstRun,
int  lastRun 
)

Import front-end settings.

Parameters
lookbackthe number of lookback windows
readoutWinthe number of readout windows
extraWinthe number of extra windows btw. lookback and readout window
offsetoffset to photon peak [RF clocks]
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV

Definition at line 1242 of file TOPDatabaseImporter.cc.

◆ importLocalT0Calibration()

void importLocalT0Calibration ( std::string  fileNames,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import channel-by-channel T0 calibration constants to database The input is the root file with ntuple produced by TOPLaserCalibrator.

Parameters
fileNamesfile names separated by space (since vector doesn't work!)
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 195 of file TOPDatabaseImporter.cc.

◆ importModuleT0()

void importModuleT0 ( std::string  fileName,
int  expNo,
int  firstRun,
int  lastRun 
)

Import module T0 calibration constants The input is a root file with 1D histogram (name is "moduleT0")

Parameters
fileNameroot file name
expNoexperiment number of IOV
firstRunfirst run number of IOV
lastRunlast run number of IOV

Definition at line 514 of file TOPDatabaseImporter.cc.

◆ importModuleT0Calibration()

void importModuleT0Calibration ( std::string  fileName,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import module T0 calibration constants to database The input is the text file.

Parameters
fileNamename of the dat file with constants of all modules
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 461 of file TOPDatabaseImporter.cc.

◆ importOfflineCommonT0Calibration()

void importOfflineCommonT0Calibration ( std::string  fileName,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import common T0 calibration constants derived form the offline data reprocessing to database The input is a root file containing a tree (one per run).

In the future we may add a furter implementation that reads the IOV from the root file itself.

Parameters
fileNamename of the root file with constants of all modules
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 372 of file TOPDatabaseImporter.cc.

◆ importPmtGainData()

void importPmtGainData ( std::string  fileName,
std::string  treeName = "gainPmtData",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import PMT gain parameters data to database.

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 796 of file TOPDatabaseImporter.cc.

◆ importPmtInstallationData()

void importPmtInstallationData ( std::string  fileName,
std::string  treeName = "installationPmtData",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import PMT installation data to database.

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 855 of file TOPDatabaseImporter.cc.

◆ importPmtObsoleteData()

void importPmtObsoleteData ( std::string  fileName,
std::string  treeName = "obsPmtData",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import PMT specifications from Hamamatsu (not to be used!)

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 905 of file TOPDatabaseImporter.cc.

◆ importPmtPulseHeightFitResult()

void importPmtPulseHeightFitResult ( std::string  fileName,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import fit results of pulse height disribution for channel gain and threshold efficiency.

Parameters
fileName: name of the root file containing relevant data, which is obtained from TOPGainEfficiencyMonitor
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1129 of file TOPDatabaseImporter.cc.

◆ importPmtQEData()

void importPmtQEData ( std::string  fileName,
std::string  treeName = "qePmtData",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import PMT Quantum Efficiency data to database.

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 723 of file TOPDatabaseImporter.cc.

◆ importPmtTTSHisto()

void importPmtTTSHisto ( std::string  fileName,
std::string  treeName = "ttsPmtHisto",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import histograms used for PMT TTS determination.

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1066 of file TOPDatabaseImporter.cc.

◆ importPmtTTSPar()

void importPmtTTSPar ( std::string  fileName,
std::string  treeName = "ttsPmtPar",
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import gaussians fitting the TTS distributions.

Parameters
fileName: name of the root file containing relevant data
treeName: name of the tree containing relevant data
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 965 of file TOPDatabaseImporter.cc.

◆ importSampleTimeCalibration()

void importSampleTimeCalibration ( std::string  fileNames,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

Import sample time calibration constants to database Output of TOPTimeBaseCalibrator (root files with histograms)

Parameters
fileNamesfile names separated by space (since vector doesn't work!)
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 69 of file TOPDatabaseImporter.cc.

◆ importTimeWalk()

void importTimeWalk ( PyObject *  list,
double  a,
double  b,
int  firstExp = 0,
int  firstRun = 0,
int  lastExp = -1,
int  lastRun = -1 
)

payload TOPCalTimeWalk import parameters for time-walk correction and electronic time resolution tuning

Parameters
listPython list of parameters of time-walk calibration curve [ns]
aelectronic time resolution: noise term excess parameter [ns]
belectronic time resolution: quadratic term parameter [ns]
firstExpfirst experiment number of IOV
firstRunfirst run number of IOV
lastExpfirst experiment number of IOV
lastRunlast run number of IOV

Definition at line 1442 of file TOPDatabaseImporter.cc.

◆ interpolate()

double interpolate ( double  lambda,
const std::vector< float > &  QE 
) const
private

Interpolate between QE datapoints (linear interpolation).

Parameters
lambdawavelength in [nm]
QEquantum efficiency data points
Returns
quantum efficiency at lambda

Definition at line 105 of file TOPPmtQE.cc.

◆ isActive()

bool isActive ( int  moduleID,
unsigned  channel 
) const

Returns false if the channel is dead or noisy, and true is the channel is active.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 72 of file TOPCalChannelMask.cc.

◆ isAvailable()

bool isAvailable ( unsigned  scrodID,
unsigned  channel 
) const

Checks if calibration is available.

Parameters
scrodIDSCROD ID
channelchannel number (within SCROD or within module)
Returns
true if available

Definition at line 76 of file TOPCalTimebase.cc.

◆ isCalibrated() [1/4]

bool isCalibrated ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if good calibrated

Definition at line 239 of file TOPCalModuleAlignment.cc.

◆ isCalibrated() [2/4]

bool isCalibrated ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if good calibrated

Definition at line 85 of file TOPCalModuleT0.cc.

◆ isCalibrated() [3/4]

bool isCalibrated ( int  moduleID,
unsigned  asic 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)
Returns
true, if good calibrated

Definition at line 66 of file TOPCalAsicShift.cc.

◆ isCalibrated() [4/4]

bool isCalibrated ( int  moduleID,
unsigned  channel 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if good calibrated

Definition at line 103 of file TOPCalChannelT0.cc.

◆ isConsistent() [1/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Reimplemented in TOPGeoPrism, and TOPGeoMirrorSegment.

Definition at line 23 of file TOPGeoBarSegment.cc.

◆ isConsistent() [2/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 20 of file TOPGeoColdPlate.cc.

21  {
22  if (m_baseThickness <= 0) return false;
23  if (m_baseMaterial.empty()) return false;
24  if (m_coolThickness <= 0) return false;
25  if (m_coolWidth <= 0) return false;
26  if (m_coolMaterial.empty()) return false;
27  return true;
28  }
std::string m_baseMaterial
base plate material name
float m_coolThickness
cooling plate thickness
std::string m_coolMaterial
cooling plate material name
float m_coolWidth
cooling plate width
float m_baseThickness
base plate thickness

◆ isConsistent() [3/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 20 of file TOPGeoEndPlate.cc.

21  {
22  if (m_thickness <= 0) return false;
23  if (m_height <= 0) return false;
24  if (m_material.empty()) return false;
25  return true;
26  }
std::string m_material
material name
float m_thickness
thickness

◆ isConsistent() [4/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 20 of file TOPGeoFrontEnd.cc.

21  {
22  if (m_FBWidth <= 0) return false;
23  if (m_FBHeight <= 0) return false;
24  if (m_FBThickness <= 0) return false;
25  if (m_FBGap < 0) return false;
26  if (m_FBMaterial.empty()) return false;
27 
28  if (m_HVWidth <= 0) return false;
29  if (m_HVLength <= 0) return false;
30  if (m_HVThickness <= 0) return false;
31  if (m_HVGap < 0) return false;
32  if (m_HVMaterial.empty()) return false;
33 
34  if (m_BSWidth <= 0) return false;
35  if (m_BSHeight <= 0) return false;
36  if (m_BSLength <= 0) return false;
37  if (m_BSGap < 0) return false;
38  if (m_BSMaterial.empty()) return false;
39  if (m_spacerWidth <= 0) return false;
40  if (m_spacerMaterial.empty()) return false;
41 
42  return true;
43  }
float m_HVGap
gap between HV board and front board
float m_FBGap
gap between front board and PMT array
float m_HVWidth
HV board width.
float m_BSHeight
board stack height
float m_HVLength
HV board length.
std::string m_BSMaterial
board stack material
float m_BSWidth
board stack width
float m_BSLength
board stack length
float m_spacerWidth
board stack spacer width
float m_FBThickness
front board thickness
std::string m_FBMaterial
front board material
std::string m_HVMaterial
HV board material.
float m_FBHeight
front board height
float m_BSGap
gap between board stack and front board
std::string m_spacerMaterial
board stack spacer material
float m_HVThickness
HV board thickness.
float m_FBWidth
front board width

◆ isConsistent() [5/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 46 of file TOPGeoHoneycombPanel.cc.

◆ isConsistent() [6/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 126 of file TOPGeometry.cc.

◆ isConsistent() [7/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBarSegment.

Definition at line 33 of file TOPGeoMirrorSegment.cc.

◆ isConsistent() [8/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 150 of file TOPGeoModule.cc.

151  {
152  if (m_moduleID <= 0) return false;
153  if (!m_bar1.isConsistent()) return false;
154  if (!m_bar2.isConsistent()) return false;
155  if (!m_mirror.isConsistent()) return false;
156  if (!m_prism.isConsistent()) return false;
157  if (!m_pmtArray.isConsistent()) return false;
158  return true;
159  }
int m_moduleID
module ID
Definition: TOPGeoModule.h:418
TOPGeoPMTArray m_pmtArray
geometry parameters of PMT array
Definition: TOPGeoModule.h:428
TOPGeoMirrorSegment m_mirror
mirror segment
Definition: TOPGeoModule.h:426
TOPGeoPrism m_prism
prism
Definition: TOPGeoModule.h:427
TOPGeoBarSegment m_bar2
bar segment 2 (backward bar)
Definition: TOPGeoModule.h:425
TOPGeoBarSegment m_bar1
bar segment 1 (forward bar)
Definition: TOPGeoModule.h:424
virtual bool isConsistent() const override
Check for consistency of data members.

◆ isConsistent() [9/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 58 of file TOPGeoPMT.cc.

◆ isConsistent() [10/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 93 of file TOPGeoPMTArray.cc.

◆ isConsistent() [11/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBarSegment.

Definition at line 36 of file TOPGeoPrism.cc.

◆ isConsistent() [12/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 21 of file TOPGeoPrismEnclosure.cc.

22  {
23  if (m_length <= 0) return false;
24  if (m_height <= 0) return false;
25  if (m_bottomThickness <= 0) return false;
26  if (m_sideThickness <= 0) return false;
27  if (m_backThickness <= 0) return false;
28  if (m_frontThickness <= 0) return false;
29  if (m_extensionThickness <= 0) return false;
30  if (m_material.empty()) return false;
31  return true;
32  }
std::string m_material
material name
float m_extensionThickness
extension plate thickness
float m_backThickness
back wall thickness
float m_frontThickness
front wall thickness
float m_bottomThickness
bottom thickness
float m_height
height up to the side rails
float m_sideThickness
side wall thickness

◆ isConsistent() [13/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 230 of file TOPGeoQBB.cc.

◆ isConsistent() [14/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 20 of file TOPGeoSideRails.cc.

21  {
22  if (m_thickness <= 0) return false;
23  if (m_reducedThickness <= 0) return false;
24  if (m_height <= 0) return false;
25  if (m_material.empty()) return false;
26  return true;
27  }
std::string m_material
material name
float m_reducedThickness
thickness at prism enclosure
float m_thickness
thickness

◆ isConsistent() [15/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 58 of file TOPNominalQE.cc.

◆ isConsistent() [16/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 84 of file TOPNominalTDC.cc.

◆ isConsistent() [17/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 60 of file TOPNominalTTS.cc.

◆ isConsistent() [18/18]

bool isConsistent ( ) const
overridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 34 of file TOPWavelengthFilter.cc.

◆ isDefault() [1/4]

bool isDefault ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if default (not calibrated)

Definition at line 246 of file TOPCalModuleAlignment.cc.

◆ isDefault() [2/4]

bool isDefault ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if default (not calibrated)

Definition at line 93 of file TOPCalModuleT0.cc.

◆ isDefault() [3/4]

bool isDefault ( int  moduleID,
unsigned  asic 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)
Returns
true, if default (not calibrated)

Definition at line 75 of file TOPCalAsicShift.cc.

◆ isDefault() [4/4]

bool isDefault ( int  moduleID,
unsigned  channel 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if default (not calibrated)

Definition at line 112 of file TOPCalChannelT0.cc.

◆ isModuleIDValid()

bool isModuleIDValid ( int  moduleID) const

Checks if module exists in m_modules.

Parameters
moduleIDmodule ID (1-based)
Returns
true if exists

Definition at line 33 of file TOPGeometry.cc.

◆ isPMTDecoupled()

bool isPMTDecoupled ( unsigned  pmtID) const

Checks if PMT is optically decoupled.

Returns
true if decoupled

Definition at line 84 of file TOPGeoPMTArray.cc.

◆ isSampleValid()

bool isSampleValid ( int  sample) const

Check for the validity of sample number.

Parameters
samplesample number
Returns
true if sample number is valid

Definition at line 77 of file TOPNominalTDC.cc.

◆ isUnusable() [1/4]

bool isUnusable ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if bad calibrated

Definition at line 253 of file TOPCalModuleAlignment.cc.

◆ isUnusable() [2/4]

bool isUnusable ( int  moduleID) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
Returns
true, if bad calibrated

Definition at line 101 of file TOPCalModuleT0.cc.

◆ isUnusable() [3/4]

bool isUnusable ( int  moduleID,
unsigned  asic 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)
Returns
true, if bad calibrated

Definition at line 84 of file TOPCalAsicShift.cc.

◆ isUnusable() [4/4]

bool isUnusable ( int  moduleID,
unsigned  channel 
) const

Returns calibration status.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
Returns
true, if bad calibrated

Definition at line 121 of file TOPCalChannelT0.cc.

◆ momentumGlobalToNominal()

XYZVector momentumGlobalToNominal ( const ROOT::Math::XYZVector &  momentum) const

Transforms momentum vector from Belle II to module nominal frame.

Parameters
momentummomentum vector in Belle II frame
Returns
momentum vector in module nominal frame

Definition at line 143 of file TOPGeoModule.cc.

◆ momentumNominalToGlobal()

XYZVector momentumNominalToGlobal ( const ROOT::Math::XYZVector &  momentum) const

Transforms momentum vector from module nominal frame to Belle II frame.

Parameters
momentummomentum vector in module nominal frame
Returns
momentum vector in Belle II frame

Definition at line 131 of file TOPGeoModule.cc.

◆ momentumToGlobal()

XYZVector momentumToGlobal ( const ROOT::Math::XYZVector &  momentum) const

Transforms momentum vector from module internal (= nominal & displaced) frame to Belle II frame.

Parameters
momentummomentum vector in module internal frame
Returns
momentum vector in Belle II frame

Definition at line 107 of file TOPGeoModule.cc.

◆ momentumToLocal()

XYZVector momentumToLocal ( const ROOT::Math::XYZVector &  momentum) const

Transforms momentum vector from Belle II to module internal (= nominal & displaced) frame.

Parameters
momentummomentum vector in Belle II frame
Returns
momentum vector in module internal frame

Definition at line 119 of file TOPGeoModule.cc.

◆ normalize()

double normalize ( )

Normalize the distribution (fractions)

Returns
value used to normalize fractions

Definition at line 36 of file TOPNominalTTS.cc.

◆ pointGlobalToNominal()

XYZPoint pointGlobalToNominal ( const ROOT::Math::XYZPoint &  point) const

Transforms 3D point from Belle II to module nominal frame.

Parameters
point3D point in Belle II frame (basf2 units!)
Returns
3D point in module nominal frame (basf2 units!)

Definition at line 137 of file TOPGeoModule.cc.

◆ pointNominalToGlobal()

XYZPoint pointNominalToGlobal ( const ROOT::Math::XYZPoint &  point) const

Transforms 3D point from module nominal frame to Belle II frame.

Parameters
point3D point in module nominal frame (basf2 units!)
Returns
3D point in Belle II frame (basf2 units!)

Definition at line 125 of file TOPGeoModule.cc.

◆ pointToGlobal()

XYZPoint pointToGlobal ( const ROOT::Math::XYZPoint &  point) const

Transforms 3D point from module internal (= nominal & displaced) frame to Belle II frame.

Parameters
point3D point in module internal frame (basf2 units!)
Returns
3D point in Belle II frame (basf2 units!)

Definition at line 101 of file TOPGeoModule.cc.

◆ pointToLocal()

XYZPoint pointToLocal ( const ROOT::Math::XYZPoint &  point) const

Transforms 3D point from Belle II to module internal (= nominal & displaced) frame.

Parameters
point3D point in Belle II frame (basf2 units!)
Returns
3D point in module internal frame (basf2 units!)

Definition at line 113 of file TOPGeoModule.cc.

◆ print() [1/21]

void print ( const std::string &  title) const
virtual

◆ print() [2/21]

void print ( const std::string &  title = "Bar segment geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Reimplemented in TOPGeoPrism, and TOPGeoMirrorSegment.

Definition at line 38 of file TOPGeoBarSegment.cc.

◆ print() [3/21]

void print ( const std::string &  title = "Front-end geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 46 of file TOPGeoFrontEnd.cc.

◆ print() [4/21]

void print ( const std::string &  title = "MCP-PMT geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 85 of file TOPGeoPMT.cc.

◆ print() [5/21]

void print ( const std::string &  title = "Mirror segment geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBarSegment.

Definition at line 44 of file TOPGeoMirrorSegment.cc.

◆ print() [6/21]

void print ( const std::string &  title = "Module displacement parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 25 of file TOPGeoModuleDisplacement.cc.

◆ print() [7/21]

void print ( const std::string &  title = "Module geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 162 of file TOPGeoModule.cc.

◆ print() [8/21]

void print ( const std::string &  title = "Nominal quantum efficiency") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 68 of file TOPNominalQE.cc.

◆ print() [9/21]

void print ( const std::string &  title = "Nominal time-to-digit conversion parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 93 of file TOPNominalTDC.cc.

◆ print() [10/21]

void print ( const std::string &  title = "Nominal TTS distribution") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 68 of file TOPNominalTTS.cc.

◆ print() [11/21]

void print ( const std::string &  title = "PMT array displacement parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 20 of file TOPGeoPMTArrayDisplacement.cc.

21  {
22  TOPGeoBase::print(title);
23  cout << " translation vector: (" << getX() << ", " << getY() << ")"
24  << " " << s_unitName << endl;
25  cout << " rotation angle: " << m_alpha << endl;
26  }
double getX() const
Returns translation in x.
double getY() const
Returns translation in y.
virtual void print(const std::string &title) const
Print the content of the class.
Definition: TOPGeoBase.cc:28
static std::string s_unitName
conversion unit name
Definition: TOPGeoBase.h:87

◆ print() [12/21]

void print ( const std::string &  title = "PMT array geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 108 of file TOPGeoPMTArray.cc.

◆ print() [13/21]

void print ( const std::string &  title = "Prism geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBarSegment.

Definition at line 60 of file TOPGeoPrism.cc.

◆ print() [14/21]

void print ( const std::string &  title = "QBB cold plate geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 31 of file TOPGeoColdPlate.cc.

◆ print() [15/21]

void print ( const std::string &  title = "QBB forward end plate geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 29 of file TOPGeoEndPlate.cc.

◆ print() [16/21]

void print ( const std::string &  title = "QBB geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 246 of file TOPGeoQBB.cc.

◆ print() [17/21]

void print ( const std::string &  title = "QBB honeycomb panel geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 60 of file TOPGeoHoneycombPanel.cc.

◆ print() [18/21]

void print ( const std::string &  title = "QBB prism enclosure geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 35 of file TOPGeoPrismEnclosure.cc.

◆ print() [19/21]

void print ( const std::string &  title = "QBB side rails geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 30 of file TOPGeoSideRails.cc.

◆ print() [20/21]

void print ( const std::string &  title = "TOP geometry parameters") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 142 of file TOPGeometry.cc.

◆ print() [21/21]

void print ( const std::string &  title = "Wavelength filter bulk transmittance") const
overridevirtual

Print the content of the class.

Parameters
titletitle to be printed

Reimplemented from TOPGeoBase.

Definition at line 45 of file TOPWavelengthFilter.cc.

◆ printSurface()

void printSurface ( const GeoOpticalSurface surface) const
virtual

Print the content of optical surface.

Parameters
surfaceoptical surface parameters

Definition at line 44 of file TOPGeoBase.cc.

◆ printUnderlined()

void printUnderlined ( const std::string &  title) const
protected

Print the content of the class.

Parameters
titletitle to be printed

Definition at line 35 of file TOPGeoBase.cc.

◆ reflect()

void reflect ( const ROOT::Math::XYVector *  points,
const ROOT::Math::XYVector *  normals,
const ROOT::Math::XYVector &  orig,
const ROOT::Math::XYVector &  surf,
const ROOT::Math::XYVector &  norm,
const ROOT::Math::XYVector &  slanted,
int  k,
std::vector< UnfoldedWindow > &  result 
) const
private

Do unfolding.

Parameters
pointspoints defining position of upper and slanted surfaces
normalsnormals of upper and slanted surfaces
origorigin of exit window
surfexit window surface direction
normexit window surface normal
slantedslanted surface normal
kindex of the surface to start unfolding (0 or 1)
resultthe result of unfolding

Definition at line 152 of file TOPGeoPrism.cc.

◆ set() [1/2]

void set ( const std::vector< double > &  timeWalkParams,
double  noise,
double  quadratic 
)

Sets all the parameters and switches status to calibrated.

Parameters
timeWalkParamspolynomial coefficients of time-walk calibration curve [ns]
noisenoise term excess coefficient of electronic time resolution [ns]
quadraticquadratic term coefficient of electronic time resolution [ns]

Definition at line 18 of file TOPCalTimeWalk.cc.

◆ set() [2/2]

void set ( int  slot,
const TH1F *  photonYields,
const TH1F *  backgroundYields,
const TH1F *  alphaRatio,
const TH1F *  activePixels,
const TH2F *  pulseHeights,
const TH1F *  muonZ 
)

Sets the data of a given slot.

The data are given as 1D histograms of 512 bins that correspond to pixelID's. Note: the setter must be called in the ascending order of slot ID's, e.g slot = 1, 2, ... , 16

Parameters
slotslot ID
photonYieldspixel photon yields
backgroundYieldspixel background yields
alphaRatioequalized alpha ratio
activePixelsactive pixels
pulseHeightspixel pulse-heights
muonZz-distribution of tracks

Definition at line 20 of file TOPCalPhotonYields.cc.

◆ setActive()

void setActive ( int  moduleID,
unsigned  channel 
)

Sets a specific channel as active.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 31 of file TOPCalChannelMask.cc.

◆ setAlpha()

void setAlpha ( int  moduleID,
double  alpha,
double  errAlpha 
)

Sets the angle alpha on a single module.

Parameters
moduleIDmodule ID (1-based)
alpharotation angle around x
errAlphaerror on alpha

Definition at line 25 of file TOPCalModuleAlignment.cc.

◆ setBeta()

void setBeta ( int  moduleID,
double  beta,
double  errBeta 
)

Sets the angle beta on a single module.

Parameters
moduleIDmodule ID (1-based)
betarotation angle around y
errBetaerror on beta

Definition at line 37 of file TOPCalModuleAlignment.cc.

◆ setBrokenGlue()

void setBrokenGlue ( int  glueID,
double  fraction,
double  angle,
const std::string &  material 
)

Sets glue to be broken (delaminated)

Parameters
glueIDglue ID: bar-mirror (1), bar-bar (2), prism-bar (3)
fractionfraction of the delaminated surface
angleangle of the delaminated surface
materialmaterial name to simulate the delaminated glue

Definition at line 72 of file TOPGeoModule.cc.

◆ setCalibrated()

void setCalibrated ( int  moduleID)

Switches calibration status to calibrated.

Parameters
moduleIDmodule ID (1-based)

Definition at line 97 of file TOPCalModuleAlignment.cc.

◆ setDead()

void setDead ( int  moduleID,
unsigned  channel 
)

Sets a specific channel as dead.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 41 of file TOPCalChannelMask.cc.

◆ setGains()

bool setGains ( const std::vector< float > &  gains,
float  error = 0 
)

Set gains.

Parameters
gainsvector of relative gains (size must be c_WindowSize)
errorerror on gains
Returns
true, on success

Definition at line 20 of file TOPASICGains.cc.

21  {
22 
23  if (gains.size() != c_WindowSize) {
24  B2ERROR("TOPASICGains::setGains: vector with wrong number of elements");
25  return false;
26  }
27 
28  for (int i = 0; i < c_WindowSize; i++) {
29  float gain = gains[i] * m_unit;
30  if (gain > 0 and (gain + 0.5) < 0x10000) {
31  m_gains[i] = int(gain + 0.5);
32  } else {
33  return false;
34  }
35  }
36  error *= m_unit;
37  m_gainError = int(error + 0.5);
38  return true;
39 
40  }
unsigned short m_gains[c_WindowSize]
gains (in fixed point format)
Definition: TOPASICGains.h:98
@ c_WindowSize
number of samples
Definition: TOPASICGains.h:28
unsigned short m_gainError
gain error (fixed point format)
Definition: TOPASICGains.h:97
unsigned short m_unit
unit of fixed point number
Definition: TOPASICGains.h:96

◆ setGamma()

void setGamma ( int  moduleID,
double  gamma,
double  errGamma 
)

Sets the angle gamma on a single module.

Parameters
moduleIDmodule ID (1-based)
gammarotation angle around z
errGammaerror on gamma

Definition at line 49 of file TOPCalModuleAlignment.cc.

◆ setNoisy()

void setNoisy ( int  moduleID,
unsigned  channel 
)

Sets a specific channel as noisy.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 51 of file TOPCalChannelMask.cc.

◆ setPedestals()

int setPedestals ( const TProfile *  profile,
double  average = 0 
)

Set pedestals from profile histogram with c_WindowSize bins.

Parameters
profileprofile histogram
averageoptional value to add
Returns
number of pedestals that can not be packed into 16-bit word

Definition at line 23 of file TOPASICPedestals.cc.

◆ setPeelOffRegions()

void setPeelOffRegions ( double  thickness,
const std::string &  material 
)

Sets parameters of the peel-off cookie volumes.

Parameters
thicknessvolume thickness
materialmaterial name

Definition at line 92 of file TOPGeoModule.cc.

◆ setStatus()

void setStatus ( int  moduleID,
unsigned  channel,
EStatus  status 
)

Sets the status for a single channel.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
statuschannel status (0: active 1: dead 2: noisy )

Definition at line 21 of file TOPCalChannelMask.cc.

◆ setT0() [1/3]

void setT0 ( int  moduleID,
double  T0,
double  errT0 
)

Sets calibration for a single module and switches status to calibrated.

Parameters
moduleIDmodule ID (1-based)
T0module T0
errT0error on T0

Definition at line 20 of file TOPCalModuleT0.cc.

◆ setT0() [2/3]

void setT0 ( int  moduleID,
unsigned  asic,
double  T0 
)

Sets calibration for a single ASIC and switches status to calibrated.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)
T0shift in time [ns]

Definition at line 20 of file TOPCalAsicShift.cc.

◆ setT0() [3/3]

void setT0 ( int  moduleID,
unsigned  channel,
double  T0,
double  errT0 
)

Sets calibration for a single channel and switches status to calibrated.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)
T0channel T0
errT0error on T0

Definition at line 20 of file TOPCalChannelT0.cc.

◆ setTimeAxis() [1/2]

void setTimeAxis ( const std::vector< double > &  sampleTimes,
double  syncTimeBase 
)

Sets time axis from calibration data and switches status to calibrated.

Parameters
sampleTimesvector of 256 elements of sample times
syncTimeBasesinchronization time base (width of 2 ASIC windows)

Definition at line 33 of file TOPSampleTimes.cc.

◆ setTimeAxis() [2/2]

void setTimeAxis ( double  syncTimeBase)

Sets equidistant time axis (uncalibrated).

Parameters
syncTimeBasesinchronization time base (width of 2 ASIC windows)

Definition at line 23 of file TOPSampleTimes.cc.

◆ setUnusable() [1/4]

void setUnusable ( int  moduleID)

Switches calibration status to unusable to flag badly calibrated constant.

Parameters
moduleIDmodule ID (1-based)

Definition at line 108 of file TOPCalModuleAlignment.cc.

◆ setUnusable() [2/4]

void setUnusable ( int  moduleID)

Switches calibration status to unusable to flag badly calibrated constant.

Parameters
moduleIDmodule ID (1-based)

Definition at line 33 of file TOPCalModuleT0.cc.

◆ setUnusable() [3/4]

void setUnusable ( int  moduleID,
unsigned  asic 
)

Switches calibration status to unusable to flag badly calibrated constant.

Parameters
moduleIDmodule ID (1-based)
asicASIC number within a module (0 - 63)

Definition at line 36 of file TOPCalAsicShift.cc.

◆ setUnusable() [4/4]

void setUnusable ( int  moduleID,
unsigned  channel 
)

Switches calibration status to unusable to flag badly calibrated constant.

Parameters
moduleIDmodule ID (1-based)
channelhardware channel number (0-based)

Definition at line 37 of file TOPCalChannelT0.cc.

◆ setWindowShifts()

void setWindowShifts ( std::vector< int >  shifts)

Sets window shifts.

Parameters
shiftsvector of size = 6 with window shifts according to revo9count

Definition at line 20 of file TOPFrontEndSetting.cc.

21  {
22  if (shifts.size() != 6) {
23  B2ERROR("TOPFrontEndSetting::setWindowShifts: vector size must be 6");
24  return;
25  }
26  for (int i = 0; i < 6; i++) m_windowShifts[i] = shifts[i];
27  }
int m_windowShifts[6]
window shifts as a function of revo9count%6

◆ setX()

void setX ( int  moduleID,
double  x,
double  errX 
)

Sets the displacement x on a single module.

Parameters
moduleIDmodule ID (1-based)
xdisplacement along the x axis
errXerror on the displacement

Definition at line 61 of file TOPCalModuleAlignment.cc.

◆ setY()

void setY ( int  moduleID,
double  y,
double  errY 
)

Sets the displacement y on a single module.

Parameters
moduleIDmodule ID (1-based)
ydisplacement along the y axis
errYerror on the displacement

Definition at line 73 of file TOPCalModuleAlignment.cc.

◆ setZ()

void setZ ( int  moduleID,
double  z,
double  errZ 
)

Sets the displacement z on a single module.

Parameters
moduleIDmodule ID (1-based)
zdisplacement along the z axis
errZerror on the displacement

Definition at line 85 of file TOPCalModuleAlignment.cc.

◆ suppressAverage() [1/2]

void suppressAverage ( )

Subtracts arithmetic average of a module from constants whose status is not c_Default.

Arithmetic average is calculated from those whose status is c_Calibrated.

Definition at line 52 of file TOPCalChannelT0.cc.

◆ suppressAverage() [2/2]

void suppressAverage ( )

Subtracts arithmetic average from constants whose status is not c_Default.

Arithmetic average is calculated from those whose status is c_Calibrated.

Definition at line 44 of file TOPCalModuleT0.cc.

◆ TOPNominalTDC()

TOPNominalTDC ( int  numWindows,
int  subBits,
double  syncTimeBase,
int  numofBunches,
double  offset,
double  pileupTime,
double  doubleHitResolution,
double  timeJitter,
double  efficiency,
const std::string &  name = "TOPNominalTDC" 
)

Useful constructor (new xml file version)

Parameters
numWindowsnumber of ASIC windows per waveform
subBitsnumber of bits per sample
syncTimeBasesynchonization time base (time width of c_syncWindows)
numofBunchesnumber of bunches per syncTimeBase
offsettime offset
pileupTimepile-up time
doubleHitResolutiondouble hit resolution time
timeJitterr.m.s. of time jitter
efficiencyelectronic efficiency (fraction of hits above threshold)
nameobject name

Definition at line 22 of file TOPNominalTDC.cc.

◆ TOPSignalShape()

TOPSignalShape ( std::vector< double >  shape,
double  timeBin,
double  tau,
double  pole1,
double  pole2 
)

Full constructor.

Parameters
shapewaveform values (unnormalized) of positive pulse
timeBintime difference between two samples [ns]
tautime constant of the exponential tail used for extrapolation [ns]
pole1noise bandwidth: first pole [GHz]
pole2noise bandwidth: second pole [GHz]

Definition at line 21 of file TOPSignalShape.cc.

◆ UnfoldedWindow()

UnfoldedWindow ( const ROOT::Math::XYVector &  orig,
const ROOT::Math::XYVector &  dir,
const ROOT::Math::XYVector &  norm,
const ROOT::Math::XYVector &  slanted 
)

constructor

Parameters
origwindow origin
dirwindow surface direction (= upper surface normal)
normwindow surface normal (pointing out of prism)
slantedslanted surface normal

Definition at line 25 of file TOPGeoPrism.cc.