22{
23 RecEmcHitMap::const_iterator ciHitMap;
24 RecEmcHitMap::const_iterator ciNeigh;
26
27 bool max;
28
30 RecEmcIDVector::const_iterator ciNeighVec;
31
32 aMaxVec.clear();
33
34 vector<RecEmcHit> aHitVec,tmpHitVec;
35 vector<RecEmcHit>::const_iterator ciHitVec;
36
38
39 for(ciHitMap=aCluster.
Begin();
40 ciHitMap!=aCluster.
End();
41 ++ciHitMap) {
42
43
44 max=true;
45 aHit=ciHitMap->second;
46
48
49 NeighVec.clear();
51
52
53 for(ciNeighVec=NeighVec.begin();
54 ciNeighVec!=NeighVec.end();
55 ++ciNeighVec) {
56
57 ciNeigh=aCluster.
Find(*ciNeighVec);
58 if(ciNeigh!=aCluster.
End()) {
59
60 if(ciNeigh->second.getEnergy()>aHit.
getEnergy()) {
61 max=false;
62 }
63 }
64 }
65 } else {
66 max=false;
67 }
68
69
70 for(ciHitVec=aHitVec.begin();
71 ciHitVec!=aHitVec.end();
72 ciHitVec++) {
74 max=false;
75 break;
76 }
77 }
78
79
80 if(max==true) {
81 aHitVec.push_back(aHit);
82 }
83
84 }
85
86 sort(aHitVec.begin(),aHitVec.end(),greater<RecEmcHit>());
87
88 for(ciHitVec=aHitVec.begin();
89 ciHitVec!=aHitVec.end();
90 ciHitVec++) {
91 aMaxVec.push_back(ciHitVec->getCellId());
92 }
93}
vector< RecEmcID > RecEmcIDVector
RecEmcIDVector GetNeighbors(const Identifier &id)
bool IsNeighbor(const Identifier &id1, const Identifier &id2)
RecEmcHitMap::const_iterator Find(const RecEmcID &CellId) const
RecEmcHitMap::const_iterator Begin() const
RecEmcHitMap::const_iterator End() const
RecEmcEnergy getEnergy() const
RecEmcID getCellId() const