Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -23,8 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.18 2010-06-07 05:40:46 perl Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
/// \file electromagnetic/TestEm3/src/EventAction.cc
|
||||
/// \brief Implementation of the EventAction class
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -39,20 +41,19 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EventAction::EventAction(DetectorConstruction* det, RunAction* run,
|
||||
HistoManager* hist)
|
||||
:detector(det), runAct(run), histoManager(hist)
|
||||
EventAction::EventAction(DetectorConstruction* det, RunAction* run)
|
||||
:fDetector(det), fRunAct(run)
|
||||
{
|
||||
drawFlag = "none";
|
||||
printModulo = 10000;
|
||||
eventMessenger = new EventActionMessenger(this);
|
||||
fDrawFlag = "none";
|
||||
fPrintModulo = 10000;
|
||||
fEventMessenger = new EventActionMessenger(this);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EventAction::~EventAction()
|
||||
{
|
||||
delete eventMessenger;
|
||||
delete fEventMessenger;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -62,13 +63,13 @@ void EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
G4int evtNb = evt->GetEventID();
|
||||
|
||||
//survey printing
|
||||
if (evtNb%printModulo == 0)
|
||||
if (evtNb%fPrintModulo == 0)
|
||||
G4cout << "\n---> Begin Of Event: " << evtNb << G4endl;
|
||||
|
||||
//initialize EnergyDeposit per event
|
||||
//
|
||||
for (G4int k=0; k<MaxAbsor; k++) {
|
||||
energyDeposit[k] = trackLengthCh[k] = 0.0;
|
||||
fEnergyDeposit[k] = fTrackLengthCh[k] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +77,10 @@ void EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
|
||||
void EventAction::EndOfEventAction(const G4Event*)
|
||||
{
|
||||
for (G4int k=1; k<=detector->GetNbOfAbsor(); k++) {
|
||||
runAct->fillPerEvent(k,energyDeposit[k],trackLengthCh[k]);
|
||||
if (energyDeposit[k] > 0.) histoManager->FillHisto(k, energyDeposit[k]);
|
||||
for (G4int k=1; k<=fDetector->GetNbOfAbsor(); k++) {
|
||||
fRunAct->FillPerEvent(k,fEnergyDeposit[k],fTrackLengthCh[k]);
|
||||
if (fEnergyDeposit[k] > 0.)
|
||||
G4AnalysisManager::Instance()->FillH1(k, fEnergyDeposit[k]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user