CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFJetIDSelectionFunctor Class Reference

PF Jet selector for pat::Jets. More...

#include "PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h"

Inheritance diagram for PFJetIDSelectionFunctor:
Selector< pat::Jet >

Public Types

enum  Quality_t { LOOSE, TIGHT, TIGHTLEPVETO, N_QUALITY }
 
enum  Version_t {
  FIRSTDATA, RUNIISTARTUP, WINTER16, WINTER17,
  WINTER17PUPPI, SUMMER18, SUMMER18PUPPI, N_VERSIONS
}
 
- Public Types inherited from Selector< pat::Jet >
typedef std::pair< index_type, size_t > cut_flow_item
 
typedef std::vector< cut_flow_itemcut_flow_map
 
typedef pat::Jet data_type
 
typedef std::map< index_type, double > double_map
 
typedef pat::strbitset::index_type index_type
 
typedef std::map< index_type, int > int_map
 

Public Member Functions

bool firstDataCuts (reco::Jet const &jet, pat::strbitset &ret, Version_t version_)
 
bool operator() (const pat::Jet &jet, pat::strbitset &ret) override
 This provides the interface for base classes to select objects. More...
 
bool operator() (const reco::PFJet &jet)
 
bool operator() (const reco::PFJet &jet, pat::strbitset &ret)
 
 PFJetIDSelectionFunctor ()
 
 PFJetIDSelectionFunctor (edm::ParameterSet const &params)
 
 PFJetIDSelectionFunctor (edm::ParameterSet const &params, edm::ConsumesCollector &iC)
 
 PFJetIDSelectionFunctor (Version_t version, Quality_t quality)
 
- Public Member Functions inherited from Selector< pat::Jet >
void clear (index_type const &i)
 
void clear (std::string const &s)
 Turn off a given selection cut. More...
 
bool considerCut (index_type const &i) const
 
bool considerCut (std::string const &s) const
 consider the cut at index "s" More...
 
double cut (index_type const &i, double val) const
 Access the double cut values at index "s". More...
 
int cut (index_type const &i, int val) const
 Access the int cut values at index "s". More...
 
double cut (std::string s, double val) const
 Access the double cut values at index "s". More...
 
int cut (std::string s, int val) const
 Access the int cut values at index "s". More...
 
pat::strbitset getBitTemplate () const
 Get an empty bitset with the proper names. More...
 
double getPasses (index_type const &i) const
 
double getPasses (std::string const &s) const
 Return the number of passing cases. More...
 
bool ignoreCut (index_type const &i) const
 
bool ignoreCut (std::string const &s) const
 ignore the cut at index "s" More...
 
virtual bool operator() (pat::Jet const &t)
 This provides an alternative signature without the second ret. More...
 
virtual bool operator() (pat::Jet const &t, edm::EventBase const &e)
 This provides an alternative signature that includes extra information. More...
 
virtual bool operator() (pat::Jet const &t, edm::EventBase const &e, pat::strbitset &ret)
 This provides an alternative signature that includes extra information. More...
 
bool operator[] (index_type const &i) const
 
bool operator[] (std::string const &s) const
 
void passCut (pat::strbitset &ret, index_type const &i)
 
void passCut (pat::strbitset &ret, std::string const &s)
 Passing cuts. More...
 
void print (std::ostream &out) const
 Print the cut flow. More...
 
void printActiveCuts (std::ostream &out) const
 Print the cuts being considered. More...
 
virtual void push_back (std::string const &s)
 This is the registration of an individual cut string. More...
 
virtual void push_back (std::string const &s, double cut)
 This is the registration of an individual cut string, with a double cut value. More...
 
virtual void push_back (std::string const &s, int cut)
 This is the registration of an individual cut string, with an int cut value. More...
 
 Selector ()
 Constructor clears the bits. More...
 
void set (index_type const &i, bool val=true)
 
void set (index_type const &i, double cut, bool val=true)
 
void set (index_type const &i, int cut, bool val=true)
 
void set (std::string const &s, bool val=true)
 Set a given selection cut, on or off. More...
 
