FairRoot/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 
23 class PndDsk : public FairDetector
24 {
25 
26  public:
27 
29  PndDsk();
30 
35  PndDsk(const char *name, Bool_t active);
36 
38  virtual ~PndDsk();
39 
43  virtual void Initialize();
44 
51  virtual Bool_t ProcessHits(FairVolume* vol = 0);
52 
58  virtual void EndOfEvent();
59 
64  virtual void Register();
65 
70  virtual TClonesArray* GetCollection(Int_t iColl) const;
71 
76  virtual void Print() const;
77 
82  virtual void Reset();
83 
91  virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset);
92 
97  virtual void ConstructGeometry();
98 
104  virtual Bool_t CheckIfSensitive(std::string name);
105 
110  Bool_t DichroicMirrorTransmitted(Double_t wavelength, Int_t detector_type);
111 
116  PndDskCerenkov* AddCerenkov(Int_t trackID, Int_t detectorID, TVector3 position,
117  TVector3 momentum, Double_t time, Double_t energy, Double_t wavelength,
118  Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName);
119 
120  PndDskFLGHit* AddHit(Int_t trackID, Int_t detectorID,
121  TVector3 position_store, TVector3 momentum_store, Double_t time,
122  Double_t angIn, Double_t thetaC_store,
123  TVector3 Cherenkov_photon, Int_t light_guide, Int_t pixel);
124 
125 
130  PndDskParticle* AddParticle(Int_t trackID, Int_t detectorID,
131  TVector3 position, TVector3 momentum, Double_t time,
132  Int_t pdgCode, TString pdgName, Double_t energy,
133  Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName,Double_t mass, Double_t angIn, Double_t thetaC, Int_t nPhot);
134 
139  PndDskTrackPoint* AddTrackPoint(Int_t trackID, Int_t detectorID, TVector3 position,
140  TVector3 momentum, Double_t time, Double_t length, Double_t eLoss);
141 
143  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
144  //void SetDetectors(Int_t detectorTypes, Int_t detectorsPerArray, Bool_t usingMirrors); // not implemented
145  void SetPDE(Double_t pde) { fPDE = pde; }
146  void SetStoreCerenkovs(Bool_t storeCerenkovs) { fStoreCerenkovs = storeCerenkovs; }
147  void SetStoreParticles(Bool_t storeParticles) { fStoreParticles = storeParticles; }
148  void SetStoreTrackPoints(Bool_t storeTrackPoints) { fStoreTrackPoints = storeTrackPoints; }
149 
150  void SetTrapFraction(std::string name); //use trap fraction from fast sim, temp.
151  private:
152 
160  Bool_t ProcessHitsCerenkov(FairVolume* vol = 0);
161  Bool_t ProcessHitsCerenkov_FLG(FairVolume* vol = 0);
169  Bool_t ProcessHitsParticle(FairVolume* vol = 0);
170 
176 
177  TH2F *trapfrac[5];
178 
180 
181  Int_t fDebugLevel;
182 
183  TClonesArray* fDskCerenkovCollection;
184  TClonesArray* fDskParticleCollection;
185  TClonesArray* fDskTrackPointCollection;
186 
187  TClonesArray* fDskFLGHitArray;
188 
195 
196  Int_t fTrackID;
197  Int_t fDetectorID;
198  TVector3 fPosition;
199  TVector3 fMomentum;
203 
205  Int_t fPdgCode;
208 
212 
213  Short_t fDetType;
214  Int_t fDetNumber;
216  TVector3 fDetMomentum;
217 
221 
223  TVector3 fEndPosition;
225  TVector3 fEndMomentum;
227 
230 
231  TLorentzVector tmpLVec;
232 
233  ClassDef(PndDsk,1)
234 
235 };
236 
237 #endif // PNDDSK_H
Int_t fPdgCode
Photon Detection Efficiency [0-1, 2].
Definition: PndDsk.h:205
TH2F * trapfrac[5]
Definition: PndDsk.h:177
TClonesArray * fDskTrackPointCollection
Particle collection.
Definition: PndDsk.h:185
Double_t fELoss
Track length since creation (without mothers) [cm].
Definition: PndDsk.h:202
virtual void Register()
Definition: PndDsk.cxx:195
Int_t fDebugLevel
Definition: PndDsk.h:181
virtual void ConstructGeometry()
Definition: PndDsk.cxx:255
TClonesArray * fDskCerenkovCollection
Debug level.
Definition: PndDsk.h:183
TClonesArray * fDskFLGHitArray
TrackPoint collection.
Definition: PndDsk.h:187
Double_t fEndEnergy
Momentum when particle disappears.
Definition: PndDsk.h:226
virtual void Print() const
Definition: PndDsk.cxx:222
Int_t fMotherTrackID
Vacuum wavelength hc/fEnergy [nm].
Definition: PndDsk.h:209
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndDsk.cxx:169
Int_t fTrackID
Whether to measure total reflection angle or not (default)
Definition: PndDsk.h:196
PndDsk()
Definition: PndDsk.cxx:55
virtual void Initialize()
Definition: PndDsk.cxx:126
Bool_t fCalcPWay
Whether to store FLGHits (default) or not.
Definition: PndDsk.h:193
void SetTrapFraction(std::string name)
Definition: PndDsk.cxx:135
TVector3 offset(2, 0, 0)
Bool_t fStoreTrackPoints
Whether to store Particles (default) or not.
Definition: PndDsk.h:191
Double_t fLength
Global time (since event start) [ns].
Definition: PndDsk.h:201
TClonesArray * fDskParticleCollection
Cerenkov collection.
Definition: PndDsk.h:184
virtual void EndOfEvent()
Definition: PndDsk.cxx:185
PndGeoDskFLG * fGeo
Definition: PndDsk.h:179
void SetDebugLevel(Int_t debugLevel)
Definition: PndDsk.h:143
TVector3 fEndMomentum
Time when particle disappears.
Definition: PndDsk.h:225
Double_t fThetaC
Definition: PndDsk.h:229
Double_t fEnergy
PDG code of current particle.
Definition: PndDsk.h:206
Bool_t fMeasureTotalRefAngle
Whether to calc Projected Way or not (default)
Definition: PndDsk.h:194
void SetStoreTrackPoints(Bool_t storeTrackPoints)
Definition: PndDsk.h:148
Double_t fTime
Momentum [GeV].
Definition: PndDsk.h:200
void SetStoreCerenkovs(Bool_t storeCerenkovs)
Definition: PndDsk.h:146
Double_t
Bool_t ProcessHitsParticle(FairVolume *vol=0)
Definition: PndDsk.cxx:725
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.cxx:352
void SetStoreParticles(Bool_t storeParticles)
Definition: PndDsk.h:147
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)
Definition: PndDsk.cxx:369
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)
Definition: PndDsk.cxx:337
Bool_t fStoreCerenkovs
DSK hits.
Definition: PndDsk.h:189
virtual Bool_t CheckIfSensitive(std::string name)
Definition: PndDsk.cxx:319
TVector3 fMomentum
Position [cm].
Definition: PndDsk.h:199
Bool_t ProcessHitsCerenkov(FairVolume *vol=0)
Definition: PndDsk.cxx:511
TString name
TLorentzVector tmpLVec
Definition: PndDsk.h:231
Bool_t fStoreFLGHits
Whether to store TrackPoints or not (default)
Definition: PndDsk.h:192
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndDsk.cxx:208
Bool_t fStoreParticles
Whether to store Cerenkovs (default) or not.
Definition: PndDsk.h:190
Bool_t DichroicMirrorTransmitted(Double_t wavelength, Int_t detector_type)
Definition: PndDsk.cxx:707
TString fPdgName
Angle between momentum of eachs first appearance.
Definition: PndDsk.h:222
Double_t fPrimaryHitAngle
Angle at the moment of first appearance.
Definition: PndDsk.h:219
Int_t fDetNumber
Detectortype that registered the Cerenkov.
Definition: PndDsk.h:214
Bool_t ProcessHitsCerenkov_FLG(FairVolume *vol=0)
Definition: PndDsk.cxx:401
Double_t fDetTime
Number of the Detector that registered the Cerenkov.
Definition: PndDsk.h:215
Double_t fWavelength
Energy [eV / GeV].
Definition: PndDsk.h:207
PndDskTrackPoint * AddTrackPoint(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t length, Double_t eLoss)
Definition: PndDsk.cxx:388
TVector3 fEndPosition
PDG name according to fPdgCode.
Definition: PndDsk.h:223
void SetPDE(Double_t pde)
Definition: PndDsk.h:145
TVector3 fDetMomentum
Global time when Cerenkov was detected [ns].
Definition: PndDsk.h:216
TString fMotherPdgName
PDG code of the particle that emitted this Cerenkov.
Definition: PndDsk.h:211
virtual void Reset()
Definition: PndDsk.cxx:232
Definition: PndDsk.h:23
TVector3 fPosition
Detector ID (volume)
Definition: PndDsk.h:198
Bool_t DoNotTrackCerenkov()
Definition: PndDsk.cxx:896
Double_t fPrimaryAngleToCerenkov
Momentum when detected [eV].
Definition: PndDsk.h:218
Double_t thetaC
Definition: plot_dirc.C:16
Int_t fDetectorID
Index of MCTrack.
Definition: PndDsk.h:197
Double_t fPDE
Energy deposit [GeV].
Definition: PndDsk.h:204
Short_t fDetType
translation of PDG code
Definition: PndDsk.h:213
Double_t fEndTime
Position when particles disappears.
Definition: PndDsk.h:224
Double_t fAngIn
Energy when particle disappears.
Definition: PndDsk.h:228
virtual ~PndDsk()
Definition: PndDsk.cxx:98
TVector3 fPrimaryHitMomentum
Angle to the z-Axis at first appearance.
Definition: PndDsk.h:220
Double_t energy
Definition: plot_dirc.C:15
Int_t fMotherPdgCode
Track ID of the particle that emitted this Cerenkov.
Definition: PndDsk.h:210
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition: PndDsk.cxx:245