1 #ifndef PhysicsTools_PatUtils_interface_PFElectronSelector_h
2 #define PhysicsTools_PatUtils_interface_PFElectronSelector_h
40 if ( versionStr ==
"SPRING11" ) {
44 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of SPRING11" << std::endl;
56 if ( parameters.
exists(
"cutsToIgnore") )
79 push_back(
"MaxMissingHits", nMissingHits );
86 set(
"MaxMissingHits");
88 set(
"ConversionRejection", convRej);
119 double corr_d0 = electron.
dB();
122 Double_t dist = electron.
convDist();
123 Double_t dcot = electron.
convDcot();
124 bool isNotConv = !(fabs(dist) < 0.02 && fabs(dcot) < 0.02);
127 bool electronIDboolean = ((bitWiseResults & 1) == 1 );
132 double et = electron.
et() ;
134 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.
bool spring11Cuts(const pat::Electron &electron, pat::strbitset &ret)
virtual double et() const
transverse energy
std::string electronIDvalue_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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.
reco::GsfTrackRef gsfTrack() const
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
double dB(IpType type=None) const
Impact parameter wrt primary vertex or beamspot.
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 userIsolation(IsolationKeys key) const
index_type indexElectronId_
PFElectronSelector(edm::ParameterSet const ¶meters, edm::ConsumesCollector &&iC)
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
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".