1 #ifndef PhysicsTools_SelectorUtils_interface_PFJetIDSelectionFunctor_h
2 #define PhysicsTools_SelectorUtils_interface_PFJetIDSelectionFunctor_h
44 if ( versionStr ==
"FIRSTDATA" )
46 else if( versionStr ==
"RUNIISTARTUP" )
73 set(
"nConstituents", 1);
76 set(
"nNeutrals_FW",10);
84 set(
"nConstituents", 1);
87 set(
"nNeutrals_FW",10);
98 if ( params.
exists(
"nConstituents") )
set(
"nConstituents", params.
getParameter<
int> (
"nConstituents") );
101 if ( params.
exists(
"nNeutrals_FW") )
set(
"nNeutrals_FW", params.
getParameter<
int> (
"nNeutrals_FW") );
104 if ( params.
exists(
"cutsToIgnore") )
147 set(
"nConstituents", 1);
150 set(
"nNeutrals_FW",10);
158 set(
"nConstituents", 1);
161 set(
"nNeutrals_FW",10);
233 int nconstituents = 0;
263 iend = patJet->
end(), isub = ibegin;
264 isub != iend; ++isub ) {
275 if ( e > 0.000001 ) {
281 chf = nhf = cef = nef = 0.0;
285 else if ( pfJet != 0 ) {
287 double jetEnergyUncorrected =
294 if ( jetEnergyUncorrected > 0. ) {
306 else if ( basicJet != 0 ) {
314 iend = patJet->
end(), isub = ibegin;
315 isub != iend; ++isub ) {
326 if ( e > 0.000001 ) {
T getParameter(std::string const &) const
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
float photonEnergy() const
photonEnergy
tuple ret
prodAgent to be discontinued
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
bool jecSetsAvailable() const
float muonEnergy() const
muonEnergy
float chargedEmEnergy() const
chargedEmEnergy
virtual double energy() const final
energy
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
PFJetIDSelectionFunctor(edm::ParameterSet const ¶ms, edm::ConsumesCollector &iC)
Base class for all types of Jets.
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
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
int neutralMultiplicity() const
neutralMultiplicity
pat::strbitset retInternal_
internal ret if users don't care about return bits
Jets made from CaloTowers.
int chargedMultiplicity() const
chargedMultiplicity
Jets made from PFObjects.
PFJetIDSelectionFunctor(Version_t version, Quality_t quality)
float neutralEmEnergy() const
neutralEmEnergy
bool operator()(const reco::PFJet &jet, pat::strbitset &ret)
index_type indexNConstituents_
float electronEnergy() const
electronEnergy
PFJetIDSelectionFunctor(edm::ParameterSet const ¶ms)
pat::strbitset bits_
the bitset indexed by strings
virtual size_t numberOfDaughters() const
number of daughters
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
float HFEMEnergy() const
HFEMEnergy.
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
const_iterator end() const
last daughter const_iterator
bool operator()(const pat::Jet &jet, pat::strbitset &ret)
This provides the interface for base classes to select objects.
Abs< T >::type abs(const T &t)
index_type indexNNeutrals_FW_
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
bool operator()(const reco::PFJet &jet)
Functor that operates on <T>
PF Jet selector for pat::Jets.
bool isPFJet() const
check to see if the jet is a reco::PFJet
int neutralMultiplicity() const
neutralMultiplicity
virtual size_t numberOfDaughters() const
strbitset & set(bool val=true)
set method of all bits
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Analysis-level calorimeter jet class.
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
bool isBasicJet() const
check to see if the jet is no more than a reco::BasicJet
const_iterator begin() const
first daughter const_iterator
float neutralHadronEnergy() const
neutralHadronEnergy
PFJetIDSelectionFunctor()
virtual double eta() const final
momentum pseudorapidity
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
int chargedMultiplicity() const
chargedMultiplicity
bool firstDataCuts(reco::Jet const &jet, pat::strbitset &ret, Version_t version_)
float chargedHadronEnergy() const
chargedHadronEnergy
int cut(index_type const &i, int val) const
Access the int cut values at index "s".