20 #include "G4TrajectoryContainer.hh" 21 #include "G4VTrajectory.hh" 22 #include "G4Trajectory.hh" 23 #include "G4VVisManager.hh" 24 #include "G4UnitsTable.hh" 25 #include "G4ThreeVector.hh" 27 #include "G4RunManager.hh" 29 #include "Randomize.hh" 35 :drawFlag(
"all"), printModulo(1) {
48 G4int evtNb = evt->GetEventID();
50 const G4int verboseLevel = G4RunManager::GetRunManager()->GetVerboseLevel();
53 G4cout <<
"##################################################################" 55 <<
"######## ActarSimEventAction::BeginOfEventAction() ##########" 57 <<
"######## Begin of event: " << evtNb <<
" ########"<< G4endl;
58 CLHEP::HepRandom::showEngineStatus();
59 G4cout <<
"##################################################################" 72 G4int evtNb = evt->GetEventID();
75 G4cout <<
"##################################################################" 77 <<
"######### ActarSimEventAction::EndOfEventAction() #########" 79 <<
"#### End of event: " << evtNb << G4endl;
80 G4cout <<
"##################################################################" 97 G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance();
99 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
100 G4int n_trajectories = 0;
101 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
103 for (G4int i=0; i<n_trajectories; i++) {
104 G4VTrajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
105 if (
drawFlag ==
"all") trj->DrawTrajectory();
106 else if ((
drawFlag ==
"charged")&&(trj->GetCharge() != 0.))
107 trj->DrawTrajectory();
108 else if ((
drawFlag ==
"neutral")&&(trj->GetCharge() == 0.))
109 trj->DrawTrajectory();
void BeginOfEventAction(const G4Event *)
Actions performed at the beginning of each event.
~ActarSimEventAction()
Destructor.
void EndOfEventAction(const G4Event *)
Actions to perform in the analysis at the end of the event.
ActarSimEventActionMessenger * eventMessenger
Pointer to the messenger.
void BeginOfEventAction(const G4Event *)
Actions to perform in the analysis at the beginning of the event.
void EndOfEventAction(const G4Event *)
ActarSimROOTAnalysis * gActarSimROOTAnalysis
Global pointer to this soliton.
ActarSimEventAction()
Constructor.