Anp::Track Class Reference

#include <Track.h>

List of all members.

Public Member Functions

 Track ()
 ~Track ()
bool Add (int key, float data)
DataIterator DataBegIterator ()
DataIterator DataEndIterator ()
DataIterator Erase (DataIterator it)
DataIterator Erase (DataIterator ibeg, DataIterator iend)
void Clear ()
void SetWeight (double value_)
short TrackIndex () const
short TraceN () const
float TraceT () const
float QP () const
float ErrorQP () const
float Chi2 () const
float Ndof () const
float Range () const
float PRangeDef () const
bool PassFit () const
float PCur () const
float PRan () const
bool Pass () const
bool Stop () const
double Weight () const
const BasicGetBasic () const
const VertexGetBegVtx () const
const VertexGetEndVtx () const
DataIter DataBeg () const
DataIter DataEnd () const
bool KeyExists (short key) const
float operator[] (short key) const
float DataAt (short key) const
void Print (std::ostream &o=std::cout) const

Private Attributes

Short_t index
Short_t tracen
Float_t tracet
Float_t fit_qp
Float_t fit_eqp
Float_t fit_chi2
Float_t fit_ndof
Float_t range
Float_t p_range
Float_t p_range_def
Bool_t pass_fit
Bool_t stopping
Double_t weight
Anp::Basic fBasic
Anp::Vertex fBegVtx
Anp::Vertex fEndVtx
DataVec fData

Friends

class FillTrack

Detailed Description

Definition at line 25 of file Track.h.


Constructor & Destructor Documentation

Anp::Track::Track (  ) 

Definition at line 16 of file Track.cxx.

00017    :index(-1),
00018     tracen(-1),
00019     tracet(-1.0e6),
00020     fit_qp(-1.0e6),
00021     fit_eqp(-1.0e6),
00022     fit_chi2(-1.0e6),
00023     fit_ndof(-1.0e6),
00024     range(-1.0e6),
00025     p_range(-1.0e6),
00026     p_range_def(-1.0e6),
00027     pass_fit(false),
00028     stopping(false),
00029     weight(1.0),
00030     fBasic(),
00031     fBegVtx(),
00032     fEndVtx(),
00033     fData()
00034 {
00035 }

Anp::Track::~Track (  ) 

Definition at line 38 of file Track.cxx.

00039 {
00040 }


Member Function Documentation

bool Anp::Track::Add ( int  key,
float  data 
)

Definition at line 66 of file Track.cxx.

References fData, and KeyExists().

Referenced by Anp::FillTrackGeom::Fill(), and Anp::PrevDataKey::operator()().

00067 { 
00068    //
00069    // Add data at key, if key does not already exits 
00070    //
00071 
00072    assert(std::abs(key) < SHRT_MAX && "key is out of range");
00073    
00074    if(KeyExists(key))
00075    {
00076       cerr << "Track::Add(" << key << ") - key already exists" << endl;
00077       return false;
00078    }
00079    
00080    fData.push_back(Anp::Data(short(key), data));
00081    return true;
00082 }

float Anp::Track::Chi2 (  )  const [inline]

Definition at line 121 of file Track.h.

References fit_chi2.

Referenced by Anp::SelectAntiNeutrino::AddData(), and Anp::PlotTrack::FillTrack().

00121 { return fit_chi2;}

void Anp::Track::Clear ( void   ) 

Definition at line 43 of file Track.cxx.

References Anp::Vertex::Clear(), Anp::Basic::Clear(), fBasic, fBegVtx, fData, fEndVtx, fit_chi2, fit_eqp, fit_ndof, fit_qp, index, p_range, p_range_def, pass_fit, range, stopping, tracen, tracet, and weight.

00044 {
00045    index       = -1; 
00046    tracen      = -1;
00047    tracet      = -1.0e6;
00048    fit_qp      = -1.0e6;
00049    fit_eqp     = -1.0e6;
00050    fit_chi2    = -1.0e6;
00051    fit_ndof    = -1.0e6;
00052    range       = -1.0e6;
00053    p_range     = -1.0e6;
00054    p_range_def = -1.0e6;
00055    pass_fit    = false;
00056    stopping    = false;
00057    weight      = 1.0;
00058 
00059    fBasic.Clear();
00060    fBegVtx.Clear();
00061    fEndVtx.Clear();
00062    fData.clear();
00063 }

