File indexing completed on 2025-08-05 08:18:09
0001 #include "PHG4Particlev3.h"
0002 #include "PHG4Particle.h"
0003
0004 #include <Geant4/G4SystemOfUnits.hh>
0005
0006 #include <string>
0007
0008 PHG4Particlev3::PHG4Particlev3(const PHG4Particle* in)
0009 : PHG4Particlev2(in)
0010 , A(in->get_A())
0011 , Z(in->get_Z())
0012 , ioncharge(in->get_IonCharge())
0013 , excitEnergy(in->get_ExcitEnergy())
0014 {
0015 }
0016
0017 void PHG4Particlev3::set_NumCharge(const int c)
0018 {
0019 ioncharge = c * eplus;
0020 }
0021
0022 void PHG4Particlev3::identify(std::ostream& os) const
0023 {
0024 if (!fname.empty())
0025 {
0026 os << "PHG4Particlev3 name: " << fname << ", ";
0027 }
0028 else
0029 {
0030 os << "PHG4Particlev3 name: missing, ";
0031 }
0032
0033 os << "track id: " << trkid
0034 << ", vtxid: " << vtxid
0035 << ", parent id: " << parentid
0036 << ", primary id: " << primaryid
0037 << ", pid: " << fpid
0038 << ", px: " << fpx
0039 << ", py: " << fpy
0040 << ", pz: " << fpz
0041 << ", e: " << fe
0042 << ", A: " << A
0043 << ", Z: " << Z
0044 << ", Eex: " << excitEnergy
0045 << ", ioncharge: " << ioncharge
0046 << std::endl;
0047 return;
0048 }