CandTrack Class Reference

#include <CandTrack.h>

Inheritance diagram for CandTrack:
CandReco CandBase CandRefCounted CandFitTrack CandTrackAtNu CandTrackCam CandTrackSR CandFitTrackAtNu CandFitTrackCam CandFitTrackMS CandFitTrackSA CandFitTrackSR

List of all members.

Public Member Functions

 CandTrack ()
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const

Static Public Member Functions

static CandTrackHandle MakeCandidate (AlgHandle &ah, CandContext &cx)

Protected Member Functions

 CandTrack (AlgHandle &ah)
 CandTrack (AlgHandle &ah, CandHandle &ch, CandContext &cx)
 CandTrack (const CandTrack &rhs)
virtual ~CandTrack ()
virtual void CreateLocalHandle ()
virtual CandTrackDup () const
virtual Bool_t IsEquivalent (const TObject *rhs) const

Protected Attributes

Double_t fMomentum
map< const CandStrip *, Int_t > fInShower
map< Int_t, Float_t > fUPos
map< Int_t, Float_t > fVPos
map< Int_t, Float_t > fdS
map< Int_t, Float_t > fRange
map< Int_t, Float_t > fTPosError
map< Int_t, Double_t > fTime [2]
Double_t fVtxTrace
Double_t fVtxTraceZ
Double_t fEndTrace
Double_t fEndTraceZ
Double_t fVtxDistToEdge
Double_t fEndDistToEdge
Int_t fVtxnActiveUpstream
Int_t fEndnActiveDownstream
Int_t fNTrackStrip
Int_t fNTrackDigit
Int_t fNTimeFitDigit
Double_t fTimeFitChi2
Double_t fTimeForwardFitRMS
Int_t fTimeForwardFitNDOF
Double_t fTimeBackwardFitRMS
Int_t fTimeBackwardFitNDOF

Friends

class CandTrackHandle

Detailed Description

Definition at line 25 of file CandTrack.h.


Constructor & Destructor Documentation

CandTrack::CandTrack (  ) 

Definition at line 31 of file CandTrack.cxx.

References CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.

Referenced by Dup(), and MakeCandidate().

00031                      :
00032   fMomentum(0.),
00033   fVtxTrace(0.),
00034   fVtxTraceZ(0.),
00035   fEndTrace(0.),
00036   fEndTraceZ(0.),
00037   fVtxDistToEdge(0.),
00038   fEndDistToEdge(0.),
00039   fVtxnActiveUpstream(0),
00040   fEndnActiveDownstream(0),
00041   fNTrackStrip(0),
00042   fNTrackDigit(0),
00043   fNTimeFitDigit(0),
00044   fTimeFitChi2(0.),
00045   fTimeForwardFitRMS(0.),
00046   fTimeForwardFitNDOF(0),
00047   fTimeBackwardFitRMS(0.),
00048   fTimeBackwardFitNDOF(0)
00049 {
00050   MSG("Cand", Msg::kDebug)
00051                         << "Begin CandTrack::CandTrack() ctor: " << endl
00052                                            << "UidInt = " << GetUidInt()
00053                            << ", ArchUidInt " << GetArchUidInt() << endl
00054                              << "No. of links = " << GetNLinks() << endl
00055                           << "End CandTrack::CandTrack() ctor." << endl;
00056 }

CandTrack::CandTrack ( AlgHandle ah  )  [protected]

Definition at line 59 of file CandTrack.cxx.

00059                                   :
00060   CandReco(ah),      // Should be the next class up on inheritance chain
00061   fMomentum(0.),
00062   fVtxTrace(0.),
00063   fVtxTraceZ(0.),
00064   fEndTrace(0.),
00065   fEndTraceZ(0.),
00066   fVtxDistToEdge(0.),
00067   fEndDistToEdge(0.),
00068   fVtxnActiveUpstream(0),
00069   fEndnActiveDownstream(0),
00070   fNTrackStrip(0),
00071   fNTrackDigit(0),
00072   fNTimeFitDigit(0),
00073   fTimeFitChi2(0.),
00074   fTimeForwardFitRMS(0.),
00075   fTimeForwardFitNDOF(0),
00076   fTimeBackwardFitRMS(0.),
00077   fTimeBackwardFitNDOF(0)
00078 
00079 {
00080 
00081 // The sole purpose of this constructor is to transmit the AlgHandle
00082 // up the inheritance chain to CandBase without having to invoke the
00083 // full constructor of an intermediate Candidate type which the highest
00084 // level Candidate might inherit from.  One only wants to create the
00085 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00086 }

