1 #ifndef PhysicsTools_PatUtils_interface_ElectronVPlusJetsIDSelectionFunctor_h 2 #define PhysicsTools_PatUtils_interface_ElectronVPlusJetsIDSelectionFunctor_h 30 if ( versionStr !=
"FIRSTDATA") {
31 std::cout <<
"The version " << versionStr <<
" is deprecated. Setting to FIRSTDATA" << std::endl;
34 if (versionStr ==
"FIRSTDATA") {
40 if ( parameters.
exists(
"cutsToIgnore") )
43 throw cms::Exception(
"InvalidInput") <<
"Expect version to be one of SUMMER08, FIRSTDATA," << std::endl;
55 double reliso = 0.1) {
103 double corr_d0 = electron.
dB();
104 double corr_ed0 = electron.
edB();
105 double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
110 double et = electron.
et() ;
112 double relIso = (ecalIso + hcalIso + trkIso) / et;
bool operator()(const pat::Electron &electron, pat::strbitset &ret) override
T getParameter(std::string const &) const
bool firstDataCuts(const pat::Electron &electron, pat::strbitset &ret)
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.
void initialize(Version_t version, double d0, double ed0, double sd0, double reliso)
double et() const final
transverse energy
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>
ElectronVPlusJetsIDSelectionFunctor(edm::ParameterSet const ¶meters, edm::ConsumesCollector &iC)
strbitset & set(bool val=true)
set method of all bits
Analysis-level electron class.
et
define resolution functions of each parameter
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.
ElectronVPlusJetsIDSelectionFunctor()
ElectronVPlusJetsIDSelectionFunctor(Version_t version, double d0=0.2, double ed0=999.0, double sd0=999.0, double reliso=0.1)
float dr03HcalTowerSumEt() const
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".