1 #ifndef PhysicsTools_PatUtils_interface_PFJetIDSelectionFunctor_h
2 #define PhysicsTools_PatUtils_interface_PFJetIDSelectionFunctor_h
39 std::string versionStr = params.
getParameter<std::string>(
"version");
40 std::string qualityStr = params.
getParameter<std::string>(
"quality");
42 if ( versionStr ==
"FIRSTDATA" )
66 set(
"nConstituents", 1);
73 set(
"nConstituents", 1);
83 if ( params.
exists(
"nConstuents") )
set(
"nConstituents", params.
getParameter<
int> (
"nConstituents") );
85 if ( params.
exists(
"cutsToIgnore") )
121 set(
"nConstituents", 1);
128 set(
"nConstituents", 1);
194 int nconstituents = 0;
221 iend = patJet->
end(), isub = ibegin;
222 isub != iend; ++isub ) {
232 if ( e > 0.000001 ) {
238 chf = nhf = cef = nef = 0.0;
242 else if ( pfJet != 0 ) {
244 double jetEnergyUncorrected =
252 if ( jetEnergyUncorrected > 0. ) {
263 else if ( basicJet != 0 ) {
272 iend = patJet->
end(), isub = ibegin;
273 isub != iend; ++isub ) {
283 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
bool jecSetsAvailable() const
float muonEnergy() const
muonEnergy
float chargedEmEnergy() const
chargedEmEnergy
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Base class for all types of Jets.
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
float neutralHadronEnergy() const
neutralHadronEnergy
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
bool firstDataCuts(reco::Jet const &jet, pat::strbitset &ret)
pat::strbitset retInternal_
internal ret if users don't care about return bits
float HFHadronEnergy() const
HFHadronEnergy.
Jets made from CaloTowers.
int chargedMultiplicity() const
chargedMultiplicity
Jets made from PFObjects.
virtual double eta() const
momentum pseudorapidity
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)
virtual double energy() const
energy
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 HFHadronEnergy() const
HFHadronEnergy.
float HFEMEnergy() const
HFEMEnergy.
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
bool operator()(const pat::Jet &jet, pat::strbitset &ret)
This provides the interface for base classes to select objects.
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
virtual size_t numberOfDaughters() const
virtual const_iterator begin() const
first daughter const_iterator
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.
virtual const_iterator end() const
last daughter const_iterator
bool isBasicJet() const
check to see if the jet is no more than a reco::BasicJet
float neutralHadronEnergy() const
neutralHadronEnergy
PFJetIDSelectionFunctor()
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)
int chargedMultiplicity() const
chargedMultiplicity
float chargedHadronEnergy() const
chargedHadronEnergy
int cut(index_type const &i, int val) const
Access the int cut values at index "s".