22 std::string recoCandidateProducerName =
"recoCandidateProducer";
26 pfClusterProducerHCAL_ = consumes<reco::PFClusterCollection>(config.
getParameter<
edm::InputTag>(
"pfClusterProducerHCAL"));
29 pfClusterProducerHFEM_ = consumes<reco::PFClusterCollection>(config.
getParameter<
edm::InputTag>(
"pfClusterProducerHFEM"));
30 pfClusterProducerHFHAD_ = consumes<reco::PFClusterCollection>(config.
getParameter<
edm::InputTag>(
"pfClusterProducerHFHAD"));
34 drVetoBarrel_ = config.
getParameter<
double>(
"drVetoBarrel");
35 drVetoEndcap_ = config.
getParameter<
double>(
"drVetoEndcap");
36 etaStripBarrel_ = config.
getParameter<
double>(
"etaStripBarrel");
37 etaStripEndcap_ = config.
getParameter<
double>(
"etaStripEndcap");
38 energyBarrel_ = config.
getParameter<
double>(
"energyBarrel");
39 energyEndcap_ = config.
getParameter<
double>(
"energyEndcap");
41 doRhoCorrection_ = config.
getParameter<
bool>(
"doRhoCorrection");
47 effectiveAreaBarrel_ = config.
getParameter<
double>(
"effectiveAreaBarrel");
48 effectiveAreaEndcap_ = config.
getParameter<
double>(
"effectiveAreaEndcap");
50 produces <T1IsolationMap >();
60 std::string recoCandidateProducerName =
"recoCandidateProducer";
72 desc.
add<
bool>(
"doRhoCorrection",
false);
73 desc.
add<
double>(
"rhoMax", 9.9999999E7);
74 desc.
add<
double>(
"rhoScale", 1.0);
75 desc.
add<
double>(
"effectiveAreaBarrel", 0.101);
76 desc.
add<
double>(
"effectiveAreaEndcap", 0.046);
77 desc.
add<
double>(
"drMax", 0.3);
78 desc.
add<
double>(
"drVetoBarrel", 0.0);
79 desc.
add<
double>(
"drVetoEndcap", 0.0);
80 desc.
add<
double>(
"etaStripBarrel", 0.0);
81 desc.
add<
double>(
"etaStripEndcap", 0.0);
82 desc.
add<
double>(
"energyBarrel", 0.0);
83 desc.
add<
double>(
"energyEndcap", 0.0);
92 if (doRhoCorrection_) {
107 iEvent.
getByToken(recoCandidateProducer_,recoCandHandle);
108 iEvent.
getByToken(pfClusterProducerHCAL_, clusterHcalHandle);
112 iEvent.
getByToken(pfClusterProducerHFEM_, clusterHfemHandle);
113 iEvent.
getByToken(pfClusterProducerHFHAD_, clusterHfhadHandle);
121 for (
unsigned int iReco = 0; iReco < recoCandHandle->size(); iReco++) {
122 T1Ref candRef(recoCandHandle, iReco);
124 if (fabs(candRef->eta()) < 1.479) {
125 dRVeto = drVetoBarrel_;
126 etaStrip = etaStripBarrel_;
128 dRVeto = drVetoEndcap_;
129 etaStrip = etaStripEndcap_;
136 for(
unsigned i=0;
i<forIsolationHcal->size();
i++) {
139 if (fabs(candRef->eta()) < 1.479) {
140 if (fabs(pfclu.
pt()) < energyBarrel_)
143 if (fabs(pfclu.
energy()) < energyEndcap_)
147 float dEta = fabs(candRef->eta() - pfclu.
eta());
148 if(dEta < etaStrip)
continue;
150 float dR =
deltaR(candRef->eta(), candRef->phi(), pfclu.
eta(), pfclu.
phi());
151 if(dR > drMax_ || dR < dRVeto)
continue;
160 for(
unsigned i=0;
i<forIsolationHfem->size();
i++) {
163 if (fabs(candRef->eta()) < 1.479) {
164 if (fabs(pfclu.
pt()) < energyBarrel_)
167 if (fabs(pfclu.
energy()) < energyEndcap_)
171 float dEta = fabs(candRef->eta() - pfclu.
eta());
172 if(dEta < etaStrip)
continue;
174 float dR =
deltaR(candRef->eta(), candRef->phi(), pfclu.
eta(), pfclu.
phi());
175 if(dR > drMax_ || dR < dRVeto)
continue;
180 for(
unsigned i=0;
i<forIsolationHfhad->size();
i++) {
183 if (fabs(candRef->eta()) < 1.479) {
184 if (fabs(pfclu.
pt()) < energyBarrel_)
187 if (fabs(pfclu.
energy()) < energyEndcap_)
191 float dEta = fabs(candRef->eta() - pfclu.
eta());
192 if(dEta < etaStrip)
continue;
194 float dR =
deltaR(candRef->eta(), candRef->phi(), pfclu.
eta(), pfclu.
phi());
195 if(dR > drMax_ || dR < dRVeto)
continue;
201 if (doRhoCorrection_) {
202 if (fabs(candRef->eta()) < 1.479)
203 sum = sum - rho*effectiveAreaBarrel_;
205 sum = sum - rho*effectiveAreaEndcap_;
208 recoCandMap.
insert(candRef, sum);
211 std::auto_ptr<T1IsolationMap> mapForEvent(
new T1IsolationMap(recoCandMap));
212 iEvent.
put(mapForEvent);
T getParameter(std::string const &) const
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
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
double pt() const
transverse momentum, massless approximation
~HLTHcalPFClusterIsolationProducer()
double eta() const
pseudorapidity of cluster centroid
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
HLTHcalPFClusterIsolationProducer< reco::RecoEcalCandidate > EgammaHLTHcalPFClusterIsolationProducer
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double energy() const
cluster energy
double deltaR(double eta1, double eta2, double phi1, double phi2)
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::auto_ptr< ParameterDescriptionCases< T > > cases)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
void insert(const key_type &k, const data_type &v)
insert an association
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
double phi() const
azimuthal angle of cluster centroid
HLTHcalPFClusterIsolationProducer(const edm::ParameterSet &)
HLTHcalPFClusterIsolationProducer< reco::RecoChargedCandidate > MuonHLTHcalPFClusterIsolationProducer