57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
// This code implementation is the intellectual property of
|
|
// the RD44 GEANT4 collaboration.
|
|
//
|
|
// By copying, distributing or modifying the Program (or any work
|
|
// based on the Program) you indicate your acceptance of this statement,
|
|
// and all its terms.
|
|
//
|
|
// $Id: ExN02EventAction.cc,v 1.3 1998/10/09 14:35:32 japost Exp $
|
|
// GEANT4 tag $Name: geant4-00 $
|
|
//
|
|
//
|
|
|
|
#include "ExN02EventAction.hh"
|
|
|
|
#include "G4Event.hh"
|
|
#include "G4EventManager.hh"
|
|
#include "G4TrajectoryContainer.hh"
|
|
#include "G4Trajectory.hh"
|
|
#include "G4VVisManager.hh"
|
|
#include "G4UImanager.hh"
|
|
#include "G4ios.hh"
|
|
|
|
|
|
ExN02EventAction::ExN02EventAction()
|
|
{}
|
|
|
|
ExN02EventAction::~ExN02EventAction()
|
|
{}
|
|
|
|
void ExN02EventAction::BeginOfEventAction()
|
|
{}
|
|
|
|
void ExN02EventAction::EndOfEventAction()
|
|
{
|
|
const G4Event* evt = fpEventManager->GetConstCurrentEvent();
|
|
|
|
G4cout << ">>> Event " << evt->GetEventID() << endl;
|
|
|
|
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
|
G4int n_trajectories = 0;
|
|
if(trajectoryContainer)
|
|
{ n_trajectories = trajectoryContainer->entries(); }
|
|
G4cout << " " << n_trajectories
|
|
<< " trajectories stored in this event." << endl;
|
|
|
|
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
|
|
|
if(pVVisManager)
|
|
{
|
|
for(G4int i=0; i<n_trajectories; i++)
|
|
{ (*(evt->GetTrajectoryContainer()))[i]->DrawTrajectory(50); }
|
|
}
|
|
}
|
|
|
|
|
|
|