00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00015 #include "Algorithm/AlgHandle.h"
00016 #include "Algorithm/AlgConfig.h"
00017 #include "CandFitTrackMS/CandFitTrackMS.h"
00018 #include "CandFitTrackMS/CandFitTrackMSHandle.h"
00019 #include "MessageService/MsgService.h"
00020
00021 ClassImp(CandFitTrackMS)
00022
00023
00024 CVSID("$Id: CandFitTrackMS.cxx,v 1.3 2002/08/08 20:51:00 bringley Exp $");
00025
00026
00027 CandFitTrackMS::CandFitTrackMS()
00028 {
00029 MSG("Cand", Msg::kDebug)
00030 << "Begin CandFitTrackMS::CandFitTrackMS() ctor: " << endl
00031 << "UidInt = " << GetUidInt()
00032 << ", ArchUidInt " << GetArchUidInt() << endl
00033 << "No. of links = " << GetNLinks() << endl
00034 << "End CandFitTrackMS::CandFitTrackMS() ctor." << endl;
00035 Init();
00036 }
00037
00038
00039 CandFitTrackMS::CandFitTrackMS(AlgHandle &ah) :
00040 CandFitTrack(ah)
00041 {
00042
00043
00044
00045
00046
00047
00048
00049 Init();
00050
00051 }
00052
00053
00054 CandFitTrackMS::CandFitTrackMS(AlgHandle &ah, CandHandle &ch, CandContext &cx) :
00055 CandFitTrack(ah)
00056 {
00057 CreateLocalHandle();
00058 MSG("Cand", Msg::kDebug)
00059 << "Begin CandFitTrackMS::CandFitTrackMS(AlgHandle &, CandHandle &, "
00060 << "CandContext &) ctor: " << endl
00061 << "UidInt = " << GetUidInt()
00062 << ", ArchUidInt " << GetArchUidInt() << endl
00063 << "No. of links = " << GetNLinks() << endl
00064 << "End CandFitTrackMS::CandFitTrackMS(AlgHandle &, CandHandle &, "
00065 << "CandContext &) ctor." << endl;
00066
00067 Init();
00068
00069 {
00070 CandFitTrackMSHandle csh(this);
00071 ch = csh;
00072 }
00073 ah.RunAlg(ch, cx);
00074 }
00075
00076
00077 CandFitTrackMS::CandFitTrackMS(const CandFitTrackMS &rhs) :
00078 CandFitTrack(rhs)
00079 {
00080 Init();
00081 MSG("Cand", Msg::kDebug)
00082 << "Begin CandFitTrackMS::CandFitTrackMS(const CandFitTrackMS &rhs) ctor: " << endl
00083 << "UidInt = " << GetUidInt()
00084 << ", ArchUidInt " << GetArchUidInt() << endl
00085 << "No. of links = " << GetNLinks() << endl
00086 << "End CandFitTrackMS::CandFitTrackMS(const CandFitTrackMS &rhs) ctor." << endl;
00087 }
00088
00089
00090 CandFitTrackMS::~CandFitTrackMS()
00091 {
00092 MSG("Cand", Msg::kDebug)
00093 << "Begin CandFitTrackMS::~CandFitTrackMS() dtor: " << endl
00094 << "UidInt = " << GetUidInt()
00095 << ", ArchUidInt " << GetArchUidInt() << endl
00096 << "No. of links = " << GetNLinks() << endl
00097 << "End CandFitTrackMS::~CandFitTrackMS() dtor." << endl;
00098
00099 }
00100
00101
00102 void CandFitTrackMS::CreateLocalHandle()
00103 {
00104 SetLocalHandle(new CandFitTrackMSHandle(this));
00105 }
00106
00107
00108 CandFitTrackMS *CandFitTrackMS::Dup() const
00109 {
00110
00111
00112
00113
00114
00115 CandFitTrackMS *cb = new CandFitTrackMS(*this);
00116 cb->CreateLocalHandle();
00117 TIter iterdau = GetDaughterIterator();
00118 CandHandle *dau;
00119 while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00120 return cb;
00121 }
00122
00123
00124 CandFitTrackMSHandle CandFitTrackMS::MakeCandidate(AlgHandle &ah, CandContext &cx)
00125 {
00126 CandFitTrackMSHandle csh;
00127 new CandFitTrackMS(ah, csh, cx);
00128 return csh;
00129 }
00130
00131
00132 void CandFitTrackMS::Init()
00133 {
00134 fMomentumL = 0;
00135 fMomentumBF = 0;
00136 fMomentumMS = 0;
00137 fMomentumBoth = 0;
00138 fMomentumAlt = 0;
00139
00140 fChi2L = 0;
00141 fChi2BF = 0;
00142 fChi2MS = 0;
00143 fChi2Both = 0;
00144 fChi2Alt = 0;
00145
00146 fFlag = 0;
00147 fIter = 0;
00148
00149 fEMChargeD = 0;
00150 }