Added contructor from TPartice.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Oct 2006 15:34:28 +0000 (15:34 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Oct 2006 15:34:28 +0000 (15:34 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index d2ffd5331dd5bfca62324a8f9ba74c6f1b3439a2..7bd7235fe5c92499804ee977d4f3b65899be85a0 100644 (file)
@@ -38,6 +38,30 @@ Track::Track() :
   fTitle()
 {}
 
+Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
+  RenderElement(),
+  TPolyLine3D(),
+
+  fV(t->Vx(), t->Vy(), t->Vz()),
+  fP(t->Px(), t->Py(), t->Pz()),
+  fBeta(t->P()/t->Energy()),
+  fCharge(0),
+  fLabel(label),
+  fPathMarks(),
+
+  fRnrStyle(rs),
+
+  fName(t->GetName()),
+  fTitle()
+{
+  fLineColor = fRnrStyle->GetColor();
+  fMainColorPtr = &fLineColor;
+
+  TParticlePDG* pdgp = t->GetPDG();
+  if (pdgp)
+    fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
+}
+
 Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
   RenderElement(),
   TPolyLine3D(),
index a0010f163d508061d95eef7b5fd330c9493524f8..c835ef9121996b6c301f5280aa573ab665738acb 100644 (file)
@@ -40,6 +40,7 @@ protected:
 
 public: 
   Track();
+  Track(TParticle* t, Int_t label, TrackRnrStyle* rs);
   Track(Reve::MCTrack*  t, TrackRnrStyle* rs);
   Track(Reve::RecTrack* t, TrackRnrStyle* rs);
   virtual ~Track();