CandReco Class Reference

#include <CandReco.h>

Inheritance diagram for CandReco:
CandBase CandRefCounted CandAtNuReco CandCluster3D CandEvent CandShower CandSubShowerSR CandTrack FarDetEvent CandShowerAtNu CandShowerEM CandShowerSR CandFitTrack CandTrackAtNu CandTrackCam CandTrackSR

List of all members.

Public Member Functions

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

Protected Member Functions

 CandReco (AlgHandle &ah)
 CandReco (const CandReco &rhs)
virtual ~CandReco ()
virtual void CreateLocalHandle ()=0
virtual CandRecoDup () const =0
virtual Bool_t IsEquivalent (const TObject *rhs) const

Protected Attributes

CandSliceHandlefCandSlice
Vertex fVertex
Double_t fVtxDirCosU
Double_t fVtxDirCosV
Double_t fVtxDirCosZ
Vertex fTerm
Double_t fEndDirCosU
Double_t fEndDirCosV
Double_t fEndDirCosZ
Double_t fTimeSlope
Double_t fTimeOffset
map< Int_t, Double_t > fSigMapped
map< Int_t, Double_t > fMIP

Friends

class CandRecoHandle

Detailed Description

Definition at line 27 of file CandReco.h.


Constructor & Destructor Documentation

CandReco::CandReco (  ) 

Definition at line 34 of file CandReco.cxx.

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

00034                    :
00035   fCandSlice(0)
00036 , fVtxDirCosU(0.)
00037 , fVtxDirCosV(0.)
00038 , fVtxDirCosZ(0.)
00039 , fEndDirCosU(0.)
00040 , fEndDirCosV(0.)
00041 , fEndDirCosZ(0.)
00042 , fTimeSlope(0.)
00043 , fTimeOffset(0.)
00044 {
00045   MSG("Cand", Msg::kDebug)
00046                           << "Begin CandReco::CandReco() ctor: " << endl
00047                                            << "UidInt = " << GetUidInt()
00048                            << ", ArchUidInt " << GetArchUidInt() << endl
00049                              << "No. of links = " << GetNLinks() << endl
00050                             << "End CandReco::CandReco() ctor." << endl;
00051 }

CandReco::CandReco ( AlgHandle ah  )  [protected]

Definition at line 54 of file CandReco.cxx.

00054                                 :
00055   CandBase(ah)       // Should be the next class up on inheritance chain
00056 , fCandSlice(0)
00057 , fVtxDirCosU(0.)
00058 , fVtxDirCosV(0.)
00059 , fVtxDirCosZ(0.)
00060 , fEndDirCosU(0.)
00061 , fEndDirCosV(0.)
00062 , fEndDirCosZ(0.)
00063 , fTimeSlope(0.)
00064 , fTimeOffset(0.)
00065 {
00066 
00067 // The sole purpose of this constructor is to transmit the AlgHandle
00068 // up the inheritance chain to CandBase without having to invoke the
00069 // full constructor of an intermediate Candidate type which the highest
00070 // level Candidate might inherit from.  One only wants to create the
00071 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00072 }

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

Definition at line 75 of file CandReco.cxx.

