3 #ifndef PhysicsTools_PatAlgos_PATElectronProducer_h 4 #define PhysicsTools_PatAlgos_PATElectronProducer_h 49 class TrackerIsolationPt;
50 class CaloIsolationEnergy;
89 typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > >
GenAssociations;
91 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > >
genMatchTokens_;
125 const ElectronBaseRef& electronRef,
127 const GenAssociations& genMatches,
137 const GenAssociations& genMatches,
150 bool primaryVertexIsValid,
152 bool beamspotIsValid );
160 const char* psetName,
165 typedef std::pair<std::string, edm::InputTag>
NameTag;
205 const char* psetName,
211 if (iConfig.
exists( psetName )) {
218 if (depconf.
exists(
"pfAllParticles")) {
221 if (depconf.
exists(
"pfChargedHadrons")) {
224 if (depconf.
exists(
"pfChargedAll")) {
227 if (depconf.
exists(
"pfPUChargedHadrons")) {
230 if (depconf.
exists(
"pfNeutralHadrons")) {
233 if (depconf.
exists(
"pfPhotons")) {
236 if (depconf.
exists(
"user")) {
237 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag> >(
"user");
238 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
240 for ( ; it != ed; ++it, ++
key) {
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels, std::vector< edm::EDGetTokenT< edm::ValueMap< T > > > &tokens)
T getParameter(std::string const &) const
Assists in assimilating all pat::UserData into pat objects.
const edm::EDGetTokenT< reco::ConversionCollection > hConversionsToken_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_charged_hadrons_
const GreaterByPt< Electron > pTComparator_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_charged_hadrons_
const bool useParticleFlow_
pflow specific
~PATElectronProducer() override
const edm::EDGetTokenT< reco::PFCandidateCollection > pfElecToken_
std::vector< double > miniIsoParamsE_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_neutral_hadrons_
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
IsolationLabels isoDepositLabels_
const bool embedPFCandidate_
std::vector< pat::PackedCandidate > PackedCandidateCollection
void embedHighLevel(pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
const edm::InputTag reducedBarrelRecHitCollection_
void fillElectron(Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const
common electron filling, for both the standard and PF2PAT case
edm::RefToBase< reco::GsfElectron > ElectronBaseRef
const edm::EDGetTokenT< edm::ValueMap< float > > hcalPFClusterIsoT_
IsolationKeys
Enum defining isolation keys.
const bool embedBasicClusters_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > elecIDTokens_
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
const bool addMVAVariables_
mva input variables
std::vector< double > miniIsoParamsB_
const bool addEfficiencies_
const edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
const edm::EDGetTokenT< edm::ValueMap< reco::PFCandidatePtr > > pfCandidateMapToken_
const bool usePfCandidateMultiMap_
pat::helper::MultiIsolator isolator_
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
edm::EDGetTokenT< edm::ValueMap< float > > PUPPIIsolation_photons_
Produces pat::Electron's.
const bool addPuppiIsolation_
PATElectronProducer(const edm::ParameterSet &iConfig)
const bool embedHighLevelSelection_
embed high level selection variables?
const bool addResolutions_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_neutral_hadrons_
const bool embedSeedCluster_
const edm::EDGetTokenT< EcalRecHitCollection > reducedEndcapRecHitCollectionToken_
const edm::InputTag reducedEndcapRecHitCollection_
const bool addPFClusterIso_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::pair< std::string, edm::InputTag > NameTag
edm::EDGetTokenT< edm::ValueMap< float > > PUPPINoLeptonsIsolation_photons_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const bool embedGsfTrack_
const edm::EDGetTokenT< reco::BeamSpot > beamLineToken_
void fillElectron2(Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
pat::helper::EfficiencyLoader efficiencyLoader_
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
const bool embedGsfElectronCore_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > pfCandidateMultiMapToken_
pat::PATUserDataHelper< pat::Electron > userDataHelper_
Analysis-level electron class.
const CaloTopology * ecalTopology_
IsolationLabels isolationValueLabelsNoPFId_
void setElectronMiniIso(pat::Electron &anElectron, const pat::PackedCandidateCollection *pc)
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
std::vector< IsolationLabel > IsolationLabels
IsolationLabels isolationValueLabels_
const bool embedPflowSuperCluster_
const bool embedPflowPreshowerClusters_
pat::helper::KinResolutionsLoader resolutionLoader_
const bool embedPflowBasicClusters_
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueTokens_
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
const bool embedPreshowerClusters_
edm::EDGetTokenT< pat::PackedCandidateCollection > pcToken_
std::vector< NameTag > elecIDSrcs_
const bool embedSuperCluster_
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps