3 #ifndef PhysicsTools_PatAlgos_PATElectronProducer_h
4 #define PhysicsTools_PatAlgos_PATElectronProducer_h
49 class TrackerIsolationPt;
50 class CaloIsolationEnergy;
84 typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > >
GenAssociations;
86 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > >
genMatchTokens_;
138 bool primaryVertexIsValid,
140 bool beamspotIsValid );
148 const char* psetName,
153 typedef std::pair<std::string, edm::InputTag>
NameTag;
184 const char* psetName,
190 if (iConfig.
exists( psetName )) {
197 if (depconf.
exists(
"pfAllParticles")) {
200 if (depconf.
exists(
"pfChargedHadrons")) {
203 if (depconf.
exists(
"pfChargedAll")) {
206 if (depconf.
exists(
"pfPUChargedHadrons")) {
209 if (depconf.
exists(
"pfNeutralHadrons")) {
212 if (depconf.
exists(
"pfPhotons")) {
215 if (depconf.
exists(
"user")) {
216 std::vector<edm::InputTag> userdeps = depconf.
getParameter<std::vector<edm::InputTag> >(
"user");
217 std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
219 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_
const GreaterByPt< Electron > pTComparator_
const bool useParticleFlow_
pflow specific
const edm::EDGetTokenT< reco::PFCandidateCollection > pfElecToken_
const edm::EDGetTokenT< edm::ValueMap< float > > ecalPFClusterIsoT_
IsolationLabels isoDepositLabels_
const bool embedPFCandidate_
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_
mva input variables
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_
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< float > > > elecIDTokens_
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
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_
pat::helper::MultiIsolator isolator_
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
Produces pat::Electron's.
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_
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
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual 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
std::vector< edm::EDGetTokenT< edm::ValueMap< double > > > isolationValueNoPFIdTokens_
pat::helper::EfficiencyLoader efficiencyLoader_
const edm::EDGetTokenT< EcalRecHitCollection > reducedBarrelRecHitCollectionToken_
const bool embedGsfElectronCore_
pat::PATUserDataHelper< pat::Electron > userDataHelper_
Analysis-level electron class.
const CaloTopology * ecalTopology_
IsolationLabels isolationValueLabelsNoPFId_
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_
std::vector< NameTag > elecIDSrcs_
const bool embedSuperCluster_
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps