17void ecalMatch::Exec(Option_t* option,TClonesArray* reconstructed,TClonesArray* mctracks)
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;
47 cells.push_back(cell);
52 e.clear(); e2.clear();
54 for(p=cells.begin();p!=cells.end();++p)
59 if (e.find(ep->first)==e.end())
60 e[ep->first]=ep->second;
62 e[ep->first]+=ep->second;
67 for(ep=e.begin();ep!=e.end();++ep)
69 if (e2.find(ep->first)==e.end())
70 e2[ep->first]=ep->second;
72 e2[ep->first]+=ep->second;
73 if (ep->first<0&&fVerbose==0)
continue;
77 Info(
"Exec",
"Event %d. Can't find MCTrack %d.",
fEv, ep->first);
88 Info(
"Exec",
"Event %d. Can't find MCTrack %d.",
fEv, ep->first);
92 if (e2.find(trn)==e2.end())
100 max=-1e11; trn=-1111;
101 for(rp=e2.rbegin();rp!=e2.rend();++rp)
104 { max=rp->second; trn=rp->first;}
116 if (fVerbose>0) Info(
"Exec",
"Event %d. Matched %d. Skipped %d maxs.",
fEv,
fN,
fRejected);
121 : FairTask(name, verbose), fEv(0), fN(0), fRejected(0), fUse3x3(0),
122 fReconstucted(NULL), fMCTracks(NULL), fStr(NULL)