TrackPoint_t.hh
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 //
3 // ADM, July 2005
4 // the g4numi output in a root tree.
5 //
6 // $Id: TrackPoint_t.hh,v 1.1 2011/07/13 16:20:52 loiacono Exp $
7 //----------------------------------------------------------------------
8 
9 #ifndef TRACKPOINT_T_HH
10 #define TRACKPOINT_T_HH
11 
12 //C++
13 #include <vector>
14 #include <map>
15 #include <iostream>
16 #include <string>
17 
18 #include "TROOT.h" // Top level (or root) structure for all classes
19 #include "TObject.h"
20 
21 
22 
24 {
25 
26 public:
27  // a constructor and a destructor
28  TrackPoint_t();
29  virtual ~TrackPoint_t();
30 
31  void Print();
32 
33 public:
34 
35  Int_t GetParticleType() const;
36  Int_t GetTrackID() const;
37  Int_t GetGeneration() const;
38  Double_t GetImpWeight() const;
39 
40  Float_t GetPosition(int i) const;
41  Float_t GetPosition(const std::string &pos) const;
42 
43  Float_t GetMomentum(int i) const;
44  Float_t GetMomentum(const std::string &pos) const;
45 
46 public:
47 
48  Int_t type; //particle type
49  Int_t trkid; //track ID (unique ID per Event)
50  Int_t gen;
51  Double_t impwt;
52  Float_t x;
53  Float_t y;
54  Float_t z;
55  Float_t px;
56  Float_t py;
57  Float_t pz;
58 
59 
60 public:
61 
63  {
64  if (this != &rhs) // protect against invalid self-assignment
65  {
66  type = rhs.type;
67  trkid = rhs.trkid;
68  gen = rhs.gen;
69  impwt = rhs.impwt;
70  x = rhs.x;
71  y = rhs.y;
72  z = rhs.z;
73  px = rhs.px;
74  py = rhs.py;
75  pz = rhs.pz;
76 
77  }
78  // by convention, always return *this
79  return *this;
80  }
81 
82 
83 
84 private:
86 
87 
88  };
89 
90 inline Int_t TrackPoint_t::GetParticleType() const { return type; }
91 inline Int_t TrackPoint_t::GetTrackID() const { return trkid; }
92 inline Int_t TrackPoint_t::GetGeneration() const { return gen; }
93 inline Double_t TrackPoint_t::GetImpWeight() const { return impwt; }
94 
95 #endif
96 
Int_t GetParticleType() const
Definition: TrackPoint_t.hh:90
Int_t GetTrackID() const
Definition: TrackPoint_t.hh:91
Int_t GetGeneration() const
Definition: TrackPoint_t.hh:92
std::string string
Definition: nybbler.cc:12
TrackPoint_t & operator=(const TrackPoint_t &rhs)
Definition: TrackPoint_t.hh:62
Float_t GetMomentum(int i) const
Definition: TrackPoint_t.cc:69
Double_t impwt
Definition: TrackPoint_t.hh:51
Float_t GetPosition(int i) const
Definition: TrackPoint_t.cc:41
virtual ~TrackPoint_t()
Definition: TrackPoint_t.cc:34
Double_t GetImpWeight() const
Definition: TrackPoint_t.hh:93