Home » PANDA » PandaRoot » Tracking » back-propagation with GEANE
Re: back-propagation with GEANE [message #10706 is a reply to message #10705] |
Wed, 19 May 2010 18:58 |
Anastasia Karavdina
Messages: 76 Registered: May 2010 Location: Mainz, Germany
|
continuous participant |
From: *kph.uni-mainz.de
|
|
Hello Stefano!
This is the code, that I used:
PndMCTrack* myTrack = (PndMCTrack*)(fMCTracks->At(0));
//Get Start point and momentum from MC
PndSdsMCPoint* mcPoint = (PndSdsMCPoint*)(fMCHits->At(0));
StartPos = mcPoint->GetPosition();
TVector3 MCmom;
mcPoint->Momentum(MCmom);
StartMom = TVector3(MCmom.X(),MCmom.Y(),MCmom.Z());
StartPosErr = TVector3(0,0,0);
StartMomErr = TVector3(0,0,0);
//Charge and PDGCode of particle
Int_t PDGCode = myTrack->GetPdgCode();
TDatabasePDG *fdbPDG= TDatabasePDG::Instance();
TParticlePDG *fParticle= fdbPDG->GetParticle(PDGCode);
Double_t fCharge= fParticle->Charge();
TClonesArray& clref1 = *fTrackParIni;
Int_t size1 = clref1.GetEntriesFast();
FairTrackParP *fStart =
new (clref1[size1]) FairTrackParP(StartPos, StartMom, StartPosErr, StartMomErr, fCharge, StartO, StartU, StartV);
TClonesArray& clref = *fTrackParGeane;
Int_t size = clref.GetEntriesFast();
FairTrackParP *fRes = new(clref[size]) FairTrackParP();
//Set origin of coordinate in intial point of track (0,0,0)
TVector3 vtx = myTrack->GetStartVertex();
fPro->SetPoint(vtx);
fPro->BackTrackToVirtualPlaneAtPCA(1);//1 means "closest approach to point"
fPro->Propagate(fStart, fRes, PDGCode);
new((*fTrackParFinal)[i]) FairTrackParP(*(fRes)); //save Track
|
|
|
Goto Forum:
Current Time: Tue Sep 10 19:42:54 CEST 2024
Total time taken to generate the page: 0.00947 seconds
|