10 #include "TClonesArray.h"
11 #include "TParticlePDG.h"
13 #include "TGeoManager.h"
14 #include "TGeoMatrix.h"
17 #include "FairRootManager.h"
20 #include "FairRuntimeDb.h"
21 #include "../pnddata/PndMCTrack.h"
30 FairTask(
"Ideal reconstruction task for PANDA PndMvd"),
32 fBranchName(
"MVDPoint"),
36 fHitOutputArray(NULL),
40 fCurrentPndMvdMCPoint(NULL),
41 fCurrentTransMat(NULL),
49 FairTask(
"Ideal reconstruction task for PANDA PndMvd"),
51 fBranchName(
"MVDPoint"),
55 fHitOutputArray(NULL),
59 fCurrentPndMvdMCPoint(NULL),
60 fCurrentTransMat(NULL),
76 FairRootManager* ioman = FairRootManager::Instance();
78 std::cout <<
"-E- PndMvdIdealRecoTask::Init: "
79 <<
"RootManager not instantiated!" << std::endl;
85 std::cout <<
"-W- PndMvdIdealRecoTask::Init: "<<
"No "<<
fBranchName
86 <<
" array!" << std::endl;
92 std::cout <<
"-W- PndMvdIdealRecoTask::Init: No McTruth array!" << std::endl;
97 ioman->Register(
"MVDHit",
"PndMvd ideal Hits",
100 std::cout <<
"-I- gGeoManager = "<<
gGeoManager << std::endl;
124 std::map<Int_t, PndSdsHit*> clusterMap;
127 for(Int_t iMvdPoint=0;iMvdPoint<nPndMvdHits;++iMvdPoint)
135 if(trackid<0)
continue;
139 TVector3 o(0.,0.,0.),u(1.,0.,0.),
v(0.,1.,0.);
160 <<
fPointArray->GetEntriesFast() <<
" Points"<<std::endl;
191 std::cout<<
"PndMvdIdealRecoTask::smear Point (x,y,z)=("
192 <<pos.x()<<
","<<pos.z()<<
","<<pos.z()<<
") by ("
197 std::cout<<
"("<<pos.x()<<
","<<pos.y()<<
","<<pos.z()<<
")"<<std::endl;
207 std::cout<<
"PndMvdIdealRecoTask::smearLocal"<<std::endl;
211 posLab[0]=pos.x(); posLab[1]=pos.y(); posLab[2]=pos.z();
214 pos.SetXYZ(posSens[0],posSens[1],posSens[2]);
218 posSens[0]=pos.x(); posSens[1]=pos.y(); posSens[2]=pos.z();
220 pos.SetXYZ(posLab[0],posLab[1],posLab[2]);
249 Double_t O[3], U[3], V[3], o[3], u[3],
v[3];
250 O[0]=oVect.x(); O[1]=oVect.y(); O[2]=oVect.z();
251 U[0]=uVect.x(); U[1]=uVect.y(); U[2]=uVect.z();
252 V[0]=vVect.x(); V[1]=vVect.y(); V[2]=vVect.z();
255 std::cout<<
"PndMvdIdealRecoTask::CalcDetPlane from Detector "
262 oVect.SetXYZ(o[0],o[1],o[2]);
263 uVect.SetXYZ(u[0],u[1],u[2]);
264 vVect.SetXYZ(v[0],v[1],v[2]);
virtual ~PndMvdIdealRecoTask()
virtual void SetParContainers()
PndSdsMCPoint * fCurrentPndMvdMCPoint
void CalcDetPlane(TVector3 &o, TVector3 &u, TVector3 &v)
TGeoManager * gGeoManager
Int_t GetSensorID() const
TString GetPath(Int_t shortID)
for a given shortID the path is returned
TClonesArray * fHitOutputArray
Class to access the naming information of the MVD.
virtual void Exec(Option_t *opt)
TClonesArray * fPointArray
TClonesArray * fMctruthArray
void smear(TVector3 &pos)
TGeoHMatrix * fCurrentTransMat
virtual void SetParContainers()
void smearLocal(TVector3 &pos)
virtual InitStatus Init()