27 template <
typename T1>
54 template <
typename T1>
58 emObjectProducer_(consumes(config.getParameter<edm::
InputTag>(
"candidateProducer"))),
59 pfClusterProducerHCAL_(consumes(config.getParameter<edm::
InputTag>(
"pfClusterProducerHCAL"))),
60 pfClusterProducerHFEM_(consumes(config.getParameter<edm::
InputTag>(
"pfClusterProducerHFEM"))),
61 pfClusterProducerHFHAD_(consumes(config.getParameter<edm::
InputTag>(
"pfClusterProducerHFHAD"))),
62 useHF_(config.getParameter<bool>(
"useHF")),
63 drMax_(config.getParameter<double>(
"drMax")),
64 drVetoBarrel_(config.getParameter<double>(
"drVetoBarrel")),
65 drVetoEndcap_(config.getParameter<double>(
"drVetoEndcap")),
66 etaStripBarrel_(config.getParameter<double>(
"etaStripBarrel")),
67 etaStripEndcap_(config.getParameter<double>(
"etaStripEndcap")),
68 energyBarrel_(config.getParameter<double>(
"energyBarrel")),
69 energyEndcap_(config.getParameter<double>(
"energyEndcap")),
70 useEt_(config.getParameter<bool>(
"useEt")) {
71 produces<edm::ValueMap<float>>();
74 template <
typename T1>
81 "pfClusterProducerHFEM", {
"hltParticleFlowClusterHFEM"},
true) and
83 "pfClusterProducerHFHAD", {
"hltParticleFlowClusterHFHAD"},
true))
or
86 desc.
add<
double>(
"drMax", 0.3);
87 desc.
add<
double>(
"drVetoBarrel", 0.0);
88 desc.
add<
double>(
"drVetoEndcap", 0.0);
89 desc.
add<
double>(
"etaStripBarrel", 0.0);
90 desc.
add<
double>(
"etaStripEndcap", 0.0);
91 desc.
add<
double>(
"energyBarrel", 0.0);
92 desc.
add<
double>(
"energyEndcap", 0.0);
93 desc.
add<
bool>(
"useEt",
true);
97 template <
typename T1>
101 auto emObjectHandle = iEvent.
getHandle(emObjectProducer_);
103 auto isoMap = std::make_unique<edm::ValueMap<float>>();
105 std::vector<float> retV(emObjectHandle->size(), 0);
107 std::vector<edm::Handle<reco::PFClusterCollection>> clusterHandles{iEvent.
getHandle(pfClusterProducerHCAL_)};
110 clusterHandles.push_back(iEvent.
getHandle(pfClusterProducerHFEM_));
111 clusterHandles.push_back(iEvent.
getHandle(pfClusterProducerHFHAD_));
115 drMax_, drVetoBarrel_, drVetoEndcap_, etaStripBarrel_, etaStripEndcap_, energyBarrel_, energyEndcap_, useEt_);
117 for (
unsigned int iReco = 0; iReco < emObjectHandle->size(); iReco++) {
118 T1Ref candRef(emObjectHandle, iReco);
119 retV[iReco] = isoAlgo.
getSum(candRef, clusterHandles);
122 filler.insert(emObjectHandle, retV.begin(), retV.end());
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
edm::Ref< T1Collection > T1Ref
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const double etaStripEndcap_
#define DEFINE_FWK_MODULE(type)
std::string defaultModuleLabel()
const double energyBarrel_
const double etaStripBarrel_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFEM_
EgammaHcalPFClusterIsolationProducer< reco::GsfElectron > ElectronHcalPFClusterIsolationProducer
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double getSum(const T1Ref candRef, const std::vector< edm::Handle< reco::PFClusterCollection >> &clusterHandles)
const edm::EDGetTokenT< T1Collection > emObjectProducer_
const double drVetoEndcap_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
tuple config
parse the configuration file
EgammaHcalPFClusterIsolationProducer< reco::Photon > PhotonHcalPFClusterIsolationProducer
std::vector< T1 > T1Collection
const double energyEndcap_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHFHAD_
EgammaHcalPFClusterIsolationProducer(const edm::ParameterSet &)
const double drVetoBarrel_
const edm::EDGetTokenT< reco::PFClusterCollection > pfClusterProducerHCAL_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)