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") {
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) {
86 double corr_sd0 = (corr_ed0 > 0.000000001) ? corr_d0 / corr_ed0 : 999.0;
88 double hcalIso =
electron.dr03HcalTowerSumEt();
89 double ecalIso =
electron.dr03EcalRecHitSumEt();
90 double trkIso =
electron.dr03TkSumPt();
93 double relIso = (ecalIso + hcalIso + trkIso) /
et;
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
bool operator()(const pat::Electron &electron, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
ret
prodAgent to be discontinued
bool firstDataCuts(const pat::Electron &electron, pat::strbitset &ret)
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)
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)
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Analysis-level electron class.
ElectronVPlusJetsIDSelectionFunctor(edm::ParameterSet const ¶meters)
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