Import Geant4 11.3.0.beta source tree
This commit is contained in:
+5
-8
@@ -42,18 +42,15 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction {
|
||||
|
||||
public:
|
||||
|
||||
DetectorConstruction() = default;
|
||||
virtual G4VPhysicalVolume* Construct() override;
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction() = default;
|
||||
virtual G4VPhysicalVolume* Construct() override;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+52
-57
@@ -35,18 +35,18 @@
|
||||
//
|
||||
/// Create a set of profiles for XS study.
|
||||
///
|
||||
/// All profiles are G4H1.
|
||||
/// All profiles are G4H1.
|
||||
/// They are created and filled via G4VAnalysisManager.
|
||||
///
|
||||
/// The profiles can be dumped to all usual formats, including ROOT
|
||||
/// The profiles can be dumped to all usual formats, including ROOT
|
||||
/// (via G4VAnalysisManager).
|
||||
/// An interesting added feature here, is that the plots, while being allocated
|
||||
/// and filled via G4VAnalysisManager, are also dumped
|
||||
/// An interesting added feature here, is that the plots, while being allocated
|
||||
/// and filled via G4VAnalysisManager, are also dumped
|
||||
/// in a Flair-compatible format (via tools::histo::flair).
|
||||
///
|
||||
/// NB: tools::histo::flair code, which allows the dump of any G4H1
|
||||
/// into Flair-compatible format, is fully application-agnostic,
|
||||
/// and is placed in FlukaCern/utils.
|
||||
/// NB: tools::histo::flair code, which allows the dump of any G4H1
|
||||
/// into Flair-compatible format, is fully application-agnostic,
|
||||
/// and is placed in FlukaCern/utils.
|
||||
/// It could also be added as an extension of core G4 Analysis Manager.
|
||||
//
|
||||
// ***************************************************************************
|
||||
@@ -54,75 +54,70 @@
|
||||
#ifndef XS_HISTO_MANAGER_HH
|
||||
#define XS_HISTO_MANAGER_HH
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "XSHistoManagerMessenger.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
class G4ParticleDefinition;
|
||||
class G4Element;
|
||||
class G4Material;
|
||||
class G4VAnalysisManager;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class XSHistoManager {
|
||||
class XSHistoManager
|
||||
{
|
||||
public:
|
||||
XSHistoManager();
|
||||
|
||||
public:
|
||||
XSHistoManager();
|
||||
void SetOutputFileName(const G4String& outputFileName);
|
||||
void SetParticle(const G4String& particleName);
|
||||
void SetElement(const G4String& elementName);
|
||||
void SetMaterial(const G4String& materialName);
|
||||
void SetNumberOfBins(const G4int numBins) { fNumBins = numBins; }
|
||||
void SetMinKinEnergy(const G4double minKineticEnergy) { fMinKineticEnergy = minKineticEnergy; }
|
||||
void SetMaxKinEnergy(const G4double maxKineticEnergy) { fMaxKineticEnergy = maxKineticEnergy; }
|
||||
|
||||
void SetOutputFileName(const G4String& outputFileName);
|
||||
void SetParticle(const G4String& particleName);
|
||||
void SetElement(const G4String& elementName);
|
||||
void SetMaterial(const G4String& materialName);
|
||||
void SetNumberOfBins(const G4int numBins) { fNumBins = numBins; }
|
||||
void SetMinKinEnergy(const G4double minKineticEnergy) { fMinKineticEnergy = minKineticEnergy; }
|
||||
void SetMaxKinEnergy(const G4double maxKineticEnergy) { fMaxKineticEnergy = maxKineticEnergy; }
|
||||
void Book();
|
||||
void EndOfRun();
|
||||
|
||||
void Book();
|
||||
void EndOfRun();
|
||||
private:
|
||||
void CheckInput();
|
||||
void DumpAllG4H1IntoRootFile() const;
|
||||
void DumpAllG4H1IntoFlairFile() const;
|
||||
|
||||
XSHistoManagerMessenger* fMessenger = nullptr;
|
||||
|
||||
private:
|
||||
void CheckInput();
|
||||
void DumpAllG4H1IntoRootFile() const;
|
||||
void DumpAllG4H1IntoFlairFile() const;
|
||||
G4String fOutputFileName = "all_XS";
|
||||
G4String fRootOutputFileName = "all_XS.root";
|
||||
G4String fFlairOutputFileName = "all_XS.hist";
|
||||
const G4ParticleDefinition* fParticle = nullptr;
|
||||
const G4Element* fElement = nullptr;
|
||||
const G4Material* fMaterial = nullptr;
|
||||
G4int fNumBins = 10000;
|
||||
G4double fMinKineticEnergy = 1. * keV;
|
||||
G4double fMaxKineticEnergy = 10. * TeV;
|
||||
G4String fFunctionName = "none";
|
||||
G4String fBinSchemeName = "log";
|
||||
G4String fRootEnergyUnit = "MeV";
|
||||
|
||||
XSHistoManagerMessenger* fMessenger = nullptr;
|
||||
G4VAnalysisManager* fAnalysisManager = nullptr;
|
||||
std::unordered_map<G4int, G4int> fXSProfileIndex; // key: XS index
|
||||
// value: histo index from G4VAnalysisManager
|
||||
|
||||
G4String fOutputFileName = "all_XS";
|
||||
G4String fRootOutputFileName = "all_XS.root";
|
||||
G4String fFlairOutputFileName = "all_XS.hist";
|
||||
const G4ParticleDefinition* fParticle = nullptr;
|
||||
const G4Element* fElement = nullptr;
|
||||
const G4Material* fMaterial = nullptr;
|
||||
G4int fNumBins = 10000;
|
||||
G4double fMinKineticEnergy = 1.*keV;
|
||||
G4double fMaxKineticEnergy = 10.*TeV;
|
||||
G4String fFunctionName = "none";
|
||||
G4String fBinSchemeName = "log";
|
||||
G4String fRootEnergyUnit = "MeV";
|
||||
|
||||
G4VAnalysisManager* fAnalysisManager = nullptr;
|
||||
std::unordered_map<G4int, G4int> fXSProfileIndex; // key: XS index
|
||||
// value: histo index from G4VAnalysisManager
|
||||
|
||||
G4int fElasticXSIndex = 0;
|
||||
G4int fInelasticXSIndex = 1;
|
||||
G4int fCaptureXSIndex = 2;
|
||||
G4int fFissionXSIndex = 3;
|
||||
G4int fChargeExchangeXSIndex = 4;
|
||||
G4int fTotalXSIndex = 5;
|
||||
G4int fElasticPerVolumeXSIndex = 6;
|
||||
G4int fInelasticPerVolumeXSIndex = 7;
|
||||
G4int fElasticXSIndex = 0;
|
||||
G4int fInelasticXSIndex = 1;
|
||||
G4int fCaptureXSIndex = 2;
|
||||
G4int fFissionXSIndex = 3;
|
||||
G4int fChargeExchangeXSIndex = 4;
|
||||
G4int fTotalXSIndex = 5;
|
||||
G4int fElasticPerVolumeXSIndex = 6;
|
||||
G4int fInelasticPerVolumeXSIndex = 7;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+18
-25
@@ -41,43 +41,36 @@
|
||||
#ifndef HISTO_MANAGER_MESSENGER_HH
|
||||
#define HISTO_MANAGER_MESSENGER_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class XSHistoManager;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class XSHistoManagerMessenger: public G4UImessenger {
|
||||
class XSHistoManagerMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
XSHistoManagerMessenger(XSHistoManager* const histoManager);
|
||||
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
XSHistoManagerMessenger(XSHistoManager* const histoManager);
|
||||
private:
|
||||
XSHistoManager* fHisto = nullptr;
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
XSHistoManager* fHisto = nullptr;
|
||||
|
||||
G4UIcmdWithAString fOutputFileNameCmd;
|
||||
G4UIcmdWithAString fParticleNameCmd;
|
||||
G4UIcmdWithAString fElementNameCmd;
|
||||
G4UIcmdWithAString fNonElementaryMaterialNameCmd;
|
||||
G4UIcmdWithAnInteger fNumBinsCmd;
|
||||
G4UIcmdWithADoubleAndUnit fMinKineticEnergyCmd;
|
||||
G4UIcmdWithADoubleAndUnit fMaxKineticEnergyCmd;
|
||||
G4UIcmdWithAString fOutputFileNameCmd;
|
||||
G4UIcmdWithAString fParticleNameCmd;
|
||||
G4UIcmdWithAString fElementNameCmd;
|
||||
G4UIcmdWithAString fNonElementaryMaterialNameCmd;
|
||||
G4UIcmdWithAnInteger fNumBinsCmd;
|
||||
G4UIcmdWithADoubleAndUnit fMinKineticEnergyCmd;
|
||||
G4UIcmdWithADoubleAndUnit fMaxKineticEnergyCmd;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user