42 template <
typename T1>
77 template <
typename T1>
81 drMax_(config.getParameter<double>(
"drMax")),
89 rhoMax_(config.getParameter<double>(
"rhoMax")),
90 rhoScale_(config.getParameter<double>(
"rhoScale")),
95 throw cms::Exception(
"IncompatibleVects") <<
"absEtaLowEdges and effectiveAreas should be of the same size. \n";
98 throw cms::Exception(
"IncompleteCoverage") <<
"absEtaLowEdges should start from 0. \n";
102 throw cms::Exception(
"ImproperBinning") <<
"absEtaLowEdges entries should be in increasing order. \n";
106 std::string recoCandidateProducerName =
"recoCandidateProducer";
109 recoCandidateProducerName =
"recoEcalCandidateProducer";
112 produces<T1IsolationMap>();
115 template <
typename T1>
118 template <
typename T1>
120 std::string recoCandidateProducerName =
"recoCandidateProducer";
123 recoCandidateProducerName =
"recoEcalCandidateProducer";
129 desc.
add<
bool>(
"doRhoCorrection",
false);
130 desc.
add<
double>(
"rhoMax", 9.9999999E7);
131 desc.
add<
double>(
"rhoScale", 1.0);
132 desc.
add<
double>(
"drMax", 0.3);
133 desc.
add<
double>(
"drVetoBarrel", 0.0);
134 desc.
add<
double>(
"drVetoEndcap", 0.0);
135 desc.
add<
double>(
"etaStripBarrel", 0.0);
136 desc.
add<
double>(
"etaStripEndcap", 0.0);
137 desc.
add<
double>(
"energyBarrel", 0.0);
138 desc.
add<
double>(
"energyEndcap", 0.0);
139 desc.
add<std::vector<double>>(
"effectiveAreas", {0.29, 0.21});
140 desc.
add<std::vector<double>>(
"absEtaLowEdges", {0.0, 1.479});
144 template <
typename T1>
168 for (
unsigned int iReco = 0; iReco < recoCandHandle->size(); iReco++) {
169 T1Ref candRef(recoCandHandle, iReco);
171 float sum = isoAlgo.
getSum(candRef, clusterHandle);
175 auto cEta =
std::abs(candRef->eta());
186 recoCandMap.
insert(candRef, sum);
189 iEvent.
put(std::make_unique<T1IsolationMap>(recoCandMap));
const double energyEndcap_
T getParameter(std::string const &) const
edm::EDGetTokenT< T1Collection > recoCandidateProducer_
const double etaStripEndcap_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< double > rhoProducer_
const double drVetoEndcap_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const double etaStripBarrel_
const double drVetoBarrel_
std::string defaultModuleLabel()
bool computedRVeto(T1Ref candRef, reco::PFClusterRef pfclu)
const std::vector< double > absEtaLowEdges_
edm::AssociationMap< edm::OneToValue< std::vector< T1 >, float > > T1IsolationMap
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) override
HLTEcalPFClusterIsolationProducer< reco::RecoChargedCandidate > MuonHLTEcalPFClusterIsolationProducer
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HLTEcalPFClusterIsolationProducer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< T1 > T1Collection
~HLTEcalPFClusterIsolationProducer() override
T const * product() const
void insert(const key_type &k, const data_type &v)
insert an association
double getSum(T1Ref, edm::Handle< std::vector< reco::PFCluster > >)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double energyBarrel_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducer_
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
HLTEcalPFClusterIsolationProducer< reco::RecoEcalCandidate > EgammaHLTEcalPFClusterIsolationProducer
edm::Ref< T1Collection > T1Ref
const bool doRhoCorrection_
const std::vector< double > effectiveAreas_