void set (std::string const &s, double cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void set (std::string const &s, int cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void setIgnored (pat::strbitset &ret)
 set ignored bits More...
 
void setIgnoredCuts (std::vector< std::string > const &bitsToIgnore)
 set the bits to ignore from a vector More...
 
virtual ~Selector ()
 

Private Member Functions

void initCuts ()
 
void initIndex ()
 

Private Attributes

index_type indexCEF_
 
index_type indexCEF_TR_
 
index_type indexCHF_
 
index_type indexMUF_
 
index_type indexMUF_TR_
 
index_type indexNCH_
 
index_type indexNCH_TR_
 
index_type indexNConstituents_
 
index_type indexNEF_
 
index_type indexNEF_EC_
 
index_type indexNEF_EC_L_
 
index_type indexNEF_EC_U_
 
index_type indexNEF_FW_
 
index_type indexNEF_TR_
 
index_type indexNHF_
 
index_type indexNHF_EC_
 
index_type indexNHF_FW_
 
index_type indexNHF_TR_
 
index_type indexNNeutrals_EC_
 
index_type indexNNeutrals_FW_
 
index_type indexNNeutrals_FW_L_
 
index_type indexNNeutrals_FW_U_
 
Quality_t quality_
 
Version_t version_
 

Additional Inherited Members

- Protected Attributes inherited from Selector< pat::Jet >
pat::strbitset bits_
 the bitset indexed by strings More...
 
cut_flow_map cutFlow_
 map of cut flows in "human" order More...
 
double_map doubleCuts_
 the double-value cut map More...
 
int_map intCuts_
 the int-value cut map More...
 
pat::strbitset retInternal_
 internal ret if users don't care about return bits More...
 

Detailed Description

PF Jet selector for pat::Jets.

Selector functor for pat::Jets that implements quality cuts based on studies of noise patterns.

Please see https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATSelectors for a general overview of the selectors.

Definition at line 25 of file PFJetIDSelectionFunctor.h.

Member Enumeration Documentation

◆ Quality_t

Enumerator
LOOSE 
TIGHT 
TIGHTLEPVETO 
N_QUALITY 

Definition at line 28 of file PFJetIDSelectionFunctor.h.

◆ Version_t

Enumerator
FIRSTDATA 
RUNIISTARTUP 
WINTER16 
WINTER17 
WINTER17PUPPI 
SUMMER18 
SUMMER18PUPPI 
N_VERSIONS 

Definition at line 27 of file PFJetIDSelectionFunctor.h.

Constructor & Destructor Documentation

◆ PFJetIDSelectionFunctor() [1/4]

PFJetIDSelectionFunctor::PFJetIDSelectionFunctor ( )
inline

Definition at line 30 of file PFJetIDSelectionFunctor.h.

30 {}

◆ PFJetIDSelectionFunctor() [2/4]

PFJetIDSelectionFunctor::PFJetIDSelectionFunctor ( edm::ParameterSet const &  params,
edm::ConsumesCollector iC 
)
inline

Definition at line 33 of file PFJetIDSelectionFunctor.h.

◆ PFJetIDSelectionFunctor() [3/4]

PFJetIDSelectionFunctor::PFJetIDSelectionFunctor ( edm::ParameterSet const &  params)
inline

Definition at line 37 of file PFJetIDSelectionFunctor.h.

37  {
38  std::string versionStr = params.getParameter<std::string>("version");
39  std::string qualityStr = params.getParameter<std::string>("quality");
40 
41  if (versionStr == "FIRSTDATA")
43  else if (versionStr == "RUNIISTARTUP")
45  // WINTER16 implements most recent (as of Feb 2017) JetID criteria
46  // See: https://twiki.cern.ch/twiki/bin/view/CMS/JetID13TeVRun2016
47  else if (versionStr == "WINTER16")
49  else if (versionStr == "WINTER17")
51  else if (versionStr == "WINTER17PUPPI")
53  else if (versionStr == "SUMMER18")
55  else if (versionStr == "SUMMER18PUPPI")
57  else
58  version_ = WINTER17; //set WINTER17 as default
59 
60  if (qualityStr == "LOOSE")
61  quality_ = LOOSE;
62  else if (qualityStr == "TIGHT")
63  quality_ = TIGHT;
64  else if (qualityStr == "TIGHTLEPVETO")
66  else
67  quality_ = TIGHT;
68 
69  initCuts();
70 
71  // Now check the configuration to see if the user changed anything
72  if (params.exists("CHF"))
73  set("CHF", params.getParameter<double>("CHF"));
74  if (params.exists("NHF"))
75  set("NHF", params.getParameter<double>("NHF"));
77  quality_ != TIGHT) {
78  if (params.exists("CEF"))
79  set("CEF", params.getParameter<double>("CEF"));
80  }
81  if (params.exists("NEF"))
82  set("NEF", params.getParameter<double>("NEF"));
83  if (params.exists("NCH"))
84  set("NCH", params.getParameter<int>("NCH"));
85  if (params.exists("nConstituents"))
86  set("nConstituents", params.getParameter<int>("nConstituents"));
87  if (version_ == RUNIISTARTUP) {
88  if (params.exists("NEF_FW"))
89  set("NEF_FW", params.getParameter<double>("NEF_FW"));
90  if (params.exists("nNeutrals_FW"))
91  set("nNeutrals_FW", params.getParameter<int>("nNeutrals_FW"));
92  }
93  if (version_ == WINTER16) {
94  if (params.exists("NHF_EC"))
95  set("NHF_EC", params.getParameter<double>("NHF_EC"));
96  if (params.exists("NEF_EC"))
97  set("NEF_EC", params.getParameter<double>("NEF_EC"));
98  if (params.exists("nNeutrals_EC"))
99  set("nNeutrals_EC", params.getParameter<int>("nNeutrals_EC"));
100  if (params.exists("NEF_FW"))
101  set("NEF_FW", params.getParameter<double>("NEF_FW"));
102  if (params.exists("nNeutrals_FW"))
103  set("nNeutrals_FW", params.getParameter<int>("nNeutrals_FW"));
104  if (quality_ == TIGHTLEPVETO) {
105  if (params.exists("MUF"))
106  set("MUF", params.getParameter<double>("MUF"));
107  }
108  }
109  if (version_ == WINTER17) {
110  if (params.exists("NEF_EC_L"))
111  set("NEF_EC_L", params.getParameter<double>("NEF_EC_L"));
112  if (params.exists("NEF_EC_U"))
113  set("NEF_EC_U", params.getParameter<double>("NEF_EC_U"));
114  if (params.exists("nNeutrals_EC"))
115  set("nNeutrals_EC", params.getParameter<int>("nNeutrals_EC"));
116  if (params.exists("NHF_FW"))
117  set("NHF_FW", params.getParameter<double>("NHF_FW"));
118  if (params.exists("NEF_FW"))
119  set("NEF_FW", params.getParameter<double>("NEF_FW"));
120  if (params.exists("nNeutrals_FW"))
121  set("nNeutrals_FW", params.getParameter<int>("nNeutrals_FW"));
122  if (quality_ == TIGHTLEPVETO) {
123  if (params.exists("MUF"))
124  set("MUF", params.getParameter<double>("MUF"));
125  }
126  }
127  if (version_ == WINTER17PUPPI) {
128  if (params.exists("NHF_EC"))
129  set("NHF_EC", params.getParameter<double>("NHF_EC"));
130  if (params.exists("NHF_FW"))
131  set("NHF_FW", params.getParameter<double>("NHF_FW"));
132  if (params.exists("NEF_FW"))
133  set("NEF_FW", params.getParameter<double>("NEF_FW"));
134  if (params.exists("nNeutrals_FW_L"))
135  set("nNeutrals_FW_L", params.getParameter<int>("nNeutrals_FW_L"));
136  if (params.exists("nNeutrals_FW_U"))
137  set("nNeutrals_FW_U", params.getParameter<int>("nNeutrals_FW_U"));
138  if (quality_ == TIGHTLEPVETO) {
139  if (params.exists("MUF"))
140  set("MUF", params.getParameter<double>("MUF"));
141  }
142  }
143  if (version_ == SUMMER18) {
144  if (params.exists("NHF_TR"))
145  set("NHF_TR", params.getParameter<double>("NHF_TR"));
146  if (params.exists("NEF_TR"))
147  set("NEF_TR", params.getParameter<double>("NEF_TR"));
148  if (params.exists("NCH_TR"))
149  set("NCH_TR", params.getParameter<int>("NCH_TR"));
150  if (params.exists("NEF_EC_L"))
151  set("NEF_EC_L", params.getParameter<double>("NEF_EC_L"));
152  if (params.exists("NEF_EC_U"))
153  set("NEF_EC_U", params.getParameter<double>("NEF_EC_U"));
154  if (params.exists("nNeutrals_EC"))
155  set("nNeutrals_EC", params.getParameter<int>("nNeutrals_EC"));
156  if (params.exists("NHF_FW"))
157  set("NHF_FW", params.getParameter<double>("NHF_FW"));
158  if (params.exists("NEF_FW"))
159  set("NEF_FW", params.getParameter<double>("NEF_FW"));
160  if (params.exists("nNeutrals_FW"))
161  set("nNeutrals_FW", params.getParameter<int>("nNeutrals_FW"));
162  if (quality_ == TIGHTLEPVETO) {
163  if (params.exists("MUF"))
164  set("MUF", params.getParameter<double>("MUF"));
165  if (params.exists("MUF_TR"))
166  set("MUF_TR", params.getParameter<double>("MUF_TR"));
167  if (params.exists("CEF_TR"))
168  set("CEF_TR", params.getParameter<double>("CEF_TR"));
169  }
170  }
171  if (version_ == SUMMER18PUPPI) {
172  if (params.exists("NHF_TR"))
173  set("NHF_TR", params.getParameter<double>("NHF_TR"));
174  if (params.exists("NEF_TR"))
175  set("NEF_TR", params.getParameter<double>("NEF_TR"));
176  if (params.exists("NHF_EC"))
177  set("NHF_EC", params.getParameter<double>("NHF_EC"));
178  if (params.exists("NHF_FW"))
179  set("NHF_FW", params.getParameter<double>("NHF_FW"));
180  if (params.exists("NEF_FW"))
181  set("NEF_FW", params.getParameter<double>("NEF_FW"));
182  if (params.exists("nNeutrals_FW_L"))
183  set("nNeutrals_FW_L", params.getParameter<int>("nNeutrals_FW_L"));
184  if (params.exists("nNeutrals_FW_U"))
185  set("nNeutrals_FW_U", params.getParameter<int>("nNeutrals_FW_U"));
186  if (quality_ == TIGHTLEPVETO) {
187  if (params.exists("MUF"))
188  set("MUF", params.getParameter<double>("MUF"));
189  if (params.exists("MUF_TR"))
190  set("MUF_TR", params.getParameter<double>("MUF_TR"));
191  if (params.exists("CEF_TR"))
192  set("CEF_TR", params.getParameter<double>("CEF_TR"));
193  }
194  }
195 
196  if (params.exists("cutsToIgnore"))
197  setIgnoredCuts(params.getParameter<std::vector<std::string> >("cutsToIgnore"));
198 
199  initIndex();
200  }

References FIRSTDATA, initCuts(), initIndex(), LOOSE, CalibrationSummaryClient_cfi::params, quality_, RUNIISTARTUP, Selector< pat::Jet >::set(), Selector< pat::Jet >::setIgnoredCuts(), AlCaHLTBitMon_QueryRunRegistry::string, SUMMER18, SUMMER18PUPPI, TIGHT, TIGHTLEPVETO, version_, WINTER16, WINTER17, and WINTER17PUPPI.

◆ PFJetIDSelectionFunctor() [4/4]

PFJetIDSelectionFunctor::PFJetIDSelectionFunctor ( Version_t  version,
Quality_t  quality 
)
inline

Definition at line 202 of file PFJetIDSelectionFunctor.h.

203  initCuts();
204  initIndex();
205  }

