Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FCALTBEventAction Class Reference

#include <FCALTBEventAction.hh>

Inheritance diagram for FCALTBEventAction:
Collaboration diagram for FCALTBEventAction:

Public Member Functions

 FCALTBEventAction (FCALSteppingAction *)
 
virtual ~FCALTBEventAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
void SetDrawFlag (G4String val)
 
void SetPrintModulo (G4int val)
 
- Public Member Functions inherited from G4UserEventAction
 G4UserEventAction ()
 
virtual ~G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 45 of file FCALTBEventAction.hh.

Constructor & Destructor Documentation

FCALTBEventAction::FCALTBEventAction ( FCALSteppingAction SA)

Definition at line 60 of file FCALTBEventAction.cc.

61  :drawFlag("all"),printModulo(10), StepAction(SA), eventMessenger(0)
62 {
63  eventMessenger = new FCALTBEventActionMessenger(this);
64 }
FCALTBEventAction::~FCALTBEventAction ( )
virtual

Definition at line 68 of file FCALTBEventAction.cc.

69 {
70  delete eventMessenger;
71  eventMessenger = 0;
72 }

Member Function Documentation

void FCALTBEventAction::BeginOfEventAction ( const G4Event evt)
virtual

Reimplemented from G4UserEventAction.

Definition at line 76 of file FCALTBEventAction.cc.

77 {
78  G4int evtNb = evt->GetEventID();
79  if (evtNb%printModulo == 0)
80  {
81  G4cout << "\n---> Begin of event: " << evtNb+1 << G4endl;
82 // HepRandom::showEngineStatus();
83  }
84 
85  NTracksOutOfWorld = 0;
86  NSecondaries = 0;
87 
88  StepAction->initialize(evtNb+1);
89 }
int G4int
Definition: G4Types.hh:78
G4int GetEventID() const
Definition: G4Event.hh:151
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void FCALTBEventAction::EndOfEventAction ( const G4Event )
virtual

Reimplemented from G4UserEventAction.

Definition at line 93 of file FCALTBEventAction.cc.

94 {
95  // Fill histograms
96  G4AnalysisManager* man = G4AnalysisManager::Instance();
97 
98  NTracksOutOfWorld = StepAction->GetOutOfWorldTracks(0, 0);
99  G4cout << "N Tracks out of world " << NTracksOutOfWorld << G4endl;
100 
101  man->FillH1(1,NTracksOutOfWorld);
102 
103  NSecondaries = StepAction->GetSecondaries(0,0);
104  G4cout << "N Scondaries " << NSecondaries << G4endl;
105 
106  man->FillH1(2,NSecondaries);
107 
108  G4double EmEdep = StepAction->GetEdepFCAL("FCALEm");
109  G4double HadEdep = StepAction->GetEdepFCAL("FCALHad");
110 
111 
112  man->FillH1(3,EmEdep/MeV);
113  man->FillH1(4,HadEdep/MeV);
114 
115 
116  G4cout<<"EmEdep is="<<EmEdep/MeV << " MeV " << G4endl;
117  G4cout<<"HadEdep is="<<HadEdep << " MeV" << G4endl;
118 
119  G4cout << "Edep in FCAL1 FCAl2 : " << StepAction->GetEdepFCAL("FCALEm") << " ";
120  G4cout << StepAction->GetEdepFCAL("FCALHad") << G4endl;
121 }
G4double GetSecondaries(G4int, G4int)
G4GLOB_DLL std::ostream G4cout
G4double GetOutOfWorldTracks(G4int, G4int)
G4double GetEdepFCAL(G4String)
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void FCALTBEventAction::SetDrawFlag ( G4String  val)
inline

Definition at line 55 of file FCALTBEventAction.hh.

55 {drawFlag = val;};

Here is the caller graph for this function:

void FCALTBEventAction::SetPrintModulo ( G4int  val)
inline

Definition at line 56 of file FCALTBEventAction.hh.

56 {printModulo = val;};

Here is the caller graph for this function:


The documentation for this class was generated from the following files: