BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
EmcRecSeedLocalMax Class Reference

#include <EmcRecSeedLocalMax.h>

+ Inheritance diagram for EmcRecSeedLocalMax:

Public Member Functions

 EmcRecSeedLocalMax ()
 
 ~EmcRecSeedLocalMax ()
 
virtual void Seed (const RecEmcCluster &aCluster, RecEmcIDVector &aMaxVec)
 
- Public Member Functions inherited from EmcRecSeedAbs
 EmcRecSeedAbs ()
 
virtual ~EmcRecSeedAbs ()
 
virtual void Seed (const RecEmcCluster &aCluster, RecEmcIDVector &aMaxVec)=0
 

Detailed Description

Definition at line 12 of file EmcRecSeedLocalMax.h.

Constructor & Destructor Documentation

◆ EmcRecSeedLocalMax()

EmcRecSeedLocalMax::EmcRecSeedLocalMax ( )

Definition at line 11 of file EmcRecSeedLocalMax.cxx.

12{}

◆ ~EmcRecSeedLocalMax()

EmcRecSeedLocalMax::~EmcRecSeedLocalMax ( )

Definition at line 14 of file EmcRecSeedLocalMax.cxx.

15{}

Member Function Documentation

◆ Seed()

void EmcRecSeedLocalMax::Seed ( const RecEmcCluster aCluster,
RecEmcIDVector aMaxVec 
)
virtual

Implements EmcRecSeedAbs.

Definition at line 17 of file EmcRecSeedLocalMax.cxx.

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}
vector< RecEmcID > RecEmcIDVector
RecEmcIDVector GetNeighbors(const Identifier &id)
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

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