#include <Multi5x5ClusterAlgo.h>
Public Member Functions | |
bool | addSeed () |
bool | containsSeed () const |
float | energy () const |
const std::vector< std::pair < DetId, float > > & | hits () const |
ProtoBasicCluster (float iEnergy, const EcalRecHit &iSeed, std::vector< std::pair< DetId, float > > &iHits) | |
ProtoBasicCluster () | |
bool | removeHit (const EcalRecHit &hitToRM) |
const EcalRecHit & | seed () const |
Private Member Functions | |
bool | isSeedCrysInHits_ () const |
Private Attributes | |
bool | containsSeed_ |
float | energy_ |
std::vector< std::pair< DetId, float > > | hits_ |
EcalRecHit | seed_ |
Definition at line 35 of file Multi5x5ClusterAlgo.h.
Multi5x5ClusterAlgo::ProtoBasicCluster::ProtoBasicCluster | ( | ) |
Multi5x5ClusterAlgo::ProtoBasicCluster::ProtoBasicCluster | ( | float | iEnergy, |
const EcalRecHit & | iSeed, | ||
std::vector< std::pair< DetId, float > > & | iHits | ||
) | [inline] |
Definition at line 42 of file Multi5x5ClusterAlgo.h.
References containsSeed_, hits_, and isSeedCrysInHits_().
:energy_(iEnergy),seed_(iSeed){hits_.swap(iHits);containsSeed_=isSeedCrysInHits_();}
bool Multi5x5ClusterAlgo::ProtoBasicCluster::addSeed | ( | ) |
Definition at line 438 of file Multi5x5ClusterAlgo.cc.
References EcalBarrel.
{ typedef std::vector<std::pair<DetId,float> >::iterator It; std::pair<It,It> hitPos; if(seed_.id().subdetId()==EcalBarrel){ hitPos = std::equal_range(hits_.begin(),hits_.end(),seed_.id(),PairSortByFirst<DetId,float,EBDetIdSorter>()); }else{ hitPos = std::equal_range(hits_.begin(),hits_.end(),seed_.id(),PairSortByFirst<DetId,float,EEDetIdSorter>()); } if(hitPos.first==hitPos.second){//it doesnt already exist in the vec, add it hits_.insert(hitPos.first,std::pair<DetId,float>(seed_.id(),1.)); energy_+=seed_.energy(); containsSeed_=true; return true; }else return false; }
bool Multi5x5ClusterAlgo::ProtoBasicCluster::containsSeed | ( | ) | const [inline] |
Definition at line 47 of file Multi5x5ClusterAlgo.h.
References containsSeed_.
{return containsSeed_;}
float Multi5x5ClusterAlgo::ProtoBasicCluster::energy | ( | ) | const [inline] |
Definition at line 44 of file Multi5x5ClusterAlgo.h.
References energy_.
Referenced by Multi5x5ClusterAlgo::mainSearch().
{return energy_;}
const std::vector<std::pair<DetId,float> >& Multi5x5ClusterAlgo::ProtoBasicCluster::hits | ( | ) | const [inline] |
Definition at line 46 of file Multi5x5ClusterAlgo.h.
References hits_.
Referenced by Multi5x5ClusterAlgo::mainSearch().
{return hits_;}
bool Multi5x5ClusterAlgo::ProtoBasicCluster::isSeedCrysInHits_ | ( | ) | const [private] |
Definition at line 459 of file Multi5x5ClusterAlgo.cc.
Referenced by ProtoBasicCluster().
bool Multi5x5ClusterAlgo::ProtoBasicCluster::removeHit | ( | const EcalRecHit & | hitToRM | ) |
Definition at line 423 of file Multi5x5ClusterAlgo.cc.
References CaloRecHit::energy(), energy_, hits_, and EcalRecHit::id().
const EcalRecHit& Multi5x5ClusterAlgo::ProtoBasicCluster::seed | ( | ) | const [inline] |
Definition at line 45 of file Multi5x5ClusterAlgo.h.
References seed_.
Referenced by Multi5x5ClusterAlgo::mainSearch().
{return seed_;}
bool Multi5x5ClusterAlgo::ProtoBasicCluster::containsSeed_ [private] |
Definition at line 39 of file Multi5x5ClusterAlgo.h.
Referenced by containsSeed(), and ProtoBasicCluster().
float Multi5x5ClusterAlgo::ProtoBasicCluster::energy_ [private] |
Definition at line 36 of file Multi5x5ClusterAlgo.h.
Referenced by energy(), and removeHit().
std::vector<std::pair<DetId,float> > Multi5x5ClusterAlgo::ProtoBasicCluster::hits_ [private] |
Definition at line 38 of file Multi5x5ClusterAlgo.h.
Referenced by hits(), ProtoBasicCluster(), and removeHit().
Definition at line 37 of file Multi5x5ClusterAlgo.h.
Referenced by seed().