Geant4  10.02.p03
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)
 

Private Attributes

G4String drawFlag
 
G4int printModulo
 
FCALSteppingActionStepAction
 
FCALTBEventActionMessengereventMessenger
 
G4double NTracksOutOfWorld
 
G4double NSecondaries
 

Additional Inherited Members

- Protected Attributes inherited from G4UserEventAction
G4EventManagerfpEventManager
 

Detailed Description

Definition at line 45 of file FCALTBEventAction.hh.

Constructor & Destructor Documentation

◆ FCALTBEventAction()

FCALTBEventAction::FCALTBEventAction ( FCALSteppingAction SA)

Definition at line 60 of file FCALTBEventAction.cc.

61  :drawFlag("all"),printModulo(10), StepAction(SA), eventMessenger(0)
62 {
64 }
FCALTBEventActionMessenger * eventMessenger
FCALSteppingAction * StepAction

◆ ~FCALTBEventAction()

FCALTBEventAction::~FCALTBEventAction ( )
virtual

Definition at line 68 of file FCALTBEventAction.cc.

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

Member Function Documentation

◆ BeginOfEventAction()

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 
86  NSecondaries = 0;
87 
88  StepAction->initialize(evtNb+1);
89 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4int GetEventID() const
Definition: G4Event.hh:151
#define G4endl
Definition: G4ios.hh:61
FCALSteppingAction * StepAction
Here is the call graph for this function:

◆ EndOfEventAction()

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 
99  G4cout << "N Tracks out of world " << NTracksOutOfWorld << G4endl;
100 
101  man->FillH1(1,NTracksOutOfWorld);
102 
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 }
static const double MeV
Definition: G4SIunits.hh:211
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
FCALSteppingAction * StepAction
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

◆ SetDrawFlag()

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:

◆ SetPrintModulo()

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:

Member Data Documentation

◆ drawFlag

G4String FCALTBEventAction::drawFlag
private

Definition at line 56 of file FCALTBEventAction.hh.

◆ eventMessenger

FCALTBEventActionMessenger* FCALTBEventAction::eventMessenger
private

Definition at line 63 of file FCALTBEventAction.hh.

◆ NSecondaries

G4double FCALTBEventAction::NSecondaries
private

Definition at line 66 of file FCALTBEventAction.hh.

◆ NTracksOutOfWorld

G4double FCALTBEventAction::NTracksOutOfWorld
private

Definition at line 66 of file FCALTBEventAction.hh.

◆ printModulo

G4int FCALTBEventAction::printModulo
private

Definition at line 60 of file FCALTBEventAction.hh.

◆ StepAction

FCALSteppingAction* FCALTBEventAction::StepAction
private

Definition at line 62 of file FCALTBEventAction.hh.


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