20{
22 RecEmcHitMap::iterator pHitMap,pBufferHitMap;
23 tHitMap=aHitMap;
24
28
29 RecEmcCluster aCluster;
30
32 EmcRecNeighbor nhb;
33
34 while(!tHitMap.empty())
35 {
36 double eCluster=0;
37 double emax=0;
39
40
41 pHitMap=tHitMap.begin();
42 aBufferHitMap[pHitMap->first]=pHitMap->second;
43 tHitMap.erase(pHitMap);
45 while(!aBufferHitMap.empty())
46 {
47 pBufferHitMap=aBufferHitMap.begin();
48 CellId=pBufferHitMap->first;
50 for(pNearCell=NearCell.begin();
51 pNearCell!=NearCell.end();
52 pNearCell++)
53 {
54 pHitMap=tHitMap.find(*pNearCell);
55 if(pHitMap!=tHitMap.end())
56 {
57 aBufferHitMap[pHitMap->first]=pHitMap->second;
58 tHitMap.erase(pHitMap);
59 }
60 }
61
62
63 if(pBufferHitMap->second.getEnergy()>emax) {
64 emax=pBufferHitMap->second.getEnergy();
65 idmax=pBufferHitMap->first;
66 }
67
68 eCluster+=pBufferHitMap->second.getEnergy();
69 aCluster.
Insert(pBufferHitMap->second);
70 aBufferHitMap.erase(pBufferHitMap);
71 }
72
74 {
76 aClusterMap[idmax]=aCluster;
77
78 }
79 }
80
81}
RecEmcIDVector::iterator i_RecEmcIDVector
vector< RecEmcID > RecEmcIDVector
map< RecEmcID, RecEmcHit, less< RecEmcID > > RecEmcHitMap
RecEmcIDVector GetNeighbors(const Identifier &id)
static EmcRecParameter & GetInstance()
double EThresholdCluster() const
void Insert(const RecEmcHit &aHit)
void ClusterId(const RecEmcID id)