11 #include "TEveTrack.h"
12 #include "TEveTrackPropagator.h"
13 #include "TGeoTrack.h"
14 #include "TClonesArray.h"
15 #include "TObjArray.h"
16 #include "TEveManager.h"
17 #include "TParticle.h"
46 fEveTrList(new TObjArray(16)),
57 if(
fVerbose>1) { cout<<
"FairMCTracks::Init()" << endl; }
61 cout <<
"FairMCPointDraw::Init() branch " << GetName() <<
" Not found! Task will be deactivated "<< endl;
65 if(
fVerbose>2) { cout<<
"FairMCTracks::Init() create propagator" << endl; }
67 if(
fVerbose>2) { cout<<
"FairMCTracks::Init() get instance of FairEventManager " << endl; }
81 if(
fVerbose>1) { cout <<
" FairMCTracks::Exec "<< endl; }
83 const Double_t*
point;
87 for (Int_t i=0; i<
fTrackList->GetEntriesFast(); i++) {
88 if(
fVerbose>2) { cout <<
"FairMCTracks::Exec "<< i << endl; }
90 TParticle* P=(TParticle*)tr->GetParticle();
100 Int_t Np=tr->GetNpoints();
102 TEveTrack* track=
new TEveTrack(P, tr->GetPDG(),
fTrPr);
104 for (Int_t
n=0;
n<Np;
n++) {
105 point=tr->GetPoint(
n);
106 track->SetPoint(
n,point[0],point[1],point[2]);
107 TEveVector
pos= TEveVector(point[0], point[1],point[2]);
108 TEvePathMark* path =
new TEvePathMark();
110 path->fTime= point[3];
112 TEveVector Mom= TEveVector(P->Px(), P->Py(),P->Pz());
115 if(
fVerbose>3) { cout <<
"Path marker added " << path << endl; }
117 track->AddPathMark(*path);
119 if(
fVerbose>3) { cout <<
"Path marker added " << path << endl; }
122 if(
fVerbose>3) { cout <<
"track added " << track->GetName() << endl; }
124 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
130 gEve->Redraw3D(kFALSE);
151 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
152 TEveTrackList* ele=( TEveTrackList*)
fEveTrList->At(i);
162 for (Int_t i=0; i<
fEveTrList->GetEntriesFast(); i++) {
163 TEveTrackList* TrListIn=( TEveTrackList*)
fEveTrList->At(i);
164 if ( strcmp(TrListIn->GetName(),P->GetName())==0 ) {
170 fTrPr=
new TEveTrackPropagator();