#include <AlgShowerEMList.h>
Inheritance diagram for AlgShowerEMList:

Public Member Functions | |
| AlgShowerEMList () | |
| virtual | ~AlgShowerEMList () |
| virtual void | RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx) |
| virtual void | Trace (const char *c) const |
Definition at line 16 of file AlgShowerEMList.h.
| AlgShowerEMList::AlgShowerEMList | ( | ) |
| AlgShowerEMList::~AlgShowerEMList | ( | ) | [virtual] |
| void AlgShowerEMList::RunAlg | ( | AlgConfig & | ac, | |
| CandHandle & | ch, | |||
| CandContext & | cx | |||
| ) | [virtual] |
Implements AlgBase.
Definition at line 50 of file AlgShowerEMList.cxx.
References CandHandle::AddDaughterLink(), Registry::Get(), AlgFactory::GetAlgHandle(), CandContext::GetCandRecord(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), CandContext::GetMom(), CandRecoHandle::GetNStrip(), RecMinos::GetVldContext(), Msg::kDebug, Msg::kError, Msg::kWarning, CandShowerEM::MakeCandidate(), MSG, and CandRecoHandle::SetCandSlice().
00051 { 00052 MSG("Alg", Msg::kDebug) << "Starting AlgShowerEMList::RunAlg()" << endl; 00053 00054 assert(cx.GetDataIn()); 00055 if (!(cx.GetDataIn()->InheritsFrom("TObjArray"))) { 00056 return; 00057 } 00058 00059 const CandSliceListHandle *slicelist = 0; 00060 const CandClusterListHandle *clusterlist = 0; 00061 const TObjArray *cxin = dynamic_cast<const TObjArray *>(cx.GetDataIn()); 00062 for (Int_t i=0; i<=cxin->GetLast(); i++) { 00063 TObject *tobj = cxin->At(i); 00064 if (tobj->InheritsFrom("CandSliceListHandle")) { 00065 slicelist = dynamic_cast<CandSliceListHandle*>(tobj); 00066 } 00067 if (tobj->InheritsFrom("CandClusterListHandle")) { 00068 clusterlist = dynamic_cast<CandClusterListHandle*>(tobj); 00069 } 00070 } 00071 if (!slicelist || !clusterlist) { 00072 MSG("error",Msg::kError) << 00073 "CandSliceListHandle or CandClusterListHandle missing\n"; 00074 } 00075 00076 // Create Candcontext 00077 CandContext cxx(this,cx.GetMom()); 00078 00079 //get config for AlgShowerEM 00080 const char *charShowerEMAlgConfig = 0; 00081 ac.Get("ShowerEMAlgConfig",charShowerEMAlgConfig); 00082 00083 // Get singleton instance of AlgFactory 00084 AlgFactory &af = AlgFactory::GetInstance(); 00085 AlgHandle ah = af.GetAlgHandle("AlgShowerEM",charShowerEMAlgConfig); 00086 00087 const CandRecord *candrec = cx.GetCandRecord(); 00088 assert(candrec); 00089 const VldContext *vldcptr = candrec->GetVldContext(); 00090 assert(vldcptr); 00091 VldContext vldc = *vldcptr; 00092 00093 UgliGeomHandle ugh(vldc); 00094 00095 CandSliceHandleItr sliceItr(slicelist->GetDaughterIterator()); 00096 while (CandSliceHandle *slice = sliceItr()) { 00097 CandClusterHandleItr clusterItr(clusterlist->GetDaughterIterator()); 00098 TObjArray newshower; 00099 while (CandClusterHandle *cluster = clusterItr()){ 00100 if (*cluster->GetCandSlice()==*slice) { 00101 newshower.Add(cluster); 00102 } 00103 } 00104 cxx.SetDataIn(&newshower); 00105 MSG("ShowerEM",Msg::kDebug) << "forming shower\n"; 00106 CandShowerEMHandle showerhandle = CandShowerEM::MakeCandidate(ah,cxx); 00107 if(showerhandle.GetNStrip()!=0) { 00108 showerhandle.SetCandSlice(slice); 00109 ch.AddDaughterLink(showerhandle); 00110 } 00111 else MSG("ShowerEM",Msg::kWarning) << "Removing empty shower\n"; 00112 } 00113 }
| void AlgShowerEMList::Trace | ( | const char * | c | ) | const [virtual] |
1.4.7