Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Particle.hh
Go to the documentation of this file.
1 ///
2 /// @file Particle.hh
3 /// @brief Hammer particle class
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
12 #ifndef HAMMER_TOOLS_PARTICLE
13 #define HAMMER_TOOLS_PARTICLE
14 
15 #include "Hammer/Particle.fhh"
17 #include "Hammer/Tools/Pdg.fhh"
18 
19 #ifdef HAVE_ROOT
21 #endif
22 
23 namespace Hammer {
24 
25  /// @brief Particle class
26  ///
27  /// Defines a particle, ...
28  ///
29  /// @ingroup Core
30  class Particle {
31 
32  public:
33  Particle();
34 
35  /// @brief
36  /// @param[in] p
37  /// @param[in] code
38  Particle(const FourMomentum& p, PdgId code);
39 
40  Particle(const Particle& other) = default;
41  Particle& operator=(const Particle& other) = default;
42 
43 #ifdef HAVE_ROOT
44  static Particle fromRoot(const TLorentzVector& p, PdgId code);
45 #endif
47  }
48 
49  public:
50  /// @brief
51  /// @param[in] p
52  /// @return
54 
55  /// @brief
56  /// @param[in] code
57  /// @return
58  Particle& setPdgId(PdgId code);
59 
60  public:
61  /// @brief
62  /// @return
63  PdgId pdgId() const;
64 
65  /// @brief
66  /// @return
67  const FourMomentum& momentum() const;
68 
69  /// @brief
70  /// @return
72 
73  /// @brief
74  /// @return
75  const FourMomentum& p() const;
76 
77  /// @brief
78  /// @return
79  FourMomentum& p();
80 
81  private:
84  };
85 
86 } // namespace Hammer
87 
88 #endif
const FourMomentum & p() const
Definition: Particle.cc:64
Particle & setPdgId(PdgId code)
Definition: Particle.cc:47
PdgId pdgId() const
Definition: Particle.cc:52
Hammer four momentum class.
Particle & setMomentum(const FourMomentum &p)
Definition: Particle.cc:42
Particle & operator=(const Particle &other)=default
Pdg forward declarations.
Particle class.
Definition: Particle.hh:30
const FourMomentum & momentum() const
Definition: Particle.cc:56
Forward declarations for particle class.
ROOT forward declarations.
int PdgId
Definition: Pdg.fhh:17
4-momentum class
Definition: FourMomentum.hh:30
FourMomentum _momentum
Definition: Particle.hh:83