CandTrack::CandTrack ( AlgHandle ah,
CandHandle ch,
CandContext cx 
) [protected]

Definition at line 89 of file CandTrack.cxx.

References CreateLocalHandle(), CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and AlgHandle::RunAlg().

00089                                                                    :
00090   CandReco(ah),      // Should be the next class up on inheritance chain
00091   fMomentum(0.),
00092   fVtxTrace(0.),
00093   fVtxTraceZ(0.),
00094   fEndTrace(0.),
00095   fEndTraceZ(0.),
00096   fVtxDistToEdge(0.),
00097   fEndDistToEdge(0.),
00098   fVtxnActiveUpstream(0),
00099   fEndnActiveDownstream(0),
00100   fNTrackStrip(0),
00101   fNTrackDigit(0),
00102   fNTimeFitDigit(0),
00103   fTimeFitChi2(0.),
00104   fTimeForwardFitRMS(0.),
00105   fTimeForwardFitNDOF(0),
00106   fTimeBackwardFitRMS(0.),
00107   fTimeBackwardFitNDOF(0)
00108 
00109 {
00110   CreateLocalHandle();
00111   MSG("Cand", Msg::kDebug)
00112              << "Begin CandTrack::CandTrack(AlgHandle &, CandHandle &, "
00113                                       << "CandContext &) ctor: " << endl
00114                                            << "UidInt = " << GetUidInt()
00115                            << ", ArchUidInt " << GetArchUidInt() << endl
00116                              << "No. of links = " << GetNLinks() << endl
00117                << "End CandTrack::CandTrack(AlgHandle &, CandHandle &, "
00118                                       << "CandContext &) ctor." << endl;
00119 
00120 // Run Algorithm to construct Candidate
00121   {                                                   // Start of scope.
00122     CandTrackHandle csh(this);               // csh will go out of scope
00123     ch = csh;                                       // after setting ch.
00124   }                                                     // End of scope.
00125   ah.RunAlg(ch, cx);
00126 }

CandTrack::CandTrack ( const CandTrack rhs  )  [protected]

Definition at line 129 of file CandTrack.cxx.

