Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Jet.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Jet_hh
2 #define ICHiggsTauTau_Jet_hh
3 #include <map>
4 #include <string>
5 #include <vector>
7 #include "Rtypes.h"
8 
9 namespace ic {
10 
17 class Jet : public Candidate {
18  private:
19  typedef std::map<std::size_t, float> UFmap;
20  typedef std::map<std::size_t, std::string> TSmap;
21 
22  public:
23  Jet();
24  virtual ~Jet();
25  virtual void Print() const;
26 
28 
40  inline std::map<std::size_t, float> const& jec_factors() const {
41  return jec_factors_;
42  }
43 
46  inline std::map<std::size_t, float> const& b_discriminators() const {
47  return b_discriminators_;
48  }
49 
51 
56  inline std::vector<std::size_t> const& gen_particles() const {
57  return gen_particles_;
58  }
59 
62  inline std::vector<std::size_t> const& secondary_vertices() const {
63  return secondary_vertices_;
64  }
65 
67  inline double const& uncorrected_energy() const {
68  return uncorrected_energy_;
69  }
70 
72  inline float const& jet_area() const { return jet_area_; }
73 
77  inline int const& parton_flavour() const { return parton_flavour_; }
78 
81  inline int const& hadron_flavour() const { return hadron_flavour_; }
82 
85  float GetJecFactor(std::string const& name) const;
86 
89  float GetBDiscriminator(std::string const& name) const;
92 
94  inline void set_jec_factors(std::map<std::size_t, float> const& jec_factors) {
96  jec_factors_ = jec_factors;
97  }
98 
100  inline void set_b_discriminators(
101  std::map<std::size_t, float> const& b_discriminators) {
102  b_discriminators_ = b_discriminators;
103  }
104 
106  inline void set_gen_particles(std::vector<std::size_t> const& gen_particles) {
107  gen_particles_ = gen_particles;
108  }
109 
112  std::vector<std::size_t> const& secondary_vertices) {
113  secondary_vertices_ = secondary_vertices;
114  }
115 
117  inline void set_uncorrected_energy(double const& uncorrected_energy) {
118  uncorrected_energy_ = uncorrected_energy;
119  }
120 
122  inline void set_jet_area(float const& jet_area) { jet_area_ = jet_area; }
123 
125  inline void set_parton_flavour(int const& parton_flavour) {
126  parton_flavour_ = parton_flavour;
127  }
128 
130  inline void set_hadron_flavour(int const& hadron_flavour) {
131  hadron_flavour_ = hadron_flavour;
132  }
133 
134 
137  void SetJecFactor(std::string const& name, float const& value);
138 
141  void SetBDiscriminator(std::string const& name, float const& value);
144  private:
145  UFmap jec_factors_;
146  UFmap b_discriminators_;
147  std::vector<std::size_t> gen_particles_;
148  std::vector<std::size_t> secondary_vertices_;
149  double uncorrected_energy_;
150  float jet_area_;
151  int parton_flavour_;
152  int hadron_flavour_;
153 
154  std::string UnHashJecFactor(std::size_t jec) const;
155  std::string UnHashDiscr(std::size_t dis) const;
156 
157  #ifndef SKIP_CINT_DICT
158  public:
159  ClassDef(Jet, 3);
160  #endif
161 };
162 
163 typedef std::vector<ic::Jet> JetCollection;
164 }
165 
168 #endif
void set_hadron_flavour(int const &hadron_flavour)
Returns true flavour of jet as PDG code. The hadronic definition can only return 0, 4 or 5.
Definition: Jet.hh:130
float const & jet_area() const
The jet area as used in the L1FastJet correction.
Definition: Jet.hh:72
Jet()
Definition: Jet.cc:11
std::map< std::size_t, float > const & jec_factors() const
A map containing the jet energy corrections, where the key is stored as a hash of the identifying str...
Definition: Jet.hh:40
void set_secondary_vertices(std::vector< std::size_t > const &secondary_vertices)
A map containing the b-tagging discriminators, where the key is stored as a hash of the identifying s...
Definition: Jet.hh:111
void set_jec_factors(std::map< std::size_t, float > const &jec_factors)
A map containing the jet energy corrections, where the key is stored as a hash of the identifying str...
Definition: Jet.hh:95
int const & hadron_flavour() const
Returns true flavour of jet as PDG code. The hadronic definition can only return 0, 4 or 5.
Definition: Jet.hh:81
float GetJecFactor(std::string const &name) const
Returns a specific correction factor if name is defined, otherwise returns zero.
Definition: Jet.cc:33
void SetBDiscriminator(std::string const &name, float const &value)
Store a b-tagging discriminator, overwriting any existing value with label name
Definition: Jet.cc:44
Stores a four-momentum, charge and identifier, and is the base class for most other physics objects...
Definition: Candidate.hh:13
void set_parton_flavour(int const &parton_flavour)
An algorithmic determination of the true flavour of the jet, e.g. gluon, light, c or b quark...
Definition: Jet.hh:125
Definition: CaloJet.hh:9
int const & parton_flavour() const
An algorithmic determination of the true flavour of the jet, e.g. gluon, light, c or b quark...
Definition: Jet.hh:77
std::vector< ic::Jet > JetCollection
Definition: Jet.hh:163
void SetJecFactor(std::string const &name, float const &value)
Store a jet energy correction factor, overwriting any existing value with label name ...
Definition: Jet.cc:29
virtual void Print() const
Definition: Jet.cc:19
ClassDef(Jet, 3)
void set_gen_particles(std::vector< std::size_t > const &gen_particles)
A vector to refer to ic::GenParticle::id() values.
Definition: Jet.hh:106
double const & uncorrected_energy() const
The raw value of the jet energy.
Definition: Jet.hh:67
virtual ~Jet()
Definition: Jet.cc:17
void set_jet_area(float const &jet_area)
The jet area as used in the L1FastJet correction.
Definition: Jet.hh:122
std::vector< std::size_t > const & secondary_vertices() const
A map containing the b-tagging discriminators, where the key is stored as a hash of the identifying s...
Definition: Jet.hh:62
void set_b_discriminators(std::map< std::size_t, float > const &b_discriminators)
A map containing the b-tagging discriminators, where the key is stored as a hash of the identifying s...
Definition: Jet.hh:100
std::map< std::size_t, float > const & b_discriminators() const
A map containing the b-tagging discriminators, where the key is stored as a hash of the identifying s...
Definition: Jet.hh:46
std::vector< std::size_t > const & gen_particles() const
A vector to refer to ic::GenParticle::id() values.
Definition: Jet.hh:56
void set_uncorrected_energy(double const &uncorrected_energy)
The raw value of the jet energy.
Definition: Jet.hh:117
float GetBDiscriminator(std::string const &name) const
Returns a specific discriminator value if name is defined, otherwise returns zero.
Definition: Jet.cc:48
A basic jet class to store properties common to all jet types.
Definition: Jet.hh:17