Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
EventAction.hh
Go to the documentation of this file.
00001 
00012 #ifndef EventAction_h
00013 #define EventAction_h 1 //!<Inclusion guard
00014 
00015 #include "G4UserEventAction.hh"
00016 #include "globals.hh"
00017 
00018 #include "RunAction.hh"
00019 #include "EventActionMessenger.hh"
00020 
00021 #include "G4Event.hh"
00022 #include "G4TrajectoryContainer.hh"
00023 #include "G4VTrajectory.hh"
00024 #include "G4VVisManager.hh"
00025 #include "G4UnitsTable.hh"
00026 #include "DetectorConstruction.hh"
00027 
00028 #include "EventHit.hh"
00029 #include "AllAccumulatedStatistics.hh"
00030 
00031 
00032 #include "Randomize.hh"
00033 #include <iomanip>
00034 
00035 
00036 
00037 
00038 #ifndef STDIO
00039 #define STDIO //!<Inclusion guard
00040 #include <stdio.h>
00041 #endif
00042 
00043 class RunAction;
00044 class EventActionMessenger;
00045 
00046 
00047 
00051 class EventAction : public G4UserEventAction
00052 {
00053 public:
00054   EventAction(RunAction* run 
00055               ,DetectorConstruction* det 
00056               ,G4double accumulationtime = 1000*ns 
00057               ); 
00058 
00059   virtual ~EventAction(); 
00060 
00061   void  BeginOfEventAction(const G4Event*);     
00062   void    EndOfEventAction(const G4Event*);     
00063   
00064   void AddScintillatorTubeEvent(G4int scintillatorID 
00065                                 ,G4double time 
00066                                 ,G4double energy 
00067                                 );
00068   
00069   void AddGeDetectorEvent(G4double time 
00070                           ,G4double energy 
00071                           ); 
00072   
00073   void AddScintillatorPlateEvent(AllAccumulatedStatistics::ScintillatorPlate plate 
00074                                  ,G4double time 
00075                                  ,G4double energy 
00076                                  ); 
00077 
00078 
00079   void PrintToVerboseFile(G4String messageToPrint);
00080 
00082   void SetPrintModulo(G4int val )  {printModulo = val;};
00083 
00084 
00085     
00086 private:
00087   RunAction*  runAct; 
00088   
00089   
00090   G4int     printModulo; 
00091                              
00092   EventActionMessenger*  eventMessenger; 
00093 
00094    
00095   DetectorConstruction * detector; 
00096   G4double myAccumulationTime; 
00097 
00098   AllAccumulatedStatistics * myStatistics; 
00099 };
00100 
00101 #endif
00102 
00103     
 All Classes Files Functions Variables Defines

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

Created by Rikard Lundmark