Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
Public Member Functions | Private Attributes
EventAction Class Reference

Holds information about what to do at the beginning and end of each event. More...

#include <EventAction.hh>

List of all members.

Public Member Functions

 EventAction (RunAction *run, DetectorConstruction *det, G4double accumulationtime=1000 *ns)
 Constructor, constructs the EventAction object.
virtual ~EventAction ()
 Destructor, destroys the EventAction object.
void BeginOfEventAction (const G4Event *)
 Actions that are taken at the beginning of each event.
void EndOfEventAction (const G4Event *)
 Actions that are taken at the end of each event.
void AddScintillatorTubeEvent (G4int scintillatorID, G4double time, G4double energy)
 Add a scintillator event when such occurs.
void AddGeDetectorEvent (G4double time, G4double energy)
 Add a germanium detector event when such occurs.
void AddScintillatorPlateEvent (AllAccumulatedStatistics::ScintillatorPlate plate, G4double time, G4double energy)
 Add a scintillator plate event.
void PrintToVerboseFile (G4String messageToPrint)
 Set the PrintModulo to a specific number.
void SetPrintModulo (G4int val)

Private Attributes

RunActionrunAct
 The Pointer to the RunAction associated with this EventAction object.
G4int printModulo
 Print a message when the event number modulo this number equals zero.
EventActionMessengereventMessenger
 The messenger.
DetectorConstructiondetector
 The detector construction.
G4double myAccumulationTime
 Default time to accumulate statistics over, usd when constructing the myStatistics object.
AllAccumulatedStatisticsmyStatistics
 Contains the statistics accumulated during the event.

Detailed Description

Holds information about what to do at the beginning and end of each event.

Accumulates statistics for the ongoing run.

Definition at line 51 of file EventAction.hh.


Constructor & Destructor Documentation

EventAction::EventAction ( RunAction run,
DetectorConstruction det,
G4double  accumulationtime = 1000*ns 
)

Constructor, constructs the EventAction object.

Parameters:
runThe RunAction to associate with this EventAction object.
detThe DetectorConstruction which we are using.
accumulationtimeThe accumulation time, default value 20 us.

Definition at line 3 of file EventAction.cc.

References detector, and eventMessenger.

  :runAct(run),printModulo(100),eventMessenger(0), myAccumulationTime(accumulationtime)
{
  detector=det;
  eventMessenger = new EventActionMessenger(this);
}

Member Function Documentation

void EventAction::AddGeDetectorEvent ( G4double  time,
G4double  energy 
)

Add a germanium detector event when such occurs.

Parameters:
timeThe time of the event.
energyThe energy of deposited.

Definition at line 50 of file EventAction.cc.

References AllAccumulatedStatistics::AddGeDetectorEvent(), and myStatistics.

Referenced by SteppingAction::UserSteppingAction().

{
  myStatistics->AddGeDetectorEvent(time,energy);
}
void EventAction::AddScintillatorPlateEvent ( AllAccumulatedStatistics::ScintillatorPlate  plate,
G4double  time,
G4double  energy 
)

Add a scintillator plate event.

Parameters:
plateThe plate the eventoccurred in
timeThe time of the event.
energyThe energy of deposited.

Definition at line 55 of file EventAction.cc.

References AllAccumulatedStatistics::AddScintillatorPlateEvent(), and myStatistics.

Referenced by SteppingAction::UserSteppingAction().

{
  myStatistics->AddScintillatorPlateEvent(plate,time,energy);
}
void EventAction::AddScintillatorTubeEvent ( G4int  scintillatorID,
G4double  time,
G4double  energy 
)

Add a scintillator event when such occurs.

Parameters:
scintillatorIDThe scintillator ID
timeThe time of the event.
energyDeposited energy.

Definition at line 45 of file EventAction.cc.

References AllAccumulatedStatistics::AddScintillatorTubeEvent(), and myStatistics.

Referenced by SteppingAction::UserSteppingAction().

{
  myStatistics->AddScintillatorTubeEvent(scintillatorID,time,energy); //a range check would probable be good here.
}
void EventAction::SetPrintModulo ( G4int  val) [inline]
Parameters:
valThe value to set PrintModulo to.

Definition at line 82 of file EventAction.hh.

References printModulo.

Referenced by EventActionMessenger::SetNewValue().

{printModulo = val;};

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines

Back to the main page of the Precalibrated Ion Beam Identification Detector project

Created by Rikard Lundmark