/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/EmcRec/EmcRec-01-02-57/src/EmcRecSeedLocalMax.cxx

Go to the documentation of this file.
00001 //
00002 //  Seed finder abstract base class
00003 //  Use local max to determine a seed
00004 //
00005 //  Zhe Wang 2004, 8, 31
00006 //
00007 #include <iostream>
00008 
00009 #include "EmcRec/EmcRecSeedLocalMax.h"
00010 
00011 EmcRecSeedLocalMax::EmcRecSeedLocalMax()
00012 {}
00013 
00014 EmcRecSeedLocalMax::~EmcRecSeedLocalMax()
00015 {}
00016 
00017 void EmcRecSeedLocalMax::Seed(const RecEmcCluster& aCluster,
00018                               RecEmcIDVector& aMaxVec)
00019 {
00020    RecEmcHitMap::const_iterator ciHitMap;
00021    RecEmcHitMap::const_iterator ciNeigh;
00022    RecEmcHit aHit;
00023    
00024    bool max;
00025    
00026    RecEmcIDVector NeighVec;
00027    RecEmcIDVector::const_iterator ciNeighVec;
00028       
00029    aMaxVec.clear();
00030    
00031    EmcRecNeighbor nhb;
00032 
00033    for(ciHitMap=aCluster.Begin();
00034        ciHitMap!=aCluster.End();
00035        ++ciHitMap) {
00036       //++++++++++++++++++++++++++++++++++++++++++++++++++
00037       //prepare a hit
00038       max=true;
00039       aHit=ciHitMap->second;
00040       //prepare its neighbours
00041       NeighVec.clear();
00042       NeighVec=nhb.GetNeighbors(aHit.getCellId());
00043       
00044       //to see if it is energy max
00045       for(ciNeighVec=NeighVec.begin();
00046           ciNeighVec!=NeighVec.end();
00047           ++ciNeighVec) {
00048          //find it
00049          ciNeigh=aCluster.Find(*ciNeighVec);
00050          if(ciNeigh!=aCluster.End()) {
00051             //largest!!!
00052             if(ciNeigh->second.getEnergy()>=aHit.getEnergy()) {
00053                max=false;
00054             }
00055          }
00056       }
00057          
00058       //once max hit is found
00059       if(max==true) {
00060         aMaxVec.push_back(aHit.getCellId());
00061       }
00062       //++++++++++++++++++++++++++++++++++++++++++++++++++
00063    }
00064 }
00065 

Generated on Tue Nov 29 23:13:18 2016 for BOSS_7.0.2 by  doxygen 1.4.7