CbmRoot
CbmRichMCbmHitProducer.h
Go to the documentation of this file.
1 
2 #ifndef CBM_RICH_MCBM_HIT_PRODUCER
3 #define CBM_RICH_MCBM_HIT_PRODUCER
4 
5 #include "CbmRichRecGeoPar.h"
6 #include "FairTask.h"
7 
8 #include "CbmDigiManager.h" // for ROOTCLING
9 
10 class TClonesArray;
11 class TVector3;
12 class CbmEvent;
13 class CbmRichDigi;
14 
16 public:
17  UInt_t fTrbId;
18  UInt_t fChannel;
19  Double_t fX;
20  Double_t fY;
21  Double_t fZ;
22 };
23 
24 class CbmRichMCbmHitProducer : public FairTask {
25 public:
30 
34  virtual ~CbmRichMCbmHitProducer();
35 
39  virtual void SetParContainers();
40 
44  virtual InitStatus Init();
45 
46 
50  virtual void Exec(Option_t* option);
51 
55  virtual void Finish();
56 
57 
61  void ProcessData(CbmEvent* event);
62 
63 
67  void ProcessDigi(CbmEvent* event, Int_t digiIndex);
68 
69 
73  void SetMappingFile(const std::string& mappingFile) {
74  fMappingFile = mappingFile;
75  }
76 
77 
81  void setToTLimits(double low, double high) {
82  fToTLimitLow = low;
83  fToTLimitHigh = high;
84  }
85 
86 
90  void setToTLimitLow(double low) { fToTLimitLow = low; }
91 
92 
96  void setToTLimitHigh(double high) { fToTLimitHigh = high; }
97 
98 
102  void applyToTCut() { fDoToT = true; }
103 
107  void DoRestrictToAcc(bool val = true) { fRestrictToAcc = val; }
108 
112  void DoRestrictToFullAcc(bool val = true) { fRestrictToFullAcc = val; }
113 
114 
115 private:
117  TClonesArray* fRichHits; // RICH hits
118  TClonesArray* fCbmEvents = nullptr; // CbmEvent for time-based simulations
119  bool fDoToT = false;
120  bool fRestrictToAcc = false;
121  bool fRestrictToFullAcc = false;
123  double fToTLimitLow = 0.;
124  double fToTLimitHigh = 1000.;
125 
126  std::map<Int_t, CbmRichMCbmMappingData> fRichMapping;
127 
128  Int_t fEventNum; // event number
129 
130  Int_t fNofHits = 0;
131 
132  Double_t fHitError;
133 
134  std::string fMappingFile;
135 
136  void InitMapping();
137 
138  bool isInToT(const double ToT);
139 
140  bool RestrictToAcc(TVector3& pos);
141  bool RestrictToAcc(Double_t x, Double_t y);
142 
143  bool RestrictToFullAcc(TVector3& pos);
144  bool RestrictToFullAcc(Double_t x, Double_t y);
145 
146  bool RestrictToAerogelAccDec2019(TVector3& pos);
147  bool RestrictToAerogelAccDec2019(Double_t x, Double_t y);
148 
153  void AddHit(CbmEvent* event,
154  TVector3& posHit,
155  const CbmRichDigi* digi,
156  Int_t index,
157  Int_t PmtId);
158 
163 
168 
169  ClassDef(CbmRichMCbmHitProducer, 1)
170 };
171 
172 #endif
CbmRichMCbmHitProducer::CbmRichMCbmHitProducer
CbmRichMCbmHitProducer()
Default constructor.
Definition: CbmRichMCbmHitProducer.cxx:21
CbmRichMCbmMappingData::fTrbId
UInt_t fTrbId
Definition: CbmRichMCbmHitProducer.h:17
CbmRichMCbmHitProducer::setToTLimitLow
void setToTLimitLow(double low)
Definition: CbmRichMCbmHitProducer.h:90
CbmRichMCbmHitProducer::fToTLimitHigh
double fToTLimitHigh
Definition: CbmRichMCbmHitProducer.h:124
CbmRichMCbmHitProducer::DoRestrictToAcc
void DoRestrictToAcc(bool val=true)
Definition: CbmRichMCbmHitProducer.h:107
CbmRichDigi
Definition: CbmRichDigi.h:25
CbmRichMCbmMappingData::fX
Double_t fX
Definition: CbmRichMCbmHitProducer.h:19
CbmRichMCbmHitProducer::fMappingFile
std::string fMappingFile
Definition: CbmRichMCbmHitProducer.h:134
CbmRichRecGeoPar.h
RICH geometry parameters for the reconstruction. This class is used for convinient storing of the bas...
CbmRichMCbmHitProducer::fToTLimitLow
double fToTLimitLow
Definition: CbmRichMCbmHitProducer.h:123
CbmRichMCbmHitProducer::fHitError
Double_t fHitError
Definition: CbmRichMCbmHitProducer.h:132
CbmRichMCbmHitProducer::fRichMapping
std::map< Int_t, CbmRichMCbmMappingData > fRichMapping
Definition: CbmRichMCbmHitProducer.h:126
CbmRichMCbmHitProducer::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmRichMCbmHitProducer.cxx:200
CbmRichMCbmHitProducer::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
Definition: CbmRichMCbmHitProducer.cxx:100
CbmRichMCbmHitProducer::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmRichMCbmHitProducer.cxx:37
CbmRichMCbmHitProducer::fRestrictToAcc
bool fRestrictToAcc
Definition: CbmRichMCbmHitProducer.h:120
CbmRichMCbmHitProducer
Definition: CbmRichMCbmHitProducer.h:24
CbmRichMCbmHitProducer::SetMappingFile
void SetMappingFile(const std::string &mappingFile)
Definition: CbmRichMCbmHitProducer.h:73
CbmRichMCbmHitProducer::AddHit
void AddHit(CbmEvent *event, TVector3 &posHit, const CbmRichDigi *digi, Int_t index, Int_t PmtId)
Add hit to the output array (and) CbmEvent if it is not NULL.
Definition: CbmRichMCbmHitProducer.cxx:175
CbmRichMCbmHitProducer::ProcessData
void ProcessData(CbmEvent *event)
Definition: CbmRichMCbmHitProducer.cxx:118
CbmRichMCbmHitProducer::SetParContainers
virtual void SetParContainers()
Inherited from FairTask.
Definition: CbmRichMCbmHitProducer.cxx:35
CbmRichMCbmHitProducer::fRichHits
TClonesArray * fRichHits
Definition: CbmRichMCbmHitProducer.h:117
CbmRichMCbmHitProducer::fDoToT
bool fDoToT
Definition: CbmRichMCbmHitProducer.h:119
CbmRichMCbmHitProducer::RestrictToAcc
bool RestrictToAcc(TVector3 &pos)
Definition: CbmRichMCbmHitProducer.cxx:215
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmRichMCbmMappingData::fZ
Double_t fZ
Definition: CbmRichMCbmHitProducer.h:21
CbmRichMCbmHitProducer::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmRichMCbmHitProducer.h:116
CbmRichMCbmHitProducer::RestrictToAerogelAccDec2019
bool RestrictToAerogelAccDec2019(TVector3 &pos)
Definition: CbmRichMCbmHitProducer.cxx:258
CbmRichMCbmHitProducer::setToTLimits
void setToTLimits(double low, double high)
Definition: CbmRichMCbmHitProducer.h:81
CbmRichMCbmHitProducer::isInToT
bool isInToT(const double ToT)
Definition: CbmRichMCbmHitProducer.cxx:203
CbmRichMCbmHitProducer::InitMapping
void InitMapping()
Definition: CbmRichMCbmHitProducer.cxx:61
CbmRichMCbmHitProducer::fCbmEvents
TClonesArray * fCbmEvents
Definition: CbmRichMCbmHitProducer.h:118
CbmRichMCbmHitProducer::fEventNum
Int_t fEventNum
Definition: CbmRichMCbmHitProducer.h:128
CbmRichMCbmMappingData::fChannel
UInt_t fChannel
Definition: CbmRichMCbmHitProducer.h:18
CbmRichMCbmMappingData::fY
Double_t fY
Definition: CbmRichMCbmHitProducer.h:20
CbmRichMCbmHitProducer::fNofHits
Int_t fNofHits
Definition: CbmRichMCbmHitProducer.h:130
CbmDigiManager.h
CbmRichMCbmHitProducer::setToTLimitHigh
void setToTLimitHigh(double high)
Definition: CbmRichMCbmHitProducer.h:96
CbmRichMCbmHitProducer::operator=
CbmRichMCbmHitProducer & operator=(const CbmRichMCbmHitProducer &)
Assignment operator.
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmRichMCbmHitProducer::~CbmRichMCbmHitProducer
virtual ~CbmRichMCbmHitProducer()
Destructor.
Definition: CbmRichMCbmHitProducer.cxx:30
CbmRichMCbmHitProducer::DoRestrictToFullAcc
void DoRestrictToFullAcc(bool val=true)
Definition: CbmRichMCbmHitProducer.h:112
CbmRichMCbmHitProducer::applyToTCut
void applyToTCut()
Definition: CbmRichMCbmHitProducer.h:102
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmRichMCbmHitProducer::CbmRichMCbmHitProducer
CbmRichMCbmHitProducer(const CbmRichMCbmHitProducer &)
Copy constructor.
CbmRichMCbmHitProducer::ProcessDigi
void ProcessDigi(CbmEvent *event, Int_t digiIndex)
Definition: CbmRichMCbmHitProducer.cxx:141
CbmRichMCbmHitProducer::fRestrictToFullAcc
bool fRestrictToFullAcc
Definition: CbmRichMCbmHitProducer.h:121
CbmRichMCbmHitProducer::RestrictToFullAcc
bool RestrictToFullAcc(TVector3 &pos)
Definition: CbmRichMCbmHitProducer.cxx:238
CbmRichMCbmMappingData
Definition: CbmRichMCbmHitProducer.h:15
CbmRichMCbmHitProducer::fRestrictToAerogelAccDec2019
bool fRestrictToAerogelAccDec2019
Definition: CbmRichMCbmHitProducer.h:122