9 #include "TEveTrackPropagator.h"
10 #include "TGeoTrack.h"
12 #include "TClonesArray.h"
13 #include "TObjArray.h"
14 #include "TEveManager.h"
16 #include "FairMCTrack.h"
35 fEveTrList( new TObjArray(16))
42 if(
fVerbose>1) { cout<<
"FairMCStack::Init()" << endl; }
46 cout <<
"FairMCPointDraw::Init() branch " << GetName() <<
" Not found! Task will be deactivated "<< endl;
50 if(
fVerbose>2) { cout<<
"FairMCStack::Init() create propagator" << endl; }
52 if(
fVerbose>2) { cout<<
"FairMCStack::Init() get instance of FairEventManager " << endl; }
58 gMC3 = (TGeant3*) gMC;
75 for(Int_t i=0; i<15; i++) {
ein[i]=0; }
93 if(
fVerbose>1) { cout <<
" FairMCStack::Exec "<< endl; }
95 const Double_t*
point;
99 for (Int_t i=0; i<
fTrackList->GetEntriesFast(); i++) {
100 if(
fVerbose>2) { cout <<
"FairMCStack::Exec "<< i << endl; }
103 TVector3 Ptot = tr->GetMomentum();
104 Int_t MotherId =tr->GetMotherID();
105 TVector3 Vertex =tr->GetStartVertex();
107 Double_t
time= tr->GetStartTime()*1
e-09;
121 TParticlePDG* fParticlePDG = TDatabasePDG::Instance()->GetParticle(tr->GetPdgCode());
124 mass = fParticlePDG->Mass();
127 ene = TMath::Sqrt(mass*mass + Ptot.Mag2());
131 TParticle* P =
new TParticle(tr->GetPdgCode(), i, MotherId, -1, -1, -1, Ptot.Px(), Ptot.Py(),Ptot.Pz(),ene, Vertex.x(), Vertex.z(), Vertex.z(),
time);
147 TEveTrack* track=
new TEveTrack(P, tr->GetPdgCode(),
fTrPr);
157 Int_t Np=tr1->GetNpoints();
159 for (Int_t
n=0;
n<Np;
n++) {
160 point=tr1->GetPoint(
n);
161 track->SetPoint(
n,point[0],point[1],point[2]);
162 TEveVector
pos= TEveVector(point[0], point[1],point[2]);
163 TEvePathMark* path =
new TEvePathMark();
165 path->fTime= point[3];
167 TEveVector Mom= TEveVector(P->Px(), P->Py(),P->Pz());
170 if(
fVerbose>3) { cout <<
"Path marker added " << path << endl; }
172 track->AddPathMark(*path);
174 if(
fVerbose>3) { cout <<
"Path marker added " << path << endl; }
177 if(
fVerbose>3) { cout <<
"track added " << track->GetName() << endl; }
202 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
203 TEveTrackList* TrListIn=( TEveTrackList*)
fEveTrList->At(i);
204 TrListIn->FindMomentumLimits(TrListIn, kFALSE);
208 gEve->Redraw3D(kFALSE);
229 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
230 TEveTrackList* ele=( TEveTrackList*)
fEveTrList->At(i);
240 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
241 TEveTrackList* TrListIn=( TEveTrackList*)
fEveTrList->At(i);
242 if ( strcmp(TrListIn->GetName(),P->GetName())==0 ) {
248 fTrPr=
new TEveTrackPropagator();