FairRoot/PandaRoot
PndDrcHitProducerReal.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndDrcHitProducer header file -----
3 // ----- Created 30/10/09 by Dipanwita Dutta
4 // ----- -----
5 // ----- -----
6 // -------------------------------------------------------------------------
7 
15 #ifndef PNDDRCHITPRODUCERREAL_H
16 #define PNDDRCHITPRODUCERREAL_H
17 
18 #include <PndPersistencyTask.h>
19 #include "TClonesArray.h"
20 #include "PndMCTrack.h"
21 #include "PndDrcHit.h"
22 #include "PndDrcPDHit.h"
23 #include "PndStack.h"
24 #include "FairBaseParSet.h"
25 #include "PndGeoDrcPar.h"
26 #include "PndGeoDrc.h"
27 #include "TString.h"
28 #include <string>
29 #include "TH1.h"
30 #include "TH2.h"
31 
32 #ifndef ROOT_TParticlePDG
33 #include "TParticlePDG.h"
34 #endif
35 #ifndef ROOT_TDatabasePDG
36 #include "TDatabasePDG.h"
37 #endif
38 
40 
41 public:
42 
45 
47  PndDrcHitProducerReal(Int_t verbose, Int_t det_type);
48 
50  virtual ~PndDrcHitProducerReal();
51 
53  // virtual void SetParContainers();
54  virtual InitStatus Init();
55 
57  virtual void Exec(Option_t* option);
58 
59 
61  virtual void Finish();
62 
67  PndDrcHit* AddHit(Int_t detID,
68  TVector3 posHit,
69  TVector3 dPosHit,
71  Double_t errThetaC,
72  Int_t index);
73 
78  PndDrcPDHit* AddPDHit(Int_t detID,
79  TVector3 posPDHit,
80  TVector3 dPosPDHit,
81  Double_t time,
82  Double_t timeThreshold,
83  Int_t index1);
84 
86  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint,
87  Double_t& xHit, Double_t& yHit, Int_t & pmtID);
88  void FindDrcHitPositionTilt(Double_t xPoint, Double_t yPoint,
89  Double_t& xHit, Double_t& yHit, Int_t & pmtID);
90 
92  void SetPhotonDetEff(Double_t& lambda_min, Double_t& lambda_max,
93  Double_t& lambda_step, Double_t efficiency[]);
94  void SetFakeDetEff(Double_t& lambda_min, Double_t& lambda_max,
95  Double_t& lambda_step, Double_t efficiency[]);
96  void SetPhotonDetEffOld(Double_t& lambda_min, Double_t& lambda_max,
97  Double_t& lambda_step, Double_t efficiency[]);
98  void SetPhotonDetEffNew(Double_t& lambda_min, Double_t& lambda_max,
99  Double_t& lambda_step, Double_t efficiency[]);
100 
102  void SetPhotonTransportEff(Double_t&, Double_t&, Double_t&, Double_t&, Int_t& , Double_t fEfficiency[]);
104  void NumberOfBounces(TVector3, TVector3, Int_t *, Int_t *, Double_t *, Double_t *);
107 
108  void SetIsDetEfficiency(Bool_t isDetEff){fisDetEff=isDetEff;}
109  void SetIsPixelization(Bool_t isPixel){fisPixel=isPixel;}
110  void SetTransportEfficiency(Bool_t isTran = 0){fisTransportEff = isTran;}
111 
112  //########################################
113  void SetTilt(Double_t tilt = 0.){ftilt = tilt;} // degrees
114  //########################################
115 
116  void DrawDetEfficiency(Bool_t dr=kFALSE){fDrawing = dr;}
117 
118 protected:
119 
120 private:
121 
123  void ProcessPhotonPoint();
124  void ProcessBarPoint();
125  void Smear(Double_t& time, Double_t sigt);
126 
127  // basic parameters of DIRC
141 
147  Int_t fDetectorID;
148  TVector3 fPosHit;
149  TVector3 fDPosHit;
150  TVector3 fPosPDHit;
151  TVector3 fDPosPDHit;
154  Int_t fRefIndex;
155  Int_t fPDRefIndex;
156 
157  TClonesArray* fBarPointArray; // DRC MC points in the bars
158  TClonesArray* fPDPointArray; // DRC MC points in the photon plane
159  TClonesArray* fHitArray; // DRC hits
160  TClonesArray* fPDHitArray; // DRC Photon Detectorhits
161  TClonesArray* fMCArray; // DRC Hits in the photon detector
162 
163  // TObjArray *fVolumeArray;
164  // TClonesArray* fListStack; // Tracks
165 
167 
169 
171  Int_t fVerbose;
172 
174  Int_t fDetType; // detector type
175 
176  Double_t nRefrac; //Refractive index of photon detector
177  Double_t fPixelDim; //Pixel Diemsion of photocathode
178  Double_t fSigmat; //Time Resolution in ps
179  Double_t fCollectionEff; //Collection Efficiency
180  Double_t fPackingFraction; //Packing Fraction or Active Area Ratio
181  Double_t fRoughness; // Surface roughness (bars)
182  Int_t detection;
183  Int_t nevents;
184 
186  void SetParameters();
187 
188 
189  ClassDef(PndDrcHitProducerReal,1)
190 
191 };
192 
193 #endif
void SetPhotonDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
void SetTilt(Double_t tilt=0.)
void Smear(Double_t &time, Double_t sigt)
#define verbose
void SetPhotonDetEffNew(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID)
virtual InitStatus Init()
void SetPhotonTransportEff(Double_t &, Double_t &, Double_t &, Double_t &, Int_t &, Double_t fEfficiency[])
void SetPhotonDetEffOld(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
void DrawDetEfficiency(Bool_t dr=kFALSE)
void SetTransportEfficiency(Bool_t isTran=0)
void SetIsDetEfficiency(Bool_t isDetEff)
Double_t
void SetFakeDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
void NumberOfBounces(TVector3, TVector3, Int_t *, Int_t *, Double_t *, Double_t *)
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
PndDrcPDHit * AddPDHit(Int_t detID, TVector3 posPDHit, TVector3 dPosPDHit, Double_t time, Double_t timeThreshold, Int_t index1)
virtual void Exec(Option_t *option)
Double_t FindPhiRot(Double_t, Double_t)
void SetIsPixelization(Bool_t isPixel)
PndDrcHit * AddHit(Int_t detID, TVector3 posHit, TVector3 dPosHit, Double_t thetaC, Double_t errThetaC, Int_t index)
Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t)
void FindDrcHitPositionTilt(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID)
Double_t thetaC
Definition: plot_dirc.C:16