BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecHit2Cluster Class Reference

#include <EmcRecHit2Cluster.h>

Public Member Functions

 EmcRecHit2Cluster ()
 
 ~EmcRecHit2Cluster ()
 
void Convert (const RecEmcHitMap &aHitMap, RecEmcClusterMap &aClusterMap)
 
 EmcRecHit2Cluster ()
 
 ~EmcRecHit2Cluster ()
 
void Convert (const RecEmcHitMap &aHitMap, RecEmcClusterMap &aClusterMap)
 

Detailed Description

Constructor & Destructor Documentation

◆ EmcRecHit2Cluster() [1/2]

EmcRecHit2Cluster::EmcRecHit2Cluster ( )

Definition at line 12 of file EmcRecHit2Cluster.cxx.

13{}

◆ ~EmcRecHit2Cluster() [1/2]

EmcRecHit2Cluster::~EmcRecHit2Cluster ( )

Definition at line 15 of file EmcRecHit2Cluster.cxx.

16{}

◆ EmcRecHit2Cluster() [2/2]

EmcRecHit2Cluster::EmcRecHit2Cluster ( )

◆ ~EmcRecHit2Cluster() [2/2]

EmcRecHit2Cluster::~EmcRecHit2Cluster ( )

Member Function Documentation

◆ Convert() [1/2]

void EmcRecHit2Cluster::Convert ( const RecEmcHitMap aHitMap,
RecEmcClusterMap aClusterMap 
)

Definition at line 18 of file EmcRecHit2Cluster.cxx.

20{
21 RecEmcHitMap tHitMap,aBufferHitMap;
22 RecEmcHitMap::iterator pHitMap,pBufferHitMap;
23 tHitMap=aHitMap;
24
25 RecEmcID CellId;
26 RecEmcIDVector NearCell;
27 i_RecEmcIDVector pNearCell;
28
29 RecEmcCluster aCluster;
30
33
34 while(!tHitMap.empty())
35 {
36 double eCluster=0; //total energy of a cluster
37 double emax=0; //seed's energy of a cluster
38 RecEmcID idmax; //seed's id of a cluster
39
40 // Search a cluster.
41 pHitMap=tHitMap.begin();
42 aBufferHitMap[pHitMap->first]=pHitMap->second;
43 tHitMap.erase(pHitMap);
44 aCluster.Clear();
45 while(!aBufferHitMap.empty())
46 {
47 pBufferHitMap=aBufferHitMap.begin();
48 CellId=pBufferHitMap->first;
49 NearCell=nhb.GetNeighbors(CellId);
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 // Find seed
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 // Now, done and save it.
73 if(eCluster>Para.EThresholdCluster())
74 {
75 aCluster.ClusterId(idmax);
76 aClusterMap[idmax]=aCluster;
77 //aClusterMap[aCluster.ClusterId()]=aCluster;
78 }
79 }
80
81}
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)

Referenced by EmcRec::execute().

◆ Convert() [2/2]

void EmcRecHit2Cluster::Convert ( const RecEmcHitMap aHitMap,
RecEmcClusterMap aClusterMap 
)

The documentation for this class was generated from the following files: