Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -23,61 +23,53 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4HadronicWhiteBoard_h
#define G4HadronicWhiteBoard_h
//
//---------------------------------------------------------------------------
//
// ClassName: G4HadronicParameters
//
// Author: 2018 Alberto Ribon
//
// Description: Singleton to keep global hadronic parameters.
//
// For the time being, at least, offers only "getters" but
// not "setters", i.e. a recompilation is needed to change
// the default parameters.
//
// Modified:
//
//----------------------------------------------------------------------------
//
#ifndef G4HadronicParameters_h
#define G4HadronicParameters_h 1
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
class G4HadronicWhiteBoard
{
class G4HadronicParameters {
public:
G4HadronicWhiteBoard();
static G4HadronicWhiteBoard& Instance();
void SetProjectile(const G4HadProjectile& aProjectile);
void SetTargetNucleus(const G4Nucleus& aTarget);
void SetProcessName(const G4String& aProcessName);
static G4HadronicParameters* Instance();
~G4HadronicParameters();
void SetModelName(const G4String& aModelName);
G4double GetMaxEnergy() const;
// Upper limit for Geant4 hadronic physics, for any application.
// Any hadronic model, physics list builder and constructor should use this method
// instead of putting an arbitrary value in the code.
// Any application which tries to use hadronic physics for an energy higher than this limit
// will get a run-time crash, because no model is found.
const G4HadProjectile* GetProjectile();
const G4Nucleus& GetTargetNucleus();
const G4ParticleDefinition* GetPDef();
G4String GetParticleName();
G4double GetEnergy();
G4double GetPx();
G4double GetPy();
G4double GetPz();
G4int GetA();
G4int GetZ();
void Dump();
private:
G4HadronicParameters();
static G4HadronicParameters* sInstance;
static G4ThreadLocal G4HadronicWhiteBoard *theInstance;
const G4HadProjectile* theProjectile;
const G4ParticleDefinition* theDef;
const char* theName;
G4double theE;
G4double thePx;
G4double thePy;
G4double thePz;
G4Nucleus theTarget;
G4int theA;
G4int theZ;
G4String theProcessName;
G4String theModelName;
G4double fMaxEnergy;
};
inline G4double G4HadronicParameters::GetMaxEnergy() const {
return fMaxEnergy;
}
#endif