00001
00002
00003
00004
00005
00007
00008 #include "TClass.h"
00009
00010 #include "Algorithm/AlgHandle.h"
00011 #include "CandSubShowerSR/CandSubShowerSR.h"
00012 #include "CandSubShowerSR/CandSubShowerSRHandle.h"
00013 #include "MessageService/MsgService.h"
00014
00015 ClassImp(CandSubShowerSR)
00016
00017
00018 CVSID("$Id: CandSubShowerSR.cxx,v 1.4 2009/11/20 03:06:11 gmieg Exp $");
00019
00020 #include "Candidate/CandBase.tpl"
00021
00022
00023 CandSubShowerSR::CandSubShowerSR()
00024 : Energy(0), planeView(PlaneView::kUnknown), Slope(0),
00025 AvgDev(0), ClusterID(ClusterType::kUnknown), ProbEM(0),
00026 MinStripPE(0)
00027 {
00028 MSG("Cand", Msg::kDebug)
00029 << "Begin CandSubShowerSR::CandSubShowerSR() ctor: " << endl
00030 << "UidInt = " << GetUidInt()
00031 << ", ArchUidInt " << GetArchUidInt() << endl
00032 << "No. of links = " << GetNLinks() << endl
00033 << "End CandSubShowerSR::CandSubShowerSR() ctor." << endl;
00034
00035 }
00036
00037
00038 CandSubShowerSR::CandSubShowerSR(AlgHandle &ah) :
00039 CandReco(ah)
00040 ,Energy(0), planeView(PlaneView::kUnknown), Slope(0),
00041 AvgDev(0), ClusterID(ClusterType::kUnknown), ProbEM(0),
00042 MinStripPE(0)
00043 {
00044
00045
00046
00047
00048
00049
00050 }
00051
00052
00053 CandSubShowerSR::CandSubShowerSR(AlgHandle &ah, CandHandle &ch,
00054 CandContext &cx) :
00055 CandReco(ah)
00056 ,Energy(0), planeView(PlaneView::kUnknown), Slope(0),
00057 AvgDev(0), ClusterID(ClusterType::kUnknown), ProbEM(0),
00058 MinStripPE(0)
00059 {
00060 CreateLocalHandle();
00061 MSG("Cand", Msg::kDebug)
00062 << "Begin CandSubShowerSR::CandSubShowerSR(AlgHandle &, CandHandle &, "
00063 << "CandContext &) ctor: " << endl
00064 << "UidInt = " << GetUidInt()
00065 << ", ArchUidInt " << GetArchUidInt() << endl
00066 << "No. of links = " << GetNLinks() << endl
00067 << "End CandSubShowerSR::CandSubShowerSR(AlgHandle &, CandHandle &, "
00068 << "CandContext &) ctor." << endl;
00069
00070
00071 {
00072 CandSubShowerSRHandle csh(this);
00073 ch = csh;
00074 }
00075 ah.RunAlg(ch, cx);
00076 }
00077
00078
00079 CandSubShowerSR::CandSubShowerSR(const CandSubShowerSR &rhs) :
00080 CandReco(rhs)
00081 ,Energy(0), planeView(PlaneView::kUnknown), Slope(0),
00082 AvgDev(0), ClusterID(ClusterType::kUnknown), ProbEM(0),
00083 MinStripPE(0)
00084 {
00085
00086 MSG("Cand", Msg::kDebug)
00087 << "Begin CandSubShowerSR::CandSubShowerSR(const CandSubShowerSR &rhs) ctor:"
00088 << endl << "UidInt = " << GetUidInt()
00089 << ", ArchUidInt " << GetArchUidInt() << endl
00090 << "No. of links = " << GetNLinks() << endl
00091 << "End CandSubShowerSR::CandSubShowerSR(const CandSubShowerSR &rhs) ctor."
00092 << endl;
00093
00094 Energy = rhs.Energy;
00095 planeView = rhs.planeView;
00096 Slope = rhs.Slope;
00097 AvgDev = rhs.AvgDev;
00098 ClusterID = rhs.ClusterID;
00099 ProbEM = rhs.ProbEM;
00100 MinStripPE = rhs.MinStripPE;
00101
00102 }
00103
00104
00105 CandSubShowerSR::~CandSubShowerSR()
00106 {
00107 MSG("Cand", Msg::kDebug)
00108 << "Begin CandSubShowerSR::~CandSubShowerSR() dtor: " << endl
00109 << "UidInt = " << GetUidInt()
00110 << ", ArchUidInt " << GetArchUidInt() << endl
00111 << "No. of links = " << GetNLinks() << endl
00112 << "End CandSubShowerSR::~CandSubShowerSR() dtor." << endl;
00113
00114 }
00115
00116
00117 void CandSubShowerSR::CreateLocalHandle()
00118 {
00119 SetLocalHandle(new CandSubShowerSRHandle(this));
00120 }
00121
00122
00123 CandSubShowerSR *CandSubShowerSR::Dup() const
00124 {
00125
00126
00127
00128
00129
00130 CandSubShowerSR *cb = new CandSubShowerSR(*this);
00131 cb->CreateLocalHandle();
00132 TIter iterdau = GetDaughterIterator();
00133 CandHandle *dau;
00134 while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00135 return cb;
00136 }
00137
00138
00139 Bool_t CandSubShowerSR::IsEquivalent(const TObject *rhs) const
00140 {
00141 Bool_t result = true;
00142 if (!CandReco::IsEquivalent(rhs)) result = false;
00143 TestDisplayCandBanner("CandSubShowerSR");
00144 const CandSubShowerSR* rCnd = dynamic_cast<const CandSubShowerSR*>(rhs);
00145 if (rCnd == NULL) return false;
00146
00147 if(dynamic_cast<const CandSubShowerSR*>(rhs)->Energy!=Energy)
00148 return false;
00149
00150 if(dynamic_cast<const CandSubShowerSR*>(rhs)->planeView!=planeView)
00151 return false;
00152
00153 if(dynamic_cast<const CandSubShowerSR*>(rhs)->Slope!=Slope)
00154 return false;
00155
00156 if(dynamic_cast<const CandSubShowerSR*>(rhs)->AvgDev!=AvgDev)
00157 return false;
00158
00159 if(dynamic_cast<const CandSubShowerSR*>(rhs)->ClusterID!=ClusterID)
00160 return false;
00161
00162 if(dynamic_cast<const CandSubShowerSR*>(rhs)->ProbEM!=ProbEM)
00163 return false;
00164
00165 if(dynamic_cast<const CandSubShowerSR*>(rhs)->MinStripPE!=MinStripPE)
00166 return false;
00167
00168 return result;
00169 }
00170
00171
00172 CandSubShowerSRHandle CandSubShowerSR::MakeCandidate(AlgHandle &ah,
00173 CandContext &cx)
00174 {
00175 CandSubShowerSRHandle csh;
00176 new CandSubShowerSR(ah, csh, cx);
00177 return csh;
00178 }
00179