Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: EventAction.cc,v 1.3 2003/10/10 10:42:39 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: EventAction.cc,v 1.4 2004/03/15 11:23:16 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -76,9 +76,9 @@ void EventAction::EndOfEventAction(const G4Event* evt)
for(G4int i=0; i<n_trajectories; i++)
{ G4Trajectory* trj = (G4Trajectory*)
((*(evt->GetTrajectoryContainer()))[i]);
if (drawFlag == "all") trj->DrawTrajectory(50);
if (drawFlag == "all") trj->DrawTrajectory(1000);
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
trj->DrawTrajectory(50);
trj->DrawTrajectory(1000);
}
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: RunAction.cc,v 1.5 2003/10/10 10:42:39 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: RunAction.cc,v 1.7 2004/03/31 16:33:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -33,12 +33,10 @@
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "Randomize.hh"
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/AIDA.h"
#endif
@@ -58,7 +56,7 @@ RunAction::~RunAction()
void RunAction::bookHisto()
{
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
// Creating the analysis factory
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
@@ -84,17 +82,17 @@ void RunAction::bookHisto()
delete hf;
delete tf;
delete af;
#endif
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::cleanHisto()
{
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
tree->commit(); // Writing the histograms to the file
tree->close(); // and closing the tree (and the file)
tree->close(); // and closing the tree (and the file)
delete tree;
#endif
}
@@ -112,19 +110,12 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
//histograms
//
if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void RunAction::EndOfRunAction(const G4Run*)
{
//draw the events
if (G4VVisManager::GetConcreteInstance())
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
// show Rndm status
HepRandom::showEngineStatus();
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: SteppingAction.cc,v 1.3 2003/10/10 10:42:40 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: SteppingAction.cc,v 1.5 2004/03/31 16:33:36 maire Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
@@ -35,7 +35,7 @@
#include "G4VProcess.hh"
#include "G4ParticleTypes.hh"
#ifdef G4ANALYSIS_USE
#ifdef USE_AIDA
#include "AIDA/IHistogram1D.h"
#endif
@@ -77,15 +77,15 @@ void SteppingAction::UserSteppingAction(const G4Step* aStep)
}
G4double xPlus = Eplus/EGamma, xMinus = Eminus/EGamma;
G4double thetaPlus = PGamma.angle(Pplus), thetaMinus = PGamma.angle(Pminus);
#ifdef G4ANALYSIS_USE
static const G4double muonMass=G4MuonPlus::MuonPlus()->GetPDGMass();
G4double GammaPlus=EGamma*xPlus/muonMass;
G4double GammaMinus=EGamma*xMinus/muonMass;
#ifdef USE_AIDA
runAction->GetHisto(0)->fill(1./(1.+pow(thetaPlus*GammaPlus,2)));
runAction->GetHisto(1)->fill(log10(thetaPlus*GammaPlus));
G4double GammaMinus=EGamma*xMinus/muonMass;
runAction->GetHisto(2)->fill(log10(thetaMinus*GammaMinus));
runAction->GetHisto(3)->fill(log10(fabs(thetaPlus *GammaPlus
-thetaMinus*GammaMinus)));