18{
22
28 list<ecalCell*> cells;
29 list<ecalCell*>::const_iterator
p;
30 map<Int_t, Float_t> e;
31 map<Int_t, Float_t> e2;
32 map<Int_t, Float_t>::const_iterator ep;
33 map<Int_t, Float_t>::reverse_iterator rp;
35 Int_t trn;
37
39 {
42 cells.clear();
43
45 {
47 cells.push_back(cell);
48 }
49 else
51
52 e.clear(); e2.clear();
53
54 for(p=cells.begin();
p!=cells.end();++
p)
55 {
58 {
59 if (e.find(ep->first)==e.end())
60 e[ep->first]=ep->second;
61 else
62 e[ep->first]+=ep->second;
63 }
64 }
65
66
67 for(ep=e.begin();ep!=e.end();++ep)
68 {
69 if (e2.find(ep->first)==e.end())
70 e2[ep->first]=ep->second;
71 else
72 e2[ep->first]+=ep->second;
73 if (ep->first<0&&fVerbose==0) continue;
75 if (tr==NULL)
76 {
77 Info(
"Exec",
"Event %d. Can't find MCTrack %d.",
fEv, ep->first);
78 continue;
79 }
80 for(;;)
81 {
84 if (trn<0) break;
86 if (tr==NULL)
87 {
88 Info(
"Exec",
"Event %d. Can't find MCTrack %d.",
fEv, ep->first);
89 break;
90 }
92 if (e2.find(trn)==e2.end())
93 e2[trn]=ep->second;
94 else
95 e2[trn]+=ep->second;
96 }
97 }
98
99
100 max=-1e11; trn=-1111;
101 for(rp=e2.rbegin();rp!=e2.rend();++rp)
102 {
103 if (rp->second>max)
104 {
max=rp->second; trn=rp->first;}
105 }
106
107 if (trn>=0)
108 {
111 }
112 else
114 }
115
116 if (fVerbose>0) Info(
"Exec",
"Event %d. Matched %d. Skipped %d maxs.",
fEv,
fN,
fRejected);
117}
Int_t GetMotherId() const
std::map< Int_t, Float_t >::const_iterator GetTrackEnergyBegin() const
std::map< Int_t, Float_t >::const_iterator GetTrackEnergyEnd() const
void GetNeighborsList(std::list< ecalCell * > &neib) const
void Get5x5Cluster(std::list< ecalCell * > &cls)
ecalCell * GetHitCell(const Int_t hitId) const