Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -20,12 +20,9 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.8 2004/06/21 10:52:55 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// $Id: EventAction.cc,v 1.4 2004/01/21 17:29:27 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -33,21 +30,25 @@
|
||||
|
||||
#include "RunAction.hh"
|
||||
#include "EventActionMessenger.hh"
|
||||
#include "HistoManager.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifdef USE_AIDA
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
EventAction::EventAction(DetectorConstruction* det, RunAction* run)
|
||||
:detector(det),runAct(run),drawFlag("none"),printModulo(10000),eventMessenger(0)
|
||||
EventAction::EventAction(DetectorConstruction* det, RunAction* run,
|
||||
HistoManager* hist)
|
||||
:detector(det), runAct(run), histoManager(hist)
|
||||
{
|
||||
drawFlag = "none";
|
||||
printModulo = 10000;
|
||||
eventMessenger = new EventActionMessenger(this);
|
||||
}
|
||||
|
||||
@@ -69,15 +70,9 @@ void EventAction::BeginOfEventAction(const G4Event* evt)
|
||||
G4cout << "\n---> Begin Of Event: " << evtNb << G4endl;
|
||||
|
||||
//initialize EnergyDeposit per event
|
||||
size_t n = detector->GetNbOfAbsor();
|
||||
energyDeposit.resize(n);
|
||||
energyLeaving.resize(n);
|
||||
trackLengthCh.resize(n);
|
||||
for (size_t k=0; k<n; k++) {
|
||||
energyDeposit[k] = 0.0;
|
||||
energyLeaving[k] = 0.0;
|
||||
trackLengthCh[k] = 0.0;
|
||||
}
|
||||
//
|
||||
for (G4int k=0; k<MaxAbsor; k++)
|
||||
energyDeposit[k] = energyLeaving[k] = trackLengthCh[k] = 0.0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -86,11 +81,12 @@ void EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
for (G4int k=0; k<detector->GetNbOfAbsor(); k++) {
|
||||
runAct->fillPerEvent(k,energyDeposit[k],trackLengthCh[k],
|
||||
energyLeaving[k]/(G4double)(detector->GetNbOfLayers()));
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if (runAct->GetHisto(k)) {
|
||||
G4double unit = runAct->GetHistoUnit(k);
|
||||
runAct->GetHisto(k)->fill(energyDeposit[k]/unit);
|
||||
energyLeaving[k]/(G4double)(detector->GetNbOfLayers()));
|
||||
|
||||
#ifdef USE_AIDA
|
||||
if (histoManager->GetHisto(k)) {
|
||||
G4double unit = histoManager->GetHistoUnit(k);
|
||||
histoManager->GetHisto(k)->fill(energyDeposit[k]/unit);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user