Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: ExN03EventAction.cc,v 1.10 2000/06/05 09:54:37 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: ExN03EventAction.cc,v 1.11 2000/11/21 10:59:44 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -73,6 +72,9 @@ void ExN03EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
void ExN03EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4int evtNb = evt->GetEventID();
|
||||
|
||||
// extracted from hits, compute the total energy deposit (and total charged
|
||||
// track length) in all absorbers and in all gaps
|
||||
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
ExN03CalorHitsCollection* CHC = NULL;
|
||||
@@ -91,7 +93,9 @@ void ExN03EventAction::EndOfEventAction(const G4Event* evt)
|
||||
totEGap += (*CHC)[i]->GetEdepGap();
|
||||
totLGap += (*CHC)[i]->GetTrakGap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// print this information event by event (modulo n)
|
||||
|
||||
if (evtNb%printModulo == 0) {
|
||||
G4cout << "---> End of event: " << evtNb << G4endl;
|
||||
@@ -106,7 +110,25 @@ void ExN03EventAction::EndOfEventAction(const G4Event* evt)
|
||||
|
||||
G4cout << "\n " << n_hit
|
||||
<< " hits are stored in ExN03CalorHitsCollection." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
// extract the trajectories and draw them
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
Reference in New Issue
Block a user