5#ifndef CBMMCBM2019TIMEWINEVENTBUILDERALGO_H
6#define CBMMCBM2019TIMEWINEVENTBUILDERALGO_H
50 Int_t iTriggerMaxDigisIn, Double_t fdTimeWinBegIn, Double_t fdTimeWinEndIn)
123 UInt_t uTriggerMinDigisIn = 0, Int_t iTriggerMaxDigisIn = -1,
124 Double_t fdTimeWinBegIn = -100, Double_t fdTimeWinEndIn = 100);
126 Int_t iTriggerMaxDigisIn = -1, Double_t fdTimeWinBegIn = -100, Double_t fdTimeWinEndIn = 100);
175 template<
class DigiSeed>
177 void CheckSeed(Double_t dSeedTime, UInt_t uSeedDigiIdx);
178 template<
class DigiCheck>
200 std::vector<EventBuilderDetector>
fvDets = {
239 std::vector<std::pair<TNamed*, std::string>>
241 std::vector<std::pair<TCanvas*, std::string>>
@ kTrd
Transition Radiation Detector.
@ kTof
Time-of-flight Detector.
@ kPsd
Projectile spectator detector.
@ kSts
Silicon Tracking System.
@ kMuch
Muon detection system.
@ kRich
Ring-Imaging Cherenkov Detector.
static const EventBuilderDetector kEventBuilderDetSts
Pre-defined detector types.
static const EventBuilderDetector kEventBuilderDetPsd
static const EventBuilderDetector kEventBuilderDetUndef
static const EventBuilderDetector kEventBuilderDetBmon
static const EventBuilderDetector kEventBuilderDetTrd
static const EventBuilderDetector kEventBuilderDetRich
static const EventBuilderDetector kEventBuilderDetMuch
static const EventBuilderDetector kEventBuilderDetTof
static double dTsStartTime
Class characterising one event by a collection of links (indices) to data objects,...
CbmMcbm2019TimeWinEventBuilderAlgo()
CBM headers.
void SetIgnoreTsOverlap(Bool_t bFlagIn=kTRUE)
Double_t fdPrevEvtTime
Timeslice Counter.
TH2 * fhNbDigiPerEvtTime
histogram with the nb of all digis in the event
static constexpr Double_t kdDefaultTimeWinEnd
UInt_t fuErrors
Event Counter.
void SetTsParameters(Double_t dTsStartTime, Double_t dTsLength, Double_t dTsOverLength)
void CheckSeed(Double_t dSeedTime, UInt_t uSeedDigiIdx)
Double_t fdWidestTimeWinRange
std::vector< EventBuilderDetector > fvDets
const TimesliceMetaData * pTsMetaData
EventBuilderDetector fRefDet
CbmMcbm2019TimeWinEventBuilderAlgo(const CbmMcbm2019TimeWinEventBuilderAlgo &)=delete
void ResetHistograms(Bool_t bResetTime=kTRUE)
std::vector< std::pair< TNamed *, std::string > > fvpAllHistoPointers
vector with all created events
void SetTriggerWindow(ECbmModuleId selDet, Double_t dWinBeg, Double_t dWinEnd)
UInt_t fuNrTs
Error Counter.
void SetFillHistos(Bool_t var)
void AddDigiToEvent(EventBuilderDetector &det, Int_t uIdx)
const std::vector< CbmTofDigi > * fBmonDigiVec
void UpdateTimeWinBoundariesExtrema()
static constexpr Double_t kdDefaultTimeWinBeg
Constants.
TH1 * fhEventSize
histogram with the interval in seed time of consecutive events
Bool_t CheckDataAvailable(EventBuilderDetector &det)
Internal methods.
void SetTriggerMinNumber(ECbmModuleId selDet, UInt_t uVal)
Bool_t fbFillHistos
Ignore data in Overlap part of the TS.
Double_t fdEarliestTimeWinBeg
Bool_t fbUseMuchBeamtimeDigi
Switch ON/OFF filling of histograms.
Double_t fdLatestTimeWinEnd
EOverlapMode fOverMode
Event building mode and detectors selection.
void UpdateWidestTimeWinRange()
CbmDigiManager * fDigiMan
std::vector< TH2 * > fvhNbDigiPerEvtTimeDet
histogram with the nb of all digis per event vs seed time of the events
void SetReferenceDetector(ECbmModuleId refDet, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn=0, Int_t iTriggerMaxDigisIn=-1, Double_t fdTimeWinBegIn=-100, Double_t fdTimeWinEndIn=100)
TClonesArray * fTimeSliceMetaDataArray
void AddDetector(ECbmModuleId selDet, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn=0, Int_t iTriggerMaxDigisIn=-1, Double_t fdTimeWinBegIn=-100, Double_t fdTimeWinEndIn=100)
ClassDefNV(CbmMcbm2019TimeWinEventBuilderAlgo, 1)
Save previous event last digi time information.
std::vector< std::pair< TNamed *, std::string > > GetHistoVector()
void AddHistoToVector(TNamed *pointer, std::string sFolder="")
For monitor algos.
UInt_t fuCurEv
histograms with the nb of digis in each detector per event vs seed time of the events
Bool_t HasTrigger(CbmEvent *)
~CbmMcbm2019TimeWinEventBuilderAlgo()
std::vector< std::pair< TCanvas *, std::string > > fvpAllCanvasPointers
Vector of pointers to histograms + optional folder name.
void ChangeMuchBeamtimeDigiFlag(Bool_t bFlagIn=kFALSE)
std::vector< std::pair< TCanvas *, std::string > > GetCanvasVector()
TH1 * fhEventDt
histogram with the seed time of the events
std::vector< CbmEvent * > fEventVector
pointer to the event which is currently build
CbmEvent * fCurrentEvent
Data ouptut.
Bool_t CheckTriggerConditions(CbmEvent *event, EventBuilderDetector &det)
Double_t fdPrevEvtEndTime
Save previous time information.
void SetEventOverlapMode(EOverlapMode mode)
Control flags.
CbmMcbm2019TimeWinEventBuilderAlgo operator=(const CbmMcbm2019TimeWinEventBuilderAlgo &)=delete
void SearchMatches(Double_t dSeedTime, EventBuilderDetector &detMatch)
void AddCanvasToVector(TCanvas *pointer, std::string sFolder="")
TH1 * fhEventTime
Vector of pointers to canvases + optional folder name.
std::vector< CbmEvent * > & GetEventVector()
Data output access.
void RemoveDetector(EventBuilderDetector selDet)
void SetTriggerMaxNumber(ECbmModuleId selDet, Int_t iVal)
Int_t fiTriggerMaxDigis
Maximum number of digis per detector to generate an event, -1 means no cut, 0 means anti-coinc trigge...
Double_t GetTimeWinRange()
bool operator!=(const EventBuilderDetector &other) const
EventBuilderDetector(ECbmModuleId detIdIn, ECbmDataType dataTypeIn, std::string sNameIn, UInt_t uTriggerMinDigisIn, Int_t iTriggerMaxDigisIn, Double_t fdTimeWinBegIn, Double_t fdTimeWinEndIn)
bool operator==(const EventBuilderDetector &other) const
UInt_t fuTriggerMinDigis
Minimum number of Bmon digis needed to generate a trigger, 0 means don't use for trigger generation.
ECbmModuleId detId
Settings.
UInt_t fuStartIndex
Book-keeping variables.
Double_t fdTimeWinBeg
Selection Window.
EventBuilderDetector(ECbmModuleId detIdIn, ECbmDataType dataTypeIn, std::string sNameIn)