7 #include "CLHEP/Units/SystemOfUnits.h"
20 m_evt(0), m_ntr(0), m_pdg(0), m_cha(0), m_ene(0),
21 m_vx(0), m_vy(0), m_vz(0),
22 m_x0(0), m_y0(0), m_z0(0), m_t0(0),
23 m_px0(0), m_py0(0), m_pz0(0),
24 m_x1(0), m_y1(0), m_z1(0), m_t1(0),
25 m_px1(0), m_py1(0), m_pz1(0),
26 m_x(0), m_y(0), m_z(0)
37 m_tree0 = std::make_unique<TTree>(
"t0",
"ATHENA event tree");
42 m_tree1 = std::make_unique<TTree>(
"t1",
"ATHENA particle tree");
72 G4cout<<
"ScoringPlane: placing scoring plane at [mm]: " <<
m_config.
plane << G4endl;
73 G4cout<<
"ScoringPlane: stop and kill particles: " <<
m_config.
pkill << G4endl;
74 G4cout<<
"ScoringPlane: output root filename: " <<
m_config.
fname << G4endl;
78 TFile*
file =
new TFile(
m_config.
fname.c_str(),
"RECREATE",
"ATHENA ufo simulation");
88 m_z0 = aStep->GetPreStepPoint()->GetPosition().z();
89 m_z1 = aStep->GetPostStepPoint()->GetPosition().z();
98 m_pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
99 m_cha = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
100 m_ene = aStep->GetTrack()->GetTotalEnergy();
101 m_vx = aStep->GetTrack()->GetVertexPosition().x();
102 m_vy = aStep->GetTrack()->GetVertexPosition().y();
103 m_vz = aStep->GetTrack()->GetVertexPosition().z();
105 m_x0 = aStep->GetPreStepPoint()->GetPosition().x();
106 m_y0 = aStep->GetPreStepPoint()->GetPosition().y();
108 m_px0 = aStep->GetPreStepPoint()->GetMomentum().x();
109 m_py0 = aStep->GetPreStepPoint()->GetMomentum().y();
110 m_pz0 = aStep->GetPreStepPoint()->GetMomentum().z();
112 m_x1 = aStep->GetPostStepPoint()->GetPosition().x();
113 m_y1 = aStep->GetPostStepPoint()->GetPosition().y();
115 m_px1 = aStep->GetPostStepPoint()->GetMomentum().x();
116 m_py1 = aStep->GetPostStepPoint()->GetMomentum().y();
117 m_pz1 = aStep->GetPostStepPoint()->GetMomentum().z();
125 if (
m_config.
pkill == 1) aStep->GetTrack()->SetTrackStatus(fStopAndKill);
126 else if (
m_config.
pkill == 2) aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);