PandaRoot
PndDsk.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndDsk header file -----
3 // ----- Created 23/10/07 by P. Koch -----
4 // -------------------------------------------------------------------------
5 
6 #ifndef PNDDSK_H
7 #define PNDDSK_H
8 
9 #include "TLorentzVector.h"
10 #include "TVector3.h"
11 #include "TH2F.h"
12 #include "PndGeoDskFLG.h"
13 
14 #include "FairDetector.h"
15 #include "PndDskFLGHit.h"
16 
17 class TClonesArray;
18 class PndDskCerenkov;
19 class PndDskParticle;
20 class PndDskTrackPoint;
21 
22 class PndDsk : public FairDetector {
23 
24  public:
26  PndDsk();
27 
32  PndDsk(const char *name, Bool_t active);
33 
35  virtual ~PndDsk();
36 
40  virtual void Initialize();
41 
48  virtual Bool_t ProcessHits(FairVolume *vol = 0);
49 
55  virtual void EndOfEvent();
56 
61  virtual void Register();
62 
67  virtual TClonesArray *GetCollection(Int_t iColl) const;
68 
73  virtual void Print() const;
74 
79  virtual void Reset();
80 
88  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
89 
94  virtual void ConstructGeometry();
95 
101  virtual Bool_t CheckIfSensitive(std::string name);
102 
107  Bool_t DichroicMirrorTransmitted(Double_t wavelength, Int_t detector_type);
108 
113  PndDskCerenkov *AddCerenkov(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t energy, Double_t wavelength, Int_t motherTrackID,
114  Int_t motherPdgCode, TString motherPdgName);
115 
116  PndDskFLGHit *AddHit(Int_t trackID, Int_t detectorID, TVector3 position_store, TVector3 momentum_store, Double_t time, Double_t angIn, Double_t thetaC_store,
117  TVector3 Cherenkov_photon, Int_t light_guide, Int_t pixel);
118 
123  PndDskParticle *AddParticle(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Int_t pdgCode, TString pdgName, Double_t energy,
124  Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName, Double_t mass, Double_t angIn, Double_t thetaC, Int_t nPhot);
125 
130  PndDskTrackPoint *AddTrackPoint(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t length, Double_t eLoss);
131 
133  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
134  // void SetDetectors(Int_t detectorTypes, Int_t detectorsPerArray, Bool_t usingMirrors); // not implemented
135  void SetPDE(Double_t pde) { fPDE = pde; }
136  void SetStoreCerenkovs(Bool_t storeCerenkovs) { fStoreCerenkovs = storeCerenkovs; }
137  void SetStoreParticles(Bool_t storeParticles) { fStoreParticles = storeParticles; }
138  void SetStoreTrackPoints(Bool_t storeTrackPoints) { fStoreTrackPoints = storeTrackPoints; }
139 
140  void SetTrapFraction(std::string name); // use trap fraction from fast sim, temp.
141  private:
149  Bool_t ProcessHitsCerenkov(FairVolume *vol = 0);
150  Bool_t ProcessHitsCerenkov_FLG(FairVolume *vol = 0);
158  Bool_t ProcessHitsParticle(FairVolume *vol = 0);
159 
164  Bool_t DoNotTrackCerenkov();
165 
166  TH2F *trapfrac[5];
167 
168  PndGeoDskFLG *fGeo;
169 
170  Int_t fDebugLevel;
171 
172  TClonesArray *fDskCerenkovCollection;
173  TClonesArray *fDskParticleCollection;
174  TClonesArray *fDskTrackPointCollection;
175 
176  TClonesArray *fDskFLGHitArray;
177 
178  Bool_t fStoreCerenkovs;
179  Bool_t fStoreParticles;
180  Bool_t fStoreTrackPoints;
181  Bool_t fStoreFLGHits;
182  Bool_t fCalcPWay;
183  Bool_t fMeasureTotalRefAngle;
184 
185  Int_t fTrackID;
186  Int_t fDetectorID;
187  TVector3 fPosition;
188  TVector3 fMomentum;
189  Double_t fTime;
190  Double_t fLength;
191  Double_t fELoss;
192 
193  Double_t fPDE;
194  Int_t fPdgCode;
195  Double_t fEnergy;
196  Double_t fWavelength;
197 
198  Int_t fMotherTrackID;
199  Int_t fMotherPdgCode;
200  TString fMotherPdgName;
201 
202  Short_t fDetType;
203  Int_t fDetNumber;
204  Double_t fDetTime;
205  TVector3 fDetMomentum;
206 
207  Double_t fPrimaryAngleToCerenkov;
208  Double_t fPrimaryHitAngle;
209  TVector3 fPrimaryHitMomentum;
210 
211  TString fPdgName;
212  TVector3 fEndPosition;
213  Double_t fEndTime;
214  TVector3 fEndMomentum;
215  Double_t fEndEnergy;
216 
217  Double_t fAngIn;
218  Double_t fThetaC;
219 
220  TLorentzVector tmpLVec;
221 
222  ClassDef(PndDsk, 1)
223 };
224 
225 #endif // PNDDSK_H
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
PndDskFLGHit * AddHit(Int_t trackID, Int_t detectorID, TVector3 position_store, TVector3 momentum_store, Double_t time, Double_t angIn, Double_t thetaC_store, TVector3 Cherenkov_photon, Int_t light_guide, Int_t pixel)
virtual ~PndDsk()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual TClonesArray * GetCollection(Int_t iColl) const
void SetTrapFraction(std::string name)
virtual Bool_t CheckIfSensitive(std::string name)
virtual void ConstructGeometry()
void SetDebugLevel(Int_t debugLevel)
Definition: PndDsk.h:133
virtual void EndOfEvent()
void SetStoreTrackPoints(Bool_t storeTrackPoints)
Definition: PndDsk.h:138
virtual void Print() const
void SetStoreCerenkovs(Bool_t storeCerenkovs)
Definition: PndDsk.h:136
void SetStoreParticles(Bool_t storeParticles)
Definition: PndDsk.h:137
PndDskParticle * AddParticle(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Int_t pdgCode, TString pdgName, Double_t energy, Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName, Double_t mass, Double_t angIn, Double_t thetaC, Int_t nPhot)
PndDskTrackPoint * AddTrackPoint(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t length, Double_t eLoss)
virtual void Reset()
Bool_t DichroicMirrorTransmitted(Double_t wavelength, Int_t detector_type)
void SetPDE(Double_t pde)
Definition: PndDsk.h:135
virtual void Initialize()
virtual void Register()
PndDskCerenkov * AddCerenkov(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t energy, Double_t wavelength, Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName)
Definition: PndDsk.h:22