1 #ifndef PhysicsTools_PatUtils_interface_PFElectronSelector_h
2 #define PhysicsTools_PatUtils_interface_PFElectronSelector_h
31 if ( versionStr ==
"SPRING11" ) {
35 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of SPRING11" << std::endl;
47 if ( parameters.
exists(
"cutsToIgnore") )
70 push_back(
"MaxMissingHits", nMissingHits );
77 set(
"MaxMissingHits");
79 set(
"ConversionRejection", convRej);
108 double mva = electron.
mva();
109 double missingHits = electron.
gsfTrack()->trackerExpectedHitsInner().numberOfHits() ;
110 double corr_d0 = electron.
dB();
113 Double_t dist = electron.
convDist();
114 Double_t dcot = electron.
convDcot();
115 bool isNotConv = !(fabs(dist) < 0.02 && fabs(dcot) < 0.02);
118 bool electronIDboolean = ((bitWiseResults & 1) == 1 );
123 double et = electron.
et() ;
125 double pfIso = (chIso + nhIso + gIso) / et;
index_type indexMaxMissingHits_
T getParameter(std::string const &) const
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
virtual double et() const GCC11_FINAL
transverse energy
bool spring11Cuts(const pat::Electron &electron, pat::strbitset &ret)
std::string electronIDvalue_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
reco::GsfTrackRef gsfTrack() const
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
pat::strbitset::index_type index_type
void setIgnored(pat::strbitset &ret)
set ignored bits
pat::strbitset retInternal_
internal ret if users don't care about return bits
pat::strbitset bits_
the bitset indexed by strings
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
PFElectronSelector(edm::ParameterSet const ¶meters)
Functor that operates on <T>
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
float userIsolation(IsolationKeys key) const
index_type indexElectronId_
bool operator()(const pat::Electron &electron, pat::strbitset &ret)
This provides the interface for base classes to select objects.
strbitset & set(bool val=true)
set method of all bits
Analysis-level electron class.
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
double dB(IpType type=None) const
Impact parameter wrt primary vertex or beamspot.
void initialize(Version_t version, double mva=0.4, double d0=0.02, int nMissingHits=1, std::string eidUsed="eidTightMC", bool convRej=true, double pfiso=0.15)
int cut(index_type const &i, int val) const
Access the int cut values at index "s".