#include <G4AtlantisDumper.h>
Definition at line 21 of file G4AtlantisDumper.h.
◆ G4AtlantisDumper()
G4UA::G4AtlantisDumper::G4AtlantisDumper |
( |
const Config & |
config | ) |
|
Definition at line 24 of file G4AtlantisDumper.cxx.
25 AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >(
"MessageSvc" ),
"G4AtlantisDumper"),
27 m_evtStore(
"StoreGateSvc/StoreGateSvc",
"G4AtlantisDumper"),
28 m_detStore(
"StoreGateSvc/DetectorStore",
"G4AtlantisDumper"),
◆ BeginOfEventAction()
void G4UA::G4AtlantisDumper::BeginOfEventAction |
( |
const G4Event * |
| ) |
|
|
overridevirtual |
Definition at line 109 of file G4AtlantisDumper.cxx.
115 ATH_MSG_INFO(
"G4AtlantisDumper could not get event info!");
119 int athevent =
evt->eventNumber();
120 int athrun =
evt->runNumber();
121 ATH_MSG_INFO(
"G4AtlantisDumper: Athena run event is "<<athrun<<
" "<<athevent);
123 int length=snprintf(buf, 1000,
"G4Atlantis_%d_%d.txt", athrun, athevent);
125 ATH_MSG_WARNING(
"BeginOfEvent:: m_filename string (" << buf <<
") was truncated" );
127 ATH_MSG_INFO(
"G4AtlantisDumper: Opening m_file "<<buf);
128 m_file =
new std::ofstream();
◆ EndOfEventAction()
void G4UA::G4AtlantisDumper::EndOfEventAction |
( |
const G4Event * |
event | ) |
|
|
overridevirtual |
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ UserSteppingAction()
void G4UA::G4AtlantisDumper::UserSteppingAction |
( |
const G4Step * |
aStep | ) |
|
|
overridevirtual |
Definition at line 33 of file G4AtlantisDumper.cxx.
35 const G4Track *
t=aStep->GetTrack();
39 int id=
t->GetTrackID();
40 int pid=
t->GetParentID();
42 int fs=aStep->IsFirstStepInVolume();
43 int ls=aStep->IsLastStepInVolume();
44 int stepn=
t->GetCurrentStepNumber();
46 const G4TrackVector *sec=aStep->GetSecondary();
47 int nsec=0;
if (sec) nsec=sec->size();
49 double tedep=aStep->GetTotalEnergyDeposit();
50 double tnedep=aStep->GetNonIonizingEnergyDeposit();
51 double length=aStep->GetStepLength();
52 int pdg=
t->GetDefinition()->GetPDGEncoding();
65 const G4VProcess *
p =
t->GetCreatorProcess();
66 G4String
pn=
"none";
if(
p)
pn=
p->GetProcessName();
68 G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition();
69 double x1=pos1.x();
double y1=pos1.y();
double z1=pos1.z();
70 double t1=aStep->GetPreStepPoint()->GetGlobalTime();
71 G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition();
72 double x2=pos2.x();
double y2=pos2.y();
double z2=pos2.z();
73 double t2=aStep->GetPostStepPoint()->GetGlobalTime();
74 G4ThreeVector
p1=aStep->GetPreStepPoint()->GetMomentum();
75 double px1=
p1.x();
double py1=
p1.y();
double pz1=
p1.z();
76 G4ThreeVector
p2=aStep->GetPostStepPoint()->GetMomentum();
77 double px2=
p2.x();
double py2=
p2.y();
double pz2=
p2.z();
78 double ke1=aStep->GetPreStepPoint()->GetKineticEnergy();
79 double ke2=aStep->GetPostStepPoint()->GetKineticEnergy();
82 double mass=aStep->GetPreStepPoint()->GetMass();
83 double charge=aStep->GetPreStepPoint()->GetCharge();
86 (*m_file)<<
"ACH_G4Step";
87 (*m_file)<<
" "<<
m_nsteps; (*m_file)<<
" "<<
id; (*m_file)<<
" "<<
pid; (*m_file)<<
" "<<(
int)
fs; (*m_file)<<
" "<<(
int)
ls; (*m_file)<<
" "<<stepn;
88 (*m_file)<<
" "<<
pn; (*m_file)<<
" "<<nsec;
89 (*m_file)<<
" "<<tedep; (*m_file)<<
" "<<tnedep; (*m_file)<<
" "<<
length; (*m_file)<<
" "<<pdg; (*m_file)<<
" "<<
mass; (*m_file)<<
" "<<
charge;
90 (*m_file)<<
" "<<
x1; (*m_file)<<
" "<<
y1; (*m_file)<<
" "<<z1; (*m_file)<<
" "<<
t1;
91 (*m_file)<<
" "<<px1; (*m_file)<<
" "<<py1; (*m_file)<<
" "<<pz1; (*m_file)<<
" "<<ke1;
92 (*m_file)<<
" "<<
x2; (*m_file)<<
" "<<
y2; (*m_file)<<
" "<<z2; (*m_file)<<
" "<<
t2;
93 (*m_file)<<
" "<<px2; (*m_file)<<
" "<<py2; (*m_file)<<
" "<<pz2; (*m_file)<<
" "<<ke2;
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_config
Config G4UA::G4AtlantisDumper::m_config |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_file
std::ofstream* G4UA::G4AtlantisDumper::m_file |
|
private |
◆ m_filename
std::string G4UA::G4AtlantisDumper::m_filename |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_nsteps
int G4UA::G4AtlantisDumper::m_nsteps |
|
private |
The documentation for this class was generated from the following files: