CbmRoot
Loading...
Searching...
No Matches
CbmTrdHitProducer.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci, Pascal Raisig, Florian Uhlig [committer] */
4
16#ifndef CBMTRDHITPRODUCER_H
17#define CBMTRDHITPRODUCER_H
18
19#include "CbmEvent.h"
20#include "CbmTrdCluster.h"
21
22#include <FairTask.h>
23
24#include <RtypesCore.h>
25#include <TClonesArray.h>
26
27#include <limits>
28
29class CbmTrdParModGeo;
31class CbmTrdParSetGas;
34class CbmTrdParSetGeo;
35class CbmTrdModuleRec;
36class CbmTrdHitProducer : public FairTask {
37 public:
42
46 virtual ~CbmTrdHitProducer();
47
51 virtual InitStatus Init();
52
56 virtual void Exec(Option_t* option = "");
57
61 virtual void Finish();
62 virtual void SetParContainers();
64 void SetHitTimeOffset(int dt) { fHitTimeOffset = dt; }
65
66 private:
69
70 CbmTrdModuleRec* AddModule(Int_t address, const CbmTrdParModGeo* pg);
71
77 UInt_t processClusters();
78
85 UInt_t processClusters(CbmEvent* event);
86
92 void processCluster(const Int_t clusterIdx);
93
101 UInt_t addModuleHits(CbmTrdModuleRec* mod, CbmEvent* event);
102
109 Int_t addHits(CbmEvent* event = nullptr);
110
111
113 TClonesArray* fClusters = nullptr;
115 TClonesArray* fHits = nullptr;
117 TClonesArray* fEvents = nullptr;
118 //================================================================== = {}
119 std::map<Int_t, CbmTrdModuleRec*> fModules = {};
125
127 UInt_t fNrTs = 0;
128
130 UInt_t fNrEvents = 0;
131
133 UInt_t fNrClusters = 0;
134
136 UInt_t fNrHits = 0;
137
139 UInt_t fNrHitsCall = 0;
140
142 Float_t fProcessTime = 0;
144
146};
147
148#endif
Data Container for TRD clusters.
Class characterising one event by a collection of links (indices) to data objects,...
Definition CbmEvent.h:34
UInt_t fNrClusters
Number of clusters as input for the hit production.
CbmTrdParSetGain * fGainPar
parameter list for keV->ADC gain conversion
CbmTrdHitProducer(const CbmTrdHitProducer &)
UInt_t addModuleHits(CbmTrdModuleRec *mod, CbmEvent *event)
Pass all hits produced by the given module to the TrdHit branch. In case of event not nullptr only th...
UInt_t fNrHits
Number of produced hits.
CbmTrdParSetGeo * fGeoPar
parameter list for modules geometry
CbmTrdHitProducer & operator=(const CbmTrdHitProducer &)
UInt_t processClusters()
Process all clusters found in the TrdClusters branch.
UInt_t fNrTs
Number of processed time slices.
void processCluster(const Int_t clusterIdx)
Produce a hit from the cluster found at clusterIdx in fClusters.
std::map< Int_t, CbmTrdModuleRec * > fModules
list of modules being processed
CbmTrdHitProducer()
Constructor.
virtual void SetParContainers()
UInt_t fNrHitsCall
Number of produced hits per call of Exec, i.e. Event(EbyE) or TimeSlice(TB).
CbmTrdParSetAsic * fAsicPar
parameter list for ASIC characterization
virtual void Exec(Option_t *option="")
Inherited from FairTask.
CbmTrdParSetDigi * fDigiPar
parameter list for read-out geometry
virtual ~CbmTrdHitProducer()
Destructor.
int fHitTimeOffset
hit time correction for synchronization
CbmTrdParSetGas * fGasPar
parameter list for HV status
virtual InitStatus Init()
Inherited form FairTask.
ClassDef(CbmTrdHitProducer, 2)
TClonesArray * fClusters
Input array of CbmTrdCluster.
Int_t addHits(CbmEvent *event=nullptr)
Loop over all modules in the given geometry and call addModuleHits(imodule)
UInt_t fNrEvents
Number of processed events (without CbmEvent corresponds to nr of exec calls)
virtual void Finish()
Inherited from FairTask.
CbmTrdModuleRec * AddModule(Int_t address, const CbmTrdParModGeo *pg)
void SetHitTimeOffset(int dt)
Correction of hit time in TRD2D due to different processes.
Float_t fProcessTime
Total processing time [RealTime].
TClonesArray * fEvents
Array connected to the CbmEvent branch.
TClonesArray * fHits
Output array of CbmTrdHit.
Abstract class for module wise cluster finding and hit reconstruction.
Definition of geometry for one TRD module.
Describe TRD module ASIC settings (electronic gain, delays, etc)
Describe TRD module working settings (HV, etc)