1 #ifndef PhysicsTools_PatUtils_interface_PFElectronSelector_h
2 #define PhysicsTools_PatUtils_interface_PFElectronSelector_h
27 std::string versionStr = parameters.
getParameter<std::string>(
"version");
32 if ( versionStr ==
"TOPPAG" ) {
36 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of : TOPPAG" << std::endl;
48 if ( parameters.
exists(
"cutsToIgnore") )
71 push_back(
"MaxMissingHits", nMissingHits );
78 set(
"MaxMissingHits");
80 set(
"ConversionRejection", convRej);
112 event.getByLabel(
rhoTag_, rhoHandle);
117 double dB = electron.
dB();
123 int mHits = electron.
gsfTrack()->trackerExpectedHitsInner().numberOfHits();
124 double mva = electron.
electronID(
"mvaTrigV0");
127 bool fid = ! (fabs(scEta) > 1.4442 && fabs(scEta) < 1.5660 );
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.
const LorentzVector & ecalDrivenMomentum() const
reco::SuperClusterRef superCluster() const
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
std::string electronIDvalue_
static Double_t GetElectronEffectiveArea(ElectronEffectiveAreaType type, Double_t SCEta, ElectronEffectiveAreaTarget EffectiveAreaTarget=kEleEAData2011)
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.
const T & max(const T &a, const T &b)
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
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.
T const * product() const
bool passConversionVeto() const
vertex fit combined with missing number of hits method
bool topPAGRefCuts(const pat::Electron &electron, edm::EventBase const &event, pat::strbitset &ret)
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
bool operator()(const pat::Electron &electron, edm::EventBase const &event, pat::strbitset &ret)
This provides an alternative signature that includes extra information.
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
void initialize(Version_t version, bool fid=true, int nMissingHits=0, double d0=0.02, bool convRej=true, double pfiso=0.10, double mva=0.4)
double dB(IpType type=None) const
Impact parameter wrt primary vertex or beamspot.
int cut(index_type const &i, int val) const
Access the int cut values at index "s".