3#include "G4TrajectoryContainer.hh"
4#include "G4Trajectory.hh"
5#include "G4VVisManager.hh"
7#include "G4DigiManager.hh"
15#include "G4RunManager.hh"
28#include "GaudiKernel/SvcFactory.h"
29#include "GaudiKernel/ISvcLocator.h"
30#include "GaudiKernel/SmartDataPtr.h"
31#include "GaudiKernel/Bootstrap.h"
36#include "G4UImanager.hh"
39 :m_runAction(runAction)
41 ISvcLocator* svcLocator = Gaudi::svcLocator();
43 StatusCode sc = svcLocator->service(
"RealizationSvc",tmpReal);
46 std::cout <<
" Could not initialize Realization Service in BesEventAction" << std::endl;
51 m_DM = G4DigiManager::GetDMpointer();
56 m_DM->AddNewModule(mdcDM);
62 m_DM->AddNewModule(cgemDM);
67 m_DM->AddNewModule(tofDM);
72 m_DM->AddNewModule(emcDM);
77 m_DM->AddNewModule(mucDM);
90 G4int eventId = evt->GetEventID();
94 G4UImanager* uiMgr = G4UImanager::GetUIpointer();
111 if (G4VVisManager::GetConcreteInstance())
113 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
114 G4int n_trajectories = 0;
115 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
117 for (G4int i=0; i<n_trajectories; i++)
119 G4Trajectory* trj = (G4Trajectory*)
120 ((*(evt->GetTrajectoryContainer()))[i]);
122 trj->DrawTrajectory(50);
176 m_DM->Digitize(
"BesMdcDigitizer");
181 m_DM->Digitize(
"BesCgemDigitizer");
185 m_DM->Digitize(
"BesTofDigitizer");
189 m_DM->Digitize(
"BesEmcDigitizer");
193 m_DM->Digitize(
"BesMucDigitizer");
void SaveHitAsciiEvents(G4int, const G4Event *)
void SaveAsciiEvents(G4int, const G4Event *)
virtual void EndOfEventAction(const G4Event *)
BesEventAction(BesRunAction *)
virtual void BeginOfEventAction(const G4Event *)
virtual ~BesEventAction()
void SaveHitRootEvent(G4int, const G4Event *)
BesTuningIO * GetTuningIO()
BesTDSWriter * GetTDSWriter()
BesAsciiIO * GetAsciiIO()
void EndOfTruthEvent(const G4Event *)
void BeginOfTruthEvent(const G4Event *)
static BesSensitiveManager * GetSensitiveManager()
void SaveAll(const G4Event *, int)
void GetRootEvent(int evtID)
static G4int GetFormatAR()