11 #include "TClonesArray.h"
12 #include "TParticlePDG.h"
14 #include "TGeoManager.h"
15 #include "TGeoMatrix.h"
18 #include "FairRootManager.h"
20 #include "FairRunAna.h"
21 #include "FairRuntimeDb.h"
31 FairTask(
"Ideal reconstruction task for PANDA Hyp"),
43 FairTask(
"Ideal reconstruction task for PANDA Hyp"),
64 FairRootManager* ioman = FairRootManager::Instance();
66 std::cout <<
"-E- PndHypIdealRecoTask::Init: "
67 <<
"RootManager not instantiated!" << std::endl;
73 std::cout <<
"-W- PndHypIdealRecoTask::Init: "<<
"No "<<
fBranchName
74 <<
" array!" << std::endl;
80 std::cout <<
"-W- PndHypIdealRecoTask::Init: No McTruth array!" << std::endl;
85 ioman->Register(
"HypHit",
"Hyp ideal Clusters",
88 std::cout <<
"-I- gGeoManager = "<<
gGeoManager << std::endl;
98 FairRun* ana = FairRun::Instance();
99 FairRuntimeDb*
rtdb=ana->GetRuntimeDb();
100 std::cout <<
"-I- rtdb = "<<rtdb << std::endl;
116 std::cout <<
"-I- fPointArray Exec = "<<
fPointArray<< std::endl;
118 std::cout<<
" entries "<<nHypHits<<std::endl;
120 for(Int_t iHypHit=0;iHypHit<nHypHits;++iHypHit)
133 TVector3 o(0.,0.,0.),u(1.,0.,0.),
v(0.,1.,0.);
141 cout<<pos.x()<<
" "<<pos.y()<<
" "<<pos.z()<<endl;
157 std::cout<<
fHitOutputArray->GetEntriesFast() <<
" hitss created out of "
158 <<
fPointArray->GetEntriesFast() <<
" Points"<<std::endl;
179 double sigx=gRandom->Gaus(0,
fSigmaX);
180 double sigy=gRandom->Gaus(0,
fSigmaY);
181 double sigz=gRandom->Gaus(0,
fSigmaZ);
183 double x = pos.x() + sigx;
184 double y = pos.y() + sigy;
185 double z = pos.z() + sigz;
188 std::cout<<
"PndHypIdealRecoTask::smear Point (x,y,z)=("
189 <<pos.x()<<
","<<pos.y()<<
","<<pos.z()<<
") by ("
194 std::cout<<
"("<<pos.x()<<
","<<pos.y()<<
","<<pos.z()<<
")"<<std::endl;
204 std::cout<<
"PndHypIdealRecoTask::smearLocal"<<std::endl;
208 posLab[0]=pos.x(); posLab[1]=pos.y(); posLab[2]=pos.z();
211 pos.SetXYZ(posSens[0],posSens[1],posSens[2]);
215 posSens[0]=pos.x(); posSens[1]=pos.y(); posSens[2]=pos.z();
217 pos.SetXYZ(posLab[0],posLab[1],posLab[2]);
246 Double_t O[3], U[3], V[3], o[3], u[3],
v[3];
247 O[0]=oVect.x(); O[1]=oVect.y(); O[2]=oVect.z();
248 U[0]=uVect.x(); U[1]=uVect.y(); U[2]=uVect.z();
249 V[0]=vVect.x(); V[1]=vVect.y(); V[2]=vVect.z();
252 std::cout<<
"PndHypIdealRecoTask::CalcDetPlane from Detector "
259 oVect.SetXYZ(o[0],o[1],o[2]);
260 uVect.SetXYZ(u[0],u[1],u[2]);
261 vVect.SetXYZ(v[0],v[1],v[2]);
virtual void SetParContainers()
PndHypPoint * fCurrentHypPoint
TClonesArray * fPointArray
Class to access the naming information of the MVD.
Int_t GetVolumeID() const
TGeoManager * gGeoManager
virtual void Exec(Option_t *opt)
TString GetPath(TString id)
for a given ID the path is returned
virtual InitStatus Init()
void smear(TVector3 &pos)
TGeoHMatrix * fCurrentTransMat
TClonesArray * fHitOutputArray
TClonesArray * fMctruthArray
PndHypGeoHandling * fGeoH
TString GetDetName() const
void CalcDetPlane(TVector3 &o, TVector3 &u, TVector3 &v)
void smearLocal(TVector3 &pos)