Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -29,21 +29,20 @@
|
||||
#define BrachyActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
|
||||
class BrachyAnalysisManager;
|
||||
class G4GeneralParticleSource;
|
||||
|
||||
class BrachyActionInitialization: public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
BrachyActionInitialization(BrachyAnalysisManager* analysis);
|
||||
BrachyActionInitialization();
|
||||
virtual ~BrachyActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
|
||||
private:
|
||||
BrachyAnalysisManager* analysis;
|
||||
private:
|
||||
G4GeneralParticleSource* masterGPS;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,56 +23,59 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/*
|
||||
Author: Susanna Guatelli
|
||||
|
||||
The class BrachyAnalysisManager creates and manages histograms and ntuples
|
||||
*/
|
||||
|
||||
#ifndef BrachyAnalysisManager_HH
|
||||
#define BrachyAnalysisManager_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4root.hh"
|
||||
|
||||
/*
|
||||
Author: Susanna Guatelli
|
||||
#ifdef ANALYSIS_USE
|
||||
#include "TROOT.h"
|
||||
#include "TFile.h"
|
||||
#include "TNtuple.h"
|
||||
#include "TH1F.h"
|
||||
#endif
|
||||
|
||||
The class BrachyAnalysisManager creates and manages histograms and ntuples
|
||||
|
||||
This class was developed following the extended Geant4 example analysis/AnaEx01
|
||||
|
||||
1 ntuple is created.
|
||||
*/
|
||||
// Define the total number of histograms
|
||||
|
||||
// Define the total number of columns in the ntuple
|
||||
const G4int MaxHisto = 1;
|
||||
const G4int MaxNtCol = 4;
|
||||
|
||||
class BrachyAnalysisManager
|
||||
{
|
||||
private:
|
||||
BrachyAnalysisManager();
|
||||
|
||||
public:
|
||||
BrachyAnalysisManager();
|
||||
~BrachyAnalysisManager();
|
||||
|
||||
static BrachyAnalysisManager* GetInstance();
|
||||
|
||||
void book();
|
||||
// Create the output ROOT file
|
||||
// Create the ntuple and histograms
|
||||
|
||||
#ifdef ANALYSIS_USE
|
||||
void FillNtupleWithEnergyDeposition(G4double,G4double,G4double,G4double);
|
||||
// Method to fill the ntuple with the energy deposition, integrated over a run, in each voxel
|
||||
// of the scoring mesh
|
||||
|
||||
void FillPrimaryParticleHistogram(G4double);
|
||||
// Energy spectrum of primary particles
|
||||
#endif
|
||||
|
||||
void save();
|
||||
// This method if called at the end of the run to store the
|
||||
// results in the ROOT file
|
||||
|
||||
private:
|
||||
G4bool factoryOn;
|
||||
G4int fHistId[MaxHisto];
|
||||
G4int fNtColId[MaxNtCol];
|
||||
G4AnaH1* primaryParticleSpectrum;
|
||||
static BrachyAnalysisManager* instance;
|
||||
|
||||
#ifdef ANALYSIS_USE
|
||||
TFile* theTFile;
|
||||
TH1F* histo;
|
||||
TNtuple* ntuple;
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorAction.hh 74021 2013-09-19 13:41:54Z gcosmo $
|
||||
// $Id: BrachyPrimaryGeneratorAction.hh 84280 2014-10-13 07:21:10Z gcosmo $
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
@@ -40,12 +40,11 @@
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4GeneralParticleSource;
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorAction(BrachyAnalysisManager*);
|
||||
BrachyPrimaryGeneratorAction();
|
||||
~BrachyPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
@@ -53,6 +52,5 @@ class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* gun;
|
||||
BrachyAnalysisManager* analysis;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -34,18 +34,13 @@
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class BrachySteppingAction: public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
|
||||
BrachySteppingAction(BrachyAnalysisManager* analysis);
|
||||
BrachySteppingAction();
|
||||
~BrachySteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step*);
|
||||
|
||||
private:
|
||||
BrachyAnalysisManager* analysis;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoreWriter.hh"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
/*
|
||||
// Code developed by:
|
||||
// S.Guatelli, susanna@uow.edu.au
|
||||
@@ -45,15 +44,12 @@ Original code from geant4/examples/extended/runAndEvent/RE03,
|
||||
class BrachyUserScoreWriter:public G4VScoreWriter
|
||||
{
|
||||
public:
|
||||
BrachyUserScoreWriter(BrachyAnalysisManager* analysis);
|
||||
BrachyUserScoreWriter();
|
||||
virtual ~BrachyUserScoreWriter();
|
||||
// store a quantity into a file
|
||||
void DumpQuantityToFile(const G4String & psName,
|
||||
const G4String & fileName,
|
||||
const G4String & option);
|
||||
|
||||
private:
|
||||
BrachyAnalysisManager* analysis;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user