float Anp::Track::DataAt ( short  key  )  const

Definition at line 110 of file Track.cxx.

References fData, find(), and it.

Referenced by Anp::SelectAntiNeutrino::AddData(), Anp::PlotShort::FillStandard(), and operator[]().

00111 {
00112    DataIter it = std::find(fData.begin(), fData.end(), key);
00113    if(it == fData.end())
00114    {
00115       cerr << "Track:DataAt(" << key << ") - key does not exist" << endl;
00116       return 0.0;
00117    }
00118    
00119    return it -> Data();
00120 }

DataIter Anp::Track::DataBeg (  )  const [inline]

Definition at line 136 of file Track.h.

References fData.

Referenced by Anp::PlotData::Plot(), and Anp::PlotShort::Plot().

00136 { return fData.begin(); }

DataIterator Anp::Track::DataBegIterator (  )  [inline]

Definition at line 108 of file Track.h.

References fData.

00108 { return fData.begin(); }

DataIter Anp::Track::DataEnd (  )  const [inline]

Definition at line 137 of file Track.h.

References fData.

Referenced by Anp::PlotData::Plot(), and Anp::PlotShort::Plot().

00137 { return fData.end(); }

DataIterator Anp::Track::DataEndIterator (  )  [inline]

Definition at line 109 of file Track.h.

References fData.

00109 { return fData.end(); }

DataIterator Anp::Track::Erase ( DataIterator  ibeg,
DataIterator  iend 
) [inline]

Definition at line 111 of file Track.h.

References fData.

00112    {
00113       return fData.erase(ibeg, iend);
00114    }

DataIterator Anp::Track::Erase ( DataIterator  it  )  [inline]

Definition at line 110 of file Track.h.

References fData.

00110 { return fData.erase(it); }

float Anp::Track::ErrorQP (  )  const [inline]
const Basic & Anp::Track::GetBasic (  )  const [inline]
const Vertex & Anp::Track::GetBegVtx (  )  const [inline]
const Vertex & Anp::Track::GetEndVtx ( void   )  const [inline]
bool Anp::Track::KeyExists ( short  key  )  const [inline]
float Anp::Track::Ndof (  )  const [inline]

Definition at line 122 of file Track.h.

References fit_ndof.

Referenced by Anp::SelectAntiNeutrino::AddData(), and Anp::PlotTrack::FillTrack().

00122 { return fit_ndof;}

float Anp::Track::operator[] ( short  key  )  const [inline]

Definition at line 143 of file Track.h.

References DataAt().

00144    {
00145       return DataAt(key);
00146    }

bool Anp::Track::Pass (  )  const [inline]
bool Anp::Track::PassFit (  )  const [inline]

Definition at line 124 of file Track.h.

References pass_fit.

Referenced by Anp::SelectAntiNeutrino::AddData(), and Anp::PlotTrackGeom::FillProjection().

00124 { return pass_fit;}

float Anp::Track::PCur (  )  const

Definition at line 95 of file Track.cxx.

References fit_qp.

Referenced by Anp::PlotTrack::FillResol(), and Anp::PlotTrack::FillTrack().

00096 {
00097    //
00098    // Return muon momentum from fit, regardless of fit pass status
00099    //
00100 
00101    if(fit_qp > 0.0 || fit_qp < 0.0)
00102    {
00103       return 1.0/std::fabs(fit_qp);
00104    }
00105 
00106    return 0.0;
00107 }

float Anp::Track::PRan (  )  const [inline]

Definition at line 126 of file Track.h.

References p_range.

Referenced by Anp::PlotTrack::FillResol(), and Anp::PlotTrack::FillTrack().

00126 { return p_range; }

float Anp::Track::PRangeDef (  )  const

Definition at line 85 of file Track.cxx.

References p_range_def.

00086 {
00087    //
00088    // Default (uncorrected) muon track momentum from range
00089    //
00090 
00091    return p_range_def;
00092 }

void Anp::Track::Print ( std::ostream &  o = std::cout  )  const

Definition at line 123 of file Track.cxx.

References fBasic, fData, fit_eqp, fit_qp, index, p_range, pass_fit, Anp::Basic::Print(), and stopping.

