Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -72,11 +72,15 @@ class G4ProductionCuts
|
||||
G4bool operator!=(const G4ProductionCuts& right) const;
|
||||
// Equality operators
|
||||
|
||||
void SetProductionCut(G4double cut, G4int index = -1);
|
||||
void SetProductionCut(G4double cut, G4int index);
|
||||
void SetProductionCut(G4double cut, G4ParticleDefinition* ptcl);
|
||||
void SetProductionCut(G4double cut, const G4String& pName);
|
||||
// Set the production cut in range with an index to particle type.
|
||||
// If index is omitted, the value is applied to all particles
|
||||
// Set the production cut in range for a specific particle from
|
||||
// and index, G4ParticleDefinition* or particle name. If the
|
||||
// particle is not a photon, e-, e+ or proton, the function has
|
||||
// no effect.
|
||||
void SetProductionCut(G4double cut);
|
||||
// Set the production cut in range for photons, e-, e+ and protons.
|
||||
|
||||
G4double GetProductionCut(G4int index) const;
|
||||
// Get the production cut in range with an index to particle type
|
||||
@@ -113,79 +117,4 @@ class G4ProductionCuts
|
||||
static G4ThreadLocal G4ParticleDefinition* protonDef; // for proton
|
||||
};
|
||||
|
||||
// ------------------
|
||||
// Inline methods
|
||||
// ------------------
|
||||
|
||||
inline
|
||||
void G4ProductionCuts::SetProductionCut(G4double cut, G4int index)
|
||||
{
|
||||
if (index<0)
|
||||
{
|
||||
for(G4int i = 0; i < NumberOfG4CutIndex; ++i)
|
||||
{
|
||||
fRangeCuts[i] = cut;
|
||||
}
|
||||
isModified = true;
|
||||
|
||||
}
|
||||
else if (index < NumberOfG4CutIndex)
|
||||
{
|
||||
fRangeCuts[index] = cut;
|
||||
isModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ProductionCuts::SetProductionCut(G4double cut,
|
||||
G4ParticleDefinition* ptcl)
|
||||
{
|
||||
G4int idx = -1;
|
||||
if(ptcl) idx = GetIndex(ptcl);
|
||||
if(idx>=0) SetProductionCut(cut,idx);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ProductionCuts::SetProductionCut(G4double cut, const G4String& pName)
|
||||
{
|
||||
G4int idx = GetIndex(pName);
|
||||
if(idx>=0) SetProductionCut(cut,idx);
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4ProductionCuts::GetProductionCut(G4int index) const
|
||||
{
|
||||
G4double cut=-1.0;
|
||||
if ( (index>=0) && (index<NumberOfG4CutIndex) )
|
||||
{
|
||||
cut = fRangeCuts[index];
|
||||
}
|
||||
return cut;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4ProductionCuts::GetProductionCut(const G4String& name) const
|
||||
{
|
||||
return GetProductionCut(GetIndex(name));
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
const std::vector<G4double>& G4ProductionCuts::GetProductionCuts() const
|
||||
{
|
||||
return fRangeCuts;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4ProductionCuts::IsModified() const
|
||||
{
|
||||
return isModified;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ProductionCuts::PhysicsTableUpdated()
|
||||
{
|
||||
isModified = false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Threading.hh"
|
||||
|
||||
class G4VRangeToEnergyConverter
|
||||
{
|
||||
@@ -103,19 +102,17 @@ private:
|
||||
|
||||
protected:
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
static G4Mutex theMutex;
|
||||
#endif
|
||||
|
||||
static G4double Emin;
|
||||
static G4double Emax;
|
||||
static std::vector<G4double>* Energy;
|
||||
static G4int NbinPerDecade;
|
||||
static G4int Nbin;
|
||||
|
||||
const G4ParticleDefinition* theParticle = nullptr;
|
||||
|
||||
G4int fPDG = 0;
|
||||
|
||||
private:
|
||||
|
||||
static G4double sEmin;
|
||||
static G4double sEmax;
|
||||
static std::vector<G4double>* sEnergy;
|
||||
static G4int sNbinPerDecade;
|
||||
static G4int sNbin;
|
||||
|
||||
G4int verboseLevel = 1;
|
||||
G4bool isFirstInstance = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user