Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Candidate.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Candidate_hh
2 #define ICHiggsTauTau_Candidate_hh
3 #include <vector>
4 #include "Math/Vector4D.h"
5 #include "Math/Vector4Dfwd.h"
6 #include "Rtypes.h"
7 
8 namespace ic {
9 
13 class Candidate {
14  private:
15  typedef ROOT::Math::PtEtaPhiEVector Vector;
16 
17  public:
18  Candidate();
19  virtual ~Candidate();
20  virtual void Print() const;
21 
23 
24 
31  inline Vector const& vector() const { return vector_; }
32 
34 
39  inline std::size_t id() const { return id_; }
40 
42  inline double pt() const { return vector_.Pt(); }
43 
45  inline double eta() const { return vector_.Eta(); }
46 
48  inline double phi() const { return vector_.Phi(); }
49 
51  inline double energy() const { return vector_.E(); }
52 
54  inline int charge() const { return charge_; }
55 
57  inline double M() const { return vector_.M(); }
60 
62  inline void set_vector(Vector const& vector) { vector_ = vector; }
64 
66  inline void set_id(std::size_t const& id) { id_ = id; }
67 
69  inline void set_pt(double const& pt) { vector_.SetPt(pt); }
70 
72  inline void set_eta(double const& eta) { vector_.SetEta(eta); }
73 
75  inline void set_phi(double const& phi) { vector_.SetPhi(phi); }
76 
78  inline void set_energy(double const& energy) { vector_.SetE(energy); }
79 
81  inline void set_charge(int const& charge) { charge_ = charge; }
84  private:
85  Vector vector_;
86  std::size_t id_;
87  int charge_;
88 
89  #ifndef SKIP_CINT_DICT
90  public:
91  ClassDef(Candidate, 2);
92  #endif
93 };
94 
95 typedef std::vector<ic::Candidate> CandidateCollection;
96 }
98 #endif
virtual ~Candidate()
Definition: Candidate.cc:7
double energy() const
Direct access to the energy.
Definition: Candidate.hh:51
int charge() const
Electric charge.
Definition: Candidate.hh:54
void set_vector(Vector const &vector)
Four-momentum.
Definition: Candidate.hh:63
std::size_t id() const
Unique identifier.
Definition: Candidate.hh:39
Stores a four-momentum, charge and identifier, and is the base class for most other physics objects...
Definition: Candidate.hh:13
Vector const & vector() const
Four-momentum.
Definition: Candidate.hh:31
void set_phi(double const &phi)
Direct access to .
Definition: Candidate.hh:75
void set_id(std::size_t const &id)
Unique identifier.
Definition: Candidate.hh:66
void set_charge(int const &charge)
Electric charge.
Definition: Candidate.hh:81
Definition: CaloJet.hh:9
double phi() const
Direct access to .
Definition: Candidate.hh:48
double eta() const
Direct access to .
Definition: Candidate.hh:45
void set_energy(double const &energy)
Direct access to the energy.
Definition: Candidate.hh:78
std::vector< ic::Candidate > CandidateCollection
Definition: Candidate.hh:95
double M() const
Calculates the candidate mass.
Definition: Candidate.hh:57
ClassDef(Candidate, 2)
virtual void Print() const
Definition: Candidate.cc:9
void set_pt(double const &pt)
Direct access to the .
Definition: Candidate.hh:69
void set_eta(double const &eta)
Direct access to .
Definition: Candidate.hh:72
double pt() const
Direct access to the .
Definition: Candidate.hh:42