00124 {
00125    o << "Track::Print" << endl
00126      << "   index = " << index << endl
00127      << "   qp = " << fit_qp  << endl
00128      << "   eqp = " << fit_eqp << endl
00129      << "   p range = " << p_range << endl
00130      << "   passed fit = " << pass_fit << endl
00131      << "   is stopping = " << stopping << endl;
00132 
00133    fBasic.Print(o);
00134 
00135    for(DataVec::const_iterator dit = fData.begin(); dit != fData.end(); ++dit)
00136    {
00137       o  << "   (key, data) = (" << dit -> Key() << ", " << dit -> Data() << ")" << endl;
00138    }
00139 }

float Anp::Track::QP (  )  const [inline]
float Anp::Track::Range (  )  const [inline]

Definition at line 123 of file Track.h.

References range.

00123 { return range; }

void Anp::Track::SetWeight ( double  value_  )  [inline]

Definition at line 106 of file Track.h.

References weight.

00106 { weight = value_; }

bool Anp::Track::Stop (  )  const [inline]
short Anp::Track::TraceN (  )  const [inline]

Definition at line 117 of file Track.h.

References tracen.

00117 { return tracen; }   

float Anp::Track::TraceT (  )  const [inline]

Definition at line 118 of file Track.h.

References tracet.

00118 { return tracet; }

short Anp::Track::TrackIndex (  )  const [inline]
double Anp::Track::Weight (  )  const [inline]

Definition at line 130 of file Track.h.

References weight.

00130 { return weight; }


Friends And Related Function Documentation

friend class FillTrack [friend]

Definition at line 76 of file Track.h.


Member Data Documentation

Definition at line 92 of file Track.h.

Referenced by Clear(), GetBasic(), Print(), and Anp::FillTrack::Run().

Definition at line 93 of file Track.h.

Referenced by Clear(), GetBegVtx(), and Anp::FillTrack::Run().

Definition at line 94 of file Track.h.

Referenced by Clear(), GetEndVtx(), and Anp::FillTrack::Run().

Float_t Anp::Track::fit_chi2 [private]

Definition at line 83 of file Track.h.

Referenced by Chi2(), Clear(), and Anp::FillTrack::Run().

Float_t Anp::Track::fit_eqp [private]

Definition at line 82 of file Track.h.

Referenced by Clear(), ErrorQP(), Print(), and Anp::FillTrack::Run().

Float_t Anp::Track::fit_ndof [private]

Definition at line 84 of file Track.h.

Referenced by Clear(), Ndof(), and Anp::FillTrack::Run().

Float_t Anp::Track::fit_qp [private]

Definition at line 81 of file Track.h.

Referenced by Clear(), PCur(), Print(), QP(), and Anp::FillTrack::Run().

Short_t Anp::Track::index [private]

Definition at line 78 of file Track.h.

Referenced by Clear(), Print(), Anp::FillTrack::Run(), and TrackIndex().

Float_t Anp::Track::p_range [private]

Definition at line 86 of file Track.h.

Referenced by Clear(), PRan(), Print(), and Anp::FillTrack::Run().

Float_t Anp::Track::p_range_def [private]

Definition at line 87 of file Track.h.

Referenced by Clear(), PRangeDef(), and Anp::FillTrack::Run().

Bool_t Anp::Track::pass_fit [private]

Definition at line 88 of file Track.h.

Referenced by Clear(), Pass(), PassFit(), Print(), and Anp::FillTrack::Run().

Float_t Anp::Track::range [private]

Definition at line 85 of file Track.h.

Referenced by Clear(), Range(), and Anp::FillTrack::Run().

Bool_t Anp::Track::stopping [private]

Definition at line 89 of file Track.h.

Referenced by Clear(), Print(), Anp::FillTrack::Run(), and Stop().

Short_t Anp::Track::tracen [private]

Definition at line 79 of file Track.h.

Referenced by Clear(), Anp::FillTrack::Run(), and TraceN().

Float_t Anp::Track::tracet [private]

Definition at line 80 of file Track.h.

Referenced by Clear(), Anp::FillTrack::Run(), and TraceT().

Double_t Anp::Track::weight [private]

Definition at line 90 of file Track.h.

Referenced by Clear(), SetWeight(), and Weight().


The documentation for this class was generated from the following files:

Generated on 11 Jan 2018 for loon by  doxygen 1.6.1