1 #ifndef PhysicsTools_PatUtils_interface_ElectronVPlusJetsIDSelectionFunctor_h
2 #define PhysicsTools_PatUtils_interface_ElectronVPlusJetsIDSelectionFunctor_h
26 if (versionStr !=
"FIRSTDATA") {
27 std::cout <<
"The version " << versionStr <<
" is deprecated. Setting to FIRSTDATA" << std::endl;
30 if (versionStr ==
"FIRSTDATA") {
36 if (parameters.
exists(
"cutsToIgnore"))
39 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of SUMMER08, FIRSTDATA," << std::endl;
46 Version_t version,
double d0 = 0.2,
double ed0 = 999.0,
double sd0 = 999.0,
double reliso = 0.1) {
84 double corr_d0 = electron.
dB();
85 double corr_ed0 = electron.
edB();
86 double corr_sd0 = (corr_ed0 > 0.000000001) ? corr_d0 / corr_ed0 : 999.0;
91 double et = electron.
et();
93 double relIso = (ecalIso + hcalIso + trkIso) / et;
bool operator()(const pat::Electron &electron, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
tuple ret
prodAgent to be discontinued
bool firstDataCuts(const pat::Electron &electron, pat::strbitset &ret)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
float dr03HcalTowerSumEt(int depth=0) const
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.
void initialize(Version_t version, double d0, double ed0, double sd0, double reliso)
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
float dr03TkSumPt() const
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Functor that operates on <T>
static constexpr float d0
ElectronVPlusJetsIDSelectionFunctor(edm::ParameterSet const ¶meters, edm::ConsumesCollector &iC)
strbitset & set(bool val=true)
set method of all bits
T getParameter(std::string const &) const
Analysis-level electron class.
float dr03EcalRecHitSumEt() const
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
ElectronVPlusJetsIDSelectionFunctor(edm::ParameterSet const ¶meters)
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
double et() const final
transverse energy
ElectronVPlusJetsIDSelectionFunctor()
ElectronVPlusJetsIDSelectionFunctor(Version_t version, double d0=0.2, double ed0=999.0, double sd0=999.0, double reliso=0.1)
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
double edB(IPTYPE type) const
Uncertainty on the corresponding impact parameter.
int cut(index_type const &i, int val) const
Access the int cut values at index "s".