14 #include "FairRootManager.h"
20 #include "FairRunAna.h"
21 #include "FairRuntimeDb.h"
22 #include "FairBaseParSet.h"
23 #include "FairGeoVolume.h"
25 #include "FairGeoTransform.h"
26 #include "FairGeoVector.h"
27 #include "FairGeoMedium.h"
28 #include "FairGeoNode.h"
31 #include "TParticlePDG.h"
32 #include "TDatabasePDG.h"
34 #include "TGeoManager.h"
73 cout <<
" ---------- INITIALIZATION ------------" << endl;
76 FairRootManager* ioman = FairRootManager::Instance();
78 cout <<
"-E- PndDskFLGHitProducerIdeal::Init: "
79 <<
"RootManager not instantiated!" << endl;
86 cout <<
"-W- PndDskFLGHitProducerIdeal::Init: "
87 <<
"No DskBarPoint array!" << endl;
92 fHitArray =
new TClonesArray(
"PndDskFLGHit");
99 cout <<
"-I- PndDskFLGHitProducerIdeal: Intialization successfull" << endl;
110 if ( !
fHitArray ) Fatal(
"Exec",
"No HitArray");
118 cout <<
" ----------------- DSK Hit Producer --------------------" << endl;
119 cout <<
" Number of input MC points in the plate: "<<
fDskParticleArray->GetEntries()<<endl;
143 if (
fVerbose >1) cout <<
"Beta not calculated " << endl;
147 if (
fabs(1./(1.47*beta)) > 1. || P == 0. || energy == 0.){
150 thetaC =
acos(1/(1.47*beta));
153 if (thetaC != -1. && beta > 1/1.47){
156 Int_t trackID = pt->GetTrackID();
157 Int_t detectorID = 0;
158 TVector3 position_store(pt->GetX(), pt->GetY(), pt->GetZ());
159 TVector3 momentum_store(Px, Py, Pz);
166 int N_cherenko_photon = pt->
GetNPhot();
168 TVector3 Cone_Pos(pt->GetX()*10, pt->GetY()*10, pt->GetZ()*10);
169 TVector3 Cone_Axis(Px, Py, Pz);
170 TVector3 Cherenkov_photon(1,0,0);
171 Cherenkov_photon.SetTheta(Cone_Axis.Theta() +
thetaC);
172 Cherenkov_photon.SetPhi(Cone_Axis.Phi());
173 for(
int i_photon = 0; i_photon < N_cherenko_photon; i_photon++){
175 Cherenkov_photon.Rotate(rot_angle, Cone_Axis);
180 if(Cherenkov_photon.Theta()<0.8 || Cherenkov_photon.Z()<0)
continue;
189 AddHit(trackID,detectorID,position_store,momentum_store,time,
204 TVector3 position_store, TVector3 momentum_store,
Double_t time,
206 TVector3 Cherenkov_photon, Int_t light_guide, Int_t
pixel)
209 Int_t size = clref.GetEntriesFast();
210 return new(clref[size])
PndDskFLGHit( trackID,detectorID,position_store,momentum_store,time,
211 angIn,thetaC_store,Cherenkov_photon,light_guide,pixel);
220 cout <<
"-I- PndDskFLGHitProducerIdeal: Finish" << endl;
friend F32vec4 acos(const F32vec4 &a)
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
virtual ~PndDskFLGHitProducerIdeal()
Double_t GetAngIn() const
friend F32vec4 sqrt(const F32vec4 &a)
static T Sqrt(const T &x)
Double_t reflect_threshold()
TString pt(TString pts, TString exts="px py pz")
virtual InitStatus Init()
virtual void Exec(Option_t *option)
PndDskFLGHitProducerIdeal()
friend F32vec4 fabs(const F32vec4 &a)
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)
TClonesArray * fDskParticleArray
void Propagate(TVector3 pos, TVector3 dir, Int_t &i_FLG, Int_t &i_Pixel)
Double_t GetThetaC() const