54 dropSuperClusters_(iConfig.getParameter<std::
string>("dropSuperCluster")),
55 dropBasicClusters_(iConfig.getParameter<std::
string>("dropBasicClusters")),
56 dropPFlowClusters_(iConfig.getParameter<std::
string>("dropPFlowClusters")),
57 dropPreshowerClusters_(iConfig.getParameter<std::
string>("dropPreshowerClusters")),
58 dropSeedCluster_(iConfig.getParameter<std::
string>("dropSeedCluster")),
59 dropRecHits_(iConfig.getParameter<std::
string>("dropRecHits")),
60 dropCorrections_(iConfig.getParameter<std::
string>("dropCorrections")),
61 dropIsolations_(iConfig.getParameter<std::
string>("dropIsolations")),
62 dropShapes_(iConfig.getParameter<std::
string>("dropShapes")),
63 dropExtrapolations_(iConfig.getParameter<std::
string>("dropExtrapolations")),
64 dropClassifications_(iConfig.getParameter<std::
string>("dropClassifications")),
68 linkToPackedPF_(iConfig.getParameter<
bool>("linkToPackedPFCandidates")),
69 saveNonZSClusterShapes_(iConfig.getParameter<std::
string>("saveNonZSClusterShapes")),
72 modifyElectron_(iConfig.getParameter<
bool>("modifyElectrons"))
75 if( modifyElectron_ ) {
78 electronModifier_->setConsumes(sumes);
80 electronModifier_.reset(
nullptr);
83 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
84 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
86 produces<std::vector<pat::Electron> >();
111 auto_ptr<vector<pat::Electron> >
out(
new vector<pat::Electron>());
112 out->reserve(
src->size());
117 std::vector<unsigned int>
keys;
140 for(
auto const& pf: (*reco2pf)[electron.
refToOrig_]) {
141 if( pf2pc->contains(pf.id()) ) {
142 keys.push_back( (*pf2pc)[pf].
key());
149 if (
keys.size() == 1) {
void setDr04Isolation(const IsolationVariables &dr04)
T getParameter(std::string const &) const
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
const StringCutObjectSelector< pat::Electron > dropRecHits_
const StringCutObjectSelector< pat::Electron > dropIsolations_
const bool linkToPackedPF_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > reco2pf_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const StringCutObjectSelector< pat::Electron > dropSuperClusters_
std::vector< pat::PackedCandidate > PackedCandidateCollection
const StringCutObjectSelector< pat::Electron > dropCorrections_
void full5x5_setSigmaIetaIphi(float sigmaIetaIphi)
void setShowerShape(const ShowerShape &s)
std::vector< reco::SuperCluster > superCluster_
Place to store electron's supercluster internally.
Slimmer of PAT Electrons.
void setHcalPFClusterIso(float hcalPFClus)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
void setPfIsolationVariables(const PflowIsolationVariables &iso)
void setDr03Isolation(const IsolationVariables &dr03)
std::vector< reco::CaloCluster > pflowBasicClusters_
Place to store electron's pflow basic clusters internally.
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
std::unique_ptr< pat::ObjectModifier< pat::Electron > > electronModifier_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) overridefinal
std::vector< reco::CaloCluster > basicClusters_
Place to store electron's basic clusters internally.
reco::SuperClusterRef superCluster() const
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
const StringCutObjectSelector< pat::Electron > dropBasicClusters_
std::vector< reco::CaloCluster > preshowerClusters_
Place to store electron's preshower clusters internally.
PATElectronSlimmer(const edm::ParameterSet &iConfig)
bool embeddedRecHits_
True if RecHits stored internally.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const StringCutObjectSelector< pat::Electron > dropPreshowerClusters_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const StringCutObjectSelector< pat::Electron > dropClassifications_
const StringCutObjectSelector< pat::Electron > dropShapes_
const StringCutObjectSelector< pat::Electron > dropExtrapolations_
bool embeddedSeedCluster_
True if seed cluster is stored internally.
const StringCutObjectSelector< pat::Electron > saveNonZSClusterShapes_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
EcalRecHitCollection recHits_
Place to store electron's RecHits internally (5x5 around seed+ all RecHits)
const StringCutObjectSelector< pat::Electron > dropSeedCluster_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) overridefinal
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
void setEcalPFClusterIso(float ecalPFClus)
const StringCutObjectSelector< pat::Electron > dropPFlowClusters_
void setClassification(Classification myclass)
bool embeddedPflowSuperCluster_
True if electron's pflowsupercluster is stored internally.
Analysis-level electron class.
bool embeddedSuperCluster_
True if electron's supercluster is stored internally.
void setTrackExtrapolations(const TrackExtrapolations &te)
reco::CandidatePtr sourceCandidatePtr(size_type i) const
get the source candidate pointer with index i
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::vector< reco::CaloCluster > pflowPreshowerClusters_
Place to store electron's pflow preshower clusters internally.
void setCorrections(const Corrections &c)
void setAssociatedPackedPFCandidates(const edm::RefProd< pat::PackedCandidateCollection > &refprod, T beginIndexItr, T endIndexItr)
References to PFCandidates linked to this object (e.g. for isolation vetos or masking before jet recl...
void setClassificationVariables(const ClassificationVariables &cv)
const edm::EDGetTokenT< edm::View< pat::Electron > > src_
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
edm::Ptr< reco::Candidate > refToOrig_
virtual ~PATElectronSlimmer()
std::vector< reco::SuperCluster > pflowSuperCluster_
Place to store electron's pflow supercluster internally.
const bool modifyElectron_
edm::SortedCollection< EcalRecHit > EcalRecHitCollection
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.