EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRichHitProducer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmRichHitProducer.h
1 
10 #ifndef CBM_RICH_HIT_PRODUCER
11 #define CBM_RICH_HIT_PRODUCER
12 
13 #include "FairTask.h"
14 
15 class CbmGeoRichPar;
16 class TClonesArray;
17 class TVector3;
18 
28 {
29 public:
34 
38  virtual ~CbmRichHitProducer();
39 
43  virtual void SetParContainers();
44 
48  virtual InitStatus Init();
49 
53  virtual void Exec(
54  Option_t* option);
55 
59  virtual void Finish();
60 
64  void SetDetectorType(Int_t detType){ fDetType = detType;}
65 
69  void SetNofNoiseHits(Int_t noise) {fNofNoiseHits = noise;}
70 
74  void SetCollectionEfficiency(Double_t collEff){fCollectionEfficiency = collEff;}
75 
79  void SetSigmaMirror(Double_t sigMirror) {fSigmaMirror = sigMirror;}
80 
84  void SetCrossTalkHitProb(Double_t crosstalk) {fCrossTalkHitProb = crosstalk;}
85 
93  void AddCrossTalkHits(
94  Double_t x,
95  Double_t y,
96  Int_t pointInd,
97  Int_t RichDetID);
98 
108  void AddHit(
109  TVector3 &posHit,
110  TVector3 &posHitErr,
111  Int_t address,
112  Int_t pmtID,
113  Double_t ampl,
114  Int_t index);
115 
125  Double_t xPoint,
126  Double_t yPoint,
127  Double_t& xHit,
128  Double_t& yHit,
129  Int_t& pmtID);
130 
141  Double_t sigma,
142  Double_t xPoint,
143  Double_t yPoint,
144  Double_t& xHit,
145  Double_t& yHit,
146  Int_t & pmtID);
147 
157  Double_t xPoint,
158  Double_t yPoint,
159  Double_t& xHit,
160  Double_t& yHit,
161  Int_t& pmtID);
162 
166  Double_t OnePhotonAmplitude(
167  Double_t x);
168 
173  Double_t GetAmplitude();
174 
183  void SetPhotoDetPar(
184  Int_t det_type,
185  Double_t& lambda_min,
186  Double_t& lambda_max,
187  Double_t& lambda_step,
188  Double_t efficiency[]);
189 
204  static void TiltPoint(
205  TVector3 *inPos,
206  TVector3 *outPos,
207  Double_t phi,
208  Double_t theta,
209  Double_t detZOrig,
210  Bool_t noTilting = false);
211 
212 private:
213 
214  TClonesArray* fRichPoints; // RICH MC points
215  TClonesArray* fRichHits; // RICH hits
216  //TClonesArray* fMcTracks; // Monte-Carlo tracks
217 
218  Int_t fNHits; // Number of hits
219  Int_t fNDoubleHits; // Number of double hits
220 
221  static constexpr Double_t c = 2.998E8; // speed of light
222  static constexpr Double_t h = 6.626E-34; // Planck constant
223  static constexpr Double_t e = 1.6022E-19; // elementary charge
224 
225  Double_t fNRefrac; // refraction index
226  Int_t fDetection; // flag for detection
227  Int_t fNEvents; // event number
228 
229  Double_t fDetX; // X-coordinate of photodetector
230  Double_t fDetY; // Y-coordinate of photodetector
231  Double_t fDetZ; // Z-coordinate of photodetector
232  Double_t fDetZ_org; // X-coordinate of photodetector (original from parameter file)
233  Double_t fDetWidthX; // width of photodetector in x
234  Double_t fDetWidthY; // width of photodetector in y
235 
236  TObjArray *fSensNodes;
237  TObjArray *fPassNodes;
239 
240  // Parameters of photodetector
241  Double_t fPhotomulRadius; // radius of photomultiplier [cm], set according to detector type
242  Double_t fPhotomulDist; // distance between PMT tube [cm], set according to detector type
243  Int_t fDetType; // detector type
244  Int_t fNofNoiseHits; // number of noise hits
245  Double_t fCollectionEfficiency; // collection efficiency for photoelectrons in PMT optics
246  Double_t fSigmaMirror; // additinal smearing of MC Points due to light scattering in mirror
247 
248  Double_t fTheta; // angle by which photodetector was tilted around x-axis
249  Double_t fPhi; // angle by which photodetector was tilted around y-axis
250 
251  Double_t fCrossTalkHitProb;// probability of cross talk hit
252  Int_t fNofCrossTalkHits; // Number of cross talk hits
253 
258 
263 
265 };
266 
267 #endif