CbmRoot
CbmMcbmCheckTimingAlgo Class Reference

#include <CbmMcbmCheckTimingAlgo.h>

Collaboration diagram for CbmMcbmCheckTimingAlgo:
[legend]

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

CbmDigiManagerfDigiMan = nullptr
 
const std::vector< CbmTofDigi > * fpT0DigiVec = nullptr
 
UInt_t fuNbTs = 0
 
CheckTimingDetector fRefDet {CheckTimingDetector(ECbmModuleId::kT0, "T0")}
 
std::vector< CheckTimingDetectorfvDets
 
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"
 

Detailed Description

Definition at line 44 of file CbmMcbmCheckTimingAlgo.h.

Constructor & Destructor Documentation

◆ CbmMcbmCheckTimingAlgo() [1/2]

CbmMcbmCheckTimingAlgo::CbmMcbmCheckTimingAlgo ( )

Definition at line 34 of file CbmMcbmCheckTimingAlgo.cxx.

◆ CbmMcbmCheckTimingAlgo() [2/2]

CbmMcbmCheckTimingAlgo::CbmMcbmCheckTimingAlgo ( const CbmMcbmCheckTimingAlgo )
delete

◆ ~CbmMcbmCheckTimingAlgo()

CbmMcbmCheckTimingAlgo::~CbmMcbmCheckTimingAlgo ( )

Constructor with parameters (Optional) Destructor

Definition at line 37 of file CbmMcbmCheckTimingAlgo.cxx.

Member Function Documentation

◆ AddCheckDetector()

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().

◆ CheckDataPresence()

void CbmMcbmCheckTimingAlgo::CheckDataPresence ( CheckTimingDetector  detToCheck)
private

◆ CheckInterSystemOffset()

template<class DigiRef >
void CbmMcbmCheckTimingAlgo::CheckInterSystemOffset
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.

◆ ClassDefNV()

CbmMcbmCheckTimingAlgo::ClassDefNV ( CbmMcbmCheckTimingAlgo  ,
 
)
private

◆ CreateHistos()

void CbmMcbmCheckTimingAlgo::CreateHistos ( )
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().

◆ FillTimeOffsetHistos()

template<class Digi >
void CbmMcbmCheckTimingAlgo::FillTimeOffsetHistos ( const Double_t  dRefTime,
const Double_t  dRefCharge,
UInt_t  uDetIdx 
)
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.

◆ Finish()

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().

◆ Init()

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().

◆ operator=()

CbmMcbmCheckTimingAlgo CbmMcbmCheckTimingAlgo::operator= ( const CbmMcbmCheckTimingAlgo )
delete

◆ ProcessTs()

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().

◆ ReInit()

Bool_t CbmMcbmCheckTimingAlgo::ReInit ( )

ReInitiliazation of task when the runID changes

Definition at line 175 of file CbmMcbmCheckTimingAlgo.cxx.

◆ RemoveCheckDetector()

void CbmMcbmCheckTimingAlgo::RemoveCheckDetector ( ECbmModuleId  detIn)

Definition at line 493 of file CbmMcbmCheckTimingAlgo.cxx.

References fvDets.

Referenced by CbmMcbmCheckTimingTask::RemoveCheckDetector().

◆ SetOutFilename()

void CbmMcbmCheckTimingAlgo::SetOutFilename ( TString  sNameIn)
inline

Definition at line 75 of file CbmMcbmCheckTimingAlgo.h.

References fOutFileName.

Referenced by CbmMcbmCheckTimingTask::SetOutFilename().

◆ SetParContainers()

void CbmMcbmCheckTimingAlgo::SetParContainers ( )

Load the parameter container from the runtime database

Definition at line 40 of file CbmMcbmCheckTimingAlgo.cxx.

◆ SetReferenceDetector()

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 
)

◆ WriteHistos()

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().

Member Data Documentation

◆ fDigiMan

CbmDigiManager* CbmMcbmCheckTimingAlgo::fDigiMan = nullptr
private

Input array from previous already existing data level

Definition at line 107 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CheckDataPresence(), CheckInterSystemOffset(), and FillTimeOffsetHistos().

◆ fOutFileName

TString CbmMcbmCheckTimingAlgo::fOutFileName = "data/HistosCheckTiming.root"
private

Name of the histogram output file

Definition at line 133 of file CbmMcbmCheckTimingAlgo.h.

Referenced by SetOutFilename(), and WriteHistos().

◆ fpT0DigiVec

const std::vector<CbmTofDigi>* CbmMcbmCheckTimingAlgo::fpT0DigiVec = nullptr
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().

◆ fRefDet

◆ fuNbTs

UInt_t CbmMcbmCheckTimingAlgo::fuNbTs = 0
private

Definition at line 113 of file CbmMcbmCheckTimingAlgo.h.

Referenced by FillTimeOffsetHistos(), Finish(), and ProcessTs().

◆ fvDets

◆ fvhDetSelfDiff

std::vector<TH1*> CbmMcbmCheckTimingAlgo::fvhDetSelfDiff = {}
private

vectors storing histograms for each detector under investigation

Definition at line 125 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CheckInterSystemOffset(), CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().

◆ fvhDetToRefDiff

std::vector<TH1*> CbmMcbmCheckTimingAlgo::fvhDetToRefDiff = {}
private

Definition at line 126 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().

◆ fvhDetToRefDiffDetCharge

std::vector<TH2*> CbmMcbmCheckTimingAlgo::fvhDetToRefDiffDetCharge = {}
private

Definition at line 128 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().

◆ fvhDetToRefDiffEvo

std::vector<TH2*> CbmMcbmCheckTimingAlgo::fvhDetToRefDiffEvo = {}
private

Definition at line 129 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().

◆ fvhDetToRefDiffEvoLong

std::vector<TH2*> CbmMcbmCheckTimingAlgo::fvhDetToRefDiffEvoLong = {}
private

Definition at line 130 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().

◆ fvhDetToRefDiffRefCharge

std::vector<TH2*> CbmMcbmCheckTimingAlgo::fvhDetToRefDiffRefCharge = {}
private

Definition at line 127 of file CbmMcbmCheckTimingAlgo.h.

Referenced by CreateHistos(), FillTimeOffsetHistos(), and WriteHistos().


The documentation for this class was generated from the following files:
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CheckTimingDetector
Definition: CbmMcbmCheckTimingAlgo.h:20
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.