55 produces < reco::RecoEcalCandidateIsolationMap >();
57 produces < reco::ElectronIsolationMap >();
70 desc.
add<
bool>(
"useGsfTrack",
false);
71 desc.
add<
bool>(
"useSCRefs",
false);
72 desc.
add<
double>(
"drMax", 0.3);
73 desc.
add<
double>(
"drVetoBarrel", 0.02);
74 desc.
add<
double>(
"drVetoEndcap", 0.02);
75 desc.
add<
double>(
"ptMin", 0.0);
76 desc.
add<
double>(
"dzMax", 0.2);
77 desc.
add<
double>(
"dxyMax", 0.1);
78 desc.
add<
int>(
"pfCandidateType", 1);
79 descriptions.
add((
"hltEgammaHLTPFChargedIsolationProducer"), desc);
103 for(
unsigned int iReco=0; iReco<recoEcalCandHandle->size(); iReco++) {
108 if (fabs(candRef->eta())<1.479)
116 math::XYZVector photon_directionWrtVtx(candRef->superCluster()->x() - beamSpotPosition.x(),
117 candRef->superCluster()->y() - beamSpotPosition.y(),
118 candRef->superCluster()->z() - beamSpotPosition.z());
122 for(
unsigned i=0;
i<forIsolation->size();
i++) {
131 float dz = fabs(pfc.
trackRef()->dz(beamSpotPosition));
132 if (dz >
dzMax_)
continue;
134 float dxy = fabs(pfc.
trackRef()->dxy(beamSpotPosition));
135 if(fabs(dxy) >
dxyMax_)
continue;
137 float dR =
deltaR(photon_directionWrtVtx.Eta(), photon_directionWrtVtx.Phi(), pfc.
momentum().Eta(), pfc.
momentum().Phi());
138 if(dR >
drMax_ || dR < dRveto)
continue;
144 recoEcalCandMap.
insert(candRef, sum);
147 for(
unsigned int iEl=0; iEl<electronHandle->size(); iEl++) {
152 if (fabs(eleRef->eta())<1.479)
161 for(
unsigned i=0;
i<forIsolation->size();
i++) {
171 float dz = fabs(pfc.
trackRef()->dz(eleRef->vertex()));
172 if (dz >
dzMax_)
continue;
174 float dxy = fabs(pfc.
trackRef()->dxy(eleRef->vertex()));
175 if(fabs(dxy) >
dxyMax_)
continue;
178 if(dR >
drMax_ || dR < dRveto)
continue;
184 eleMap.
insert(eleRef, sum);
190 iEvent.
put(mapForEvent);
193 iEvent.
put(mapForEvent);
edm::InputTag electronProducer_
T getParameter(std::string const &) const
edm::InputTag recoEcalCandidateProducer_
math::XYZPoint Point
point in the space
edm::InputTag pfCandidateProducer_
reco::TrackRef trackRef() const
EgammaHLTPFChargedIsolationProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag beamSpotProducer_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
~EgammaHLTPFChargedIsolationProducer()
void insert(const key_type &k, const data_type &v)
insert an association
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T const * product() const
Particle reconstructed by the particle flow algorithm.
virtual ParticleType particleId() const
virtual float pt() const GCC11_FINAL
transverse momentum