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);
192 iEvent.
put(mapForEvent);
202 for(
unsigned int iEl=0; iEl<electronHandle->size(); iEl++) {
205 if (fabs(eleRef->eta()) < 1.479) {
216 for(
unsigned i=0;
i<pfHandle->size();
i++) {
220 if (pfc->particleId() ==
pfToUse_) {
222 if (fabs(eleRef->eta()) < 1.479) {
230 float dEta = fabs(eleRef->eta() - pfc->momentum().Eta());
234 float dR =
deltaR(eleRef->eta(), eleRef->phi(), pfc->momentum().Eta(), pfc->momentum().Phi());
235 if(dR >
drMax_ || dR < dRVeto)
239 bool clusterOverlap =
false;
240 for(
unsigned b=0;
b<pfc->elementsInBlocks().size();
b++){
242 unsigned elementIndex = pfc->elementsInBlocks()[
b].second;
243 if(blockRef.
isNull())
continue;
248 if(myPFClusterRef.
isNull())
continue;
249 for(
reco::CaloCluster_iterator it = eleRef->superCluster()->clustersBegin(); it != eleRef->superCluster()->clustersEnd(); ++it){
250 if( myPFClusterRef->seed() == (*it)->seed() ){
251 clusterOverlap =
true;
256 if(clusterOverlap)
break;
258 if(clusterOverlap)
continue;
265 if (fabs(eleRef->eta()) < 1.479)
271 eleMap.
insert(eleRef, sum);
274 iEvent.
put(mapForEvent);
T getParameter(std::string const &) const
Abstract base class for a PFBlock element (track, cluster...)
float effectiveAreaBarrel_
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)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidateProducer_
edm::EDGetTokenT< double > rhoProducer_
virtual void produce(edm::Event &, const edm::EventSetup &) override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isNull() const
Checks for null.
float effectiveAreaEndcap_
double deltaR(double eta1, double eta2, double phi1, double phi2)
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)
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_