CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecSeedLocalMax.cxx
Go to the documentation of this file.
1//
2// Seed finder abstract base class
3// Use local max to determine a seed
4//
5// Zhe Wang 2004, 8, 31
6//
7#include <iostream>
8
10
12{}
13
15{}
16
18 RecEmcIDVector& aMaxVec)
19{
20 RecEmcHitMap::const_iterator ciHitMap;
21 RecEmcHitMap::const_iterator ciNeigh;
22 RecEmcHit aHit;
23
24 bool max;
25
26 RecEmcIDVector NeighVec;
27 RecEmcIDVector::const_iterator ciNeighVec;
28
29 aMaxVec.clear();
30
32
33 for(ciHitMap=aCluster.Begin();
34 ciHitMap!=aCluster.End();
35 ++ciHitMap) {
36 //++++++++++++++++++++++++++++++++++++++++++++++++++
37 //prepare a hit
38 max=true;
39 aHit=ciHitMap->second;
40 //prepare its neighbours
41 NeighVec.clear();
42 NeighVec=nhb.GetNeighbors(aHit.getCellId());
43
44 //to see if it is energy max
45 for(ciNeighVec=NeighVec.begin();
46 ciNeighVec!=NeighVec.end();
47 ++ciNeighVec) {
48 //find it
49 ciNeigh=aCluster.Find(*ciNeighVec);
50 if(ciNeigh!=aCluster.End()) {
51 //largest!!!
52 if(ciNeigh->second.getEnergy()>=aHit.getEnergy()) {
53 max=false;
54 }
55 }
56 }
57
58 //once max hit is found
59 if(max==true) {
60 aMaxVec.push_back(aHit.getCellId());
61 }
62 //++++++++++++++++++++++++++++++++++++++++++++++++++
63 }
64}
65
vector< RecEmcID > RecEmcIDVector
RecEmcIDVector GetNeighbors(const Identifier &id)
virtual void Seed(const RecEmcCluster &aCluster, RecEmcIDVector &aMaxVec)
RecEmcHitMap::const_iterator Find(const RecEmcID &CellId) const
RecEmcHitMap::const_iterator Begin() const
RecEmcHitMap::const_iterator End() const
RecEmcEnergy getEnergy() const
Definition: RecEmcHit.h:48
RecEmcID getCellId() const
Definition: RecEmcHit.h:47