![]() |
Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
|
Holds information about what to do at the beginning and end of each event. More...
#include <EventAction.hh>
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 | |
RunAction * | runAct |
The Pointer to the RunAction associated with this EventAction object. | |
G4int | printModulo |
Print a message when the event number modulo this number equals zero. | |
EventActionMessenger * | eventMessenger |
The messenger. | |
DetectorConstruction * | detector |
The detector construction. | |
G4double | myAccumulationTime |
Default time to accumulate statistics over, usd when constructing the myStatistics object. | |
AllAccumulatedStatistics * | myStatistics |
Contains the statistics accumulated during the event. |
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.
EventAction::EventAction | ( | RunAction * | run, |
DetectorConstruction * | det, | ||
G4double | accumulationtime = 1000*ns |
||
) |
Constructor, constructs the EventAction object.
run | The RunAction to associate with this EventAction object. |
det | The DetectorConstruction which we are using. |
accumulationtime | The 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); }
void EventAction::AddGeDetectorEvent | ( | G4double | time, |
G4double | energy | ||
) |
Add a germanium detector event when such occurs.
time | The time of the event. |
energy | The 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.
plate | The plate the eventoccurred in |
time | The time of the event. |
energy | The 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.
scintillatorID | The scintillator ID |
time | The time of the event. |
energy | Deposited 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] |
val | The value to set PrintModulo to. |
Definition at line 82 of file EventAction.hh.
References printModulo.
Referenced by EventActionMessenger::SetNewValue().
{printModulo = val;};