PandaRoot
PndDsk.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- PndDsk header file -----
15 // ----- Created 23/10/07 by P. Koch -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PNDDSK_H
19 #define PNDDSK_H
20 
21 #include "TLorentzVector.h"
22 #include "TVector3.h"
23 #include "TH2F.h"
24 #include "PndGeoDskFLG.h"
25 
26 #include "FairDetector.h"
27 #include "PndDskFLGHit.h"
28 
29 class TClonesArray;
30 class PndDskCerenkov;
31 class PndDskParticle;
32 class PndDskTrackPoint;
33 
34 class PndDsk : public FairDetector {
35 
36  public:
38  PndDsk();
39 
44  PndDsk(const char *name, Bool_t active);
45 
47  virtual ~PndDsk();
48 
52  virtual void Initialize();
53 
60  virtual Bool_t ProcessHits(FairVolume *vol = 0);
61 
67  virtual void EndOfEvent();
68 
73  virtual void Register();
74 
79  virtual TClonesArray *GetCollection(Int_t iColl) const;
80 
85  virtual void Print() const;
86 
91  virtual void Reset();
92 
100  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
101 
106  virtual void ConstructGeometry();
107 
113  virtual Bool_t CheckIfSensitive(std::string name);
114 
119  Bool_t DichroicMirrorTransmitted(Double_t wavelength, Int_t detector_type);
120 
125  PndDskCerenkov *AddCerenkov(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t energy, Double_t wavelength, Int_t motherTrackID,
126  Int_t motherPdgCode, TString motherPdgName);
127 
128  PndDskFLGHit *AddHit(Int_t trackID, Int_t detectorID, TVector3 position_store, TVector3 momentum_store, Double_t time, Double_t angIn, Double_t thetaC_store,
129  TVector3 Cherenkov_photon, Int_t light_guide, Int_t pixel);
130 
135  PndDskParticle *AddParticle(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Int_t pdgCode, TString pdgName, Double_t energy,
136  Int_t motherTrackID, Int_t motherPdgCode, TString motherPdgName, Double_t mass, Double_t angIn, Double_t thetaC, Int_t nPhot);
137 
142  PndDskTrackPoint *AddTrackPoint(Int_t trackID, Int_t detectorID, TVector3 position, TVector3 momentum, Double_t time, Double_t length, Double_t eLoss);
143 
145  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
146  // void SetDetectors(Int_t detectorTypes, Int_t detectorsPerArray, Bool_t usingMirrors); // not implemented
147  void SetPDE(Double_t pde) { fPDE = pde; }
148  void SetStoreCerenkovs(Bool_t storeCerenkovs) { fStoreCerenkovs = storeCerenkovs; }
149  void SetStoreParticles(Bool_t storeParticles) { fStoreParticles = storeParticles; }
150  void SetStoreTrackPoints(Bool_t storeTrackPoints) { fStoreTrackPoints = storeTrackPoints; }
151 
152  void SetTrapFraction(std::string name); // use trap fraction from fast sim, temp.
153  private:
161  Bool_t ProcessHitsCerenkov(FairVolume *vol = 0);
162  Bool_t ProcessHitsCerenkov_FLG(FairVolume *vol = 0);
170  Bool_t ProcessHitsParticle(FairVolume *vol = 0);
171 
176  Bool_t DoNotTrackCerenkov();
177 
178  TH2F *trapfrac[5];
179 
180  PndGeoDskFLG *fGeo;
181 
182  Int_t fDebugLevel;
183 
184  TClonesArray *fDskCerenkovCollection;
185  TClonesArray *fDskParticleCollection;
186  TClonesArray *fDskTrackPointCollection;
187 
188  TClonesArray *fDskFLGHitArray;
189 
190  Bool_t fStoreCerenkovs;
191  Bool_t fStoreParticles;
192  Bool_t fStoreTrackPoints;
193  Bool_t fStoreFLGHits;
194  Bool_t fCalcPWay;
195  Bool_t fMeasureTotalRefAngle;
196 
197  Int_t fTrackID;
198  Int_t fDetectorID;
199  TVector3 fPosition;
200  TVector3 fMomentum;
201  Double_t fTime;
202  Double_t fLength;
203  Double_t fELoss;
204 
205  Double_t fPDE;
206  Int_t fPdgCode;
207  Double_t fEnergy;
208  Double_t fWavelength;
209 
210  Int_t fMotherTrackID;
211  Int_t fMotherPdgCode;
212  TString fMotherPdgName;
213 
214  Short_t fDetType;
215  Int_t fDetNumber;
216  Double_t fDetTime;
217  TVector3 fDetMomentum;
218 
219  Double_t fPrimaryAngleToCerenkov;
220  Double_t fPrimaryHitAngle;
221  TVector3 fPrimaryHitMomentum;
222 
223  TString fPdgName;
224  TVector3 fEndPosition;
225  Double_t fEndTime;
226  TVector3 fEndMomentum;
227  Double_t fEndEnergy;
228 
229  Double_t fAngIn;
230  Double_t fThetaC;
231 
232  TLorentzVector tmpLVec;
233 
234  ClassDef(PndDsk, 1)
235 };
236 
237 #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:145
virtual void EndOfEvent()
void SetStoreTrackPoints(Bool_t storeTrackPoints)
Definition: PndDsk.h:150
virtual void Print() const
void SetStoreCerenkovs(Bool_t storeCerenkovs)
Definition: PndDsk.h:148
void SetStoreParticles(Bool_t storeParticles)
Definition: PndDsk.h:149
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:147
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:34