58 dropSuperClusters_(iConfig.getParameter<std::
string>("dropSuperCluster")),
59 dropBasicClusters_(iConfig.getParameter<std::
string>("dropBasicClusters")),
60 dropPFlowClusters_(iConfig.getParameter<std::
string>("dropPFlowClusters")),
61 dropPreshowerClusters_(iConfig.getParameter<std::
string>("dropPreshowerClusters")),
62 dropSeedCluster_(iConfig.getParameter<std::
string>("dropSeedCluster")),
63 dropRecHits_(iConfig.getParameter<std::
string>("dropRecHits")),
64 dropCorrections_(iConfig.getParameter<std::
string>("dropCorrections")),
65 dropIsolations_(iConfig.getParameter<std::
string>("dropIsolations")),
66 dropShapes_(iConfig.getParameter<std::
string>("dropShapes")),
67 dropSaturation_(iConfig.getParameter<std::
string>("dropSaturation")),
68 dropExtrapolations_(iConfig.getParameter<std::
string>("dropExtrapolations")),
69 dropClassifications_(iConfig.getParameter<std::
string>("dropClassifications")),
71 iConfig.getParameter<edm::
InputTag>("recoToPFMap"))),
75 linkToPackedPF_(iConfig.getParameter<
bool>("linkToPackedPFCandidates")),
76 saveNonZSClusterShapes_(iConfig.getParameter<std::
string>("saveNonZSClusterShapes")),
77 reducedBarrelRecHitCollectionToken_(
79 reducedEndcapRecHitCollectionToken_(
81 ecalClusterToolsESGetTokens_{consumesCollector()},
85 electronModifier_ = std::make_unique<pat::ObjectModifier<pat::Electron>>(mod_config, consumesCollector());
88 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEB"));
89 mayConsume<EcalRecHitCollection>(
edm::InputTag(
"reducedEcalRecHitsEE"));
91 produces<std::vector<pat::Electron>>();
116 auto out = std::make_unique<std::vector<pat::Electron>>();
117 out->reserve(
src->size());
125 std::vector<unsigned int>
keys;
186 for (
auto const& pf : (*reco2pf)[electron.
refToOrig_]) {
187 if (pf2pc->contains(pf.id())) {
188 keys.push_back((*pf2pc)[pf].
key());
195 if (
keys.size() == 1) {
202 const auto& vCov = lazyToolsNoZS.localCovariances(*(electron.
superCluster()->seed()));
void setDr04Isolation(const IsolationVariables &dr04)
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
const StringCutObjectSelector< pat::Electron > dropRecHits_
reco::CandidatePtr sourceCandidatePtr(size_type i) const override
get the source candidate pointer with index i
const StringCutObjectSelector< pat::Electron > dropIsolations_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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
void setSaturationInfo(const SaturationInfo &s)
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.
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
void setPfIsolationVariables(const PflowIsolationVariables &iso)
void setDr03Isolation(const IsolationVariables &dr03)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) final
std::vector< reco::CaloCluster > pflowBasicClusters_
Place to store electron's pflow basic clusters internally.
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
std::unique_ptr< pat::ObjectModifier< pat::Electron > > electronModifier_
std::vector< reco::CaloCluster > basicClusters_
Place to store electron's basic clusters internally.
tuple reducedBarrelRecHitCollection
const StringCutObjectSelector< pat::Electron > dropBasicClusters_
std::vector< reco::CaloCluster > preshowerClusters_
Place to store electron's preshower clusters internally.
PATElectronSlimmer(const edm::ParameterSet &iConfig)
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
bool embeddedRecHits_
True if RecHits stored internally.
const StringCutObjectSelector< pat::Electron > dropPreshowerClusters_
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_
tuple key
prepare the HTCondor submission files and eventually submit them
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) final
EcalRecHitCollection recHits_
Place to store electron's RecHits internally (5x5 around seed+ all RecHits)
const StringCutObjectSelector< pat::Electron > dropSeedCluster_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
~PATElectronSlimmer() override
const StringCutObjectSelector< pat::Electron > dropPFlowClusters_
void setClassification(Classification myclass)
bool embeddedPflowSuperCluster_
True if electron's pflowsupercluster is stored internally.
T getParameter(std::string const &) const
Analysis-level electron class.
const StringCutObjectSelector< pat::Electron > dropSaturation_
bool embeddedSuperCluster_
True if electron's supercluster is stored internally.
void setTrackExtrapolations(const TrackExtrapolations &te)
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)
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
const edm::EDGetTokenT< edm::View< pat::Electron > > src_
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
edm::Ptr< reco::Candidate > refToOrig_
std::vector< reco::SuperCluster > pflowSuperCluster_
Place to store electron's pflow supercluster internally.
const bool modifyElectron_
edm::SortedCollection< EcalRecHit > EcalRecHitCollection
tuple reducedEndcapRecHitCollection
std::vector< reco::CaloCluster > seedCluster_
Place to store electron's seed cluster internally.