References initCuts(), and initIndex().

Member Function Documentation

◆ firstDataCuts()

bool PFJetIDSelectionFunctor::firstDataCuts ( reco::Jet const &  jet,
pat::strbitset ret,
Version_t  version_ 
)
inline

Definition at line 246 of file PFJetIDSelectionFunctor.h.

246  {
247  ret.set(false);
248 
249  // cache some variables
250  double chf = 0.0;
251  double nhf = 0.0;
252  double cef = 0.0;
253  double nef = 0.0;
254  double muf = 0.0;
255 
256  int nch = 0;
257  int nconstituents = 0;
258  int nneutrals = 0;
259 
260  // Have to do this because pat::Jet inherits from reco::Jet but not reco::PFJet
261  reco::PFJet const *pfJet = dynamic_cast<reco::PFJet const *>(&jet);
262  pat::Jet const *patJet = dynamic_cast<pat::Jet const *>(&jet);
263  reco::BasicJet const *basicJet = dynamic_cast<reco::BasicJet const *>(&jet);
264 
265  if (patJet != nullptr) {
266  if (patJet->isPFJet()) {
267  chf = patJet->chargedHadronEnergyFraction();
268  nhf = patJet->neutralHadronEnergyFraction();
269  cef = patJet->chargedEmEnergyFraction();
270  nef = patJet->neutralEmEnergyFraction();
271  nch = patJet->chargedMultiplicity();
272  muf = patJet->muonEnergyFraction();
273  nconstituents = patJet->neutralMultiplicity() + patJet->chargedMultiplicity();
274  nneutrals = patJet->neutralMultiplicity();
275  }
276  // Handle the special case where this is a composed jet for
277  // subjet analyses
278  else if (patJet->isBasicJet()) {
279  double e_chf = 0.0;
280  double e_nhf = 0.0;
281  double e_cef = 0.0;
282  double e_nef = 0.0;
283  double e_muf = 0.0;
284  nch = 0;
285  nconstituents = 0;
286  nneutrals = 0;
287 
288  for (reco::Jet::const_iterator ibegin = patJet->begin(), iend = patJet->end(), isub = ibegin; isub != iend;
289  ++isub) {
290  reco::PFJet const *pfsub = dynamic_cast<reco::PFJet const *>(&*isub);
291  pat::Jet const *patsub = dynamic_cast<pat::Jet const *>(&*isub);
292  if (patsub) {
293  e_chf += patsub->chargedHadronEnergy();
294  e_nhf += patsub->neutralHadronEnergy();
295  e_cef += patsub->chargedEmEnergy();
296  e_nef += patsub->neutralEmEnergy();
297  e_muf += patsub->muonEnergy();
298  nch += patsub->chargedMultiplicity();
299  nconstituents += patsub->neutralMultiplicity() + patsub->chargedMultiplicity();
300  nneutrals += patsub->neutralMultiplicity();
301  } else if (pfsub) {
302  e_chf += pfsub->chargedHadronEnergy();
303  e_nhf += pfsub->neutralHadronEnergy();
304  e_cef += pfsub->chargedEmEnergy();
305  e_nef += pfsub->neutralEmEnergy();
306  e_muf += pfsub->muonEnergy();
307  nch += pfsub->chargedMultiplicity();
308  nconstituents += pfsub->neutralMultiplicity() + pfsub->chargedMultiplicity();
309  nneutrals += pfsub->neutralMultiplicity();
310  } else
311  assert(0);
312  }
313  double e = patJet->energy();
314  if (e > 0.000001) {
315  chf = e_chf / e;
316  nhf = e_nhf / e;
317  cef = e_cef / e;
318  nef = e_nef / e;
319  muf = e_muf / e;
320  } else {
321  chf = nhf = cef = nef = muf = 0.0;
322  }
323  }
324  } // end if pat jet
325  else if (pfJet != nullptr) {
326  // CV: need to compute energy fractions in a way that works for corrected as well as for uncorrected PFJets
327  double jetEnergyUncorrected = pfJet->chargedHadronEnergy() + pfJet->neutralHadronEnergy() +
328  pfJet->photonEnergy() + pfJet->electronEnergy() + pfJet->muonEnergy() +
329  pfJet->HFEMEnergy();
330  if (jetEnergyUncorrected > 0.) {
331  chf = pfJet->chargedHadronEnergy() / jetEnergyUncorrected;
332  nhf = pfJet->neutralHadronEnergy() / jetEnergyUncorrected;
333  cef = pfJet->chargedEmEnergy() / jetEnergyUncorrected;
334  nef = pfJet->neutralEmEnergy() / jetEnergyUncorrected;
335  muf = pfJet->muonEnergy() / jetEnergyUncorrected;
336  }
337  nch = pfJet->chargedMultiplicity();
338  nconstituents = pfJet->neutralMultiplicity() + pfJet->chargedMultiplicity();
339  nneutrals = pfJet->neutralMultiplicity();
340  } // end if PF jet
341  // Handle the special case where this is a composed jet for
342  // subjet analyses
343  else if (basicJet != nullptr) {
344  double e_chf = 0.0;
345  double e_nhf = 0.0;
346  double e_cef = 0.0;
347  double e_nef = 0.0;
348  double e_muf = 0.0;
349  nch = 0;
350  nconstituents = 0;
351  for (reco::Jet::const_iterator ibegin = basicJet->begin(), iend = patJet->end(), isub = ibegin; isub != iend;
352  ++isub) {
353  reco::PFJet const *pfsub = dynamic_cast<reco::PFJet const *>(&*isub);
354  e_chf += pfsub->chargedHadronEnergy();
355  e_nhf += pfsub->neutralHadronEnergy();
356  e_cef += pfsub->chargedEmEnergy();
357  e_nef += pfsub->neutralEmEnergy();
358  e_muf += pfsub->muonEnergy();
359  nch += pfsub->chargedMultiplicity();
360  nconstituents += pfsub->neutralMultiplicity() + pfsub->chargedMultiplicity();
361  nneutrals += pfsub->neutralMultiplicity();
362  }
363  double e = basicJet->energy();
364  if (e > 0.000001) {
365  chf = e_chf / e;
366  nhf = e_nhf / e;
367  cef = e_cef / e;
368  nef = e_nef / e;
369  muf = e_muf / e;
370  }
371  } // end if basic jet
372 
373  float etaB = 2.4;
374  // Cuts for |eta| < 2.6 for Summer18
376  etaB = 2.6;
378  quality_ != TIGHT) {
379  if (ignoreCut(indexCEF_) || (cef < cut(indexCEF_, double()) || std::abs(jet.eta()) > etaB))
381  }
382  if (ignoreCut(indexCHF_) || (chf > cut(indexCHF_, double()) || std::abs(jet.eta()) > etaB))
384  if (ignoreCut(indexNCH_) || (nch > cut(indexNCH_, int()) || std::abs(jet.eta()) > etaB))
386  if (version_ == FIRSTDATA) { // Cuts for all eta for FIRSTDATA
387  if (ignoreCut(indexNConstituents_) || (nconstituents > cut(indexNConstituents_, int())))
389  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double())))
391  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double())))
393  } else if (version_ == RUNIISTARTUP) {
394  // Cuts for |eta| <= 3.0 for RUNIISTARTUP scenario
396  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 3.0))
398  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 3.0))
400  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 3.0))
402  // Cuts for |eta| > 3.0 for RUNIISTARTUP scenario
403  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
405  if (ignoreCut(indexNNeutrals_FW_) || (nneutrals > cut(indexNNeutrals_FW_, int()) || std::abs(jet.eta()) <= 3.0))
407  } else if (version_ == WINTER16) {
408  // Cuts for |eta| <= 2.7 for WINTER16 scenario
410  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 2.7))
412  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 2.7))
414  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 2.7))
416  if (quality_ == TIGHTLEPVETO) {
417  if (ignoreCut(indexMUF_) || (muf < cut(indexMUF_, double()) || std::abs(jet.eta()) > 2.7))
419  }
420 
421  // Cuts for 2.7 < |eta| <= 3.0 for WINTER16 scenario
422  if (ignoreCut(indexNHF_EC_) ||
423  (nhf < cut(indexNHF_EC_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
425  if (ignoreCut(indexNEF_EC_) ||
426  (nef > cut(indexNEF_EC_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
429  (nneutrals > cut(indexNNeutrals_EC_, int()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
431 
432  // Cuts for |eta| > 3.0 for WINTER16 scenario
433  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
435  if (ignoreCut(indexNNeutrals_FW_) || (nneutrals > cut(indexNNeutrals_FW_, int()) || std::abs(jet.eta()) <= 3.0))
437  } else if (version_ == WINTER17) {
438  // Cuts for |eta| <= 2.7 for WINTER17 scenario
440  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 2.7))
442  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 2.7))
444  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 2.7))
446  if (quality_ == TIGHTLEPVETO) {
447  if (ignoreCut(indexMUF_) || (muf < cut(indexMUF_, double()) || std::abs(jet.eta()) > 2.7))
449  }
450 
451  // Cuts for 2.7 < |eta| <= 3.0 for WINTER17 scenario
452 
453  if (ignoreCut(indexNEF_EC_L_) ||
454  (nef > cut(indexNEF_EC_L_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
456  if (ignoreCut(indexNEF_EC_U_) ||
457  (nef < cut(indexNEF_EC_U_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
460  (nneutrals > cut(indexNNeutrals_EC_, int()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
462 
463  // Cuts for |eta| > 3.0 for WINTER17 scenario
464  if (ignoreCut(indexNHF_FW_) || (nhf > cut(indexNHF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
466  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
468  if (ignoreCut(indexNNeutrals_FW_) || (nneutrals > cut(indexNNeutrals_FW_, int()) || std::abs(jet.eta()) <= 3.0))
470 
471  } else if (version_ == WINTER17PUPPI) {
472  // Cuts for |eta| <= 2.7 for WINTER17 scenario
474  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 2.7))
476  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 2.7))
478  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 2.7))
480  if (quality_ == TIGHTLEPVETO) {
481  if (ignoreCut(indexMUF_) || (muf < cut(indexMUF_, double()) || std::abs(jet.eta()) > 2.7))
483  }
484 
485  // Cuts for 2.7 < |eta| <= 3.0 for WINTER17 scenario
486 
487  if (ignoreCut(indexNHF_EC_) ||
488  (nhf < cut(indexNHF_EC_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
490 
491  // Cuts for |eta| > 3.0 for WINTER17 scenario
492  if (ignoreCut(indexNHF_FW_) || (nhf > cut(indexNHF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
494  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
497  (nneutrals > cut(indexNNeutrals_FW_L_, int()) || std::abs(jet.eta()) <= 3.0))
500  (nneutrals < cut(indexNNeutrals_FW_U_, int()) || std::abs(jet.eta()) <= 3.0))
502  } else if (version_ == SUMMER18) {
503  // Cuts for |eta| <= 2.6 for SUMMER18 scenario
505  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 2.6))
507  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 2.6))
509  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 2.6))
511  if (quality_ == TIGHTLEPVETO) {
512  if (ignoreCut(indexMUF_) || (muf < cut(indexMUF_, double()) || std::abs(jet.eta()) > 2.6))
514  }
515 
516  // Cuts for 2.6 <= |eta| <= 2.7 for SUMMER18 scenario
517  if (ignoreCut(indexNHF_TR_) ||
518  (nhf < cut(indexNHF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
520  if (ignoreCut(indexNEF_TR_) ||
521  (nef < cut(indexNEF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
523  if (ignoreCut(indexNCH_TR_) ||
524  (nch > cut(indexNCH_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
526  if (quality_ == TIGHTLEPVETO) {
527  if (ignoreCut(indexMUF_TR_) ||
528  (muf < cut(indexMUF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
530  if (ignoreCut(indexCEF_TR_) ||
531  (cef < cut(indexCEF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
533  }
534 
535  // Cuts for 2.7 < |eta| <= 3.0 for SUMMER18 scenario
536  if (ignoreCut(indexNEF_EC_L_) ||
537  (nef > cut(indexNEF_EC_L_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
539  if (ignoreCut(indexNEF_EC_U_) ||
540  (nef < cut(indexNEF_EC_U_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
543  (nneutrals > cut(indexNNeutrals_EC_, int()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
545 
546  // Cuts for |eta| > 3.0 for SUMMER18 scenario
547  if (ignoreCut(indexNHF_FW_) || (nhf > cut(indexNHF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
549  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
551  if (ignoreCut(indexNNeutrals_FW_) || (nneutrals > cut(indexNNeutrals_FW_, int()) || std::abs(jet.eta()) <= 3.0))
553  }
554 
555  else if (version_ == SUMMER18PUPPI) {
556  // Cuts for |eta| <= 2.6 for SUMMER18PUPPI scenario
558  (nconstituents > cut(indexNConstituents_, int()) || std::abs(jet.eta()) > 2.6))
560  if (ignoreCut(indexNEF_) || (nef < cut(indexNEF_, double()) || std::abs(jet.eta()) > 2.6))
562  if (ignoreCut(indexNHF_) || (nhf < cut(indexNHF_, double()) || std::abs(jet.eta()) > 2.6))
564  if (quality_ == TIGHTLEPVETO) {
565  if (ignoreCut(indexMUF_) || (muf < cut(indexMUF_, double()) || std::abs(jet.eta()) > 2.6))
567  }
568 
569  // Cuts for 2.6 <= |eta| <= 2.7 for SUMMER18PUPPI scenario
570  if (ignoreCut(indexNHF_TR_) ||
571  (nhf < cut(indexNHF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
573  if (ignoreCut(indexNEF_TR_) ||
574  (nef < cut(indexNEF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
576  if (quality_ == TIGHTLEPVETO) {
577  if (ignoreCut(indexMUF_TR_) ||
578  (muf < cut(indexMUF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
580  if (ignoreCut(indexCEF_TR_) ||
581  (cef < cut(indexCEF_TR_, double()) || std::abs(jet.eta()) <= 2.6 || std::abs(jet.eta()) > 2.7))
583  }
584 
585  // Cuts for 2.7 < |eta| <= 3.0 for SUMMER18PUPPI scenario
586  if (ignoreCut(indexNHF_EC_) ||
587  (nhf < cut(indexNHF_EC_, double()) || std::abs(jet.eta()) <= 2.7 || std::abs(jet.eta()) > 3.0))
589 
590  // Cuts for |eta| > 3.0 for SUMMER18PUPPI scenario
591  if (ignoreCut(indexNHF_FW_) || (nhf > cut(indexNHF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
593  if (ignoreCut(indexNEF_FW_) || (nef < cut(indexNEF_FW_, double()) || std::abs(jet.eta()) <= 3.0))
596  (nneutrals > cut(indexNNeutrals_FW_L_, int()) || std::abs(jet.eta()) <= 3.0))
599  (nneutrals < cut(indexNNeutrals_FW_U_, int()) || std::abs(jet.eta()) <= 3.0))
601  }
602 
603  //std::cout << "<PFJetIDSelectionFunctor::firstDataCuts>:" << std::endl;
604  //std::cout << " jet: Pt = " << jet.pt() << ", eta = " << jet.eta() << ", phi = " << jet.phi() << std::endl;
605  //ret.print(std::cout);
606  setIgnored(ret);
607  return (bool)ret;
608  }

References funct::abs(), cms::cuda::assert(), reco::Candidate::begin(), reco::PFJet::chargedEmEnergy(), pat::Jet::chargedEmEnergy(), pat::Jet::chargedEmEnergyFraction(), reco::PFJet::chargedHadronEnergy(), pat::Jet::chargedHadronEnergy(), pat::Jet::chargedHadronEnergyFraction(), reco::PFJet::chargedMultiplicity(), pat::Jet::chargedMultiplicity(), Selector< pat::Jet >::cut(), MillePedeFileConverter_cfg::e, reco::PFJet::electronEnergy(), reco::Candidate::end(), reco::LeafCandidate::energy(), FIRSTDATA, reco::PFJet::HFEMEnergy(), Selector< pat::Jet >::ignoreCut(), indexCEF_, indexCEF_TR_, indexCHF_, indexMUF_, indexMUF_TR_, indexNCH_, indexNCH_TR_, indexNConstituents_, indexNEF_, indexNEF_EC_, indexNEF_EC_L_, indexNEF_EC_U_, indexNEF_FW_, indexNEF_TR_, indexNHF_, indexNHF_EC_, indexNHF_FW_, indexNHF_TR_, indexNNeutrals_EC_, indexNNeutrals_FW_, indexNNeutrals_FW_L_, indexNNeutrals_FW_U_, pat::Jet::isBasicJet(), pat::Jet::isPFJet(), metsig::jet, reco::PFJet::muonEnergy(), pat::Jet::muonEnergy(), pat::Jet::muonEnergyFraction(), reco::PFJet::neutralEmEnergy(), pat::Jet::neutralEmEnergy(), pat::Jet::neutralEmEnergyFraction(), reco::PFJet::neutralHadronEnergy(), pat::Jet::neutralHadronEnergy(), pat::Jet::neutralHadronEnergyFraction(), reco::PFJet::neutralMultiplicity(), pat::Jet::neutralMultiplicity(), Selector< pat::Jet >::passCut(), reco::PFJet::photonEnergy(), quality_, runTheMatrix::ret, RUNIISTARTUP, Selector< pat::Jet >::setIgnored(), SUMMER18, SUMMER18PUPPI, TIGHT, TIGHTLEPVETO, version_, WINTER16, WINTER17, and WINTER17PUPPI.

Referenced by operator()().

◆ initCuts()

void PFJetIDSelectionFunctor::initCuts ( )
inlineprivate

Definition at line 611 of file PFJetIDSelectionFunctor.h.

611  {
612  push_back("CHF");
613  push_back("NHF");
615  quality_ != TIGHT)
616  push_back("CEF");
617  push_back("NEF");
618  push_back("NCH");
619  push_back("nConstituents");
620  if (version_ == RUNIISTARTUP) {
621  push_back("NEF_FW");
622  push_back("nNeutrals_FW");
623  }
624  if (version_ == WINTER16) {
625  push_back("NHF_EC");
626  push_back("NEF_EC");
627  push_back("nNeutrals_EC");
628  push_back("NEF_FW");
629  push_back("nNeutrals_FW");
630  if (quality_ == TIGHTLEPVETO)
631  push_back("MUF");
632  }
633  if (version_ == WINTER17) {
634  push_back("NEF_EC_L");
635  push_back("NEF_EC_U");
636  push_back("nNeutrals_EC");
637  push_back("NEF_FW");
638  push_back("NHF_FW");
639  push_back("nNeutrals_FW");
640  if (quality_ == TIGHTLEPVETO)
641  push_back("MUF");
642  }
643  if (version_ == WINTER17PUPPI) {
644  push_back("NHF_EC");
645  push_back("NEF_FW");
646  push_back("NHF_FW");
647  push_back("nNeutrals_FW_L");
648  push_back("nNeutrals_FW_U");
649  if (quality_ == TIGHTLEPVETO)
650  push_back("MUF");
651  }
652  if (version_ == SUMMER18) {
653  push_back("NHF_TR");
654  push_back("NEF_TR");
655  push_back("NCH_TR");
656  push_back("NEF_EC_L");
657  push_back("NEF_EC_U");
658  push_back("nNeutrals_EC");
659  push_back("NEF_FW");
660  push_back("NHF_FW");
661  push_back("nNeutrals_FW");
662 
663  if (quality_ == TIGHTLEPVETO) {
664  push_back("MUF");
665  push_back("MUF_TR");
666  push_back("CEF_TR");
667  }
668  }
669  if (version_ == SUMMER18PUPPI) {
670  push_back("NHF_TR");
671  push_back("NEF_TR");
672  push_back("NHF_EC");
673  push_back("NEF_FW");
674  push_back("NHF_FW");
675  push_back("nNeutrals_FW_L");
676  push_back("nNeutrals_FW_U");
677 
678  if (quality_ == TIGHTLEPVETO) {
679  push_back("MUF");
680  push_back("MUF_TR");
681  push_back("CEF_TR");
682  }
683  }
684 
686  quality_ == LOOSE) {
687  edm::LogWarning("BadJetIDVersion")
688  << "The LOOSE operating point is only supported for the WINTER16 JetID version -- defaulting to TIGHT";
689  quality_ = TIGHT;
690  }
691 
692  // Set some default cuts for LOOSE, TIGHT
693  if (quality_ == LOOSE) {
694  set("CHF", 0.0);
695  set("NHF", 0.99);
696  set("CEF", 0.99);
697  set("NEF", 0.99);
698  set("NCH", 0);
699  set("nConstituents", 1);
700  if (version_ == RUNIISTARTUP) {
701  set("NEF_FW", 0.90);
702  set("nNeutrals_FW", 10);
703  } else if (version_ == WINTER16) {
704  set("NHF_EC", 0.98);
705  set("NEF_EC", 0.01);
706  set("nNeutrals_EC", 2);
707  set("NEF_FW", 0.90);
708  set("nNeutrals_FW", 10);
709  }
710  } else if (quality_ == TIGHT) {
711  set("CHF", 0.0);
712  set("NHF", 0.9);
714  set("CEF", 0.99);
715  set("NEF", 0.9);
716  set("NCH", 0);
717  set("nConstituents", 1);
718  if (version_ == RUNIISTARTUP) {
719  set("NEF_FW", 0.90);
720  set("nNeutrals_FW", 10);
721  } else if (version_ == WINTER16) {
722  set("NHF_EC", 0.98);
723  set("NEF_EC", 0.01);
724  set("nNeutrals_EC", 2);
725  set("NEF_FW", 0.90);
726  set("nNeutrals_FW", 10);
727  } else if (version_ == WINTER17) {
728  set("NEF_EC_L", 0.02);
729  set("NEF_EC_U", 0.99);
730  set("nNeutrals_EC", 2);
731  set("NHF_FW", 0.02);
732  set("NEF_FW", 0.90);
733  set("nNeutrals_FW", 10);
734  } else if (version_ == WINTER17PUPPI) {
735  set("NHF_EC", 0.99);
736  set("NHF_FW", 0.02);
737  set("NEF_FW", 0.90);
738  set("nNeutrals_FW_L", 2);
739  set("nNeutrals_FW_U", 15);
740  } else if (version_ == SUMMER18) {
741  set("NHF_TR", 0.9);
742  set("NEF_TR", 0.99);
743  set("NCH_TR", 0);
744  set("NEF_EC_L", 0.02);
745  set("NEF_EC_U", 0.99);
746  set("nNeutrals_EC", 2);
747  set("NHF_FW", 0.2);
748  set("NEF_FW", 0.90);
749  set("nNeutrals_FW", 10);
750  } else if (version_ == SUMMER18PUPPI) {
751  set("NHF_TR", 0.9);
752  set("NEF_TR", 0.99);
753  set("NHF_EC", 0.99);
754  set("NHF_FW", 0.02);
755  set("NEF_FW", 0.90);
756  set("nNeutrals_FW_L", 2);
757  set("nNeutrals_FW_U", 15);
758  }
759  } else if (quality_ == TIGHTLEPVETO) {
760  set("CHF", 0.0);
761  set("NHF", 0.9);
762  set("NEF", 0.9);
763  set("NCH", 0);
764  set("nConstituents", 1);
765  if (version_ == WINTER17) {
766  set("CEF", 0.8);
767  set("NEF_EC_L", 0.02);
768  set("NEF_EC_U", 0.99);
769  set("nNeutrals_EC", 2);
770  set("NHF_FW", 0.02);
771  set("NEF_FW", 0.90);
772  set("nNeutrals_FW", 10);
773  set("MUF", 0.8);
774  } else if (version_ == WINTER17PUPPI) {
775  set("CEF", 0.8);
776  set("NHF_EC", 0.99);
777  set("NHF_FW", 0.02);
778  set("NEF_FW", 0.90);
779  set("nNeutrals_FW_L", 2);
780  set("nNeutrals_FW_U", 15);
781  set("MUF", 0.8);
782  } else if (version_ == WINTER16) {
783  set("CEF", 0.9);
784  set("NEF_EC", 0.01);
785  set("NHF_EC", 0.98);
786  set("nNeutrals_EC", 2);
787  set("nNeutrals_FW", 10);
788  set("NEF_FW", 0.90);
789  set("MUF", 0.8);
790  } else if (version_ == WINTER17PUPPI) {
791  set("CEF", 0.8);
792  set("NHF_EC", 0.99);
793  set("NHF_FW", 0.02);
794  set("NEF_FW", 0.90);
795  set("nNeutrals_FW_L", 2);
796  set("nNeutrals_FW_U", 15);
797  set("MUF", 0.8);
798  } else if (version_ == WINTER16) {
799  set("CEF", 0.9);
800  set("NEF_EC", 0.01);
801  set("NHF_EC", 0.98);
802  set("nNeutrals_EC", 2);
803  set("nNeutrals_FW", 10);
804  set("NEF_FW", 0.90);
805  set("MUF", 0.8);
806  } else if (version_ == SUMMER18) {
807  set("CEF", 0.8);
808  set("MUF", 0.8);
809  set("NHF_TR", 0.9);
810  set("NEF_TR", 0.99);
811  set("MUF_TR", 0.8);
812  set("NCH_TR", 0);
813  set("CEF_TR", 0.8);
814  set("NEF_EC_L", 0.02);
815  set("NEF_EC_U", 0.99);
816  set("nNeutrals_EC", 2);
817  set("NHF_FW", 0.2);
818  set("NEF_FW", 0.90);
819  set("nNeutrals_FW", 10);
820  } else if (version_ == SUMMER18PUPPI) {
821  set("CEF", 0.8);
822  set("MUF", 0.8);
823  set("NHF_TR", 0.9);
824  set("NEF_TR", 0.99);
825  set("MUF_TR", 0.8);
826  set("CEF_TR", 0.8);
827  set("NHF_EC", 0.99);
828  set("NHF_FW", 0.02);
829  set("NEF_FW", 0.90);
830  set("nNeutrals_FW_L", 2);
831  set("nNeutrals_FW_U", 15);
832  }
833  }
834  }

References LOOSE, Selector< pat::Jet >::push_back(), quality_, RUNIISTARTUP, Selector< pat::Jet >::set(), SUMMER18, SUMMER18PUPPI, TIGHT, TIGHTLEPVETO, version_, WINTER16, WINTER17, and WINTER17PUPPI.

Referenced by PFJetIDSelectionFunctor().

◆ initIndex()

void PFJetIDSelectionFunctor::initIndex ( )
inlineprivate

Definition at line 836 of file PFJetIDSelectionFunctor.h.

836  {
837  indexNConstituents_ = index_type(&bits_, "nConstituents");
838  indexNEF_ = index_type(&bits_, "NEF");
839  indexNHF_ = index_type(&bits_, "NHF");
841  quality_ != TIGHT)
842  indexCEF_ = index_type(&bits_, "CEF");
843 
844  indexCHF_ = index_type(&bits_, "CHF");
845  indexNCH_ = index_type(&bits_, "NCH");
846  if (version_ == RUNIISTARTUP) {
847  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
848  indexNNeutrals_FW_ = index_type(&bits_, "nNeutrals_FW");
849  }
850  if (version_ == WINTER16) {
851  indexNHF_EC_ = index_type(&bits_, "NHF_EC");
852  indexNEF_EC_ = index_type(&bits_, "NEF_EC");
853  indexNNeutrals_EC_ = index_type(&bits_, "nNeutrals_EC");
854  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
855  indexNNeutrals_FW_ = index_type(&bits_, "nNeutrals_FW");
856  if (quality_ == TIGHTLEPVETO) {
857  indexMUF_ = index_type(&bits_, "MUF");
858  }
859  }
860  if (version_ == WINTER17) {
861  indexNEF_EC_L_ = index_type(&bits_, "NEF_EC_L");
862  indexNEF_EC_U_ = index_type(&bits_, "NEF_EC_U");
863  indexNNeutrals_EC_ = index_type(&bits_, "nNeutrals_EC");
864  indexNHF_FW_ = index_type(&bits_, "NHF_FW");
865  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
866  indexNNeutrals_FW_ = index_type(&bits_, "nNeutrals_FW");
867  if (quality_ == TIGHTLEPVETO) {
868  indexMUF_ = index_type(&bits_, "MUF");
869  }
870  }
871  if (version_ == WINTER17PUPPI) {
872  indexNHF_EC_ = index_type(&bits_, "NHF_EC");
873  indexNHF_FW_ = index_type(&bits_, "NHF_FW");
874  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
875  indexNNeutrals_FW_L_ = index_type(&bits_, "nNeutrals_FW_L");
876  indexNNeutrals_FW_U_ = index_type(&bits_, "nNeutrals_FW_U");
877  if (quality_ == TIGHTLEPVETO) {
878  indexMUF_ = index_type(&bits_, "MUF");
879  }
880  }
881  if (version_ == SUMMER18) {
882  indexNHF_TR_ = index_type(&bits_, "NHF_TR");
883  indexNEF_TR_ = index_type(&bits_, "NEF_TR");
884  indexNCH_TR_ = index_type(&bits_, "NCH_TR");
885  indexNEF_EC_L_ = index_type(&bits_, "NEF_EC_L");
886  indexNEF_EC_U_ = index_type(&bits_, "NEF_EC_U");
887  indexNNeutrals_EC_ = index_type(&bits_, "nNeutrals_EC");
888  indexNHF_FW_ = index_type(&bits_, "NHF_FW");
889  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
890  indexNNeutrals_FW_ = index_type(&bits_, "nNeutrals_FW");
891  if (quality_ == TIGHTLEPVETO) {
892  indexMUF_ = index_type(&bits_, "MUF");
893  indexMUF_TR_ = index_type(&bits_, "MUF_TR");
894  indexCEF_TR_ = index_type(&bits_, "CEF_TR");
895  }
896  }
897  if (version_ == SUMMER18PUPPI) {
898  indexNHF_TR_ = index_type(&bits_, "NHF_TR");
899  indexNEF_TR_ = index_type(&bits_, "NEF_TR");
900  indexNHF_EC_ = index_type(&bits_, "NHF_EC");
901  indexNHF_FW_ = index_type(&bits_, "NHF_FW");
902  indexNEF_FW_ = index_type(&bits_, "NEF_FW");
903  indexNNeutrals_FW_L_ = index_type(&bits_, "nNeutrals_FW_L");
904  indexNNeutrals_FW_U_ = index_type(&bits_, "nNeutrals_FW_U");
905  if (quality_ == TIGHTLEPVETO) {
906  indexMUF_ = index_type(&bits_, "MUF");
907  indexMUF_TR_ = index_type(&bits_, "MUF_TR");
908  indexCEF_TR_ = index_type(&bits_, "CEF_TR");
909  }
910  }
912  }

References Selector< pat::Jet >::bits_, Selector< pat::Jet >::getBitTemplate(), indexCEF_, indexCEF_TR_, indexCHF_, indexMUF_, indexMUF_TR_, indexNCH_, indexNCH_TR_, indexNConstituents_, indexNEF_, indexNEF_EC_, indexNEF_EC_L_, indexNEF_EC_U_, indexNEF_FW_, indexNEF_TR_, indexNHF_, indexNHF_EC_, indexNHF_FW_, indexNHF_TR_, indexNNeutrals_EC_, indexNNeutrals_FW_, indexNNeutrals_FW_L_, indexNNeutrals_FW_U_, quality_, Selector< pat::Jet >::retInternal_, RUNIISTARTUP, SUMMER18, SUMMER18PUPPI, TIGHT, TIGHTLEPVETO, version_, WINTER16, WINTER17, and WINTER17PUPPI.

Referenced by PFJetIDSelectionFunctor().

◆ operator()() [1/3]

bool PFJetIDSelectionFunctor::operator() ( const pat::Jet t,
pat::strbitset ret 
)
inlineoverridevirtual

This provides the interface for base classes to select objects.

Implements Selector< pat::Jet >.

Definition at line 210 of file PFJetIDSelectionFunctor.h.

210  {
213  if (jet.currentJECLevel() == "Uncorrected" || !jet.jecSetsAvailable())
214  return firstDataCuts(jet, ret, version_);
215  else
216  return firstDataCuts(jet.correctedJet("Uncorrected"), ret, version_);
217  } else {
218  return false;
219  }
220  }

References FIRSTDATA, firstDataCuts(), metsig::jet, runTheMatrix::ret, RUNIISTARTUP, SUMMER18, SUMMER18PUPPI, version_, WINTER16, WINTER17, and WINTER17PUPPI.

Referenced by operator()().

◆ operator()() [2/3]

bool PFJetIDSelectionFunctor::operator() ( const reco::PFJet jet)
inline

◆ operator()() [3/3]

bool PFJetIDSelectionFunctor::operator() ( const reco::PFJet jet,
pat::strbitset ret 
)
inline

Definition at line 227 of file PFJetIDSelectionFunctor.h.

227  {
230  return firstDataCuts(jet, ret, version_);
231  } else {
232  return false;
233  }
234  }

References FIRSTDATA, firstDataCuts(), metsig::jet, runTheMatrix::ret, RUNIISTARTUP, SUMMER18, SUMMER18PUPPI, version_, WINTER16, WINTER17, and WINTER17PUPPI.

Member Data Documentation

◆ indexCEF_

index_type PFJetIDSelectionFunctor::indexCEF_
private

Definition at line 921 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexCEF_TR_

index_type PFJetIDSelectionFunctor::indexCEF_TR_
private

Definition at line 929 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexCHF_

index_type PFJetIDSelectionFunctor::indexCHF_
private

Definition at line 922 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexMUF_

index_type PFJetIDSelectionFunctor::indexMUF_
private

Definition at line 919 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexMUF_TR_

index_type PFJetIDSelectionFunctor::indexMUF_TR_
private

Definition at line 928 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNCH_

index_type PFJetIDSelectionFunctor::indexNCH_
private

Definition at line 923 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNCH_TR_

index_type PFJetIDSelectionFunctor::indexNCH_TR_
private

Definition at line 927 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNConstituents_

index_type PFJetIDSelectionFunctor::indexNConstituents_
private

Definition at line 917 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_

index_type PFJetIDSelectionFunctor::indexNEF_
private

Definition at line 918 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_EC_

index_type PFJetIDSelectionFunctor::indexNEF_EC_
private

Definition at line 938 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_EC_L_

index_type PFJetIDSelectionFunctor::indexNEF_EC_L_
private

Definition at line 939 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_EC_U_

index_type PFJetIDSelectionFunctor::indexNEF_EC_U_
private

Definition at line 940 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_FW_

index_type PFJetIDSelectionFunctor::indexNEF_FW_
private

Definition at line 932 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNEF_TR_

index_type PFJetIDSelectionFunctor::indexNEF_TR_
private

Definition at line 926 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNHF_

index_type PFJetIDSelectionFunctor::indexNHF_
private

Definition at line 920 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNHF_EC_

index_type PFJetIDSelectionFunctor::indexNHF_EC_
private

Definition at line 937 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNHF_FW_

index_type PFJetIDSelectionFunctor::indexNHF_FW_
private

Definition at line 931 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNHF_TR_

index_type PFJetIDSelectionFunctor::indexNHF_TR_
private

Definition at line 925 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNNeutrals_EC_

index_type PFJetIDSelectionFunctor::indexNNeutrals_EC_
private

Definition at line 941 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNNeutrals_FW_

index_type PFJetIDSelectionFunctor::indexNNeutrals_FW_
private

Definition at line 933 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNNeutrals_FW_L_

index_type PFJetIDSelectionFunctor::indexNNeutrals_FW_L_
private

Definition at line 934 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ indexNNeutrals_FW_U_

index_type PFJetIDSelectionFunctor::indexNNeutrals_FW_U_
private

Definition at line 935 of file PFJetIDSelectionFunctor.h.

Referenced by firstDataCuts(), and initIndex().

◆ quality_

Quality_t PFJetIDSelectionFunctor::quality_
private

◆ version_

Version_t PFJetIDSelectionFunctor::version_
private
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
reco::PFJet::muonEnergy
float muonEnergy() const
muonEnergy
Definition: PFJet.h:111
PFJetIDSelectionFunctor::FIRSTDATA
Definition: PFJetIDSelectionFunctor.h:27
Selector< pat::Jet >::setIgnored
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:181
Selector< pat::Jet >::bits_
pat::strbitset bits_
the bitset indexed by strings
Definition: Selector.h:241
PFJetIDSelectionFunctor::indexNEF_EC_L_
index_type indexNEF_EC_L_
Definition: PFJetIDSelectionFunctor.h:939
Selector< pat::Jet >::index_type
pat::strbitset::index_type index_type
Definition: Selector.h:25
PFJetIDSelectionFunctor::indexNNeutrals_EC_
index_type indexNNeutrals_EC_
Definition: PFJetIDSelectionFunctor.h:941
PFJetIDSelectionFunctor::firstDataCuts
bool firstDataCuts(reco::Jet const &jet, pat::strbitset &ret, Version_t version_)
Definition: PFJetIDSelectionFunctor.h:246
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
PFJetIDSelectionFunctor::indexNEF_
index_type indexNEF_
Definition: PFJetIDSelectionFunctor.h:918
PFJetIDSelectionFunctor::N_QUALITY
Definition: PFJetIDSelectionFunctor.h:28
pat::strbitset::set
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:126
Selector< pat::Jet >::retInternal_
pat::strbitset retInternal_
internal ret if users don't care about return bits
Definition: Selector.h:242
Selector< pat::Jet >::ignoreCut
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:127
pat::Jet::neutralHadronEnergyFraction
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:404
PFJetIDSelectionFunctor::indexNConstituents_
index_type indexNConstituents_
Definition: PFJetIDSelectionFunctor.h:917
reco::candidate::const_iterator
Definition: const_iterator.h:14
PFJetIDSelectionFunctor::initIndex
void initIndex()
Definition: PFJetIDSelectionFunctor.h:836
cms::cuda::assert
assert(be >=bs)
PFJetIDSelectionFunctor::indexNHF_FW_
index_type indexNHF_FW_
Definition: PFJetIDSelectionFunctor.h:931
PFJetIDSelectionFunctor::WINTER16
Definition: PFJetIDSelectionFunctor.h:27
PFJetIDSelectionFunctor::indexNCH_
index_type indexNCH_
Definition: PFJetIDSelectionFunctor.h:923
PFJetIDSelectionFunctor::initCuts
void initCuts()
Definition: PFJetIDSelectionFunctor.h:611
PFJetIDSelectionFunctor::RUNIISTARTUP
Definition: PFJetIDSelectionFunctor.h:27
reco::PFJet::chargedHadronEnergy
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: PFJet.h:95
PFJetIDSelectionFunctor::indexNCH_TR_
index_type indexNCH_TR_
Definition: PFJetIDSelectionFunctor.h:927
reco::BasicJet
Jets made from CaloTowers.
Definition: BasicJet.h:19
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
reco::PFJet::HFEMEnergy
float HFEMEnergy() const
HFEMEnergy.
Definition: PFJet.h:119
pat::Jet::chargedHadronEnergy
float chargedHadronEnergy() const
chargedHadronEnergy
Definition: Jet.h:696
PFJetIDSelectionFunctor::indexNHF_TR_
index_type indexNHF_TR_
Definition: PFJetIDSelectionFunctor.h:925
Selector< pat::Jet >::push_back
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Definition: Selector.h:42
reco::PFJet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: PFJet.h:152
pat::Jet::neutralEmEnergy
float neutralEmEnergy() const
neutralEmEnergy
Definition: Jet.h:726
PFJetIDSelectionFunctor::WINTER17PUPPI
Definition: PFJetIDSelectionFunctor.h:27
PFJetIDSelectionFunctor::version_
Version_t version_
Definition: PFJetIDSelectionFunctor.h:914
reco::PFJet::chargedEmEnergy
float chargedEmEnergy() const
chargedEmEnergy
Definition: PFJet.h:139
PFJetIDSelectionFunctor::indexNHF_
index_type indexNHF_
Definition: PFJetIDSelectionFunctor.h:920
PFJetIDSelectionFunctor::SUMMER18PUPPI
Definition: PFJetIDSelectionFunctor.h:27
PFJetIDSelectionFunctor::indexMUF_TR_
index_type indexMUF_TR_
Definition: PFJetIDSelectionFunctor.h:928
PFJetIDSelectionFunctor::indexNNeutrals_FW_
index_type indexNNeutrals_FW_
Definition: PFJetIDSelectionFunctor.h:933
pat::Jet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: Jet.h:746
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat::Jet::neutralHadronEnergy
float neutralHadronEnergy() const
neutralHadronEnergy
Definition: Jet.h:706
PFJetIDSelectionFunctor::indexNEF_EC_
index_type indexNEF_EC_
Definition: PFJetIDSelectionFunctor.h:938
edm::LogWarning
Definition: MessageLogger.h:141
reco::PFJet::photonEnergy
float photonEnergy() const
photonEnergy
Definition: PFJet.h:103
Selector< pat::Jet >::getBitTemplate
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:168
pat::Jet::chargedEmEnergy
float chargedEmEnergy() const
chargedEmEnergy
Definition: Jet.h:716
PFJetIDSelectionFunctor::N_VERSIONS
Definition: PFJetIDSelectionFunctor.h:27
reco::Candidate::end
const_iterator end() const
last daughter const_iterator
Definition: Candidate.h:145
pat::Jet::neutralEmEnergyFraction
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:412
Selector< pat::Jet >::passCut
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:142
pat::Jet::isBasicJet
bool isBasicJet() const
check to see if the jet is no more than a reco::BasicJet
Definition: Jet.h:277
pat::Jet::neutralMultiplicity
int neutralMultiplicity() const
neutralMultiplicity
Definition: Jet.h:466
PFJetIDSelectionFunctor::indexNEF_EC_U_
index_type indexNEF_EC_U_
Definition: PFJetIDSelectionFunctor.h:940
PFJetIDSelectionFunctor::operator()
bool operator()(const pat::Jet &jet, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
Definition: PFJetIDSelectionFunctor.h:210
PFJetIDSelectionFunctor::indexNEF_TR_
index_type indexNEF_TR_
Definition: PFJetIDSelectionFunctor.h:926
PFJetIDSelectionFunctor::indexNNeutrals_FW_L_
index_type indexNNeutrals_FW_L_
Definition: PFJetIDSelectionFunctor.h:934
Selector< pat::Jet >::setIgnoredCuts
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
Definition: Selector.h:131
PFJetIDSelectionFunctor::indexMUF_
index_type indexMUF_
Definition: PFJetIDSelectionFunctor.h:919
PFJetIDSelectionFunctor::indexCHF_
index_type indexCHF_
Definition: PFJetIDSelectionFunctor.h:922
pat::Jet::isPFJet
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:275
pat::Jet::chargedEmEnergyFraction
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:408
PFJetIDSelectionFunctor::indexNEF_FW_
index_type indexNEF_FW_
Definition: PFJetIDSelectionFunctor.h:932
PFJetIDSelectionFunctor::TIGHT
Definition: PFJetIDSelectionFunctor.h:28
pat::Jet::muonEnergy
float muonEnergy() const
muonEnergy
Definition: Jet.h:430
PFJetIDSelectionFunctor::indexCEF_TR_
index_type indexCEF_TR_
Definition: PFJetIDSelectionFunctor.h:929
pat::Jet::chargedHadronEnergyFraction
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:400
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
Selector< pat::Jet >::cut
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:158
reco::PFJet::neutralHadronEnergy
float neutralHadronEnergy() const
neutralHadronEnergy
Definition: PFJet.h:99
metsig::jet
Definition: SignAlgoResolutions.h:47
pat::Jet::muonEnergyFraction
float muonEnergyFraction() const
muonEnergyFraction (relative to corrected jet energy)
Definition: Jet.h:432
reco::PFJet::neutralMultiplicity
int neutralMultiplicity() const
neutralMultiplicity
Definition: PFJet.h:154
PFJetIDSelectionFunctor::PFJetIDSelectionFunctor
PFJetIDSelectionFunctor()
Definition: PFJetIDSelectionFunctor.h:30
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
PFJetIDSelectionFunctor::TIGHTLEPVETO
Definition: PFJetIDSelectionFunctor.h:28
reco::PFJet::neutralEmEnergy
float neutralEmEnergy() const
neutralEmEnergy
Definition: PFJet.h:147
PFJetIDSelectionFunctor::WINTER17
Definition: PFJetIDSelectionFunctor.h:27
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
Selector< pat::Jet >::set
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
Definition: Selector.h:93
PFJetIDSelectionFunctor::SUMMER18
Definition: PFJetIDSelectionFunctor.h:27
PFJetIDSelectionFunctor::indexNNeutrals_FW_U_
index_type indexNNeutrals_FW_U_
Definition: PFJetIDSelectionFunctor.h:935
PFJetIDSelectionFunctor::quality_
Quality_t quality_
Definition: PFJetIDSelectionFunctor.h:915
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
PFJetIDSelectionFunctor::indexNHF_EC_
index_type indexNHF_EC_
Definition: PFJetIDSelectionFunctor.h:937
reco::Candidate::begin
const_iterator begin() const
first daughter const_iterator
Definition: Candidate.h:143
reco::PFJet::electronEnergy
float electronEnergy() const
electronEnergy
Definition: PFJet.h:107
PFJetIDSelectionFunctor::indexCEF_
index_type indexCEF_
Definition: PFJetIDSelectionFunctor.h:921
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
PFJetIDSelectionFunctor::LOOSE
Definition: PFJetIDSelectionFunctor.h:28