FairRoot/PandaRoot
PndDrc.h
Go to the documentation of this file.
1 
2 // -------------------------------------------------------------------------
3 // ----- PndDrc header file -----
4 // ----- Created 11/10/06 by Annalisa Cecchi -----
5 // ----- -----
6 // -------------------------------------------------------------------------
7 
8 
9 #ifndef PNDDRC_H
10 #define PNDDRC_H
11 
12 
13 //#include "TClonesArray.h"
14 #include "TLorentzVector.h"
15 #include "FairDetector.h"
16 #include "TGraph.h"
17 #include "TRandom3.h"
18 #include "TArrayI.h"
19 #include "PndGeoHandling.h"
20 
21 //using namespace std;
22 
23 class TClonesArray;
24 class PndDrcPDPoint;
25 class PndDrcBarPoint;
26 class FairVolume;
27 class PndGeoDrc;
28 class PndDrcEVPoint;
29 class TClonesArray;
30 
31 class PndDrc : public FairDetector
32 {
33 
34  public:
35 
37  PndDrc();
38 
39 
44  PndDrc(const char* name, Bool_t active);
45 
46 
48  virtual ~PndDrc();
49 
53  void StopSecondaries(Bool_t ss = kFALSE){fStopSecondaries = ss;}
54 
59 
60 
61 
73 
86 
92  void SetMirrorReal(Bool_t mir = kTRUE){fTakeRealReflectivity = mir;}
93 
94  void SetBlackLensSides(Bool_t lesi = kFALSE){fSetBlackLens = lesi;}
95 
99  void SetStopTime(Double_t ti=-1.)
100  { fPhoMaxTime = ti;
101  if(fPhoMaxTime > 0.){fStopTime = kTRUE;}
102  if(fPhoMaxTime <= 0.){fStopTime = kFALSE;}
103  }
104 
109  void SetOptionForLUT(Bool_t oplu=kFALSE){fOptionForLUT = oplu;}
110 
111  virtual void Initialize();
112  void SetPersistency(Bool_t v = kTRUE) { fPersistency = v; }
113 
121  virtual Bool_t ProcessHits(FairVolume* vol = 0);
122 
123  virtual void FinishPrimary();
124 
130  virtual void EndOfEvent();
131 
132 
133  virtual void BeginEvent();
138  virtual void Register();
139 
140 
142  virtual TClonesArray* GetCollection(Int_t iColl) const;
143 
144 
149  virtual void Print() const;
150 
151 
156  virtual void Reset();
157 
158 
166  virtual void CopyClones(TClonesArray* clPD1, TClonesArray* clPD2, TClonesArray* clBar1, TClonesArray* clBar2, /*TClonesArray* clSdsPD1, TClonesArray* clSdsPD2, TClonesArray* clSdsBar1, TClonesArray* clSdsBar2, */ Int_t offset);
167 
168  // Int_t GetSensorId(TString);
169 
170  void FinishRun();
171 
175  virtual void ConstructGeometry();
176  virtual void ConstructOpGeometry();
177  // void ConstructASCIIGeometry();
178  // virtual void ConstructRootGeometry();
179  std::vector<std::string> fListOfSensitives;
180  bool CheckIfSensitive(std::string name);
181 
182  void NumberOfBounces(TVector3, TVector3, Int_t, Int_t *, Int_t *, Double_t *, Double_t *);
184 
185  PndDrcPDPoint* AddHit(Int_t trackID,
186  Int_t copyNo,
187  Int_t mcpId,
188  TVector3 pos,
189  TVector3 mom,
190  TVector3 momAtEV,
191  Double_t timeAtEV,
192  Double_t time,
193  Double_t length,
194  Int_t pdgCode,
195  Int_t eventID);
196 
197  PndDrcEVPoint* AddEVHit(Int_t trackID,
198  Int_t copyNo,
199  TVector3 pos,
200  TVector3 mom,
201  Double_t time,
202  Double_t length,
203  Int_t pdgCode,
204  Int_t eventID,
205  Double_t timestart,
206  Double_t timestartEV,
207  Double_t VeloPhoton,
208  TVector3 normal);
209 
210  PndDrcBarPoint* AddBarHit(Int_t trackID,
211  Int_t copyNo,
212  TVector3 pos,
213  TVector3 mom,
214  Double_t time,
215  Double_t length,
216  Int_t pdgCode,
218  Int_t nBar,
219  Int_t eventID,
220  Double_t mass);
221 
223 
224  private:
225 
227 
228  // basic parameters of DIRC
236 
242 
244 
246  Int_t fTrackID;
247  Int_t fBarId;
248  TLorentzVector fPos;
249  TLorentzVector fMom;
250  Double32_t fTime;
251  Double32_t fLength;
252  Double32_t fLengthEV;
254  Int_t fNBar;
255  Int_t fPosIndex;
256  Int_t volDetector;
258  TLorentzVector fMomAtEV;
263 
264  // from Initialisation:
267 
268  TGraph* fDetEff;
271  TRandom3 fRand;
272  Double_t fCollectionEff;//Collection Efficiency
273 
281 
283 
284  Int_t fPdgCode;
286 
287  TClonesArray* fDrcPDCollection;
288  TClonesArray* fDrcEVCollection;
289  TClonesArray* fDrcBarCollection;
290 
291  Int_t fEventID;
292 
293  // reset all parameters
294  void ResetParameters();
295 
296  ClassDef(PndDrc,1)
297 };
298 
299 
300 
301 inline void PndDrc::ResetParameters() {
302  fTrackID = -999;
303  fPos.SetXYZT(-999., -999., -999., -999.);
304  fMom.SetXYZT(-999., -999., -999., -999.) ;
305  fTime = -999;
306  fLength = -999;
307  fPdgCode = -999;
308  fAngIn = -999;
309  fThetaC = -999;
310  fNBar = -999;
311  //fEventID = -999;
312  fMass = -999;
313 }
314 
315 
316 #endif
317 
318 
319 
320 
TVector3 pos
Double_t fpipehAngle
Definition: PndDrc.h:234
Double_t fEfficiencyR[1000]
Definition: PndDrc.h:265
virtual void Register()
Definition: PndDrc.cxx:589
Double_t fzdown
Definition: PndDrc.h:231
virtual Bool_t ProcessHits(FairVolume *vol=0)
Definition: PndDrc.cxx:291
virtual void ConstructOpGeometry()
Definition: PndDrc.cxx:679
Double_t fbarwidth
Definition: PndDrc.h:241
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
void SetStopTime(Double_t ti=-1.)
Set time after which photons are killed.
Definition: PndDrc.h:99
Double_t fzup
Definition: PndDrc.h:230
void SetBlackLensSides(Bool_t lesi=kFALSE)
Definition: PndDrc.h:94
Bool_t fStopTime
Definition: PndDrc.h:274
Double_t fPhoMaxTime
Definition: PndDrc.h:275
Bool_t fTransportEffAtProduction
Definition: PndDrc.h:270
TLorentzVector fMom
position
Definition: PndDrc.h:249
Double_t fbbGap
Definition: PndDrc.h:235
void SetPersistency(Bool_t v=kTRUE)
Definition: PndDrc.h:112
void NumberOfBounces(TVector3, TVector3, Int_t, Int_t *, Int_t *, Double_t *, Double_t *)
Definition: PndDrc.cxx:500
Bool_t fPersistency
Definition: PndDrc.h:222
virtual void Reset()
Definition: PndDrc.cxx:622
Double_t mom
Definition: plot_dirc.C:14
virtual ~PndDrc()
Definition: PndDrc.cxx:197
Double32_t fTime
momentum
Definition: PndDrc.h:250
Int_t fTrackID
Switch ON/OFF Cherenkov propagation.
Definition: PndDrc.h:246
TVector3 offset(2, 0, 0)
void FinishRun()
Definition: PndDrc.cxx:584
PndDrcPDPoint * AddHit(Int_t trackID, Int_t copyNo, Int_t mcpId, TVector3 pos, TVector3 mom, TVector3 momAtEV, Double_t timeAtEV, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID)
Definition: PndDrc.cxx:853
TRandom3 fRand
Definition: PndDrc.h:271
Double_t fMass
MC volume ID of drc.
Definition: PndDrc.h:257
__m128 v
Definition: P4_F32vec4.h:4
void StopChargedTrackAfterDIRC(Bool_t sctad=kTRUE)
Kill charged track by exiting the DIRC to avoid it hitting the large EV.
Definition: PndDrc.h:58
Double_t fCollectionEff
Definition: PndDrc.h:272
void SetTransportEffAtProduction(Bool_t tra=kFALSE)
Kill photons at production point according to the transport efficiency distribution.
Definition: PndDrc.h:85
Double32_t fLength
time
Definition: PndDrc.h:251
virtual void BeginEvent()
Definition: PndDrc.cxx:283
TLorentzVector fPos
Definition: PndDrc.h:248
Bool_t fOptionForLUT
Definition: PndDrc.h:280
virtual void CopyClones(TClonesArray *clPD1, TClonesArray *clPD2, TClonesArray *clBar1, TClonesArray *clBar2, Int_t offset)
Definition: PndDrc.cxx:630
Class to access the naming information of the MVD.
virtual void FinishPrimary()
Definition: PndDrc.cxx:497
Bool_t fRunCherenkov
///&lt; converter for detector names
Definition: PndDrc.h:245
virtual void Print() const
Definition: PndDrc.cxx:605
Double_t fphi0
Definition: PndDrc.h:239
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition: PndDrc.cxx:596
TGraph * fDetEff
Definition: PndDrc.h:268
Double_t
Definition: PndDrc.h:31
Double_t fdphi
Definition: PndDrc.h:240
Double32_t fLengthEV
length
Definition: PndDrc.h:252
PndDrcEVPoint * AddEVHit(Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID, Double_t timestart, Double_t timestartEV, Double_t VeloPhoton, TVector3 normal)
Definition: PndDrc.cxx:875
Int_t fEventID
Hit collection in the bar.
Definition: PndDrc.h:291
Int_t fBarId
track index
Definition: PndDrc.h:247
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
Int_t fPdgCode
Pointer to basic DRC geometry data.
Definition: PndDrc.h:284
Double_t fAngIn
Definition: PndDrc.h:253
Int_t fEVreflections
Definition: PndDrc.h:266
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
virtual void ConstructGeometry()
Definition: PndDrc.cxx:663
Double_t fTimeAtEVEntrance
Definition: PndDrc.h:260
void SetDetEffAtProduction(Bool_t dep=kFALSE)
Kill photons at production point according to the detector efficiency distribution.
Definition: PndDrc.h:72
TString name
PndDrc()
Definition: PndDrc.cxx:67
PndGeoDrc * fGeo
Definition: PndDrc.h:282
Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t)
Definition: PndDrc.cxx:545
PndDrcBarPoint * AddBarHit(Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Double_t thetaC, Int_t nBar, Int_t eventID, Double_t mass)
Definition: PndDrc.cxx:896
Bool_t fStopSecondaries
Definition: PndDrc.h:277
Bool_t fTakeRealReflectivity
Definition: PndDrc.h:276
TLorentzVector fMomAtEV
Definition: PndDrc.h:258
virtual void EndOfEvent()
Definition: PndDrc.cxx:579
Double_t fThetaC
Definition: PndDrc.h:285
Double_t fbarnum
Definition: PndDrc.h:238
void SetRunCherenkov(Bool_t ch)
Definition: PndDrc.h:222
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
virtual void Initialize()
Definition: PndDrc.cxx:218
void StopSecondaries(Bool_t ss=kFALSE)
Kill secondaries at its production point.
Definition: PndDrc.h:53
void SetOptionForLUT(Bool_t oplu=kFALSE)
Definition: PndDrc.h:109
std::vector< std::string > fListOfSensitives
Definition: PndDrc.h:179
Double_t fpi
Definition: PndDrc.h:229
Bool_t fStopChargedTrackAfterDIRC
Definition: PndDrc.h:278
Double_t fhthick
Definition: PndDrc.h:233
Int_t fNBar
Definition: PndDrc.h:254
Int_t fPosIndex
Definition: PndDrc.h:255
void ResetParameters()
Definition: PndDrc.h:301
Double_t fTimeAtEV
Definition: PndDrc.h:259
void SetMirrorReal(Bool_t mir=kTRUE)
Choose between ideal and real mirror:
Definition: PndDrc.h:92
Double_t fVeloPhoton
Definition: PndDrc.h:262
Int_t volDetector
Definition: PndDrc.h:256
Double_t thetaC
Definition: plot_dirc.C:16
Double_t fTimeStart
Definition: PndDrc.h:261
Double_t fradius
Definition: PndDrc.h:232
Double_t fbbnum
Definition: PndDrc.h:237
Bool_t fSetBlackLens
Definition: PndDrc.h:279
bool CheckIfSensitive(std::string name)
Definition: PndDrc.cxx:844