Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Electron.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Electron_hh
2 #define ICHiggsTauTau_Electron_hh
3 #include <map>
4 #include <string>
5 #include "Math/Vector4D.h"
6 #include "Math/Vector4Dfwd.h"
7 #include "Math/Point3D.h"
8 #include "Math/Point3Dfwd.h"
10 #include "Rtypes.h"
11 
12 namespace ic {
13 
26 class Electron : public Candidate {
27  private:
28  typedef ROOT::Math::XYZPoint Point;
29  typedef std::map<std::size_t, float> UFmap;
30 
31  public:
32  Electron();
33  virtual ~Electron();
34  virtual void Print() const;
35 
37 
38 
45  inline std::vector<std::size_t> const& gen_particles() const {
46  return gen_particles_;
47  }
48 
50  inline Point const& ref_point() const { return ref_point_; }
51 
53  inline float dr03_tk_sum_pt() const { return dr03_tk_sum_pt_; }
54 
56  inline float dr03_ecal_rechit_sum_et() const {
57  return dr03_ecal_rechit_sum_et_;
58  }
59 
61  inline float dr03_hcal_tower_sum_et() const {
62  return dr03_hcal_tower_sum_et_;
63  }
64 
66  inline float ecal_pf_cluster_iso() const {
67  return ecal_pf_cluster_iso_;
68  }
69 
71  inline float hcal_pf_cluster_iso() const {
72  return hcal_pf_cluster_iso_;
73  }
74 
77  inline float dr03_pfiso_charged_all() const {
78  return dr03_pfiso_charged_all_;
79  }
80 
82  inline float dr03_pfiso_charged() const { return dr03_pfiso_charged_; }
83 
85  inline float dr03_pfiso_neutral() const { return dr03_pfiso_neutral_; }
86 
88  inline float dr03_pfiso_gamma() const { return dr03_pfiso_gamma_; }
89 
91  inline float dr03_pfiso_pu() const { return dr03_pfiso_pu_; }
92 
95  inline float dr04_pfiso_charged_all() const {
96  return dr04_pfiso_charged_all_;
97  }
98 
100  inline float dr04_pfiso_charged() const { return dr04_pfiso_charged_; }
101 
103  inline float dr04_pfiso_neutral() const { return dr04_pfiso_neutral_; }
104 
106  inline float dr04_pfiso_gamma() const { return dr04_pfiso_gamma_; }
107 
109  inline float dr04_pfiso_pu() const { return dr04_pfiso_pu_; }
110 
112  inline float hadronic_over_em() const { return hadronic_over_em_; }
113 
116  inline float full5x5_sigma_IetaIeta() const { return full5x5_sigma_IetaIeta_; }
117 
121  inline float sigma_IetaIeta() const { return sigma_IetaIeta_; }
122 
125  inline float dphi_sc_tk_at_vtx() const { return dphi_sc_tk_at_vtx_; }
126 
129  inline float deta_sc_tk_at_vtx() const { return deta_sc_tk_at_vtx_; }
130 
133  inline int gsf_tk_nhits() const { return gsf_tk_nhits_; }
134 
136  inline float conv_dist() const { return conv_dist_; }
137 
140  inline float conv_dcot() const { return conv_dcot_; }
141 
143  inline float f_brem() const { return f_brem_; }
144 
146  inline float sc_eta() const { return sc_eta_; }
147 
149  inline float sc_seed_eta() const { return sc_seed_eta_; }
150 
152  inline float sc_theta() const { return sc_theta_; }
153 
155  inline float sc_energy() const { return sc_energy_; }
156 
159  inline float sc_e_over_p() const { return sc_e_over_p_; }
160 
163  inline float r9() const { return r9_; }
164 
166  inline float hcal_sum() const { return hcal_sum_; }
167 
169  inline float ecal_energy() const { return ecal_energy_; }
170 
172  inline bool has_matched_conversion() const { return has_matched_conversion_; }
173 
175  inline double vx() const { return ref_point_.x(); }
176 
178  inline double vy() const { return ref_point_.y(); }
179 
181  inline double vz() const { return ref_point_.z(); }
182 
184  inline double dxy_vertex() const { return dxy_vertex_; }
185 
187  inline double dz_vertex() const { return dz_vertex_; }
188 
190  inline double dxy_beamspot() const { return dxy_beamspot_; }
193 
195  inline void set_gen_particles(std::vector<std::size_t> const& gen_particles) {
197  gen_particles_ = gen_particles;
198  }
199 
201  inline void set_ref_point(Point const& ref_point) { ref_point_ = ref_point; }
202 
204  inline void set_dr03_tk_sum_pt(float const& dr03_tk_sum_pt) {
205  dr03_tk_sum_pt_ = dr03_tk_sum_pt;
206  }
207 
210  float const& dr03_ecal_rechit_sum_et) {
211  dr03_ecal_rechit_sum_et_ = dr03_ecal_rechit_sum_et;
212  }
213 
216  dr03_hcal_tower_sum_et_ = dr03_hcal_tower_sum_et;
217  }
218 
220  inline void set_ecal_pf_cluster_iso(float const& ecal_pf_cluster_iso) {
221  ecal_pf_cluster_iso_ = ecal_pf_cluster_iso;
222  }
223 
225  inline void set_hcal_pf_cluster_iso(float const& hcal_pf_cluster_iso){
226  hcal_pf_cluster_iso_ = hcal_pf_cluster_iso;
227  }
228 
231  dr03_pfiso_charged_all_ = dr03_pfiso_charged_all;
232  }
233 
235  inline void set_dr03_pfiso_charged(float const& dr03_pfiso_charged) {
236  dr03_pfiso_charged_ = dr03_pfiso_charged;
237  }
238 
240  inline void set_dr03_pfiso_neutral(float const& dr03_pfiso_neutral) {
241  dr03_pfiso_neutral_ = dr03_pfiso_neutral;
242  }
243 
245  inline void set_dr03_pfiso_gamma(float const& dr03_pfiso_gamma) {
246  dr03_pfiso_gamma_ = dr03_pfiso_gamma;
247  }
248 
250  inline void set_dr03_pfiso_pu(float const& dr03_pfiso_pu) {
251  dr03_pfiso_pu_ = dr03_pfiso_pu;
252  }
253 
256  dr04_pfiso_charged_all_ = dr04_pfiso_charged_all;
257  }
258 
260  inline void set_dr04_pfiso_charged(float const& dr04_pfiso_charged) {
261  dr04_pfiso_charged_ = dr04_pfiso_charged;
262  }
263 
265  inline void set_dr04_pfiso_neutral(float const& dr04_pfiso_neutral) {
266  dr04_pfiso_neutral_ = dr04_pfiso_neutral;
267  }
268 
270  inline void set_dr04_pfiso_gamma(float const& dr04_pfiso_gamma) {
271  dr04_pfiso_gamma_ = dr04_pfiso_gamma;
272  }
273 
275  inline void set_dr04_pfiso_pu(float const& dr04_pfiso_pu) {
276  dr04_pfiso_pu_ = dr04_pfiso_pu;
277  }
278 
280  inline void set_hadronic_over_em(float const& hadronic_over_em) {
281  hadronic_over_em_ = hadronic_over_em;
282  }
283 
286  full5x5_sigma_IetaIeta_ = full5x5_sigma_IetaIeta;
287  }
288 
289 
291  inline void set_sigma_IetaIeta(float const& sigma_IetaIeta) {
292  sigma_IetaIeta_ = sigma_IetaIeta;
293  }
294 
296  inline void set_dphi_sc_tk_at_vtx(float const& dphi_sc_tk_at_vtx) {
297  dphi_sc_tk_at_vtx_ = dphi_sc_tk_at_vtx;
298  }
299 
301  inline void set_deta_sc_tk_at_vtx(float const& deta_sc_tk_at_vtx) {
302  deta_sc_tk_at_vtx_ = deta_sc_tk_at_vtx;
303  }
304 
306  inline void set_gsf_tk_nhits(int const& gsf_tk_nhits) {
307  gsf_tk_nhits_ = gsf_tk_nhits;
308  }
309 
310 
312  inline void set_conv_dist(float const& conv_dist) { conv_dist_ = conv_dist; }
313 
315  inline void set_conv_dcot(float const& conv_dcot) { conv_dcot_ = conv_dcot; }
316 
318  inline void set_f_brem(float const& f_brem) { f_brem_ = f_brem; }
319 
321  inline void set_sc_eta(float const& sc_eta) { sc_eta_ = sc_eta; }
322 
324  inline void set_sc_seed_eta(float const& sc_seed_eta) { sc_seed_eta_ = sc_seed_eta; }
325 
327  inline void set_sc_theta(float const& sc_theta) { sc_theta_ = sc_theta; }
328 
330  inline void set_sc_energy(float const& sc_energy) { sc_energy_ = sc_energy; }
331 
333  inline void set_sc_e_over_p(float const& sc_e_over_p) {
334  sc_e_over_p_ = sc_e_over_p;
335  }
336 
338  inline void set_r9(float const& r9) { r9_ = r9; }
339 
341  inline void set_hcal_sum(float const& hcal_sum) { hcal_sum_ = hcal_sum; }
342 
344  inline void set_ecal_energy(float const& ecal_energy) {
345  ecal_energy_ = ecal_energy;
346  }
347 
350  has_matched_conversion_ = has_matched_conversion;
351  }
352 
354  inline void set_vx(double const& x) { ref_point_.SetX(x); }
355 
357  inline void set_vy(double const& y) { ref_point_.SetY(y); }
358 
360  inline void set_vz(double const& z) { ref_point_.SetZ(z); }
361 
363  inline void set_dxy_vertex(double const& dxy_vertex) {
364  dxy_vertex_ = dxy_vertex;
365  }
366 
368  inline void set_dz_vertex(double const& dz_vertex) { dz_vertex_ = dz_vertex; }
369 
371  inline void set_dxy_beamspot(double const& dxy_beamspot) {
372  dxy_beamspot_ = dxy_beamspot;
373  }
388  void SetIdIso(std::string const& name, float const& value);
394  bool HasIdIso(std::string const& name) const;
400  float GetIdIso(std::string const& name) const;
403  private:
404  // SimpleCutBasedEleID Variable:
405  // https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID
406  float dr03_tk_sum_pt_;
407  float dr03_ecal_rechit_sum_et_;
408  float dr03_hcal_tower_sum_et_;
409 
410  //ecal/hcal pf cluster isolation
411  float ecal_pf_cluster_iso_;
412  float hcal_pf_cluster_iso_;
413 
414  // PF-based isolation variables
415  float dr03_pfiso_charged_all_;
416  float dr03_pfiso_charged_;
417  float dr03_pfiso_neutral_;
418  float dr03_pfiso_gamma_;
419  float dr03_pfiso_pu_;
420  float dr04_pfiso_charged_all_;
421  float dr04_pfiso_charged_;
422  float dr04_pfiso_neutral_;
423  float dr04_pfiso_gamma_;
424  float dr04_pfiso_pu_;
425 
426  float hadronic_over_em_;
427  float full5x5_sigma_IetaIeta_;
428  float sigma_IetaIeta_;
429  float dphi_sc_tk_at_vtx_;
430  float deta_sc_tk_at_vtx_;
431  int gsf_tk_nhits_;
432  float conv_dist_;
433  float conv_dcot_;
434 
435  float f_brem_;
436  float sc_eta_;
437  float sc_seed_eta_;
438  float sc_theta_;
439  float sc_e_over_p_;
440  float sc_energy_;
441  float r9_;
442  float hcal_sum_;
443 
444  float ecal_energy_;
445  bool has_matched_conversion_;
446 
447  Point ref_point_;
448 
449  double dxy_vertex_;
450  double dz_vertex_;
451  double dxy_beamspot_;
452 
453  std::vector<std::size_t> gen_particles_;
454 
455  UFmap elec_idiso_;
456 
457  #ifndef SKIP_CINT_DICT
458  public:
459  ClassDef(Electron, 5);
460  #endif
461 };
462 
463 typedef std::vector<ic::Electron> ElectronCollection;
464 }
465 
467 #endif
float sc_eta() const
Supercluster .
Definition: Electron.hh:146
void set_full5x5_sigma_IetaIeta(float const &full5x5_sigma_IetaIeta)
Weighted cluster RMS in the -direction, measured in units of crystals in a 5x5 block centred on the s...
Definition: Electron.hh:285
void set_vz(double const &z)
The z-coordinate of the ref_point()
Definition: Electron.hh:360
void set_has_matched_conversion(bool const &has_matched_conversion)
True if electron is matched to a conversion vertex.
Definition: Electron.hh:349
float sigma_IetaIeta() const
Weighted cluster RMS in the -direction, measured in units of crystals in a 5x5 block centred on the s...
Definition: Electron.hh:121
double dxy_vertex() const
Transverse impact parameter of the GSF track with the primary vertex.
Definition: Electron.hh:184
double vy() const
The y-coordinate of the ref_point()
Definition: Electron.hh:178
void set_dphi_sc_tk_at_vtx(float const &dphi_sc_tk_at_vtx)
between the supercluster and track, where the latter is evaluated from the vertex position ...
Definition: Electron.hh:296
void set_dz_vertex(double const &dz_vertex)
Longitudinal impact parameter of the GSF track with the primary vertex.
Definition: Electron.hh:368
int gsf_tk_nhits() const
Number of tracker layers between the vertex and the first detected hit the electron should have trave...
Definition: Electron.hh:133
float sc_seed_eta() const
Supercluster seed .
Definition: Electron.hh:149
float dr04_pfiso_pu() const
PF isolation, using charged pileup in a cone with .
Definition: Electron.hh:109
void set_hcal_pf_cluster_iso(float const &hcal_pf_cluster_iso)
HCAL PF cluster isolation.
Definition: Electron.hh:225
void set_hcal_sum(float const &hcal_sum)
Calorimeter tower isolation sum.
Definition: Electron.hh:341
float dr03_pfiso_neutral() const
PF isolation, using neutral hadrons in a cone with .
Definition: Electron.hh:85
void set_dr03_pfiso_pu(float const &dr03_pfiso_pu)
PF isolation, using charged pileup in a cone with .
Definition: Electron.hh:250
void set_dr04_pfiso_charged_all(float const &dr04_pfiso_charged_all)
PF isolation, using all charged particles in a cone with .
Definition: Electron.hh:255
float f_brem() const
Fraction of momentum lost as bremsstrahlung, as measured in the GSF fit.
Definition: Electron.hh:143
float ecal_pf_cluster_iso() const
ECAL PF cluster isolation.
Definition: Electron.hh:66
void set_deta_sc_tk_at_vtx(float const &deta_sc_tk_at_vtx)
between the supercluster and track, where the latter is evaluated from the vertex position ...
Definition: Electron.hh:301
This class stores a subset of the reco::GsfElectron properties which are most commonly used in analys...
Definition: Electron.hh:26
void SetIdIso(std::string const &name, float const &value)
Add a new entry, overwriting any existing one with the same name.
Definition: Electron.cc:48
float sc_e_over_p() const
Ratio of supercluster energy to track momentum, where the latter is evaluated at the PCA to the beams...
Definition: Electron.hh:159
float dr03_pfiso_charged_all() const
PF isolation, using all charged particles in a cone with .
Definition: Electron.hh:77
virtual void Print() const
Definition: Electron.cc:67
bool HasIdIso(std::string const &name) const
Check if a value with label name has already been defined.
Definition: Electron.cc:52
float dr04_pfiso_charged() const
PF isolation, using charged hadrons in a cone with .
Definition: Electron.hh:100
void set_sc_theta(float const &sc_theta)
Supercluster .
Definition: Electron.hh:327
float dr03_ecal_rechit_sum_et() const
ECAL isolation in a cone with .
Definition: Electron.hh:56
void set_dr03_pfiso_charged(float const &dr03_pfiso_charged)
PF isolation, using charged hadrons in a cone with .
Definition: Electron.hh:235
Stores a four-momentum, charge and identifier, and is the base class for most other physics objects...
Definition: Candidate.hh:13
float conv_dist() const
Minimum distance between conversion tracks (if found)
Definition: Electron.hh:136
float sc_energy() const
Supercluster energy.
Definition: Electron.hh:155
void set_sc_energy(float const &sc_energy)
Supercluster energy.
Definition: Electron.hh:330
float dr04_pfiso_gamma() const
PF isolation, using photons in a cone with .
Definition: Electron.hh:106
void set_dr03_pfiso_gamma(float const &dr03_pfiso_gamma)
PF isolation, using photons in a cone with .
Definition: Electron.hh:245
void set_dr04_pfiso_pu(float const &dr04_pfiso_pu)
PF isolation, using charged pileup in a cone with .
Definition: Electron.hh:275
virtual ~Electron()
Definition: Electron.cc:46
void set_dr04_pfiso_charged(float const &dr04_pfiso_charged)
PF isolation, using charged hadrons in a cone with .
Definition: Electron.hh:260
float conv_dcot() const
between conversion tracks at the conversion vertex
Definition: Electron.hh:140
Definition: CaloJet.hh:9
void set_sc_eta(float const &sc_eta)
Supercluster .
Definition: Electron.hh:321
void set_ecal_pf_cluster_iso(float const &ecal_pf_cluster_iso)
ECAL PF cluster isolation.
Definition: Electron.hh:220
void set_f_brem(float const &f_brem)
Fraction of momentum lost as bremsstrahlung, as measured in the GSF fit.
Definition: Electron.hh:318
std::vector< ic::Electron > ElectronCollection
Definition: Electron.hh:463
void set_sc_seed_eta(float const &sc_seed_eta)
Supercluster seed .
Definition: Electron.hh:324
float r9() const
The ratio of the energy in the 3x3 crystal array centred on the seed over the energy of the complete ...
Definition: Electron.hh:163
void set_vx(double const &x)
The x-coordinate of the ref_point()
Definition: Electron.hh:354
Point const & ref_point() const
Point-of-closest-approach (PCA) of the electron track to the beamspot.
Definition: Electron.hh:50
void set_dr03_hcal_tower_sum_et(float const &dr03_hcal_tower_sum_et)
HCAL isolation in a cone with .
Definition: Electron.hh:215
void set_dr03_pfiso_charged_all(float const &dr03_pfiso_charged_all)
PF isolation, using all charged particles in a cone with .
Definition: Electron.hh:230
void set_dr04_pfiso_gamma(float const &dr04_pfiso_gamma)
PF isolation, using photons in a cone with .
Definition: Electron.hh:270
float dr03_pfiso_pu() const
PF isolation, using charged pileup in a cone with .
Definition: Electron.hh:91
ClassDef(Electron, 5)
void set_conv_dist(float const &conv_dist)
Minimum distance between conversion tracks (if found)
Definition: Electron.hh:312
float dr04_pfiso_neutral() const
PF isolation, using neutral hadrons in a cone with .
Definition: Electron.hh:103
void set_dr03_tk_sum_pt(float const &dr03_tk_sum_pt)
Tracker isolation in a cone with .
Definition: Electron.hh:204
void set_ref_point(Point const &ref_point)
Point-of-closest-approach (PCA) of the electron track to the beamspot.
Definition: Electron.hh:201
float full5x5_sigma_IetaIeta() const
Weighted cluster RMS in the -direction, measured in units of crystals in a 5x5 block centred on the s...
Definition: Electron.hh:116
void set_dxy_beamspot(double const &dxy_beamspot)
Transverse impact parameter of the GSF track with the beamspot.
Definition: Electron.hh:371
float dr03_pfiso_gamma() const
PF isolation, using photons in a cone with .
Definition: Electron.hh:88
float deta_sc_tk_at_vtx() const
between the supercluster and track, where the latter is evaluated from the vertex position ...
Definition: Electron.hh:129
double dz_vertex() const
Longitudinal impact parameter of the GSF track with the primary vertex.
Definition: Electron.hh:187
double vz() const
The z-coordinate of the ref_point()
Definition: Electron.hh:181
void set_gen_particles(std::vector< std::size_t > const &gen_particles)
A vector to refer to ic::GenParticle::id() values.
Definition: Electron.hh:196
float dr04_pfiso_charged_all() const
PF isolation, using all charged particles in a cone with .
Definition: Electron.hh:95
float hcal_pf_cluster_iso() const
HCAL PF cluster isolation.
Definition: Electron.hh:71
void set_hadronic_over_em(float const &hadronic_over_em)
Ratio of HCAL to supercluster energy in the region of the electron hit.
Definition: Electron.hh:280
float dphi_sc_tk_at_vtx() const
between the supercluster and track, where the latter is evaluated from the vertex position ...
Definition: Electron.hh:125
void set_gsf_tk_nhits(int const &gsf_tk_nhits)
Number of tracker layers between the vertex and the first detected hit the electron should have trave...
Definition: Electron.hh:306
float dr03_tk_sum_pt() const
Tracker isolation in a cone with .
Definition: Electron.hh:53
float hadronic_over_em() const
Ratio of HCAL to supercluster energy in the region of the electron hit.
Definition: Electron.hh:112
void set_sigma_IetaIeta(float const &sigma_IetaIeta)
Weighted cluster RMS in the -direction, measured in units of crystals in a 5x5 block centred on the s...
Definition: Electron.hh:291
bool has_matched_conversion() const
True if electron is matched to a conversion vertex.
Definition: Electron.hh:172
void set_r9(float const &r9)
The ratio of the energy in the 3x3 crystal array centred on the seed over the energy of the complete ...
Definition: Electron.hh:338
double dxy_beamspot() const
Transverse impact parameter of the GSF track with the beamspot.
Definition: Electron.hh:190
float dr03_hcal_tower_sum_et() const
HCAL isolation in a cone with .
Definition: Electron.hh:61
void set_vy(double const &y)
The y-coordinate of the ref_point()
Definition: Electron.hh:357
double vx() const
The x-coordinate of the ref_point()
Definition: Electron.hh:175
float GetIdIso(std::string const &name) const
Get the value associated to a label.
Definition: Electron.cc:56
void set_dr03_pfiso_neutral(float const &dr03_pfiso_neutral)
PF isolation, using neutral hadrons in a cone with .
Definition: Electron.hh:240
float dr03_pfiso_charged() const
PF isolation, using charged hadrons in a cone with .
Definition: Electron.hh:82
void set_conv_dcot(float const &conv_dcot)
between conversion tracks at the conversion vertex
Definition: Electron.hh:315
void set_ecal_energy(float const &ecal_energy)
The corrected supercluster energy.
Definition: Electron.hh:344
void set_dr03_ecal_rechit_sum_et(float const &dr03_ecal_rechit_sum_et)
ECAL isolation in a cone with .
Definition: Electron.hh:209
void set_dr04_pfiso_neutral(float const &dr04_pfiso_neutral)
PF isolation, using neutral hadrons in a cone with .
Definition: Electron.hh:265
void set_dxy_vertex(double const &dxy_vertex)
Transverse impact parameter of the GSF track with the primary vertex.
Definition: Electron.hh:363
std::vector< std::size_t > const & gen_particles() const
A vector to refer to ic::GenParticle::id() values.
Definition: Electron.hh:45
float sc_theta() const
Supercluster .
Definition: Electron.hh:152
float hcal_sum() const
Calorimeter tower isolation sum.
Definition: Electron.hh:166
float ecal_energy() const
The corrected supercluster energy.
Definition: Electron.hh:169
void set_sc_e_over_p(float const &sc_e_over_p)
Ratio of supercluster energy to track momentum, where the latter is evaluated at the PCA to the beams...
Definition: Electron.hh:333