Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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


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 Anp::Data, 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.

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

00121 { return fit_chi2;}

void Anp::Track::Clear  ) 
 

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 Anp::Data, Anp::DataIter, fData, and find().

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 Anp::DataIter, and fData.

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

00136 { return fData.begin(); }

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

Definition at line 108 of file Track.h.

References Anp::DataIterator, and fData.

00108 { return fData.begin(); }

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

Definition at line 137 of file Track.h.

References Anp::DataIter, and fData.

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

00137 { return fData.end(); }

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

Definition at line 109 of file Track.h.

References Anp::DataIterator, and fData.

00109 { return fData.end(); }

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

Definition at line 111 of file Track.h.

References Anp::DataIterator, and 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 Anp::DataIterator, and fData.

00110 { return fData.erase(it); }

float Anp::Track::ErrorQP  )  const [inline]
 

Definition at line 120 of file Track.h.

Referenced by Anp::SelectAntiNeutrino::AddData(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrack::FillResol(), Anp::PlotShort::FillStandard(), Anp::PlotTrack::FillTrack(), Anp::SelectNuMu::PassSign(), and Anp::FillShortVar::Study().

00120 { return fit_eqp; }

const Basic & Anp::Track::GetBasic  )  const [inline]
 

Definition at line 132 of file Track.h.

Referenced by Anp::SelectAntiNeutrino::AddData(), Anp::PlotPmt::Collect(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotShort::FillStandard(), Anp::FillShortVar::Get(), Anp::SelectNuMu::PassSign(), Anp::SelectNuMu::ResetStop(), Anp::FillMuonId::Select(), and Anp::FillShortVar::Study().

00132 { return fBasic; }

const Vertex & Anp::Track::GetBegVtx  )  const [inline]
 

Definition at line 133 of file Track.h.

Referenced by Anp::PlotTrackGeom::Fill(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotShort::FillStandard(), and Anp::PlotTrackGeom::FillXProduct().

00133 { return fBegVtx; }

const Vertex & Anp::Track::GetEndVtx  )  const [inline]
 

Definition at line 134 of file Track.h.

Referenced by Anp::PlotTrackGeom::Fill(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrackGeom::FillRotation(), Anp::PlotTrackGeom::FillXProduct(), and Anp::SelectNuMu::ResetStop().

00134 { return fEndVtx; }

bool Anp::Track::KeyExists short  key  )  const [inline]
 

Definition at line 139 of file Track.h.

References fData, and find().

Referenced by Add(), Anp::SelectAntiNeutrino::AddData(), Anp::FillTrackGeom::Fill(), Anp::PlotTrack::FillResol(), Anp::PlotShort::FillStandard(), Anp::PlotTrack::FillTrack(), Anp::PlotData::Particle(), Anp::SelectNuMu::PassSign(), and Anp::SelectReson::Run().

00140    {
00141       return std::find(fData.begin(), fData.end(), key) != fData.end();
00142    }

float Anp::Track::Ndof  )  const [inline]
 

Definition at line 122 of file Track.h.

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]
 

Definition at line 127 of file Track.h.

Referenced by Anp::FillTrackGeom::Fill(), Anp::PlotTrack::FillResol(), Anp::PlotTrack::FillTrack(), Anp::SelectNuMu::PassSign(), and Anp::SelectReson::Run().

00127 { return pass_fit; }

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

Definition at line 124 of file Track.h.

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.

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.

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 Anp::Data, fBasic, fData, fit_eqp, fit_qp, index, Anp::Corr::Key, 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]
 

Definition at line 119 of file Track.h.

Referenced by Anp::SelectAntiNeutrino::AddData(), Anp::FillTrackGeom::Fill(), Anp::PlotTrackGeom::FillProjection(), Anp::PlotTrack::FillResol(), Anp::PlotShort::FillStandard(), Anp::PlotTrack::FillTrack(), Anp::SelectNuMu::PassSign(), and Anp::FillShortVar::Study().

00119 { return fit_qp; }

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

Definition at line 123 of file Track.h.

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]
 

Definition at line 128 of file Track.h.

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

00128 { return stopping; }

short Anp::Track::TraceN  )  const [inline]
 

Definition at line 117 of file Track.h.

00117 { return tracen; }   

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

Definition at line 118 of file Track.h.

00118 { return tracet; }

short Anp::Track::TrackIndex  )  const [inline]
 

Definition at line 116 of file Track.h.

Referenced by Anp::PlotPmt::Collect(), Anp::PlotShort::FillStandard(), Anp::Record::FindEvent(), Anp::Record::FindStdHep(), Anp::Record::FindTruth(), Anp::FillShortVar::Get(), Anp::GetStrip(), Anp::FillShortVar::GetTrackMap(), Anp::operator==(), Anp::FillMuonId::Select(), and Anp::FillShortVar::Study().

00116 { return index;}

double Anp::Track::Weight  )  const [inline]
 

Definition at line 130 of file Track.h.

00130 { return weight; }


Friends And Related Function Documentation

friend class FillTrack [friend]
 

Definition at line 76 of file Track.h.


Member Data Documentation

Anp::Basic Anp::Track::fBasic [private]
 

Definition at line 92 of file Track.h.

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

Anp::Vertex Anp::Track::fBegVtx [private]
 

Definition at line 93 of file Track.h.

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

DataVec Anp::Track::fData [private]
 

Definition at line 96 of file Track.h.

Referenced by Add(), Clear(), DataAt(), DataBeg(), DataBegIterator(), DataEnd(), DataEndIterator(), Erase(), KeyExists(), and Print().

Anp::Vertex Anp::Track::fEndVtx [private]
 

Definition at line 94 of file Track.h.

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

Float_t Anp::Track::fit_chi2 [private]
 

Definition at line 83 of file Track.h.

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

Float_t Anp::Track::fit_eqp [private]
 

Definition at line 82 of file Track.h.

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

Float_t Anp::Track::fit_ndof [private]
 

Definition at line 84 of file Track.h.

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

Float_t Anp::Track::fit_qp [private]
 

Definition at line 81 of file Track.h.

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

Short_t Anp::Track::index [private]
 

Definition at line 78 of file Track.h.

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

Float_t Anp::Track::p_range [private]
 

Definition at line 86 of file Track.h.

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

Float_t Anp::Track::p_range_def [private]
 

Definition at line 87 of file Track.h.

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

Bool_t Anp::Track::pass_fit [private]
 

Definition at line 88 of file Track.h.

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

Float_t Anp::Track::range [private]
 

Definition at line 85 of file Track.h.

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

Bool_t Anp::Track::stopping [private]
 

Definition at line 89 of file Track.h.

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

Short_t Anp::Track::tracen [private]
 

Definition at line 79 of file Track.h.

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

Float_t Anp::Track::tracet [private]
 

Definition at line 80 of file Track.h.

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

Double_t Anp::Track::weight [private]
 

Definition at line 90 of file Track.h.

Referenced by Clear(), and SetWeight().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:36 2010 for loon by  doxygen 1.3.9.1