LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ArtG4tkParticle.hh
Go to the documentation of this file.
1 #ifndef artg4tk_DataProducts_G4DetectorHits_ArtG4tkParticle_hh
2 #define artg4tk_DataProducts_G4DetectorHits_ArtG4tkParticle_hh
3 
4 #include "CLHEP/Vector/LorentzVector.h"
5 
6 #include <string>
7 
8 namespace artg4tk {
9 
11 
12  public:
14  ArtG4tkParticle(const int, const CLHEP::HepLorentzVector&);
15  ArtG4tkParticle(const int, const CLHEP::Hep3Vector&);
18 
21  {
22  fPDG = other.fPDG;
23  fMomentum = other.fMomentum;
24  return *this;
25  }
26 
27  void SetPDG(const int);
28  void SetMomentum(const CLHEP::HepLorentzVector&);
29  void SetMomentum(const CLHEP::Hep3Vector&);
30 
31  int
32  GetPDG() const
33  {
34  return fPDG;
35  }
36  std::string GetName() const;
37  const CLHEP::HepLorentzVector&
38  GetMomentum() const
39  {
40  return fMomentum;
41  }
42 
43  // Patch up dictionary generation.
44  // NOTE(from GenParticle, by HW):
45  // There is source in art::PtrVector that should be protected and gccxml trying to instantiate
46  // it. Until that is fixed, we need to provide a an operator< or else the dictionary generation
47  // fails. So we provide a bogus version here. This is never actually used but,if gccxml cannot
48  // find the method, it quits.
49  //
50  bool
51  operator<(const ArtG4tkParticle&) const
52  {
53  return true;
54  }
55 
56  private:
57  // data members
58  //
59  int fPDG;
60  CLHEP::HepLorentzVector fMomentum;
61  };
62 
63 }
64 
65 #endif /* artg4tk_DataProducts_G4DetectorHits_ArtG4tkParticle_hh */
CLHEP::HepLorentzVector fMomentum
const CLHEP::HepLorentzVector & GetMomentum() const
ArtG4tkParticle & operator=(const ArtG4tkParticle &other)
bool operator<(const ArtG4tkParticle &) const
void SetMomentum(const CLHEP::HepLorentzVector &)
std::string GetName() const