57 produces < reco::RecoEcalCandidateIsolationMap >();
60 produces < reco::ElectronIsolationMap >();
71 desc.
add<
bool>(
"doRhoCorrection",
false);
72 desc.
add<
double>(
"rhoMax", 9.9999999E7);
73 desc.
add<
double>(
"rhoScale", 1.0);
74 desc.
add<
double>(
"effectiveAreaBarrel", 0.101);
75 desc.
add<
double>(
"effectiveAreaEndcap", 0.046);
76 desc.
add<
bool>(
"useSCRefs",
false);
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);
84 desc.
add<
int>(
"pfCandidateType", 4);
85 descriptions.
add((
"hltEgammaHLTPFPhotonIsolationProducer"), desc);
116 for (
unsigned int iReco = 0; iReco < recoecalcandHandle->size(); iReco++) {
119 if (fabs(candRef->eta()) < 1.479) {
130 for(
unsigned i=0;
i<pfHandle->size();
i++) {
134 if (pfc->particleId() ==
pfToUse_) {
136 if (fabs(candRef->eta()) < 1.479) {
146 math::XYZVector candDirectionWrtVtx(candRef->superCluster()->x() - pfvtx.x(),
147 candRef->superCluster()->y() - pfvtx.y(),
148 candRef->superCluster()->z() - pfvtx.z());
150 float dEta = fabs(candDirectionWrtVtx.Eta() - pfc->momentum().Eta());
151 if(dEta < etaStrip)
continue;
153 float dR =
deltaR(candDirectionWrtVtx.Eta(), candDirectionWrtVtx.Phi(), pfc->momentum().Eta(), pfc->momentum().Phi());
154 if(dR >
drMax_ || dR < dRVeto)
continue;
157 bool clusterOverlap =
false;
158 for(
unsigned b=0;
b<pfc->elementsInBlocks().size();
b++){
160 unsigned elementIndex = pfc->elementsInBlocks()[
b].second;
161 if(blockRef.
isNull())
continue;
166 if(myPFClusterRef.
isNull())
continue;
167 for(
reco::CaloCluster_iterator it = candRef->superCluster()->clustersBegin(); it != candRef->superCluster()->clustersEnd(); ++it){
168 if( myPFClusterRef->seed() == (*it)->seed() ){
169 clusterOverlap =
true;
174 if(clusterOverlap)
break;
176 if(clusterOverlap)
continue;
183 if (fabs(candRef->eta()) < 1.479)
189 recoEcalCandMap.
insert(candRef, sum);
191 iEvent.
put(std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandMap));
201 for(
unsigned int iEl=0; iEl<electronHandle->size(); iEl++) {
204 if (fabs(eleRef->eta()) < 1.479) {
215 for(
unsigned i=0;
i<pfHandle->size();
i++) {
219 if (pfc->particleId() ==
pfToUse_) {
221 if (fabs(eleRef->eta()) < 1.479) {
229 float dEta = fabs(eleRef->eta() - pfc->momentum().Eta());
233 float dR =
deltaR(eleRef->eta(), eleRef->phi(), pfc->momentum().Eta(), pfc->momentum().Phi());
234 if(dR >
drMax_ || dR < dRVeto)
238 bool clusterOverlap =
false;
239 for(
unsigned b=0;
b<pfc->elementsInBlocks().size();
b++){
241 unsigned elementIndex = pfc->elementsInBlocks()[
b].second;
242 if(blockRef.
isNull())
continue;
247 if(myPFClusterRef.
isNull())
continue;
248 for(
reco::CaloCluster_iterator it = eleRef->superCluster()->clustersBegin(); it != eleRef->superCluster()->clustersEnd(); ++it){
249 if( myPFClusterRef->seed() == (*it)->seed() ){
250 clusterOverlap =
true;
255 if(clusterOverlap)
break;
257 if(clusterOverlap)
continue;
264 if (fabs(eleRef->eta()) < 1.479)
270 eleMap.
insert(eleRef, sum);
272 iEvent.
put(std::make_unique<reco::ElectronIsolationMap>(eleMap));
T getParameter(std::string const &) const
Abstract base class for a PFBlock element (track, cluster...)
float effectiveAreaBarrel_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual const PFClusterRef & clusterRef() const
edm::EDGetTokenT< reco::ElectronCollection > electronProducer_
EgammaHLTPFPhotonIsolationProducer(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidateProducer_
edm::EDGetTokenT< double > rhoProducer_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNull() const
Checks for null.
float effectiveAreaEndcap_
T const * product() const
void insert(const key_type &k, const data_type &v)
insert an association
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_