#include "Track.h"
#include "MCHelixLine.hi"
+#include "PointSet.h"
#include <TPolyLine3D.h>
#include <TPolyMarker3D.h>
fP(),
fBeta(0),
fCharge(0),
- fLabel(0),
+ fLabel(-1),
+ fIndex(-1),
fPathMarks(),
fRnrStyle(0)
fBeta(t->P()/t->Energy()),
fCharge(0),
fLabel(label),
+ fIndex(-1),
fPathMarks(),
fRnrStyle(rs)
}
*/
-/**************************************************************************/
+ /**************************************************************************/
void Track::MakeTrack()
{
MCHelix helix(fRnrStyle, &mc_v0, TMath::C()*fBeta, &track_points, a); //m->cm
helix.Init(TMath::Sqrt(px*px+py*py), pz);
- if(!fPathMarks.empty()){
- for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i) {
+ if(!fPathMarks.empty())
+ {
+ for(std::vector<Reve::PathMark*>::iterator i=fPathMarks.begin(); i!=fPathMarks.end(); ++i)
+ {
Reve::PathMark* pm = *i;
- if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter){
+ if (RS.fFitReferences && pm->type == Reve::PathMark::Reference)
+ {
if(TMath::Abs(pm->V.z) > RS.fMaxZ
|| TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
goto helix_bounds;
- //printf("%s fit daughter \n", fName.Data());
- helix.LoopToVertex(fP.x, fP.y, fP.z, pm->V.x, pm->V.y, pm->V.z);
- fP.x -= pm->P.x;
- fP.y -= pm->P.y;
- fP.z -= pm->P.z;
+ // printf("%s fit reference \n", fName.Data());
+ helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
+ px = pm->P.x;
+ py = pm->P.y;
+ pz = pm->P.z;
}
- if(RS.fFitDecay && pm->type == Reve::PathMark::Decay){
-
+ else if(RS.fFitDaughters && pm->type == Reve::PathMark::Daughter)
+ {
+ if(TMath::Abs(pm->V.z) > RS.fMaxZ
+ || TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
+ goto helix_bounds;
+
+ // printf("%s fit daughter \n", fName.Data());
+ helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
+ px -= pm->P.x;
+ py -= pm->P.y;
+ pz -= pm->P.z;
+ }
+ else if(RS.fFitDecay && pm->type == Reve::PathMark::Decay)
+ {
if(TMath::Abs(pm->V.z) > RS.fMaxZ
|| TMath::Sqrt(pm->V.x*pm->V.x + pm->V.y*pm->V.y) > RS.fMaxR )
goto helix_bounds;
- helix.LoopToVertex(fP.x, fP.y, fP.z, pm->V.x, pm->V.y, pm->V.z);
+ helix.LoopToVertex(px, py, pz, pm->V.x, pm->V.y, pm->V.z);
decay = true;
break;
}
}
}
helix_bounds:
- //go to bounds
+ // go to bounds
if(!decay || RS.fFitDecay == kFALSE){
helix.LoopToBounds(px,py,pz);
// printf("%s loop to bounds \n",fName.Data() );
void Track::ImportClustersFromIndex()
{
+ static const Exc_t eH("Track::ImportClustersFromIndex ");
+
+ if (fIndex < 0)
+ throw(eH + "index not set.");
+
Reve::LoadMacro("clusters_from_index.C");
gROOT->ProcessLine(Form("clusters_from_index(%d);", fIndex));
}
fMinAng (45),
fDelta (0.1),
- fFitDaughters(kTRUE),
- fFitDecay (kTRUE)
-{}
+ fFitDaughters (kTRUE),
+ fFitReferences (kTRUE),
+ fFitDecay (kTRUE),
+ fRnrDaughters (kTRUE),
+ fRnrReferences (kTRUE),
+ fRnrDecay (kTRUE)
+{}
/**************************************************************************/
/**************************************************************************/
void TrackList::Init()
{
- fMarkerStyle = 6;
+ fMarkerStyle = 5;
fMarkerColor = 5;
// fMarker->SetMarkerSize(0.05);
fTitle(),
- fRnrStyle (rs),
- fRnrMarkers (kTRUE),
- fRnrTracks (kTRUE)
+ fRnrStyle (rs),
+ fRnrTracks (kTRUE),
+ fEditPathMarks (kFALSE)
{
Init();
}
fTitle(),
fRnrStyle (rs),
- fRnrMarkers (kTRUE),
fRnrTracks (kTRUE)
{
Init();
/**************************************************************************/
-void TrackList::SetRnrMarkers(Bool_t rnr)
-{
- fRnrMarkers = rnr;
- gReve->Redraw3D();
-}
-
-void TrackList::SetRnrTracks(Bool_t rnr)
-{
-
- fRnrTracks = rnr;
- gReve->Redraw3D();
-}
-
-/**************************************************************************/
-
void TrackList::MakeTracks()
{
for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
MakeTracks();
}
+void TrackList::SetFitReferences(Bool_t x)
+{
+ fRnrStyle->fFitReferences = x;
+ MakeTracks();
+}
+
void TrackList::SetFitDecay(Bool_t x)
{
fRnrStyle->fFitDecay = x;
MakeTracks();
}
+void TrackList::SetRnrDecay(Bool_t rnr)
+{
+ fRnrStyle->fRnrDecay = rnr;
+ MakeTracks();
+}
+
+void TrackList::SetRnrDaughters(Bool_t rnr)
+{
+ fRnrStyle->fRnrDaughters = rnr;
+ MakeTracks();
+}
+
+void TrackList::SetRnrReferences(Bool_t rnr)
+{
+ fRnrStyle->fRnrReferences = rnr;
+ MakeTracks();
+}
+
+void TrackList::SetRnrMarkers(Bool_t rnr)
+{
+ fRnrMarkers = rnr;
+ gReve->Redraw3D();
+}
+
+void TrackList::SetRnrTracks(Bool_t rnr)
+{
+
+ fRnrTracks = rnr;
+ gReve->Redraw3D();
+}
+
/**************************************************************************/
/**************************************************************************/