Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PFJet.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_PFJet_hh
2 #define ICHiggsTauTau_PFJet_hh
3 #include <map>
4 #include <string>
6 #include "Rtypes.h"
7 
8 namespace ic {
9 
14 class PFJet : public Jet {
15  public:
16  PFJet();
17  virtual ~PFJet();
18  virtual void Print() const;
19 
21 
22  inline int const& muon_multiplicity() const { return muon_multiplicity_; }
24 
26  inline int const& charged_multiplicity() const {
27  return charged_multiplicity_;
28  }
29 
31  inline int const& charged_had_multiplicity() const {
32  return charged_had_multiplicity_;
33  }
34 
36  inline int const& neutral_had_multiplicity() const {
37  return neutral_had_multiplicity_;
38  }
39 
41  inline int const& photon_multiplicity() const { return photon_multiplicity_; }
42 
44  inline int const& electron_multiplicity() const {
45  return electron_multiplicity_;
46  }
47 
49  inline int const& HF_had_multiplicity() const { return HF_had_multiplicity_; }
50 
52  inline int const& HF_em_multiplicity() const { return HF_em_multiplicity_; }
53 
55  inline int const& neutral_multiplicity() const {
56  return neutral_multiplicity_;
57  }
58 
60  inline float const& charged_em_energy() const { return charged_em_energy_; }
61 
63  inline float charged_em_energy_frac() const {
64  return (charged_em_energy_ / uncorrected_energy());
65  }
66 
68  inline float const& neutral_em_energy() const { return neutral_em_energy_; }
69 
71  inline float neutral_em_energy_frac() const {
72  return (neutral_em_energy_ / uncorrected_energy());
73  }
74 
76  inline float const& charged_had_energy() const { return charged_had_energy_; }
77 
79  inline float charged_had_energy_frac() const {
80  return (charged_had_energy_ / uncorrected_energy());
81  }
82 
84  inline float const& neutral_had_energy() const { return neutral_had_energy_; }
85 
87  inline float neutral_had_energy_frac() const {
88  return (neutral_had_energy_ / uncorrected_energy());
89  }
90 
92  inline float const& photon_energy() const { return photon_energy_; }
93 
95  inline float photon_energy_frac() const {
96  return (photon_energy_ / uncorrected_energy());
97  }
98 
100  inline float const& electron_energy() const { return electron_energy_; }
101 
103  inline float electron_energy_frac() const {
104  return (electron_energy_ / uncorrected_energy());
105  }
106 
108  inline float const& muon_energy() const { return muon_energy_; }
109 
111  inline float muon_energy_frac() const {
112  return (muon_energy_ / uncorrected_energy());
113  }
114 
116  inline float const& HF_had_energy() const { return HF_had_energy_; }
117 
119  inline float HF_had_energy_frac() const {
120  return (HF_had_energy_ / uncorrected_energy());
121  }
122 
124  inline float const& HF_em_energy() const { return HF_em_energy_; }
125 
127  inline float HF_em_energy_frac() const {
128  return (HF_em_energy_ / uncorrected_energy());
129  }
130 
132  inline float const& charged_mu_energy() const { return charged_mu_energy_; }
133 
135  inline float charged_mu_energy_frac() const {
136  return (charged_mu_energy_ / uncorrected_energy());
137  }
138 
155  inline float const& beta() const { return beta_; }
156 
159  inline float const& beta_max() const { return beta_max_; }
160 
162  inline float const& pu_id_mva_value() const { return pu_id_mva_value_; }
163 
164 
166 
170  inline bool pu_id_mva_loose() const {
171  // Pt2030_Loose = cms.vdouble(-0.80,-0.85,-0.84,-0.85),
172  // Pt3050_Loose = cms.vdouble(-0.80,-0.74,-0.68,-0.77)
173  // #4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0
174  double abs_eta = fabs(this->eta());
175  double pt = this->pt();
176  if (pt > 20. && pt <= 30) {
177  if (abs_eta < 2.5) {
178  return (pu_id_mva_value_ > -0.80);
179  } else if (abs_eta < 2.75) {
180  return (pu_id_mva_value_ > -0.85);
181  } else if (abs_eta < 3.0) {
182  return (pu_id_mva_value_ > -0.84);
183  } else if (abs_eta < 5.0) {
184  return (pu_id_mva_value_ > -0.85);
185  } else {
186  return true;
187  }
188  } else if (pt > 30.) {
189  if (abs_eta < 2.5) {
190  return (pu_id_mva_value_ > -0.80);
191  } else if (abs_eta < 2.75) {
192  return (pu_id_mva_value_ > -0.74);
193  } else if (abs_eta < 3.0) {
194  return (pu_id_mva_value_ > -0.68);
195  } else if (abs_eta < 5.0) {
196  return (pu_id_mva_value_ > -0.77);
197  } else {
198  return true;
199  }
200  } else {
201  return true;
202  }
203  }
204 
206  inline std::vector<std::size_t> const& constituent_tracks() const {
207  return constituent_tracks_;
208  }
209 
211  inline int const& charged_multiplicity_nopu() const {
212  return charged_multiplicity_nopu_;
213  }
214 
216 
224  inline float const& linear_radial_moment() const {
225  return linear_radial_moment_;
226  }
229 
233  inline void set_muon_multiplicity(int const& muon_multiplicity) {
235  muon_multiplicity_ = muon_multiplicity;
236  }
237 
240  charged_multiplicity_ = charged_multiplicity;
241  }
242 
245  int const& charged_had_multiplicity) {
246  charged_had_multiplicity_ = charged_had_multiplicity;
247  }
248 
251  int const& neutral_had_multiplicity) {
252  neutral_had_multiplicity_ = neutral_had_multiplicity;
253  }
254 
257  photon_multiplicity_ = photon_multiplicity;
258  }
259 
262  electron_multiplicity_ = electron_multiplicity;
263  }
264 
267  HF_had_multiplicity_ = HF_had_multiplicity;
268  }
269 
271  inline void set_HF_em_multiplicity(int const& HF_em_multiplicity) {
272  HF_em_multiplicity_ = HF_em_multiplicity;
273  }
274 
277  neutral_multiplicity_ = neutral_multiplicity;
278  }
279 
281  inline void set_charged_em_energy(float const& charged_em_energy) {
282  charged_em_energy_ = charged_em_energy;
283  }
284 
286  inline void set_neutral_em_energy(float const& neutral_em_energy) {
287  neutral_em_energy_ = neutral_em_energy;
288  }
289 
291  inline void set_charged_had_energy(float const& charged_had_energy) {
292  charged_had_energy_ = charged_had_energy;
293  }
294 
296  inline void set_neutral_had_energy(float const& neutral_had_energy) {
297  neutral_had_energy_ = neutral_had_energy;
298  }
299 
301  inline void set_photon_energy(float const& photon_energy) {
302  photon_energy_ = photon_energy;
303  }
304 
306  inline void set_electron_energy(float const& electron_energy) {
307  electron_energy_ = electron_energy;
308  }
309 
311  inline void set_muon_energy(float const& muon_energy) {
312  muon_energy_ = muon_energy;
313  }
314 
316  inline void set_HF_had_energy(float const& HF_had_energy) {
317  HF_had_energy_ = HF_had_energy;
318  }
319 
320 
322  inline void set_HF_em_energy(float const& HF_em_energy) {
323  HF_em_energy_ = HF_em_energy;
324  }
325 
327  inline void set_charged_mu_energy(float const& charged_mu_energy) {
328  charged_mu_energy_ = charged_mu_energy;
329  }
330 
332  inline void set_beta(float const& beta) { beta_ = beta; }
333 
335  inline void set_beta_max(float const& beta_max) { beta_max_ = beta_max; }
336 
338  inline void set_pu_id_mva_value(float const& pu_id_mva_value) {
339  pu_id_mva_value_ = pu_id_mva_value;
340  }
341 
344  std::vector<std::size_t> const& constituent_tracks) {
345  constituent_tracks_ = constituent_tracks;
346  }
347 
350  int const& charged_multiplicity_nopu) {
351  charged_multiplicity_nopu_ = charged_multiplicity_nopu;
352  }
353 
355  inline void set_linear_radial_moment(float const& linear_radial_moment) {
356  linear_radial_moment_ = linear_radial_moment;
357  }
360  private:
361  int muon_multiplicity_;
362  int charged_multiplicity_;
363  int charged_had_multiplicity_;
364  int neutral_had_multiplicity_;
365  int photon_multiplicity_;
366  int electron_multiplicity_;
367  int HF_had_multiplicity_;
368  int HF_em_multiplicity_;
369  int neutral_multiplicity_;
370 
371  float charged_em_energy_;
372  float neutral_em_energy_;
373  float charged_had_energy_;
374  float neutral_had_energy_;
375  float photon_energy_;
376  float electron_energy_;
377  float muon_energy_;
378  float HF_had_energy_;
379  float HF_em_energy_;
380  float charged_mu_energy_;
381 
382  float beta_;
383  float beta_max_;
384 
385  float pu_id_mva_value_;
386 
387  std::vector<std::size_t> constituent_tracks_;
388 
389  float linear_radial_moment_;
390  int charged_multiplicity_nopu_;
391 
392  #ifndef SKIP_CINT_DICT
393  public:
394  ClassDef(PFJet, 2);
395  #endif
396 };
397 
398 typedef std::vector<ic::PFJet> PFJetCollection;
399 }
400 #endif
float neutral_had_energy_frac() const
Calculates the neutral hadron fraction of the raw jet energy.
Definition: PFJet.hh:87
void set_neutral_had_multiplicity(int const &neutral_had_multiplicity)
Number of neutral hadron constituents.
Definition: PFJet.hh:250
float electron_energy_frac() const
Calculates the electron fraction of the raw jet energy.
Definition: PFJet.hh:103
float HF_em_energy_frac() const
Calculates the HF electromagnetic fraction of the raw jet energy.
Definition: PFJet.hh:127
int const & HF_em_multiplicity() const
Number of PF HF electromagnetic constituents.
Definition: PFJet.hh:52
int const & neutral_multiplicity() const
Number of neutral constituents.
Definition: PFJet.hh:55
float charged_em_energy_frac() const
Calculates the charged electromagnetic fraction of the raw jet energy.
Definition: PFJet.hh:63
float const & linear_radial_moment() const
Used for quark-gluon discrimination.
Definition: PFJet.hh:224
void set_neutral_em_energy(float const &neutral_em_energy)
Neutral electromagnetic energy.
Definition: PFJet.hh:286
float const & charged_had_energy() const
Charged hadron energy.
Definition: PFJet.hh:76
void set_muon_multiplicity(int const &muon_multiplicity)
Number of PF muon constituents.
Definition: PFJet.hh:234
float const & beta_max() const
The largest value of beta() obtained when it is evaluated for every vertex in the event...
Definition: PFJet.hh:159
std::vector< ic::PFJet > PFJetCollection
Definition: PFJet.hh:398
void set_HF_had_energy(float const &HF_had_energy)
HF hadronic energy.
Definition: PFJet.hh:316
void set_charged_multiplicity_nopu(int const &charged_multiplicity_nopu)
The number of charged constituents associated to the PV.
Definition: PFJet.hh:349
virtual ~PFJet()
Definition: PFJet.cc:32
float const & charged_em_energy() const
Charged electromagnetic energy.
Definition: PFJet.hh:60
float const & photon_energy() const
Photon energy.
Definition: PFJet.hh:92
ClassDef(PFJet, 2)
std::vector< std::size_t > const & constituent_tracks() const
A vector to refer to the constituent track ic::Track::id() values.
Definition: PFJet.hh:206
void set_photon_multiplicity(int const &photon_multiplicity)
Number of PF photon constituents.
Definition: PFJet.hh:256
int const & electron_multiplicity() const
Number of PF electron constituents.
Definition: PFJet.hh:44
int const & muon_multiplicity() const
Number of PF muon constituents.
Definition: PFJet.hh:23
int const & photon_multiplicity() const
Number of PF photon constituents.
Definition: PFJet.hh:41
void set_linear_radial_moment(float const &linear_radial_moment)
Used for quark-gluon discrimination.
Definition: PFJet.hh:355
int const & charged_had_multiplicity() const
Number of charged hadron constituents.
Definition: PFJet.hh:31
float const & pu_id_mva_value() const
The output of the pileup ID MVA.
Definition: PFJet.hh:162
PFJet()
Definition: PFJet.cc:5
void set_electron_multiplicity(int const &electron_multiplicity)
Number of PF electron constituents.
Definition: PFJet.hh:261
void set_beta(float const &beta)
The fraction of the constituent track momentum associated to the primary vertex.
Definition: PFJet.hh:332
void set_charged_multiplicity(int const &charged_multiplicity)
Number of charged constituents.
Definition: PFJet.hh:239
Definition: CaloJet.hh:9
float const & electron_energy() const
Electron energy.
Definition: PFJet.hh:100
float const & beta() const
The fraction of the constituent track momentum associated to the primary vertex.
Definition: PFJet.hh:155
int const & neutral_had_multiplicity() const
Number of neutral hadron constituents.
Definition: PFJet.hh:36
float HF_had_energy_frac() const
Calculates the HF hadronic fraction of the raw jet energy.
Definition: PFJet.hh:119
int const & charged_multiplicity() const
Number of charged constituents.
Definition: PFJet.hh:26
float charged_had_energy_frac() const
Calculates the charged hadron fraction of the raw jet energy.
Definition: PFJet.hh:79
void set_charged_had_energy(float const &charged_had_energy)
Charged hadron energy.
Definition: PFJet.hh:291
double eta() const
Direct access to .
Definition: Candidate.hh:45
void set_HF_em_multiplicity(int const &HF_em_multiplicity)
Number of PF HF electromagnetic constituents.
Definition: PFJet.hh:271
void set_charged_had_multiplicity(int const &charged_had_multiplicity)
Number of charged hadron constituents.
Definition: PFJet.hh:244
void set_HF_had_multiplicity(int const &HF_had_multiplicity)
Number PF HF hadronic constituents.
Definition: PFJet.hh:266
void set_pu_id_mva_value(float const &pu_id_mva_value)
The output of the pileup ID MVA.
Definition: PFJet.hh:338
double const & uncorrected_energy() const
The raw value of the jet energy.
Definition: Jet.hh:67
float charged_mu_energy_frac() const
Calculates the muon fraction of the raw jet energy.
Definition: PFJet.hh:135
void set_charged_mu_energy(float const &charged_mu_energy)
Muon energy.
Definition: PFJet.hh:327
void set_muon_energy(float const &muon_energy)
Muon energy.
Definition: PFJet.hh:311
bool pu_id_mva_loose() const
Whether the loose working point of the MVA ID is passed.
Definition: PFJet.hh:170
void set_electron_energy(float const &electron_energy)
Electron energy.
Definition: PFJet.hh:306
float muon_energy_frac() const
Calculates the muon fraction of the raw jet energy.
Definition: PFJet.hh:111
void set_charged_em_energy(float const &charged_em_energy)
Charged electromagnetic energy.
Definition: PFJet.hh:281
float photon_energy_frac() const
Calculates the photon fraction of the raw jet energy.
Definition: PFJet.hh:95
float const & neutral_em_energy() const
Neutral electromagnetic energy.
Definition: PFJet.hh:68
void set_HF_em_energy(float const &HF_em_energy)
HF electromagnetic energy.
Definition: PFJet.hh:322
float const & HF_em_energy() const
HF electromagnetic energy.
Definition: PFJet.hh:124
A class deriving from ic::Jet that provides specific information for particle-flow jets...
Definition: PFJet.hh:14
float const & muon_energy() const
Muon energy.
Definition: PFJet.hh:108
float const & HF_had_energy() const
HF hadronic energy.
Definition: PFJet.hh:116
void set_beta_max(float const &beta_max)
The largest value of beta() obtained when it is evaluated for every vertex in the event...
Definition: PFJet.hh:335
float const & charged_mu_energy() const
Muon energy.
Definition: PFJet.hh:132
void set_constituent_tracks(std::vector< std::size_t > const &constituent_tracks)
A vector to refer to the constituent track ic::Track::id() values.
Definition: PFJet.hh:343
void set_neutral_multiplicity(int const &neutral_multiplicity)
Number of neutral constituents.
Definition: PFJet.hh:276
int const & HF_had_multiplicity() const
Number PF HF hadronic constituents.
Definition: PFJet.hh:49
void set_neutral_had_energy(float const &neutral_had_energy)
Neutral hadron energy.
Definition: PFJet.hh:296
float neutral_em_energy_frac() const
Calculates the neutral electromagnetic fraction of the raw jet energy.
Definition: PFJet.hh:71
int const & charged_multiplicity_nopu() const
The number of charged constituents associated to the PV.
Definition: PFJet.hh:211
void set_photon_energy(float const &photon_energy)
Photon energy.
Definition: PFJet.hh:301
double pt() const
Direct access to the .
Definition: Candidate.hh:42
virtual void Print() const
Definition: PFJet.cc:34
float const & neutral_had_energy() const
Neutral hadron energy.
Definition: PFJet.hh:84
A basic jet class to store properties common to all jet types.
Definition: Jet.hh:17