User action to do some basic step-based validation of G4.
More...
#include <SteppingValidation.h>
User action to do some basic step-based validation of G4.
Definition at line 24 of file SteppingValidation.h.
◆ SteppingValidation()
G4UA::SteppingValidation::SteppingValidation |
( |
| ) |
|
◆ BeginOfEventAction()
void G4UA::SteppingValidation::BeginOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ BeginOfRunAction()
void G4UA::SteppingValidation::BeginOfRunAction |
( |
const G4Run * |
| ) |
|
|
overridevirtual |
Definition at line 32 of file SteppingValidation.cxx.
46 _SET_TITLE(
m_stepL,
"Step length distribution",
"Step length [log(mm)]",
"Steps");
50 _SET_TITLE(
m_secE,
"Secondary energy distribution",
"Energy [log(MeV)]",
"Secondaries");
51 _SET_TITLE(
m_EvsR,
"Primary Energy vs Radius",
"Radius [m]",
"Primary Energy [MeV]");
52 _SET_TITLE(
m_latPhi,
"Phi energy distribution",
"Energy-weighted #phi RMS",
"Primaries");
53 _SET_TITLE(
m_latEta,
"Eta energy distribution",
"Energy-weighted #eta RMS",
"Primaries");
◆ EndOfEventAction()
void G4UA::SteppingValidation::EndOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
◆ UserSteppingAction()
void G4UA::SteppingValidation::UserSteppingAction |
( |
const G4Step * |
aStep | ) |
|
|
overridevirtual |
Definition at line 76 of file SteppingValidation.cxx.
79 m_stepProc->Fill( aStep->GetPostStepPoint()->GetProcessDefinedStep()->
83 m_stepELoss->Fill( log10(aStep->GetTotalEnergyDeposit()) );
86 m_stepL->Fill( log10( aStep->GetStepLength() ) );
89 auto* preStepPoint = aStep->GetPreStepPoint();
90 auto* postStepPoint = aStep->GetPostStepPoint();
92 m_prim = aStep->GetTrack();
95 else if (aStep->GetTrack()!=
m_prim && aStep->GetTrack()!=
m_sec){
96 m_secE->Fill( log10(preStepPoint->GetTotalEnergy()) );
97 m_sec = aStep->GetTrack();
101 if (postStepPoint->GetProcessDefinedStep()->GetProcessType()==1){
102 if (
m_prim==aStep->GetTrack()){
103 double angle = std::acos(
104 preStepPoint->GetMomentumDirection().dot(
105 postStepPoint->GetMomentumDirection() ) );
107 m_EvsR->Fill( postStepPoint->GetPosition().perp()*0.001,
108 aStep->GetTrack()->GetTotalEnergy() );
112 if (aStep->GetTrack()->GetNextVolume()==0){
114 if (
m_prim==aStep->GetTrack()){
115 m_primH = postStepPoint->GetPosition().eta();
116 m_primF = postStepPoint->GetPosition().phi();
118 m_dh += (postStepPoint->GetPosition().eta() -
m_primH )*aStep->GetTrack()->GetTotalEnergy();
119 m_dh2 +=
std::pow(postStepPoint->GetPosition().eta() -
m_primH,2)*aStep->GetTrack()->GetTotalEnergy();
120 m_dp += (postStepPoint->GetPosition().phi() -
m_primF )*aStep->GetTrack()->GetTotalEnergy();
121 m_dp2 +=
std::pow(postStepPoint->GetPosition().phi() -
m_primF,2)*aStep->GetTrack()->GetTotalEnergy();
122 m_nsec += aStep->GetTrack()->GetTotalEnergy();
◆ m_dh
double G4UA::SteppingValidation::m_dh |
|
private |
◆ m_dh2
double G4UA::SteppingValidation::m_dh2 |
|
private |
◆ m_dp
double G4UA::SteppingValidation::m_dp |
|
private |
◆ m_dp2
double G4UA::SteppingValidation::m_dp2 |
|
private |
◆ m_EvsR
TH2* G4UA::SteppingValidation::m_EvsR |
|
private |
◆ m_histSvc
◆ m_latEta
TH1 * G4UA::SteppingValidation::m_latEta |
|
private |
◆ m_latPhi
TH1 * G4UA::SteppingValidation::m_latPhi |
|
private |
◆ m_mscAngle
TH1 * G4UA::SteppingValidation::m_mscAngle |
|
private |
◆ m_nsec
double G4UA::SteppingValidation::m_nsec |
|
private |
◆ m_path
std::string SimTestHisto::m_path {"/truth/"} |
|
protectedinherited |
◆ m_prim
G4Track* G4UA::SteppingValidation::m_prim |
|
private |
◆ m_primF
double G4UA::SteppingValidation::m_primF |
|
private |
◆ m_primH
double G4UA::SteppingValidation::m_primH |
|
private |
◆ m_sec
G4Track * G4UA::SteppingValidation::m_sec |
|
private |
◆ m_secE
TH1 * G4UA::SteppingValidation::m_secE |
|
private |
◆ m_stepELoss
TH1 * G4UA::SteppingValidation::m_stepELoss |
|
private |
◆ m_stepL
TH1* G4UA::SteppingValidation::m_stepL |
|
private |
◆ m_stepProc
TH1 * G4UA::SteppingValidation::m_stepProc |
|
private |
The documentation for this class was generated from the following files:
#define _TH2D_NOCHECK(var, name, nbinx, xmin, xmax, nbiny, ymin, ymax)