#include <ClusterClusterMapping.h>
|
static int | checkOverlap (const reco::PFCluster &pfc, const std::vector< const reco::SuperCluster * > &sc, float minfrac=0.01, bool debug=false) |
|
static int | checkOverlap (const reco::PFCluster &pfc, const std::vector< reco::SuperClusterRef > &sc, float minfrac=0.01, bool debug=false) |
|
static int | checkOverlap (const reco::PFClusterRef &pfc, const std::vector< reco::SuperClusterRef > &sc, const edm::ValueMap< reco::CaloClusterPtr > &pfclusassoc) |
|
static bool | overlap (const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false) |
|
static bool | overlap (const reco::PFClusterRef &pfclustest, const reco::SuperCluster &sc, const edm::ValueMap< reco::CaloClusterPtr > &pfclusassoc) |
|
Definition at line 12 of file ClusterClusterMapping.h.
ClusterClusterMapping::ClusterClusterMapping |
( |
| ) |
|
|
inline |
ClusterClusterMapping::~ClusterClusterMapping |
( |
| ) |
|
|
inline |
int ClusterClusterMapping::checkOverlap |
( |
const reco::PFCluster & |
pfc, |
|
|
const std::vector< const reco::SuperCluster * > & |
sc, |
|
|
float |
minfrac = 0.01 , |
|
|
bool |
debug = false |
|
) |
| |
|
static |
Definition at line 51 of file ClusterClusterMapping.cc.
References overlap(), and mps_fire::result.
53 unsigned nsc=
sc.size();
55 for(
unsigned isc=0;isc<nsc;++isc) {
static bool overlap(const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false)
Definition at line 62 of file ClusterClusterMapping.cc.
References overlap(), and mps_fire::result.
64 unsigned nsc=
sc.size();
66 for(
unsigned isc=0;isc<nsc;++isc) {
static bool overlap(const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false)
Definition at line 73 of file ClusterClusterMapping.cc.
References overlap(), and mps_fire::result.
75 unsigned nsc=
sc.size();
77 for(
unsigned isc=0;isc<nsc;++isc) {
static bool overlap(const reco::CaloCluster &sc1, const reco::CaloCluster &sc, float minfrac=0.01, bool debug=false)
Definition at line 4 of file ClusterClusterMapping.cc.
References gather_cfg::cout, plotBeamSpotDB::first, reco::CaloCluster::hitsAndFractions(), and edm::second().
Referenced by checkOverlap(), SpecialClusterImporter< T >::importToBlock(), PFElecTkProducer::isSharingEcalEnergyWithEgSC(), SCAndECALLinker::testLink(), and SCAndHGCalLinker::testLink().
5 const std::vector< std::pair<DetId, float> > & hits1 = sc1.
hitsAndFractions();
6 const std::vector< std::pair<DetId, float> > & hits2 = sc2.hitsAndFractions();
7 unsigned nhits1=hits1.size();
8 unsigned nhits2=hits2.size();
10 for(
unsigned i1=0;i1<nhits1;++i1)
13 if(hits1[i1].
second<minfrac) {
14 if(
debug)
std::cout <<
" Discarding " << hits1[i1].first <<
" with " << hits1[i1].second << std::endl;
17 for(
unsigned i2=0;i2<nhits2;++i2)
20 if(hits2[i2].
second<minfrac ) {
21 if(
debug)
std::cout <<
" Discarding " << hits2[i2].first <<
" with " << hits2[i2].second << std::endl;
28 std::cout <<
" Matching hits " << hits1[i1].first <<
" with " << hits1[i1].second <<
" and " << hits2[i2].first;
29 std::cout <<
" with " << hits2[i2].second << std::endl;
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
U second(std::pair< T, U > const &p)
Definition at line 38 of file ClusterClusterMapping.cc.
References reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), edm::ValueMap< T >::contains(), edm::Ptr< T >::id(), edm::Ref< C, T, F >::id(), edm::Ptr< T >::key(), and edm::Ref< C, T, F >::key().
42 if( pfclusassoc.
contains(caloclus->id()) ) {
45 if (pfclus.
id()==pfclustest.
id() && pfclus.
key()==pfclustest.
key())
return true;
key_type key() const
Accessor for product key.
ProductID id() const
Accessor for product ID.
bool contains(ProductID id) const
ProductID id() const
Accessor for product ID.
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents