17 #include "G4PrimaryParticle.hh" 18 #include "G4ThreeVector.hh" 20 #include "G4PhysicalConstants.hh" 21 #include "G4SystemOfUnits.hh" 29 nbPrimariesInEvent = 0;
55 theta = prim->GetMomentum().theta() / rad;
56 phi = prim->GetMomentum().phi() / rad;
63 mass = prim->GetMass();
64 charge = prim->GetCharge() / eplus;
65 polX = prim->GetPolX();
66 polY = prim->GetPolY();
67 polZ = prim->GetPolZ();
72 Double_t energysquared = (prim->GetMass()*prim->GetMass()) +
73 (prim->GetPx()*prim->GetPx()+
74 prim->GetPy()*prim->GetPy()+
75 prim->GetPz()*prim->GetPz());
87 G4cout <<
"-------------------------------------------" << G4endl;
88 G4cout <<
"------- ActarSimPrimaryInfo::print() ---------" << G4endl;
89 G4cout <<
" eventID: " <<
eventID <<
", runID: " <<
runID << G4endl;
90 G4cout <<
" PDGcode: " <<
PDGcode 93 <<
", charge: " <<
charge / eplus <<
" eplus" << G4endl;
94 G4cout <<
" Px: " <<
Px 97 <<
", properTime: " <<
properTime / ns <<
" ns" << G4endl;
98 G4cout <<
" polX: " <<
polX 101 <<
", Weight0: " <<
Weight0 << G4endl;
102 G4cout <<
" x0: " <<
x0 / mm <<
" mm" 103 <<
" y0: " <<
y0 / mm <<
" mm" 104 <<
" z0: " <<
z0 / mm <<
" mm" << G4endl;
107 <<
", theta: " <<
theta / rad <<
" rad" 108 <<
", phi: " <<
phi / rad <<
" rad" << G4endl;
109 G4cout <<
"-------------------------------------------" << G4endl;
126 G4ThreeVector mom(
Px,
Py,
Pz);
137 Double_t mas2 = E*E - px*px - py*py - pz*pz;
139 mass = std::sqrt(mas2);
Double_t y0
Vertex position in X.
Double_t x0
Vertex position in X.
Double_t kineticEnergy
Kinetic energy.
Double_t properTime
Partice proper time.
Double_t Weight0
Particle weight.
Double_t Px
X component of the momentum.
Double_t Pz
Z component of the momentum.
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.
Double_t Py
Y component of the momentum.
ClassImp(ActarSimPrimaryInfo) ActarSimPrimaryInfo
Constructor.
void Set4Momentum(Double_t px, Double_t py, Double_t pz, Double_t E)
Sets the 4momentum.
Int_t PDGcode
PDG code. Datamembers copied from G4PrimaryParticle.
Double_t polZ
Particle polarization along Z.
Double_t polX
Particle polarization along X.
void SetVertexPosition(Double_t x, Double_t y, Double_t z)
Sets the position of the vertex (origin of the primary particle)
Double_t polY
Particle polarization along Y.
Double_t phi
Phi emission angle.
UInt_t nbPrimariesInEvent
Number of primaries in the event.
void print(void)
Prints info.
~ActarSimPrimaryInfo()
Destructor. Makes nothing.
Double_t charge
Partcile charge.
void SetPolarization(Double_t px, Double_t py, Double_t pz)
Sets the polarization.
Double_t z0
Vertex position in X.