1 #ifndef CommonTools_ParticleFlow_IsolatedPFCandidateSelectorDefinition 2 #define CommonTools_ParticleFlow_IsolatedPFCandidateSelectorDefinition 39 std::vector< edm::Handle<IsoMap> >
47 std::vector< edm::Handle<IsoMap> >
59 for( collection::const_iterator pfc = hc->begin();
60 pfc != hc->end(); ++pfc, ++
key) {
64 double isoSumCharged=0.0;
65 double isoSumNeutral=0.0;
67 for(
unsigned iMap = 0; iMap<isoMapsCharged.size(); ++iMap) {
68 const IsoMap & isoMap = *(isoMapsCharged[iMap]);
69 double val = isoMap[candidate];
73 for(
unsigned iMap = 0; iMap<isoMapsNeutral.size(); ++iMap) {
74 const IsoMap & isoMap = *(isoMapsNeutral[iMap]);
75 double val = isoMap[candidate];
81 const IsoMap& isoMap = *dBetaH;
82 double dBetaVal = isoMap[candidate];
84 isoSumNeutral = dBetaCorIsoSumNeutral>0 ? dBetaCorIsoSumNeutral : 0;
87 double isoSum=isoSumCharged+isoSumNeutral;
90 isoSum /= candidate->pt();
101 selected_.back().setSourceCandidatePtr( ptrToMother );
IsolatedPFCandidateSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
edm::ValueMap< double > IsoMap
bool getByToken(EDGetToken token, Handle< PROD > &result) const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
edm::EDGetTokenT< IsoMap > deltaBetaIsolationValueMapToken_
std::vector< edm::EDGetTokenT< IsoMap > > isolationValueMapChargedTokens_
void select(const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
std::vector< edm::EDGetTokenT< IsoMap > > isolationValueMapNeutralTokens_
bool doDeltaBetaCorrection_
Particle reconstructed by the particle flow algorithm.
isoSum
===> compute the isolation and find the most isolated track