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);
118 for (
unsigned int iReco = 0; iReco < recoecalcandHandle->size(); iReco++) {
121 if (fabs(candRef->eta()) < 1.479) {
132 for(
unsigned i=0;
i<pfHandle->size();
i++) {
136 if (pfc->particleId() ==
pfToUse_) {
138 if (fabs(candRef->eta()) < 1.479) {
148 math::XYZVector candDirectionWrtVtx(candRef->superCluster()->x() - pfvtx.x(),
149 candRef->superCluster()->y() - pfvtx.y(),
150 candRef->superCluster()->z() - pfvtx.z());
152 float dEta = fabs(candDirectionWrtVtx.Eta() - pfc->momentum().Eta());
153 if(dEta < etaStrip)
continue;
155 float dR =
deltaR(candDirectionWrtVtx.Eta(), candDirectionWrtVtx.Phi(), pfc->momentum().Eta(), pfc->momentum().Phi());
156 if(dR >
drMax_ || dR < dRVeto)
continue;
159 bool clusterOverlap =
false;
160 for(
unsigned b=0;
b<pfc->elementsInBlocks().size();
b++){
162 unsigned elementIndex = pfc->elementsInBlocks()[
b].second;
163 if(blockRef.
isNull())
continue;
168 if(myPFClusterRef.
isNull())
continue;
169 for(
reco::CaloCluster_iterator it = candRef->superCluster()->clustersBegin(); it != candRef->superCluster()->clustersEnd(); ++it){
170 if( myPFClusterRef->seed() == (*it)->seed() ){
171 clusterOverlap =
true;
176 if(clusterOverlap)
break;
178 if(clusterOverlap)
continue;
185 if (fabs(candRef->eta()) < 1.479)
191 recoEcalCandMap.
insert(candRef, sum);
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);
277 iEvent.
put(mapForEvent);
280 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_