14 #include "FairRootManager.h"
18 #include "FairRunAna.h"
19 #include "FairRuntimeDb.h"
20 #include "FairBaseParSet.h"
21 #include "FairGeoVolume.h"
23 #include "FairGeoTransform.h"
24 #include "FairGeoVector.h"
25 #include "FairGeoMedium.h"
26 #include "FairGeoNode.h"
29 #include "TParticlePDG.h"
30 #include "TDatabasePDG.h"
32 #include "TGeoManager.h"
41 :FairTask(
"PndPhoGunShortP")
52 :FairTask(
"PndPhoGunShortP")
72 cout <<
" ---------- INITIALIZATION ------------" << endl;
75 FairRootManager* ioman = FairRootManager::Instance();
77 cout <<
"-E- PndPhoGunShortP::Init: "
78 <<
"RootManager not instantiated!" << endl;
83 fMCArray = (TClonesArray*) ioman->GetObject(
"MCTrack");
85 cout <<
"-W- PndPhoGunShortP::Init: "
86 <<
"No MCTrack array!" << endl;
90 fPDPointArray = (TClonesArray*) ioman->GetObject(
"DrcPDPoint");
92 cout <<
"-W- PndPhoGunShortP::Init: "
93 <<
"No DrcPDPoint array!" << endl;
97 fPDHitArray = (TClonesArray*) ioman->GetObject(
"DrcPDHit");
99 cout <<
"-W- PndPhoGunShortP::Init: "
100 <<
"No DrcPDHit array!" << endl;
105 cout <<
"-W- PndDrcLogLikeli::Init: "
106 <<
"No DrcBarPoint array!" << endl;
110 fEVPointArray = (TClonesArray*) ioman->GetObject(
"DrcEVPoint");
112 cout <<
"-W- PndPhoGunShortP::Init: "
113 <<
"No DrcEVPoint array!" << endl;
116 fDigiArray = (TClonesArray*) ioman->GetObject(
"DrcDigi");
118 cout <<
"-W- PndPhoGunShortP::Init: " <<
"No DrcDigi array!" << endl;
148 fTree =
new TTree(
"dircsim",
"Look-up table for DIRC");
150 for(Int_t iLut=0; iLut<5; iLut++){
151 fLut[iLut] =
new TClonesArray(
"PndDrcLutNode");
152 fTree->Branch(Form(
"LUT%d",iLut),&
fLut[iLut],256000,0);
165 cout <<
"-I- PndPhoGunShortP: Intialization successfull" << endl;
185 Int_t SelectionName=0;
191 for(Int_t k=0; k<
fPDHitArray->GetEntriesFast(); k++) {
202 Int_t trID=
Ppt->GetTrackID();
207 if(trID!=
EVpt->GetTrackID())cout<<
"different track IDs"<<endl;
209 if(trID!=
EVpt->GetTrackID())
continue;
233 for(Int_t k2 = 1; k2 <
fEVPointArray->GetEntriesFast()-1; k2++){
240 if(wePho == kTRUE)
continue;
250 for(Int_t k1 = 1; k1 < EVEntry; k1++){
263 if(PhiSec>0)cout<<
"phi sec = "<<PhiSec<<endl;
267 if(PhiSec>0)
continue;
272 if(EVEntry>=6)
ReflName.Append(
"XX");
359 if(SelectionName==0.){
continue;}
495 if(startPhi < 0.){startPhi = 360. + startPhi;}
496 if(startPhi > 0. && startPhi < 90.){
499 if(startPhi > 90. && startPhi < 270.){
502 if(startPhi > 270. && startPhi < 360.){
508 return PhiRot/180.*
fpi;
514 Int_t Nnodes = 30000;
515 for(Int_t iLut=0; iLut<5; iLut++){
516 TClonesArray &fLuta = *
fLut[iLut];
517 for (Long64_t
n=0;
n<Nnodes;
n++) {
530 for(Int_t iLut=0; iLut<5; iLut++){
533 cout <<
"-I- PndDrcLutFill: Finish" << endl;
TClonesArray * fEVPointArray
virtual ~PndPhoGunShortP()
friend F32vec4 cos(const F32vec4 &a)
TClonesArray * fDigiArray
virtual void SetParContainers()
friend F32vec4 sin(const F32vec4 &a)
TVector3 GetMomentum() const
TClonesArray * fPDHitArray
PndGeoDrc * fGeo
Basic geometry data of barrel DRC.
Double_t InBarCoordSyst(TVector3)
Int_t GetBarPointID() const
virtual Int_t GetRefIndex()
friend F32vec4 fabs(const F32vec4 &a)
static PndGeoHandling * Instance()
TVector3 GetPosition() const
Double_t FindReflectionType(Double_t, Double_t, Double_t, TString)
TClonesArray * fPDPointArray
virtual InitStatus Init()
Int_t GetSensorId() const
virtual void Exec(Option_t *option)
TVector3 GetStartVertex() const
Int_t GetDetectorId() const
cout<<"the Event No is "<< i<< endl;{{if(hit_array->GetEntriesFast()!=mc_array->GetEntriesFast()) continue;PndSdsHit *hit=(PndSdsHit *) hit_array-> At(j)
Int_t GetIndex(int i=0) const
TMatrixT< double > TMatrixD
TClonesArray * fBarPointArray