ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimPrimaryInfo.hh
Go to the documentation of this file.
1 // - AUTHOR: Hector Alvarez-Pol 04/2008
2 /******************************************************************
3  * Copyright (C) 2005-2016, Hector Alvarez-Pol *
4  * All rights reserved. *
5  * *
6  * License according to GNU LESSER GPL (see lgpl-3.0.txt). *
7  * For the list of contributors see CREDITS. *
8  ******************************************************************/
9 
10 #ifndef ActarSimPrimaryInfo_h
11 #define ActarSimPrimaryInfo_h 1
12 
13 #include "TROOT.h" //for including Rtypes.h
14 
15 #include "TObject.h"
16 
17 class G4PrimaryParticle;
18 
19 class ActarSimPrimaryInfo : public TObject {
20 private:
21  UInt_t nbPrimariesInEvent; ///< Number of primaries in the event
22  Double_t kineticEnergy; ///< Kinetic energy
23  Double_t theta; ///< Theta emission angle
24  Double_t phi; ///< Phi emission angle
25 
26  Int_t PDGcode; ///< PDG code. Datamembers copied from G4PrimaryParticle
27  Double_t Px; ///< X component of the momentum
28  Double_t Py; ///< Y component of the momentum
29  Double_t Pz; ///< Z component of the momentum
30  Int_t trackID; ///< Rrack ID
31  Double_t mass; ///< Particle mass
32  Double_t charge; ///< Partcile charge
33  Double_t polX; ///< Particle polarization along X
34  Double_t polY; ///< Particle polarization along Y
35  Double_t polZ; ///< Particle polarization along Z
36  Double_t Weight0; ///< Particle weight
37  Double_t properTime; ///< Partice proper time
38 
39  Double_t x0; ///< Vertex position in X
40  Double_t y0; ///< Vertex position in X
41  Double_t z0; ///< Vertex position in X
42 
43  //Event identification
44  UInt_t eventID; ///< Event ID
45  UInt_t runID; ///< Run ID
46 
47 public:
49  ActarSimPrimaryInfo(G4PrimaryParticle*);
51 
52  inline Int_t GetNbPrimariesInEvent() const { return nbPrimariesInEvent; }
53  inline Double_t GetKineticEnergy() const { return kineticEnergy; }
54  inline Double_t GetTheta() const { return theta; }
55  inline Double_t GetPhi() const { return phi; }
56  inline Int_t GetPDGcode() const { return PDGcode; }
57  inline Double_t GetPx() const { return Px; }
58  inline Double_t GetPy() const { return Py; }
59  inline Double_t GetPz() const { return Pz; }
60  inline Int_t GetTrackID() const { return trackID; }
61  inline Double_t GetMass() const { return mass; }
62  inline Double_t GetCharge() const { return charge; }
63  inline Double_t GetPolX() const { return polX; }
64  inline Double_t GetPolY() const { return polY; }
65  inline Double_t GetPolZ() const { return polZ; }
66  inline Double_t GetWeight() const { return Weight0; }
67  inline Double_t GetProperTime() const { return properTime; }
68  inline Double_t GetEventID() const { return eventID; }
69  inline Double_t GetRunID() const { return runID; }
70  inline Double_t GetX0() const { return x0; }
71  inline Double_t GetY0() const { return y0; }
72  inline Double_t GetZ0() const { return z0; }
73 
74  inline void SetNbPrimariesInEvent(Int_t nb) { nbPrimariesInEvent = nb; }
75  inline void SetKineticEnergy(Double_t kin) { kineticEnergy = kin; }
76  inline void SetTheta(Double_t t) { theta = t; }
77  inline void SetPhi(Double_t p) { phi = p; }
78  inline void SetPDGcode(Int_t PDG) { PDGcode = PDG; }
79  inline void SetPx(Double_t val) { Px = val; }
80  inline void SetPy(Double_t val) { Py = val; }
81  inline void SetPz(Double_t val) { Pz = val; }
82  inline void SetTrackID(Int_t tr) { trackID = tr; }
83  inline void SetMass(Double_t m) { mass = m; }
84  inline void SetCharge(Double_t c) { charge = c; }
85  inline void SetPolX(Double_t p) { polX = p; }
86  inline void SetPolY(Double_t p) { polY = p; }
87  inline void SetPolZ(Double_t p) { polZ = p; }
88  inline void SetWeight(Double_t w) { Weight0 = w; }
89  inline void SetProperTime(Double_t pt) { properTime = pt; }
90  inline void SetEventID(UInt_t eID) { eventID = eID; }
91  inline void SetRunID(UInt_t rID) { runID = rID; }
92  inline void SetX0(UInt_t x) { x0 = x; }
93  inline void SetY0(UInt_t y) { y0 = y; }
94  inline void SetZ0(UInt_t z) { z0 = z; }
95 
96  void SetVertexPosition(Double_t x,Double_t y,Double_t z);
97  void SetMomentum(Double_t px,Double_t py,Double_t pz);
98  void Set4Momentum(Double_t px,Double_t py,Double_t pz,Double_t E);
99  void SetPolarization(Double_t px,Double_t py,Double_t pz);
100 
101  void print(void);
102 
103  ClassDef(ActarSimPrimaryInfo,1) //ROOT CINT
104 };
105 #endif
Double_t GetRunID() const
Double_t y0
Vertex position in X.
Double_t GetProperTime() const
void SetNbPrimariesInEvent(Int_t nb)
Double_t x0
Vertex position in X.
UInt_t eventID
Event ID.
Double_t kineticEnergy
Kinetic energy.
void SetPolZ(Double_t p)
Int_t GetNbPrimariesInEvent() const
Double_t GetZ0() const
Double_t properTime
Partice proper time.
Double_t GetKineticEnergy() const
void SetWeight(Double_t w)
Double_t GetTheta() const
Double_t Weight0
Particle weight.
Double_t GetY0() const
Double_t Px
X component of the momentum.
Double_t Pz
Z component of the momentum.
Double_t GetPolZ() const
Double_t theta
Theta emission angle.
void SetMomentum(Double_t px, Double_t py, Double_t pz)
Sets the momentum.
Double_t mass
Particle mass.
void SetEventID(UInt_t eID)
Double_t GetX0() const
Double_t GetPx() const
Double_t Py
Y component of the momentum.
Double_t GetPolX() const
void Set4Momentum(Double_t px, Double_t py, Double_t pz, Double_t E)
Sets the 4momentum.
void SetProperTime(Double_t pt)
Int_t PDGcode
PDG code. Datamembers copied from G4PrimaryParticle.
Double_t GetPy() const
void SetPx(Double_t val)
void SetPDGcode(Int_t PDG)
Double_t GetWeight() const
Double_t GetCharge() const
void SetPy(Double_t val)
void SetCharge(Double_t c)
void SetMass(Double_t m)
Double_t polZ
Particle polarization along Z.
void SetRunID(UInt_t rID)
Double_t polX
Particle polarization along X.
void SetPolY(Double_t p)
Double_t GetEventID() const
void SetVertexPosition(Double_t x, Double_t y, Double_t z)
Sets the position of the vertex (origin of the primary particle)
void SetPolX(Double_t p)
Double_t polY
Particle polarization along Y.
Double_t phi
Phi emission angle.
Double_t GetPz() const
UInt_t nbPrimariesInEvent
Number of primaries in the event.
void print(void)
Prints info.
~ActarSimPrimaryInfo()
Destructor. Makes nothing.
void SetPz(Double_t val)
Double_t charge
Partcile charge.
void SetPolarization(Double_t px, Double_t py, Double_t pz)
Sets the polarization.
void SetKineticEnergy(Double_t kin)
Double_t GetPhi() const
Double_t GetPolY() const
void SetTheta(Double_t t)
void SetPhi(Double_t p)
Double_t z0
Vertex position in X.
Double_t GetMass() const