References fdS, fInShower, fRange, fTime, fTPosError, fUPos, fVPos, CandBase::GetArchUidInt(), CandBase::GetDaughterIterator(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.

00129                                          :
00130   CandReco(rhs)      // Should be the next class up on inheritance chain
00131 , fMomentum(rhs.fMomentum)
00132 , fVtxTrace(rhs.fVtxTrace)
00133 , fVtxTraceZ(rhs.fVtxTraceZ)
00134 , fEndTrace(rhs.fEndTrace)
00135 , fEndTraceZ(rhs.fEndTraceZ)
00136 ,  fVtxDistToEdge(rhs.fVtxDistToEdge)
00137 ,  fEndDistToEdge(rhs.fEndDistToEdge)
00138 ,  fVtxnActiveUpstream(rhs.fVtxnActiveUpstream)
00139 ,  fEndnActiveDownstream(rhs.fEndnActiveDownstream)
00140 , fNTrackStrip(rhs.fNTrackStrip)
00141 , fNTrackDigit(rhs.fNTrackDigit)
00142 , fNTimeFitDigit(rhs.fNTimeFitDigit)
00143 , fTimeFitChi2(rhs.fTimeFitChi2)
00144 , fTimeForwardFitRMS(rhs.fTimeForwardFitRMS)
00145 , fTimeForwardFitNDOF(rhs.fTimeForwardFitNDOF)
00146 , fTimeBackwardFitRMS(rhs.fTimeBackwardFitRMS)
00147 , fTimeBackwardFitNDOF(rhs.fTimeBackwardFitNDOF)
00148 {
00149 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00150   MSG("Cand", Msg::kDebug)
00151     << "Begin CandTrack::CandTrack(const CandTrack &rhs) ctor: " << endl
00152                                            << "UidInt = " << GetUidInt()
00153                            << ", ArchUidInt " << GetArchUidInt() << endl
00154                              << "No. of links = " << GetNLinks() << endl
00155       << "End CandTrack::CandTrack(const CandTrack &rhs) ctor." << endl;
00156   fInShower.erase(fInShower.begin(),fInShower.end());
00157   fUPos.erase(fUPos.begin(),fUPos.end());
00158   fVPos.erase(fVPos.begin(),fVPos.end());
00159   fdS.erase(fdS.begin(),fdS.end());
00160   fRange.erase(fRange.begin(),fRange.end());
00161   fTPosError.erase(fTPosError.begin(),fTPosError.end());
00162   fTime[0].erase(fTime[0].begin(),fTime[0].end());
00163   fTime[1].erase(fTime[1].begin(),fTime[1].end());
00164   TIter stripItr(rhs.GetDaughterIterator());
00165   while (const CandStripHandle *striphandle =
00166                            dynamic_cast<CandStripHandle*>(stripItr())) {
00167     const CandStrip *strip =
00168              dynamic_cast<const CandStrip*>(striphandle->GetCandBase());
00169     fInShower[strip] = rhs.fInShower[strip];
00170     fUPos[striphandle->GetPlane()] = rhs.fUPos[striphandle->GetPlane()];
00171     fVPos[striphandle->GetPlane()] = rhs.fVPos[striphandle->GetPlane()];
00172     fdS[striphandle->GetPlane()] = rhs.fdS[striphandle->GetPlane()];
00173     fTPosError[striphandle->GetPlane()] = rhs.fTPosError[striphandle->GetPlane()];
00174     fRange[striphandle->GetPlane()] =
00175                                     rhs.fRange[striphandle->GetPlane()];
00176     for (int i=0; i<2; i++) {
00177       fTime[i][striphandle->GetPlane()] =
00178                                   rhs.fTime[i][striphandle->GetPlane()];
00179     }
00180   }
00181 
00182 }

CandTrack::~CandTrack (  )  [protected, virtual]

Definition at line 185 of file CandTrack.cxx.

References CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.

00186 {
00187   MSG("Cand", Msg::kDebug)
00188                        << "Begin CandTrack::~CandTrack() dtor: " << endl
00189                                            << "UidInt = " << GetUidInt()
00190                            << ", ArchUidInt " << GetArchUidInt() << endl
00191                              << "No. of links = " << GetNLinks() << endl
00192                          << "End CandTrack::~CandTrack() dtor." << endl;
00193 }


Member Function Documentation

void CandTrack::CreateLocalHandle (  )  [protected, virtual]

Implements CandReco.

Reimplemented in CandFitTrackAtNu, CandTrackAtNu, CandFitTrackCam, CandFitTrackMS, CandFitTrackSA, CandFitTrackSR, CandTrackCam, CandTrackSR, and CandFitTrack.

Definition at line 196 of file CandTrack.cxx.

References CandTrackHandle, and CandBase::SetLocalHandle().

Referenced by CandTrack(), and Dup().

00197 {
00198   SetLocalHandle(new CandTrackHandle(this));
00199 }

CandTrack * CandTrack::Dup (  )  const [protected, virtual]

Implements CandReco.

Reimplemented in CandFitTrackAtNu, CandTrackAtNu, CandFitTrackCam, CandFitTrackMS, CandFitTrackSA, CandFitTrackSR, CandTrackCam, CandTrackSR, and CandFitTrack.

Definition at line 202 of file CandTrack.cxx.

References CandBase::AddDaughterLink(), CandTrack(), CreateLocalHandle(), CandBase::fCandRecord, CandBase::GetDaughterIterator(), and CandBase::SetCandRecord().

00203 {
00204 
00205 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00206 // Daughter List copy is made in the derived class Dup() function.
00207 // This is because base class copy constructor hasn't yet created
00208 // fLocalHandle with a CandHandle* of the full derived type.
00209   CandTrack *cb = new CandTrack(*this);           // Copy-ctor dups ptrs
00210   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00211   cb->SetCandRecord(fCandRecord);
00212   TIter iterdau = GetDaughterIterator();
00213   CandHandle *dau;
00214   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00215   return cb;
00216 }

std::ostream & CandTrack::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Reimplemented from CandReco.

Reimplemented in CandFitTrackSR, and CandFitTrack.

Definition at line 281 of file CandTrack.cxx.

References fEndTrace, fEndTraceZ, fVtxTrace, fVtxTraceZ, CandBase::GetDataIndent(), and CandBase::GetIndentString().

00283 {
00284   CandReco::FormatToOStream(os,option);
00285 
00286   TString opt(option);
00287   if (!opt.Contains("v0")) { // v0 means suppress the data values
00288     const TString& indent = GetIndentString();
00289 
00290     static MsgFormat timefmt("f10.9");
00291     os  << indent << GetDataIndent()
00292        << "Trace Vtx: " << fVtxTrace << " " << fVtxTraceZ
00293        << " End: " << fEndTrace << " " << fEndTraceZ
00294        << endl;
00295 
00296   }
00297   return os;
00298   
00299 }

Bool_t CandTrack::IsEquivalent ( const TObject *  rhs  )  const [protected, virtual]

Reimplemented from CandReco.

Reimplemented in CandFitTrackSR, CandTrackSR, and CandFitTrack.

Definition at line 219 of file CandTrack.cxx.

References fdS, fEndTrace, fEndTraceZ, fInShower, fMomentum, fNTimeFitDigit, fNTrackDigit, fNTrackStrip, fRange, fTime, fTimeBackwardFitNDOF, fTimeBackwardFitRMS, fTimeFitChi2, fTimeForwardFitNDOF, fTimeForwardFitRMS, fTPosError, fUPos, fVPos, fVtxTrace, fVtxTraceZ, CandReco::IsEquivalent(), CandBase::TestArrayEquality(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

Referenced by CandTrackSR::IsEquivalent(), and CandFitTrack::IsEquivalent().

00220 {
00221   Bool_t result = true;
00222   if (!CandReco::IsEquivalent(rhs)) result = false;   // superclass test
00223   TestDisplayCandBanner("CandTrack");
00224   const CandTrack* rCnd = dynamic_cast<const CandTrack*>(rhs);
00225   if (rCnd == NULL) return false;
00226 
00227   result = TestArrayEquality("fTime", 2, this->fTime,
00228                                          rCnd->fTime)     && result;
00229   result = TestEquality("fMomentum",   this->fMomentum, 
00230                                        rCnd->fMomentum)   && result;
00231   result = TestEquality("fInShower",   this->fInShower, 
00232                                        rCnd->fInShower)   && result;
00233   result = TestEquality("fUPos",       this->fUPos, 
00234                                        rCnd->fUPos)       && result;
00235   result = TestEquality("fVPos",       this->fVPos, 
00236                                        rCnd->fVPos)       && result;
00237   result = TestEquality("fdS",         this->fdS, 
00238                                        rCnd->fdS)         && result;
00239   result = TestEquality("fTPosError",  this->fTPosError, 
00240                                        rCnd->fTPosError)         && result;
00241   result = TestEquality("fRange",      this->fRange, 
00242                                        rCnd->fRange)      && result;
00243   result = TestEquality("fVtxTrace",   this->fVtxTrace,
00244                                        rCnd->fVtxTrace)   && result;
00245   result = TestEquality("fVtxTraceZ",  this->fVtxTraceZ, 
00246                                        rCnd->fVtxTraceZ)  && result;
00247   result = TestEquality("fEndTrace",   this->fEndTrace, 
00248                                        rCnd->fEndTrace)   && result;
00249   result = TestEquality("fEndTraceZ",  this->fEndTraceZ, 
00250                                        rCnd->fEndTraceZ)  && result;
00251   result = TestEquality("fNTrackStrip", this->fNTrackStrip,
00252                                         rCnd->fNTrackStrip)   && result;
00253   result = TestEquality("fNTrackDigit", this->fNTrackDigit,
00254                                         rCnd->fNTrackDigit)   && result;
00255   result = TestEquality("fNTimeFitDigit",
00256                                         this->fNTimeFitDigit,
00257                                         rCnd->fNTimeFitDigit) && result;
00258   result = TestEquality("fTimeForwardFitRMS", this->fTimeForwardFitRMS,
00259                                         rCnd->fTimeForwardFitRMS)   && result;
00260   result = TestEquality("fTimeForwardFitNDOF", this->fTimeForwardFitNDOF,
00261                                         rCnd->fTimeForwardFitNDOF)   && result;
00262   result = TestEquality("fTimeBackwardFitRMS", this->fTimeBackwardFitRMS,
00263                                         rCnd->fTimeBackwardFitRMS)   && result;
00264   result = TestEquality("fTimeBackwardFitNDOF", this->fTimeBackwardFitNDOF,
00265                                         rCnd->fTimeBackwardFitNDOF)   && result;
00266   result = TestEquality("fTimeFitChi2", this->fTimeFitChi2,
00267                                         rCnd->fTimeFitChi2)   && result;
00268 
00269   return result;
00270 }

CandTrackHandle CandTrack::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Reimplemented in CandFitTrackAtNu, CandTrackAtNu, CandFitTrackCam, CandFitTrackMS, CandFitTrackSA, CandFitTrackSR, CandTrackCam, CandTrackSR, and CandFitTrack.

Definition at line 273 of file CandTrack.cxx.

References CandTrack().

00274 {
00275   CandTrackHandle csh;
00276   new CandTrack(ah, csh, cx);              // csh owns the new CandTrack
00277   return csh;
00278 }


Friends And Related Function Documentation

friend class CandTrackHandle [friend]

Definition at line 27 of file CandTrack.h.

Referenced by CreateLocalHandle().


Member Data Documentation

map<Int_t,Float_t> CandTrack::fdS [mutable, protected]
Double_t CandTrack::fEndDistToEdge [protected]

Definition at line 60 of file CandTrack.h.

Definition at line 62 of file CandTrack.h.

Double_t CandTrack::fEndTrace [protected]

Definition at line 57 of file CandTrack.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandTrack::fEndTraceZ [protected]

Definition at line 58 of file CandTrack.h.

Referenced by FormatToOStream(), and IsEquivalent().

map<const CandStrip *, Int_t> CandTrack::fInShower [mutable, protected]
Double_t CandTrack::fMomentum [protected]

Definition at line 45 of file CandTrack.h.

Referenced by IsEquivalent().

Int_t CandTrack::fNTimeFitDigit [protected]

Reimplemented in CandTrackSR.

Definition at line 66 of file CandTrack.h.

Referenced by IsEquivalent().

Int_t CandTrack::fNTrackDigit [protected]

Reimplemented in CandTrackSR.

Definition at line 65 of file CandTrack.h.

Referenced by IsEquivalent().

Int_t CandTrack::fNTrackStrip [protected]

Reimplemented in CandTrackSR.

Definition at line 64 of file CandTrack.h.

Referenced by IsEquivalent().

map<Int_t,Float_t> CandTrack::fRange [mutable, protected]
map<Int_t,Double_t> CandTrack::fTime[2] [mutable, protected]

Definition at line 71 of file CandTrack.h.

Referenced by IsEquivalent().

Double_t CandTrack::fTimeBackwardFitRMS [protected]

Definition at line 70 of file CandTrack.h.

Referenced by IsEquivalent().

Double_t CandTrack::fTimeFitChi2 [protected]

Reimplemented in CandTrackSR.

Definition at line 67 of file CandTrack.h.

Referenced by IsEquivalent().

Int_t CandTrack::fTimeForwardFitNDOF [protected]

Definition at line 69 of file CandTrack.h.

Referenced by IsEquivalent().

Double_t CandTrack::fTimeForwardFitRMS [protected]

Definition at line 68 of file CandTrack.h.

Referenced by IsEquivalent().

map<Int_t,Float_t> CandTrack::fTPosError [mutable, protected]
map<Int_t,Float_t> CandTrack::fUPos [mutable, protected]
map<Int_t,Float_t> CandTrack::fVPos [mutable, protected]
Double_t CandTrack::fVtxDistToEdge [protected]

Definition at line 59 of file CandTrack.h.

Int_t CandTrack::fVtxnActiveUpstream [protected]

Definition at line 61 of file CandTrack.h.

Double_t CandTrack::fVtxTrace [protected]

Definition at line 55 of file CandTrack.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandTrack::fVtxTraceZ [protected]

Definition at line 56 of file CandTrack.h.

Referenced by FormatToOStream(), and IsEquivalent().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1