PandaRoot
PndDrcHitProducerReal.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 // ----- PndDrcHitProducer header file -----
15 // ----- Created 30/10/09 by Dipanwita Dutta
16 // ----- -----
17 // ----- -----
18 // -------------------------------------------------------------------------
19 
27 #ifndef PNDDRCHITPRODUCERREAL_H
28 #define PNDDRCHITPRODUCERREAL_H
29 
30 #include <PndPersistencyTask.h>
31 #include "TClonesArray.h"
32 #include "PndMCTrack.h"
33 #include "PndDrcHit.h"
34 #include "PndDrcPDHit.h"
35 #include "PndStack.h"
36 #include "FairBaseParSet.h"
37 #include "PndGeoDrcPar.h"
38 #include "PndGeoDrc.h"
39 #include "TString.h"
40 #include <string>
41 #include "TH1.h"
42 #include "TH2.h"
43 
44 #ifndef ROOT_TParticlePDG
45 #include "TParticlePDG.h"
46 #endif
47 #ifndef ROOT_TDatabasePDG
48 #include "TDatabasePDG.h"
49 #endif
50 
52 
53  public:
56 
58  PndDrcHitProducerReal(Int_t verbose, Int_t det_type);
59 
61  virtual ~PndDrcHitProducerReal();
62 
64  // virtual void SetParContainers();
65  virtual InitStatus Init();
66 
68  virtual void Exec(Option_t *option);
69 
71  virtual void Finish();
72 
77  PndDrcHit *AddHit(Int_t detID, TVector3 posHit, TVector3 dPosHit, Double_t thetaC, Double_t errThetaC, Int_t index);
78 
83  PndDrcPDHit *AddPDHit(Int_t detID, TVector3 posPDHit, TVector3 dPosPDHit, Double_t time, Double_t timeThreshold, Int_t index1);
84 
86  void FindDrcHitPosition(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID);
87  void FindDrcHitPositionTilt(Double_t xPoint, Double_t yPoint, Double_t &xHit, Double_t &yHit, Int_t &pmtID);
88 
90  void SetPhotonDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
91  void SetFakeDetEff(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
92  void SetPhotonDetEffOld(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
93  void SetPhotonDetEffNew(Double_t &lambda_min, Double_t &lambda_max, Double_t &lambda_step, Double_t efficiency[]);
94 
96  void SetPhotonTransportEff(Double_t &, Double_t &, Double_t &, Double_t &, Int_t &, Double_t fEfficiency[]);
98  void NumberOfBounces(TVector3, TVector3, Int_t *, Int_t *, Double_t *, Double_t *);
99  Double_t FindPhiRot(Double_t, Double_t);
100  Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t);
101 
102  void SetIsDetEfficiency(Bool_t isDetEff) { fisDetEff = isDetEff; }
103  void SetIsPixelization(Bool_t isPixel) { fisPixel = isPixel; }
104  void SetTransportEfficiency(Bool_t isTran = 0) { fisTransportEff = isTran; }
105 
106  //########################################
107  void SetTilt(Double_t tilt = 0.) { ftilt = tilt; } // degrees
108  //########################################
109 
110  void DrawDetEfficiency(Bool_t dr = kFALSE) { fDrawing = dr; }
111 
112  protected:
113  private:
115  void ProcessPhotonPoint();
116  void ProcessBarPoint();
117  void Smear(Double_t &time, Double_t sigt);
118 
119  // basic parameters of DIRC
120  Double_t fpi;
121  Double_t fzup;
122  Double_t fzdown;
123  Double_t fradius;
124  Double_t fhthick;
125  Double_t fpipehAngle;
126  Double_t fbbGap;
127  Double_t fbbnum;
128  Double_t fbarnum;
129  Double_t fphi0;
130  Double_t fdphi;
131  Double_t flside;
132  Double_t fbarwidth;
133 
134  Bool_t fisDetEff;
135  Bool_t fisPixel;
136  Bool_t fisTransportEff;
137  Bool_t fDrawing;
138  Double_t ftilt;
139  Int_t fDetectorID;
140  TVector3 fPosHit;
141  TVector3 fDPosHit;
142  TVector3 fPosPDHit;
143  TVector3 fDPosPDHit;
144  Double_t fThetaC, fErrThetaC;
145  Double_t fTime, fTimeThreshold;
146  Int_t fRefIndex;
147  Int_t fPDRefIndex;
148 
149  TClonesArray *fBarPointArray; // DRC MC points in the bars
150  TClonesArray *fPDPointArray; // DRC MC points in the photon plane
151  TClonesArray *fHitArray; // DRC hits
152  TClonesArray *fPDHitArray; // DRC Photon Detectorhits
153  TClonesArray *fMCArray; // DRC Hits in the photon detector
154 
155  // TObjArray *fVolumeArray;
156  // TClonesArray* fListStack; // Tracks
157 
158  PndGeoDrcPar *fPar;
159 
160  PndGeoDrc *fGeo;
161 
163  Int_t fVerbose;
164 
166  Int_t fDetType; // detector type
167 
168  Double_t nRefrac; // Refractive index of photon detector
169  Double_t fPixelDim; // Pixel Diemsion of photocathode
170  Double_t fSigmat; // Time Resolution in ps
171  Double_t fCollectionEff; // Collection Efficiency
172  Double_t fPackingFraction; // Packing Fraction or Active Area Ratio
173  Double_t fRoughness; // Surface roughness (bars)
174  Int_t detection;
175  Int_t nevents;
176 
178  void SetParameters();
179 
180  ClassDef(PndDrcHitProducerReal, 1)
181 };
182 
183 #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()