CbmRoot
|
#include <CbmMcbmCheckTimingAlgo.h>
Public Member Functions | |
CbmMcbmCheckTimingAlgo () | |
CbmMcbmCheckTimingAlgo (const CbmMcbmCheckTimingAlgo &)=delete | |
CbmMcbmCheckTimingAlgo | operator= (const CbmMcbmCheckTimingAlgo &)=delete |
~CbmMcbmCheckTimingAlgo () | |
Bool_t | Init () |
Bool_t | ReInit () |
void | ProcessTs () |
void | SetParContainers () |
void | Finish () |
void | SetOutFilename (TString sNameIn) |
void | WriteHistos () |
void | SetReferenceDetector (ECbmModuleId refDetIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0) |
void | AddCheckDetector (ECbmModuleId detIn, std::string sNameIn, Double_t dTimeRangeBegIn=-1000.0, Double_t dTimeRangeEndIn=1000.0, UInt_t uRangeNbBinsIn=320, UInt_t uChargeCutMinIn=0, UInt_t uChargeCutMaxIn=0) |
void | RemoveCheckDetector (ECbmModuleId detIn) |
Private Member Functions | |
void | CheckDataPresence (CheckTimingDetector detToCheck) |
void | CreateHistos () |
template<class DigiRef > | |
void | CheckInterSystemOffset () |
template<class Digi > | |
void | FillTimeOffsetHistos (const Double_t dRefTime, const Double_t dRefCharge, UInt_t uDetIdx) |
ClassDefNV (CbmMcbmCheckTimingAlgo, 1) | |
Private Attributes | |
CbmDigiManager * | fDigiMan = nullptr |
const std::vector< CbmTofDigi > * | fpT0DigiVec = nullptr |
UInt_t | fuNbTs = 0 |
CheckTimingDetector | fRefDet {CheckTimingDetector(ECbmModuleId::kT0, "T0")} |
std::vector< CheckTimingDetector > | fvDets |
std::vector< TH1 * > | fvhDetSelfDiff = {} |
vectors storing histograms for each detector under investigation More... | |
std::vector< TH1 * > | fvhDetToRefDiff = {} |
std::vector< TH2 * > | fvhDetToRefDiffRefCharge = {} |
std::vector< TH2 * > | fvhDetToRefDiffDetCharge = {} |
std::vector< TH2 * > | fvhDetToRefDiffEvo = {} |
std::vector< TH2 * > | fvhDetToRefDiffEvoLong = {} |
TString | fOutFileName = "data/HistosCheckTiming.root" |
Definition at line 44 of file CbmMcbmCheckTimingAlgo.h.
CbmMcbmCheckTimingAlgo::CbmMcbmCheckTimingAlgo | ( | ) |
Definition at line 34 of file CbmMcbmCheckTimingAlgo.cxx.
|
delete |
CbmMcbmCheckTimingAlgo::~CbmMcbmCheckTimingAlgo | ( | ) |
Constructor with parameters (Optional) Destructor
Definition at line 37 of file CbmMcbmCheckTimingAlgo.cxx.
void CbmMcbmCheckTimingAlgo::AddCheckDetector | ( | ECbmModuleId | detIn, |
std::string | sNameIn, | ||
Double_t | dTimeRangeBegIn = -1000.0 , |
||
Double_t | dTimeRangeEndIn = 1000.0 , |
||
UInt_t | uRangeNbBinsIn = 320 , |
||
UInt_t | uChargeCutMinIn = 0 , |
||
UInt_t | uChargeCutMaxIn = 0 |
||
) |
Definition at line 457 of file CbmMcbmCheckTimingAlgo.cxx.
References fvDets.
Referenced by CbmMcbmCheckTimingTask::AddCheckDetector().
|
private |
Handle special case for T0 as not yet supported in DigiManager
Definition at line 68 of file CbmMcbmCheckTimingAlgo.cxx.
References CheckTimingDetector::detId, fDigiMan, fpT0DigiVec, CbmDigiManager::Init(), CbmDigiManager::Instance(), CbmDigiManager::IsPresent(), kT0, CheckTimingDetector::sName, and CbmDigiManager::UseMuchBeamTimeDigi().
Referenced by Init().
|
private |
Re-initialize array references
Fill self time difference histo
Charge cut if defined!
Cut charges between Min and Max to reject pulser
Select charges between Max and Min to select pulser (Min and Max swapped!!)
Fill time difference for each check detector defined in list
Definition at line 222 of file CbmMcbmCheckTimingAlgo.cxx.
References CheckTimingDetector::detId, CheckTimingDetector::dPrevTime, fDigiMan, fpT0DigiVec, fRefDet, fvDets, fvhDetSelfDiff, CbmDigiManager::Get(), CbmDigiManager::GetNofDigis(), kMuch, kNotExist, kPsd, kRich, kSts, kT0, kTof, kTrd, CheckTimingDetector::sName, CheckTimingDetector::uChargeCutMax, and CheckTimingDetector::uChargeCutMin.
|
private |
|
private |
FIXME: Disable clang formatting for histograms declaration for now
Logarithmic bining for self time comparison
Parameters are NbDecadesLog, NbStepsDecade, NbSubStepsInStep
Add reference detector digi to digi time difference histo at end of vector
Register the histos in the HTTP server
Register histos for all checked detectors
Register the histo for reference detector digi to digi time difference
FIXME: Re-enable clang formatting after histograms declaration
Definition at line 90 of file CbmMcbmCheckTimingAlgo.cxx.
References fRefDet, fvDets, fvhDetSelfDiff, fvhDetToRefDiff, fvhDetToRefDiffDetCharge, fvhDetToRefDiffEvo, fvhDetToRefDiffEvoLong, fvhDetToRefDiffRefCharge, GenerateLogBinArray(), and CheckTimingDetector::sName.
Referenced by Init().
|
private |
Fill self correlation histo while avoiding double counting due to the "smart looping"
already past interesting range
Charge cut if defined!
Cut charges between Min and Max to reject pulser
Select charges between Max and Min to select pulser (Min and Max swapped!!)
Fill histos
Store earliest possible starting index for next reference digi (time sorted!)
Definition at line 328 of file CbmMcbmCheckTimingAlgo.cxx.
References fDigiMan, fpT0DigiVec, fRefDet, fuNbTs, fvDets, fvhDetSelfDiff, fvhDetToRefDiff, fvhDetToRefDiffDetCharge, fvhDetToRefDiffEvo, fvhDetToRefDiffEvoLong, fvhDetToRefDiffRefCharge, CbmDigiManager::Get(), CbmDigiManager::GetNofDigis(), kNotExist, kT0, and CheckTimingDetector::sName.
void CbmMcbmCheckTimingAlgo::Finish | ( | ) |
Finish task called at the end of the run
Definition at line 413 of file CbmMcbmCheckTimingAlgo.cxx.
References fuNbTs.
Referenced by CbmMcbmCheckTimingTask::Finish().
Bool_t CbmMcbmCheckTimingAlgo::Init | ( | ) |
Initiliazation of task at the beginning of a run
Check if all required data input storage are present Reference detector
Checked detectors
Definition at line 52 of file CbmMcbmCheckTimingAlgo.cxx.
References CheckDataPresence(), CreateHistos(), fRefDet, and fvDets.
Referenced by CbmMcbmCheckTimingTask::Init().
|
delete |
void CbmMcbmCheckTimingAlgo::ProcessTs | ( | ) |
Executed for each event.
Definition at line 178 of file CbmMcbmCheckTimingAlgo.cxx.
References CheckTimingDetector::detId, fRefDet, fuNbTs, kMuch, kPsd, kRich, kSts, kT0, kTof, kTrd, and CheckTimingDetector::sName.
Referenced by CbmMcbmCheckTimingTask::Exec().
Bool_t CbmMcbmCheckTimingAlgo::ReInit | ( | ) |
ReInitiliazation of task when the runID changes
Definition at line 175 of file CbmMcbmCheckTimingAlgo.cxx.
void CbmMcbmCheckTimingAlgo::RemoveCheckDetector | ( | ECbmModuleId | detIn | ) |
Definition at line 493 of file CbmMcbmCheckTimingAlgo.cxx.
References fvDets.
Referenced by CbmMcbmCheckTimingTask::RemoveCheckDetector().
|
inline |
Definition at line 75 of file CbmMcbmCheckTimingAlgo.h.
References fOutFileName.
Referenced by CbmMcbmCheckTimingTask::SetOutFilename().
void CbmMcbmCheckTimingAlgo::SetParContainers | ( | ) |
Load the parameter container from the runtime database
Definition at line 40 of file CbmMcbmCheckTimingAlgo.cxx.
void CbmMcbmCheckTimingAlgo::SetReferenceDetector | ( | ECbmModuleId | refDetIn, |
std::string | sNameIn, | ||
Double_t | dTimeRangeBegIn = -1000.0 , |
||
Double_t | dTimeRangeEndIn = 1000.0 , |
||
UInt_t | uRangeNbBinsIn = 320 , |
||
UInt_t | uChargeCutMinIn = 0 , |
||
UInt_t | uChargeCutMaxIn = 0 |
||
) |
Definition at line 442 of file CbmMcbmCheckTimingAlgo.cxx.
References CheckTimingDetector::detId, CheckTimingDetector::dTimeRangeBeg, CheckTimingDetector::dTimeRangeEnd, fRefDet, CheckTimingDetector::sName, CheckTimingDetector::uChargeCutMax, CheckTimingDetector::uChargeCutMin, and CheckTimingDetector::uRangeNbBins.
Referenced by CbmMcbmCheckTimingTask::SetReferenceDetector().
void CbmMcbmCheckTimingAlgo::WriteHistos | ( | ) |
Register the histo for reference detector digi to digi time difference
Definition at line 417 of file CbmMcbmCheckTimingAlgo.cxx.
References fOutFileName, fvDets, fvhDetSelfDiff, fvhDetToRefDiff, fvhDetToRefDiffDetCharge, fvhDetToRefDiffEvo, fvhDetToRefDiffEvoLong, and fvhDetToRefDiffRefCharge.
Referenced by CbmMcbmCheckTimingTask::SaveHistos().
|
private |
Input array from previous already existing data level
Definition at line 107 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CheckDataPresence(), CheckInterSystemOffset(), and FillTimeOffsetHistos().
|
private |
Name of the histogram output file
Definition at line 133 of file CbmMcbmCheckTimingAlgo.h.
Referenced by SetOutFilename(), and WriteHistos().
|
private |
T0 is not included in CbmDigiManager, so add it explicitly here
Definition at line 110 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CheckDataPresence(), CheckInterSystemOffset(), and FillTimeOffsetHistos().
|
private |
Definition at line 115 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CheckInterSystemOffset(), CreateHistos(), FillTimeOffsetHistos(), Init(), ProcessTs(), and SetReferenceDetector().
|
private |
Definition at line 113 of file CbmMcbmCheckTimingAlgo.h.
Referenced by FillTimeOffsetHistos(), Finish(), and ProcessTs().
|
private |
Definition at line 116 of file CbmMcbmCheckTimingAlgo.h.
Referenced by AddCheckDetector(), CheckInterSystemOffset(), CreateHistos(), FillTimeOffsetHistos(), Init(), RemoveCheckDetector(), and WriteHistos().
|
private |
vectors storing histograms for each detector under investigation
Definition at line 125 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CheckInterSystemOffset(), CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().
|
private |
Definition at line 126 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().
|
private |
Definition at line 128 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().
|
private |
Definition at line 129 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().
|
private |
Definition at line 130 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().
|
private |
Definition at line 127 of file CbmMcbmCheckTimingAlgo.h.
Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().