42 produces < reco::RecoEcalCandidateIsolationMap >();
45 produces < reco::ElectronIsolationMap >();
55 desc.
add<
bool>(
"useGsfTrack",
false);
56 desc.
add<
bool>(
"useSCRefs",
false);
57 desc.
add<
double>(
"drMax", 0.3);
58 desc.
add<
double>(
"drVetoBarrel", 0.02);
59 desc.
add<
double>(
"drVetoEndcap", 0.02);
60 desc.
add<
double>(
"ptMin", 0.0);
61 desc.
add<
double>(
"dzMax", 0.2);
62 desc.
add<
double>(
"dxyMax", 0.1);
63 desc.
add<
int>(
"pfCandidateType", 1);
64 descriptions.
add((
"hltEgammaHLTPFChargedIsolationProducer"), desc);
88 for(
unsigned int iReco=0; iReco<recoEcalCandHandle->size(); iReco++) {
91 if (fabs(candRef->eta())<1.479)
97 math::XYZVector candDirectionWrtVtx(candRef->superCluster()->x() - beamSpotPosition.x(),
98 candRef->superCluster()->y() - beamSpotPosition.y(),
99 candRef->superCluster()->z() - beamSpotPosition.z());
104 for(
unsigned i=0;
i<forIsolation->size();
i++) {
112 float dz = fabs(pfc.
trackRef()->dz(beamSpotPosition));
115 float dxy = fabs(pfc.
trackRef()->dxy(beamSpotPosition));
116 if(fabs(dxy) >
dxyMax_)
continue;
118 float dR =
deltaR(candDirectionWrtVtx.Eta(), candDirectionWrtVtx.Phi(), pfc.
momentum().Eta(), pfc.
momentum().Phi());
119 if(dR >
drMax_ || dR < dRveto)
continue;
125 recoEcalCandMap.
insert(candRef, sum);
134 for(
unsigned int iEl=0; iEl<electronHandle->size(); iEl++) {
138 if (fabs(eleRef->eta())<1.479)
146 for(
unsigned i=0;
i<forIsolation->size();
i++) {
154 float dz = fabs(pfc.
trackRef()->dz(eleRef->vertex()));
157 float dxy = fabs(pfc.
trackRef()->dxy(eleRef->vertex()));
158 if(fabs(dxy) >
dxyMax_)
continue;
161 if(dR >
drMax_ || dR < dRveto)
continue;
167 eleMap.
insert(eleRef, sum);
174 iEvent.
put(mapForEvent);
177 iEvent.
put(mapForEvent);
T getParameter(std::string const &) const
virtual float pt() const
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual Vector momentum() const
spatial momentum vector
math::XYZPoint Point
point in the space
edm::EDGetTokenT< reco::BeamSpot > beamSpotProducer_
reco::TrackRef trackRef() const
EgammaHLTPFChargedIsolationProducer(const edm::ParameterSet &)
edm::EDGetTokenT< reco::RecoEcalCandidateCollection > recoEcalCandidateProducer_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidateProducer_
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::ElectronCollection > electronProducer_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Particle reconstructed by the particle flow algorithm.
virtual ParticleType particleId() const