References fCandSlice, fMIP, fSigMapped, CandBase::GetArchUidInt(), CandBase::GetDaughterIterator(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, StripEnd::kNegative, StripEnd::kPositive, and MSG.

00075                                       :
00076   CandBase(rhs)      // Should be the next class up on inheritance chain
00077 , fCandSlice(0)
00078 , fVertex(rhs.fVertex)
00079 , fVtxDirCosU(rhs.fVtxDirCosU)
00080 , fVtxDirCosV(rhs.fVtxDirCosV)
00081 , fVtxDirCosZ(rhs.fVtxDirCosZ)
00082 , fTerm(rhs.fTerm)
00083 , fEndDirCosU(rhs.fEndDirCosU)
00084 , fEndDirCosV(rhs.fEndDirCosV)
00085 , fEndDirCosZ(rhs.fEndDirCosZ)
00086 , fTimeSlope(rhs.fTimeSlope)
00087 , fTimeOffset(rhs.fTimeOffset)
00088 {
00089 
00090 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00091   MSG("Cand", Msg::kDebug)
00092        << "Begin CandReco::CandReco(const CandReco &rhs) ctor: " << endl
00093                                            << "UidInt = " << GetUidInt()
00094                            << ", ArchUidInt " << GetArchUidInt() << endl
00095                              << "No. of links = " << GetNLinks() << endl
00096          << "Term CandReco::CandReco(const CandReco &rhs) ctor." << endl;
00097 
00098   if (rhs.fCandSlice)                       // Make an owned CandHandle*
00099     fCandSlice = (rhs.fCandSlice)->DupHandle();
00100 
00101   fSigMapped.erase(fSigMapped.begin(),fSigMapped.end());
00102   fMIP.erase(fMIP.begin(),fMIP.end());
00103   TIter stripItr(rhs.GetDaughterIterator());
00104   while (const CandStripHandle *strip =
00105                            dynamic_cast<CandStripHandle*>(stripItr())) {
00106     if (strip->GetNDigit(StripEnd::kNegative)>0) {
00107       Int_t encodedNegative =
00108                  strip->GetStripEndId(StripEnd::kNegative).GetEncoded();
00109       fSigMapped[encodedNegative] = rhs.fSigMapped[encodedNegative];
00110       fMIP[encodedNegative] = rhs.fMIP[encodedNegative];
00111     }
00112     if (strip->GetNDigit(StripEnd::kPositive)>0) {
00113       Int_t encodedPositive =
00114                  strip->GetStripEndId(StripEnd::kPositive).GetEncoded();
00115       fSigMapped[encodedPositive] = rhs.fSigMapped[encodedPositive];
00116       fMIP[encodedPositive] = rhs.fMIP[encodedPositive];
00117     }
00118   }
00119 }

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

Definition at line 122 of file CandReco.cxx.

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

00123 {
00124   MSG("Cand", Msg::kDebug)
00125                          << "Begin CandReco::~CandReco() dtor: " << endl
00126                                            << "UidInt = " << GetUidInt()
00127                            << ", ArchUidInt " << GetArchUidInt() << endl
00128                              << "No. of links = " << GetNLinks() << endl
00129                            << "End CandReco::~CandReco() dtor." << endl;
00130 
00131 // fCandSlice is an owned CandHandle* starting at CandReco version 3
00132    delete fCandSlice;
00133 }


Member Function Documentation

virtual void CandReco::CreateLocalHandle (  )  [protected, pure virtual]
virtual CandReco* CandReco::Dup (  )  const [protected, pure virtual]
std::ostream & CandReco::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Reimplemented from CandBase.

Reimplemented in CandFitShowerEM, CandFitTrackSR, CandShowerSR, CandEvent, CandFitTrack, CandShower, and CandTrack.

Definition at line 176 of file CandReco.cxx.

References Vertex::AsString(), fEndDirCosU, fEndDirCosV, fEndDirCosZ, fTerm, fTimeOffset, fTimeSlope, fVertex, fVtxDirCosU, fVtxDirCosV, fVtxDirCosZ, CandBase::GetDataIndent(), CandBase::GetIndentString(), and Munits::ns.

00178 {
00179   CandBase::FormatToOStream(os,option);
00180 
00181   TString opt(option);
00182   if (!opt.Contains("v0")) { // v0 means suppress the data values
00183     const TString& indent = GetIndentString();
00184 
00185     static MsgFormat timefmt("f10.9");
00186     os << indent << GetDataIndent()
00187        << "Vertex " << fVertex.AsString()
00188        << endl;    os << indent << GetDataIndent()
00189        << "Term " << fTerm.AsString()
00190        << endl;
00191     os << indent << GetDataIndent()
00192        << "Vertex DirCos: U=" << fVtxDirCosU
00193        << " V=" << fVtxDirCosV
00194        << " Z=" << fVtxDirCosZ
00195        << " Term DirCos: U=" << fEndDirCosU
00196        << " V=" << fEndDirCosV
00197        << " Z=" << fEndDirCosZ
00198        << endl
00199        << indent << GetDataIndent()
00200        << "Time(ns) Slope=" << fTimeSlope/Munits::ns
00201        << " Offset=" << fTimeOffset/Munits::ns
00202        << endl;
00203   }
00204   return os;
00205   
00206 }

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

Reimplemented from CandBase.

Reimplemented in CandFitShowerEM, CandFitTrackSR, CandShowerEM, CandShowerSR, CandSubShowerSR, CandTrackSR, CandCluster3D, CandEvent, CandFitTrack, CandShower, and CandTrack.

Definition at line 136 of file CandReco.cxx.

References fCandSlice, fEndDirCosU, fEndDirCosV, fEndDirCosZ, fMIP, fSigMapped, fTerm, fTimeOffset, fTimeSlope, fVertex, fVtxDirCosU, fVtxDirCosV, fVtxDirCosZ, CandBase::IsEquivalent(), CandBase::TestCandHandleDup(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

Referenced by CandTrack::IsEquivalent(), CandSubShowerSR::IsEquivalent(), CandCluster3D::IsEquivalent(), and CandShower::IsEquivalent().

00137 {
00138   Bool_t result = true;
00139   if (!CandBase::IsEquivalent(rhs)) result = false;   // superclass test
00140   TestDisplayCandBanner("CandReco");
00141   const CandReco* rCnd = dynamic_cast<const CandReco*>(rhs);
00142   if (rCnd == NULL) return false;
00143 
00144   result = TestCandHandleDup("fCandSlice",
00145                                        this->fCandSlice,
00146                                        rCnd->fCandSlice)  && result;
00147   result = TestEquality("fVertex",     this->fVertex,
00148                                        rCnd->fVertex)     && result;
00149   result = TestEquality("fTerm",     this->fTerm,
00150                                        rCnd->fTerm)     && result;
00151   result = TestEquality("fVtxDirCosU",    this->fVtxDirCosU,
00152                                        rCnd->fVtxDirCosU)    && result;
00153   result = TestEquality("fVtxDirCosV",    this->fVtxDirCosV,
00154                                        rCnd->fVtxDirCosV)    && result;
00155   result = TestEquality("fVtxDirCosZ",    this->fVtxDirCosZ,
00156                                        rCnd->fVtxDirCosZ)    && result;
00157   result = TestEquality("fEndDirCosU",    this->fEndDirCosU,
00158                                        rCnd->fEndDirCosU)    && result;
00159   result = TestEquality("fEndDirCosV",    this->fEndDirCosV,
00160                                        rCnd->fEndDirCosV)    && result;
00161   result = TestEquality("fEndDirCosZ",    this->fEndDirCosZ,
00162                                        rCnd->fEndDirCosZ)    && result;
00163   result = TestEquality("fTimeSlope",  this->fTimeSlope,
00164                                        rCnd->fTimeSlope)  && result;
00165   result = TestEquality("fTimeOffset", this->fTimeOffset,
00166                                        rCnd->fTimeOffset) && result;
00167   result = TestEquality("fSigMapped",  this->fSigMapped,
00168                                        rCnd->fSigMapped)  && result;
00169   result = TestEquality("fMIP",        this->fMIP,
00170                                        rCnd->fMIP)        && result;
00171 
00172   return result;
00173 }


Friends And Related Function Documentation

friend class CandRecoHandle [friend]

Definition at line 29 of file CandReco.h.


Member Data Documentation

Definition at line 45 of file CandReco.h.

Referenced by CandReco(), IsEquivalent(), and ~CandReco().

Double_t CandReco::fEndDirCosU [protected]

Definition at line 53 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fEndDirCosV [protected]

Definition at line 54 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fEndDirCosZ [protected]

Definition at line 55 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

map<Int_t, Double_t> CandReco::fMIP [mutable, protected]
map<Int_t, Double_t> CandReco::fSigMapped [mutable, protected]
Vertex CandReco::fTerm [protected]

Definition at line 52 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fTimeOffset [protected]

Definition at line 58 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fTimeSlope [protected]

Definition at line 57 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Definition at line 47 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fVtxDirCosU [protected]

Definition at line 48 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fVtxDirCosV [protected]

Definition at line 49 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandReco::fVtxDirCosZ [protected]

Definition at line 50 of file CandReco.h.

Referenced by FormatToOStream(), and IsEquivalent().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1