18 #include <TEvePointSet.h>
19 #include <TGeoTrack.h>
20 #include <TMathBase.h>
21 #include <TParticle.h>
41 AddElement(fRecoTrack);
47 if (TMath::Abs(hit.X()) > world.X())
49 if (TMath::Abs(hit.Y()) > world.Y())
51 if (TMath::Abs(hit.Z()) > world.Z())
53 if (fHits ==
nullptr) {
54 fHits =
new TEvePointSet();
55 fHits->SetCompound(
this);
56 fHits->SetMainColor(GetMainColor());
59 fHits->SetNextPoint(hit.X(), hit.Y(), hit.Z());
64 if (fMCTrack !=
nullptr)
66 TParticle *p =
static_cast<TParticle *
>(geo->GetParticle());
67 fMCTrack =
new FairEveTrack(p, fRecoTrack->GetLabel(), fRecoTrack->GetPropagator());
68 fMCTrack->SetLineColor(fRecoTrack->GetLineColor());
69 TVector3 mom(p->Px(), p->Py(), p->Pz());
70 const Double_t *posV = geo->GetFirstPoint();
71 TVector3 pos(posV[0], posV[1], posV[2]);
73 for (
int i = 1; i < geo->GetNpoints(); i++) {
74 const Double_t *xyz = geo->GetPoint(i);
75 pos.SetXYZ(xyz[0], xyz[1], xyz[2]);
78 fMCTrack->SetLineStyle(10);
85 if (fMCTrack !=
nullptr)
87 TParticle *P =
new TParticle(*p);
88 fMCTrack =
new FairEveTrack(P, fRecoTrack->GetLabel(), fRecoTrack->GetPropagator());
89 fMCTrack->SetLineColor(fRecoTrack->GetLineColor());
90 TVector3 mom(p->Px(), p->Py(), p->Pz());
91 TVector3 pos(P->Vx(), P->Vy(), P->Vz());
93 fMCTrack->SetLineStyle(10);
99 TEveCompound::SetMainColor(color);
101 fRecoTrack->SetMainColor(color);
103 fHits->SetMainColor(color);
105 fMCTrack->SetMainColor(color);
virtual ~FairEveRecoTrack()
void MakeMCTrack(const TGeoTrack *geo)
void AddHit(TVector3 hit)
void SetMainColor(Color_t color)
TVector3 GetWorldSize() const
static FairEventManager * Instance()
void SetNextPoint(const TVector3 &point)
void SetFirstPoint(const TVector3 &mom, const TVector3 &pos)
void InitMCTrack(const TParticle *p)