Selects good electrons. More...
#include "PhysicsTools/PatUtils/ElectronSelector.h"
Public Member Functions | |
ElectronSelector (const ElectronSelection &cfg) | |
const ParticleStatus | filter (const unsigned int &index, const edm::View< Electron > &electrons, const ElectronIDmap &electronIDs, const reco::ClusterShape *clusterShape) const |
~ElectronSelector () | |
Private Types | |
typedef reco::GsfElectron | Electron |
typedef reco::ElectronIDAssociationCollection | ElectronIDmap |
Private Member Functions | |
const ParticleStatus | customSelection_ (const unsigned int &index, const edm::View< Electron > &electrons, const reco::ClusterShape *clusterShape) const |
Full-fledged selection based on SusyAnalyser. More... | |
const reco::ElectronIDRef & | electronID_ (const unsigned int &index, const edm::View< Electron > &electrons, const ElectronIDmap &electronIDs) const |
Private Attributes | |
ElectronSelection | config_ |
Selects good electrons.
The electron selector returns a flag (see pat::ParticleStatus) based on one of the possible selections: either eId-based (cut, likelihood, neural net) or custom (user-defined set of cuts). This is driven by the configuration parameters (see the PATElectronCleaner documentation for configuration details).
The parameters are passed to the selector through an ElectronSelection struct. (An adapter exists for use in CMSSW: reco::modules::ParameterAdapter< pat::ElectronSelector >.)
Definition at line 56 of file ElectronSelector.h.
|
private |
Definition at line 58 of file ElectronSelector.h.
Definition at line 59 of file ElectronSelector.h.
|
inline |
Definition at line 62 of file ElectronSelector.h.
|
inline |
Definition at line 63 of file ElectronSelector.h.
References nano_cff::electrons, and ALCARECOTkAlBeamHalo_cff::filter.
|
private |
Full-fledged selection based on SusyAnalyser.
Definition at line 69 of file ElectronSelector.cc.
References pat::BAD, reco::GsfElectron::caloEnergy(), config_, reco::ClusterShape::covEtaEta(), reco::ClusterShape::covPhiPhi(), electronIdCutBased_cfi::deltaEtaIn, pat::ElectronSelection::DeltaEtaInBarmax, pat::ElectronSelection::DeltaEtaInEndmax, reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), electronIdCutBased_cfi::deltaPhiIn, pat::ElectronSelection::DeltaPhiInBarmax, pat::ElectronSelection::DeltaPhiInEndmax, electronIdCutBasedClasses_cfi::deltaPhiOut, pat::ElectronSelection::DeltaPhiOutBarmax, pat::ElectronSelection::DeltaPhiOutEndmax, reco::GsfElectron::deltaPhiSeedClusterTrackAtCalo(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), pat::ElectronSelection::doBremEoverPcomp, reco::ClusterShape::e3x3(), reco::ClusterShape::e5x5(), electronIdCutBasedClasses_cfi::E9overE25, pat::ElectronSelection::E9overE25Barmin, pat::ElectronSelection::E9overE25Endmin, metsig::electron, pat::ElectronSelection::EoverPInBarmin, pat::ElectronSelection::EoverPInEndmin, reco::GsfElectron::eSuperClusterOverP(), PVValHelper::eta, pat::GOOD, reco::GsfElectron::hadronicOverEm(), pat::HOVERE, electronIdCutBased_cfi::hOverE, pat::ElectronSelection::HoverEBarmax, pat::ElectronSelection::HoverEEndmax, pat::ElectronSelection::InvEMinusInvPBarmax, pat::ElectronSelection::InvEMinusInvPEndmax, pat::MATCHING, reco::GsfElectron::p4(), pat::SHOWER, pat::ElectronSelection::SigmaEtaEtaBarmax, pat::ElectronSelection::SigmaEtaEtaEndmax, pat::ElectronSelection::SigmaPhiPhiBarmax, pat::ElectronSelection::SigmaPhiPhiEndmax, mathSSE::sqrt(), reco::GsfElectron::trackMomentumAtVtx(), and reco::GsfElectron::trackMomentumOut().
Referenced by filter().
|
private |
Returns the electron ID object based on the given electron. The latter is defined by an index in the vector of electrons. The ID is found in the association map.
Definition at line 53 of file ElectronSelector.cc.
References edm::AssociationMap< edm::OneToOne< GsfElectronCollection, ElectronIDCollection > >::const_iterator, PatElectronAnalyzer_cfi::electronID, edm::AssociationMap< Tag >::find(), and edm::View< T >::refAt().
Referenced by filter().
const pat::ParticleStatus ElectronSelector::filter | ( | const unsigned int & | index, |
const edm::View< Electron > & | electrons, | ||
const ElectronIDmap & | electronIDs, | ||
const reco::ClusterShape * | clusterShape | ||
) | const |
Returns 0 if electron matches criteria, a flag otherwise. Criteria depend on the selector's configuration. Electron IDs are only used if the selection is based on it (cut, neural net or likelihood). Cluster shapes are for custom selection only.
Definition at line 11 of file ElectronSelector.cc.
References pat::BAD, config_, edm::errors::Configuration, customSelection_(), electronID_(), Exception, pat::GOOD, likelihood(), pat::ElectronSelection::selectionType, and pat::ElectronSelection::value.
|
private |
Definition at line 80 of file ElectronSelector.h.
Referenced by customSelection_(), and filter().