Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: Em1RunAction.cc,v 1.16 2002/06/03 13:49:28 maire Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: Em1RunAction.cc,v 1.18 2002/12/11 14:19:24 maire Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -43,15 +43,7 @@
#include "Randomize.hh"
#ifndef G4NOHIST
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/ITree.h"
#include "AIDA/IHistogramFactory.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IAxis.h"
#include "AIDA/IAnnotation.h"
#include "AIDA/ITupleFactory.h"
#include "AIDA/ITuple.h"
#include "AIDA/AIDA.h"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -73,24 +65,26 @@ void Em1RunAction::bookHisto()
{
#ifndef G4NOHIST
// Creating the analysis factory
IAnalysisFactory* af = AIDA_createAnalysisFactory();
AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
// Creating the tree factory
ITreeFactory* tf = af->createTreeFactory();
AIDA::ITreeFactory* tf = af->createTreeFactory();
// Creating a tree mapped to an hbook file.
tree = tf->create("testem1.paw", false, false, "hbook");
G4bool readOnly = false;
G4bool createNew = true;
tree = tf->create("testem1.paw", "hbook", readOnly, createNew);
// Creating a histogram factory, whose histograms will be handled by the tree
IHistogramFactory* hf = af->createHistogramFactory(*tree);
AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
// booking histograms
histo[0] = hf->create1D("1","track length (mm) of a charged particle",
histo[0] = hf->createHistogram1D("1","track length (mm) of a charged particle",
100,0.,50*cm);
histo[1] = hf->create1D("2","Nb of steps per track (charged particle)",
histo[1] = hf->createHistogram1D("2","Nb of steps per track (charged particle)",
100,0.,100.);
histo[2] = hf->create1D("3","step length (mm) charged particle",
histo[2] = hf->createHistogram1D("3","step length (mm) charged particle",
100,0.,10*mm);
delete hf;
@@ -154,8 +148,14 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
{ //nb of tracks and steps per event
G4double dNbOfEvents = double(NbOfEvents);
G4long oldform = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
G4int oldprec = G4cout.precision(4);
#ifdef G4USE_STD_NAMESPACE
G4std::ios::fmtflags mode = G4cout.flags();
G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
#else
G4long mode = G4cout.setf(G4std::ios::fixed,G4std::ios::floatfield);
#endif
G4int prec = G4cout.precision(4);
G4cout << "\n nb tracks/event"
<< " neutral: " << G4std::setw(10) << NbOfTraks0/dNbOfEvents
@@ -176,8 +176,8 @@ void Em1RunAction::EndOfRunAction(const G4Run* aRun)
/dNbOfEvents;
G4cout << G4endl;
G4cout.setf(oldform,G4std::ios::floatfield);
G4cout.precision(oldprec);
G4cout.setf(mode,G4std::ios::floatfield);
G4cout.precision(prec);
}
// delete and remove all contents in ProcCounter