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:
44 
46  PndDrcHitProducerReal(Int_t verbose, Int_t det_type);
47 
49  virtual ~PndDrcHitProducerReal();
50 
52  // virtual void SetParContainers();
53  virtual InitStatus Init();
54 
56  virtual void Exec(Option_t *option);
57 
59  virtual void Finish();
60 
65  PndDrcHit *AddHit(Int_t detID, TVector3 posHit, TVector3 dPosHit, Double_t thetaC, Double_t errThetaC, Int_t index);
66 
71  PndDrcPDHit *AddPDHit(Int_t detID, TVector3 posPDHit, TVector3 dPosPDHit, Double_t time, Double_t timeThreshold, Int_t index1);
72 
74  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID);
75  void FindDrcHitPositionTilt(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID);
76 
78  void SetPhotonDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
79  void SetFakeDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
80  void SetPhotonDetEffOld(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
81  void SetPhotonDetEffNew(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
82 
84  void SetPhotonTransportEff(Double_t &, Double_t &, Double_t &, Double_t &, Int_t &, Double_t fEfficiency[]);
86  void NumberOfBounces(TVector3, TVector3, Int_t *, Int_t *, Double_t *, Double_t *);
87  Double_t FindPhiRot(Double_t, Double_t);
88  Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t);
89 
90  void SetIsDetEfficiency(Bool_t isDetEff) { fisDetEff = isDetEff; }
91  void SetIsPixelization(Bool_t isPixel) { fisPixel = isPixel; }
92  void SetTransportEfficiency(Bool_t isTran = 0) { fisTransportEff = isTran; }
93 
94  //########################################
95  void SetTilt(Double_t tilt = 0.) { ftilt = tilt; } // degrees
96  //########################################
97 
98  void DrawDetEfficiency(Bool_t dr = kFALSE) { fDrawing = dr; }
99 
100  protected:
101  private:
103  void ProcessPhotonPoint();
104  void ProcessBarPoint();
105  void Smear(Double_t &time, Double_t sigt);
106 
107  // basic parameters of DIRC
108  Double_t fpi;
109  Double_t fzup;
110  Double_t fzdown;
111  Double_t fradius;
112  Double_t fhthick;
113  Double_t fpipehAngle;
114  Double_t fbbGap;
115  Double_t fbbnum;
116  Double_t fbarnum;
117  Double_t fphi0;
118  Double_t fdphi;
119  Double_t flside;
120  Double_t fbarwidth;
121 
122  Bool_t fisDetEff;
123  Bool_t fisPixel;
124  Bool_t fisTransportEff;
125  Bool_t fDrawing;
126  Double_t ftilt;
127  Int_t fDetectorID;
128  TVector3 fPosHit;
129  TVector3 fDPosHit;
130  TVector3 fPosPDHit;
131  TVector3 fDPosPDHit;
132  Double_t fThetaC, fErrThetaC;
133  Double_t fTime, fTimeThreshold;
134  Int_t fRefIndex;
135  Int_t fPDRefIndex;
136 
137  TClonesArray *fBarPointArray; // DRC MC points in the bars
138  TClonesArray *fPDPointArray; // DRC MC points in the photon plane
139  TClonesArray *fHitArray; // DRC hits
140  TClonesArray *fPDHitArray; // DRC Photon Detectorhits
141  TClonesArray *fMCArray; // DRC Hits in the photon detector
142 
143  // TObjArray *fVolumeArray;
144  // TClonesArray* fListStack; // Tracks
145 
146  PndGeoDrcPar *fPar;
147 
148  PndGeoDrc *fGeo;
149 
151  Int_t fVerbose;
152 
154  Int_t fDetType; // detector type
155 
156  Double_t nRefrac; // Refractive index of photon detector
157  Double_t fPixelDim; // Pixel Diemsion of photocathode
158  Double_t fSigmat; // Time Resolution in ps
159  Double_t fCollectionEff; // Collection Efficiency
160  Double_t fPackingFraction; // Packing Fraction or Active Area Ratio
161  Double_t fRoughness; // Surface roughness (bars)
162  Int_t detection;
163  Int_t nevents;
164 
166  void SetParameters();
167 
168  ClassDef(PndDrcHitProducerReal, 1)
169 };
170 
171 #endif
virtual ~PndDrcHitProducerReal()
void SetPhotonDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
void SetTilt(Double_t tilt=0.)
virtual InitStatus Init()
void SetPhotonDetEffNew(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[])
PndDrcPDHit * AddPDHit(Int_t detID, TVector3 posPDHit, TVector3 dPosPDHit, Double_t time, Double_t timeThreshold, Int_t index1)
void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID)
virtual void Exec(Option_t *option)
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)
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 *)
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)
virtual void Finish()