16 {
18 RecEmcHitMap::iterator pHitMap, pBufferHitMap;
19 tHitMap = aHitMap;
20
24
25 RecEmcCluster aCluster;
26
28 EmcRecNeighbor nhb;
29
30 while ( !tHitMap.empty() )
31 {
32 double eCluster = 0;
33 double emax = 0;
35
36
37 pHitMap = tHitMap.begin();
38 aBufferHitMap[pHitMap->first] = pHitMap->second;
39 tHitMap.erase( pHitMap );
41 while ( !aBufferHitMap.empty() )
42 {
43 pBufferHitMap = aBufferHitMap.begin();
44 CellId = pBufferHitMap->first;
46 for ( pNearCell = NearCell.begin(); pNearCell != NearCell.end(); pNearCell++ )
47 {
48 pHitMap = tHitMap.find( *pNearCell );
49 if ( pHitMap != tHitMap.end() )
50 {
51 aBufferHitMap[pHitMap->first] = pHitMap->second;
52 tHitMap.erase( pHitMap );
53 }
54 }
55
56
57 if ( pBufferHitMap->second.getEnergy() > emax )
58 {
59 emax = pBufferHitMap->second.getEnergy();
60 idmax = pBufferHitMap->first;
61 }
62
63 eCluster += pBufferHitMap->second.getEnergy();
64 aCluster.
Insert( pBufferHitMap->second );
65 aBufferHitMap.erase( pBufferHitMap );
66 }
67
69 {
71 aClusterMap[idmax] = aCluster;
72
73 }
74 }
75}
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)