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 PndSdsTask(
"Ideal reconstruction task for PANDA PndSds"),
34 fHitOutputArray(NULL),
38 fCurrentPndSdsMCPoint(NULL),
39 fCurrentTransMat(NULL),
49 PndSdsTask(
"Ideal reconstruction task for PANDA PndSds"),
53 fHitOutputArray(NULL),
57 fCurrentPndSdsMCPoint(NULL),
58 fCurrentTransMat(NULL),
79 FairRootManager* ioman = FairRootManager::Instance();
81 std::cout <<
"-E- PndSdsIdealRecoTask::Init: "
82 <<
"RootManager not instantiated!" << std::endl;
88 std::cout <<
"-W- PndSdsIdealRecoTask::Init: "<<
"No "<<
fInBranchName
89 <<
" array!" << std::endl;
95 std::cout <<
"-W- PndSdsIdealRecoTask::Init: No McTruth array!" << std::endl;
102 std::cout <<
"-I- gGeoManager = "<<
gGeoManager << std::endl;
123 std::map<Int_t, PndSdsHit*> clusterMap;
126 for(Int_t iMvdPoint=0;iMvdPoint<nPndSdsHits;++iMvdPoint)
134 if(trackid<0)
continue;
138 TVector3 o(0.,0.,0.),u(1.,0.,0.),
v(0.,1.,0.);
159 <<
fPointArray->GetEntriesFast() <<
" Points"<<std::endl;
190 std::cout<<
"PndSdsIdealRecoTask::smear Point (x,y,z)=("
191 <<pos.x()<<
","<<pos.z()<<
","<<pos.z()<<
") by ("
196 std::cout<<
"("<<pos.x()<<
","<<pos.y()<<
","<<pos.z()<<
")"<<std::endl;
206 std::cout<<
"PndSdsIdealRecoTask::smearLocal"<<std::endl;
210 posLab[0]=pos.x(); posLab[1]=pos.y(); posLab[2]=pos.z();
213 pos.SetXYZ(posSens[0],posSens[1],posSens[2]);
217 posSens[0]=pos.x(); posSens[1]=pos.y(); posSens[2]=pos.z();
219 pos.SetXYZ(posLab[0],posLab[1],posLab[2]);
248 Double_t O[3], U[3], V[3], o[3], u[3],
v[3];
249 O[0]=oVect.x(); O[1]=oVect.y(); O[2]=oVect.z();
250 U[0]=uVect.x(); U[1]=uVect.y(); U[2]=uVect.z();
251 V[0]=vVect.x(); V[1]=vVect.y(); V[2]=vVect.z();
254 std::cout<<
"PndSdsIdealRecoTask::CalcDetPlane from Detector "
261 oVect.SetXYZ(o[0],o[1],o[2]);
262 uVect.SetXYZ(u[0],u[1],u[2]);
263 vVect.SetXYZ(v[0],v[1],v[2]);
void smear(TVector3 &pos)
virtual void Exec(Option_t *opt)
virtual void SetParContainers()
virtual void SetParContainers()
void SetPersistency(Bool_t val=kTRUE)
TGeoHMatrix * fCurrentTransMat
void smearLocal(TVector3 &pos)
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 InitStatus Init()
virtual void SetBranchNames()=0
TClonesArray * fMctruthArray
TClonesArray * fPointArray
void CalcDetPlane(TVector3 &o, TVector3 &u, TVector3 &v)
PndSdsMCPoint * fCurrentPndSdsMCPoint
virtual ~PndSdsIdealRecoTask()
virtual void SetInBranchId()