Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4IonTable.hh 94421 2015-11-16 08:22:56Z gcosmo $
// $Id: G4IonTable.hh 96314 2016-04-06 07:21:51Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -134,13 +134,23 @@ class G4IonTable
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int lvl=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4int lvl);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E, G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L,
G4double E, G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4double E,
char flbChar, G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E,
G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E,
G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* GetIon(G4int Z, G4int A, G4int L, G4double E,
char flbChar, G4int J=0);
// Z: Atomic Number
// A: Atomic Mass (nn + np +nlambda)
// L: Number of Lmabda
// E: Excitaion energy
// lvl: Isomer Level 0: ground state)
// flb: Floating level base (enum defined in G4Ions.hh)
// flbChar: Floating level base denoted bya character (X,Y,Z,U,V,W)
// J: Total Angular momentum (in unit of 1/2) : not used
G4ParticleDefinition* GetIon(G4int encoding);
@@ -151,13 +161,23 @@ class G4IonTable
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int lvl=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4int lvl);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E, G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L,
G4double E, G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4double E,
char flbChar, G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E,
G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E,
G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* FindIon(G4int Z, G4int A, G4int L, G4double E,
char flbChar, G4int J=0);
// Z: Atomic Number
// A: Atomic Mass (nn + np +nlambda)
// L: Number of Lmabda
// E: Excitaion energy
// lvl: Isomer Level 0: ground state)
// flb: Floating level base (enum defined in G4Ions.hh)
// flbChar: Floating level base denoted bya character (X,Y,Z,U,V,W)
// J: Total Angular momentum (in unit of 1/2) : not used
static G4bool IsIon(const G4ParticleDefinition*);
@@ -168,8 +188,10 @@ class G4IonTable
const G4String& GetIonName(G4int Z, G4int A, G4int lvl=0) const;
const G4String& GetIonName(G4int Z, G4int A, G4double E) const;
const G4String& GetIonName(G4int Z, G4int A, G4int L, G4double E) const;
const G4String& GetIonName(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::noFloat) const;
const G4String& GetIonName(G4int Z, G4int A, G4int L, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::noFloat) const;
const G4String& GetIonName(G4int Z, G4int A, G4int L, G4int lvl) const;
// get ion name
@@ -210,7 +232,9 @@ class G4IonTable
// lvl is isomer level
G4double GetLifeTime(const G4ParticleDefinition*) const;
G4double GetLifeTime(G4int Z, G4int A, G4double E) const;
G4double GetLifeTime(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::noFloat) const;
G4double GetLifeTime(G4int Z, G4int A, G4double E, char flbChar) const;
// Returns a life time of an ion. -1 for stable ion, and -1001 for ion
// that is not listed in G4NuclideTable.
@@ -240,12 +264,13 @@ class G4IonTable
protected:
G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int lvl=0);
G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int L, G4int lvl);
G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4double E, G4int J=0);
G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* FindIonInMaster(G4int Z, G4int A, G4int L,
G4double E, G4int J=0);
G4double E, G4Ions::G4FloatLevelBase flb, G4int J=0);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4double E);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int L, G4double E);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int L, G4double E, G4Ions::G4FloatLevelBase flb);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int lvl=0);
G4ParticleDefinition* CreateIon(G4int Z, G4int A, G4int L, G4int lvl);
@@ -263,7 +288,7 @@ class G4IonTable
// Create Ion
G4IsotopeProperty* FindIsotope(G4int Z, G4int A, G4double E) const;
G4IsotopeProperty* FindIsotope(G4int Z, G4int A, G4double E, G4Ions::G4FloatLevelBase flb) const;
G4IsotopeProperty* FindIsotope(G4int Z, G4int A, G4int lvl) const;
// Ask properties of isotopes to this G4VIsotopeTable
@@ -296,7 +321,6 @@ class G4IonTable
// ion list. This implementation is equivalent to make the ion table thread
// private. The two shadow ponters are used by each worker thread to copy the
// content from the master thread.
static const G4double tolerance;
enum { numberOfElements = 118};
static const G4String elementName[numberOfElements];
+104 -2
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4Ions.hh 69557 2013-05-08 12:01:40Z gcosmo $
// $Id: G4Ions.hh 96314 2016-04-06 07:21:51Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -91,12 +91,33 @@ class G4Ions : public G4ParticleDefinition
// Get Isomer level (=0 for ground state)
G4int GetIsomerLevel() const;
private:
// enumerator for floating level base
enum class G4FloatLevelBase { noFloat=0, plus_U, plus_V, plus_W, plus_X, plus_Y, plus_Z };
static G4Ions::G4FloatLevelBase FloatLevelBase(char flbChar);
static G4Ions::G4FloatLevelBase FloatLevelBase(G4int flbIdx);
static char FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb);
// set/get methods for floating level base
G4Ions::G4FloatLevelBase GetFloatLevelBase() const;
G4int GetFloatLevelBaseIndex() const;
void SetFloatLevelBase(G4Ions::G4FloatLevelBase flb);
void SetFloatLevelBase(char flbChar);
void SetFloatLevelBase(G4int flbIdx);
private:
G4double theExcitationEnergy;
G4int theIsomerLevel;
G4FloatLevelBase floatLevelBase;
};
#define plusU G4Ions::G4FloatLevelBase::plus_U
#define plusV G4Ions::G4FloatLevelBase::plus_V
#define plusW G4Ions::G4FloatLevelBase::plus_W
#define plusX G4Ions::G4FloatLevelBase::plus_X
#define plusY G4Ions::G4FloatLevelBase::plus_Y
#define plusZ G4Ions::G4FloatLevelBase::plus_Z
inline
G4Ions* G4Ions::IonsDefinition()
{
@@ -121,6 +142,87 @@ inline
return theIsomerLevel;
}
inline
G4Ions::G4FloatLevelBase G4Ions::GetFloatLevelBase() const
{
return floatLevelBase;
}
inline
G4int G4Ions::GetFloatLevelBaseIndex() const
{
return static_cast<G4int>(floatLevelBase);
}
inline
void G4Ions::SetFloatLevelBase(G4Ions::G4FloatLevelBase flb)
{
floatLevelBase = flb;
}
inline
void G4Ions::SetFloatLevelBase(char flbChar)
{
floatLevelBase = FloatLevelBase(flbChar);
}
inline
void G4Ions::SetFloatLevelBase(G4int flbIdx)
{
floatLevelBase = FloatLevelBase(flbIdx);
}
inline
G4Ions::G4FloatLevelBase G4Ions::FloatLevelBase(char flbChar)
{
G4Ions::G4FloatLevelBase flb = G4FloatLevelBase::noFloat;
switch(flbChar)
{
case 'u': case 'U':
flb = plusU;
break;
case 'v': case 'V':
flb = plusV;
break;
case 'w': case 'W':
flb = plusW;
break;
case 'x': case 'X':
flb = plusX;
break;
case 'y': case 'Y':
flb = plusY;
break;
case 'z': case 'Z':
flb = plusZ;
break;
default:
break;
}
return flb;
}
inline
G4Ions::G4FloatLevelBase G4Ions::FloatLevelBase(G4int flbIdx)
{
static G4Ions::G4FloatLevelBase flb[] =
{ G4FloatLevelBase::noFloat,
G4FloatLevelBase::plus_U,
G4FloatLevelBase::plus_V,
G4FloatLevelBase::plus_W,
G4FloatLevelBase::plus_X,
G4FloatLevelBase::plus_Y,
G4FloatLevelBase::plus_Z };
return flb[flbIdx];
}
inline
char G4Ions::FloatLevelBaseChar(G4Ions::G4FloatLevelBase flb)
{
static char flbChar[] = {'\0','U','V','W','X','Y','Z'};
return flbChar[static_cast<G4int>(flb)];
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4IsotopeProperty.hh 69557 2013-05-08 12:01:40Z gcosmo $
// $Id: G4IsotopeProperty.hh 96314 2016-04-06 07:21:51Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -41,6 +41,7 @@
#include "globals.hh"
class G4DecayTable;
#include "G4Ions.hh"
class G4IsotopeProperty
{
// Class Description
@@ -89,6 +90,11 @@ class G4IsotopeProperty
G4int GetIsomerLevel() const;
void SetIsomerLevel(G4int level);
// Set/Get floating level base
G4Ions::G4FloatLevelBase GetFloatLevelBase() const;
void SetFloatLevelBase(G4Ions::G4FloatLevelBase flb);
void SetFloatLevelBase(G4int flbIndex);
// Set/Get life time
G4double GetLifeTime() const;
void SetLifeTime(G4double T);
@@ -109,6 +115,7 @@ class G4IsotopeProperty
G4DecayTable* fDecayTable; // decay Table
G4double fMagneticMoment; // magnetic moment
G4int fIsomerLevel; // isomer level
G4Ions::G4FloatLevelBase fFloatLevelBase; // floating level base
};
inline
@@ -205,6 +212,25 @@ inline
{
fDecayTable = table;
}
inline
G4Ions::G4FloatLevelBase G4IsotopeProperty::GetFloatLevelBase() const
{
return fFloatLevelBase;
}
inline
void G4IsotopeProperty::SetFloatLevelBase(G4Ions::G4FloatLevelBase flb)
{
fFloatLevelBase = flb;
}
inline
void G4IsotopeProperty::SetFloatLevelBase(G4int flbIndex)
{
fFloatLevelBase = G4Ions::FloatLevelBase(flbIndex);
}
#endif
@@ -214,5 +240,3 @@ inline
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4KL3DecayChannel.hh 67971 2013-03-13 10:13:24Z gcosmo $
// $Id: G4KL3DecayChannel.hh 95906 2016-03-02 10:56:50Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -66,7 +66,7 @@ class G4KL3DecayChannel :public G4VDecayChannel
protected:
// assignment of daughter particles for arrays of daughters[] etc.
enum{idPi=0, idLepton=1, idNutrino=2};
G4double daughterM[3];
//G4double daughterM[3];
protected:
// calcurate momentum of daughters
@@ -88,11 +88,10 @@ class G4KL3DecayChannel :public G4VDecayChannel
// pLambda : linear energy dependence of f+
// pXi0 : = f+(0)/f-
// pNorm : normalization factor
G4double DalitzDensity(G4double Epi, G4double El, G4double Enu);
G4double DalitzDensity(G4double parentmass, G4double Epi, G4double El, G4double Enu,
G4double massPi, G4double massL , G4double massNu );
private:
// constants used in DalitzDensity()
// Kon mass
G4double massK;
// coefficients
G4double pLambda;
G4double pXi0;
@@ -78,39 +78,33 @@ public: // With Description
private:
// Radiative Correction Factors
G4double F_c(G4double x, G4double x0);
G4double F_theta(G4double x, G4double x0);
G4double R_c(G4double x);
G4double EMMU;
G4double EMASS;
G4double F_c(G4double x, G4double x0 , G4double omega);
G4double F_theta(G4double x, G4double x0 , G4double omega);
G4double R_c(G4double x , G4double omega);
};
inline G4double G4MuonDecayChannelWithSpin::F_c(G4double x, G4double x0)
inline G4double G4MuonDecayChannelWithSpin::F_c(G4double x, G4double x0 , G4double omega)
{
G4double omega = std::log(EMMU/EMASS);
G4double f_c;
f_c = (5.+17.*x-34.*x*x)*(omega+std::log(x))-22.*x+34.*x*x;
f_c = (1.-x)/(3.*x*x)*f_c;
f_c = (6.-4.*x)*R_c(x)+(6.-6.*x)*std::log(x) + f_c;
f_c = (6.-4.*x)*R_c(x,omega)+(6.-6.*x)*std::log(x) + f_c;
f_c = (CLHEP::fine_structure_const/CLHEP::twopi) * (x*x-x0*x0) * f_c;
return f_c;
}
inline G4double G4MuonDecayChannelWithSpin::F_theta(G4double x, G4double x0)
inline G4double G4MuonDecayChannelWithSpin::F_theta(G4double x, G4double x0,G4double omega)
{
G4double omega = std::log(EMMU/EMASS);
G4double f_theta;
f_theta = (1.+x+34*x*x)*(omega+std::log(x))+3.-7.*x-32.*x*x;
f_theta = f_theta + ((4.*(1.-x)*(1.-x))/x)*std::log(1.-x);
f_theta = (1.-x)/(3.*x*x) * f_theta;
f_theta = (2.-4.*x)*R_c(x)+(2.-6.*x)*std::log(x)-f_theta;
f_theta = (2.-4.*x)*R_c(x,omega)+(2.-6.*x)*std::log(x)-f_theta;
f_theta = (CLHEP::fine_structure_const/CLHEP::twopi) * (x*x-x0*x0) * f_theta;
return f_theta;
@@ -93,19 +93,21 @@ public:
G4double GetLevelTolerance() { return flevelTolerance; };
void AddState(G4int,G4int,G4double,G4double,G4int ionJ=0,G4double ionMu=0.0);
void AddState(G4int,G4int,G4double,G4int,G4double,G4int ionJ=0,G4double ionMu=0.0);
//G4bool Exists(G4double,G4double,G4double);
//Use GetIsotope(G4int Z, G4int A, G4double E)
//void FillProperty(G4ParticleDefinition*);
size_t GetSizeOfIsotopeList(){ return ( fIsotopeList ? fIsotopeList->size() : static_cast<size_t>(0)) ; };
size_t GetSizeOfIsotopeList()
{ return ( fIsotopeList ? fIsotopeList->size() : static_cast<size_t>(0)) ; };
//
// with description
//
virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E);
virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::noFloat);
virtual G4IsotopeProperty* GetIsotopeByIsoLvl(G4int Z, G4int A, G4int lvl=0);
//
// again it will replace the pure virtual one in the abstract base class.
@@ -113,6 +115,7 @@ public:
// Z: Atomic Number
// A: Atomic Mass
// E: Excitaion energy
// flb: floating level base (enum defined in G4Ions.hh)
// or
// lvl: isomer level
//
@@ -159,8 +162,10 @@ private:
G4IsotopeList* fIsotopeList;
G4double flevelTolerance;
G4NuclideTableMessenger* fMessenger;
};
private:
G4double StripFloatLevelBase(G4double E, G4int& flbIndex);
};
inline
size_t G4NuclideTable::entries() const
@@ -174,4 +179,5 @@ inline
if ( fIsotopeList && idx<fIsotopeList->size()) return (*fIsotopeList)[idx];
else return 0;
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4PhaseSpaceDecayChannel.hh 92057 2015-08-14 13:34:55Z gcosmo $
// $Id: G4PhaseSpaceDecayChannel.hh 95906 2016-03-02 10:56:50Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -41,6 +41,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4VDecayChannel.hh"
#include "G4Cache.hh"
class G4PhaseSpaceDecayChannel :public G4VDecayChannel
{
@@ -73,8 +74,9 @@ class G4PhaseSpaceDecayChannel :public G4VDecayChannel
public:
static G4double Pmx(G4double e, G4double p1, G4double p2);
private:
static G4ThreadLocal G4double current_parent_mass;
private:
//A thread-local object
G4Cache<G4double> current_parent_mass;
G4DecayProducts *OneBodyDecayIt();
G4DecayProducts *TwoBodyDecayIt();
G4DecayProducts *ThreeBodyDecayIt();
@@ -77,31 +77,6 @@ class G4PionRadiativeDecayChannel : public G4VDecayChannel
virtual G4DecayProducts *DecayIt(G4double);
private:
G4double beta;
G4double cib;
G4double csdp;
G4double csdm;
G4double cif;
G4double cig;
G4double xl, yl, xu, yu, d2wmax;
G4double D2W(const G4double x, const G4double y);
};
inline G4double G4PionRadiativeDecayChannel::D2W(const G4double x,
const G4double y)
{
G4double d2w = cib*(1.-y)*(1.+((1.-x)*(1.-x)))/((x*x)*(x+y-1.)) +
csdp*(1.-x)*((x+y-1.)*(x+y-1.)) +
csdm*(1.-x)*((1.-y)*(1.-y)) +
cif*(x-1.)*(1.-y)/x +
cig*(1.-y)*(1.-x+(x*x)/(x+y-1.))/x;
return d2w;
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VDecayChannel.hh 93024 2015-09-30 15:59:32Z gcosmo $
// $Id: G4VDecayChannel.hh 95906 2016-03-02 10:56:50Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -43,65 +43,13 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
/////@@#include "G4PDefSplitter.hh"
#include "G4Threading.hh"
#include "G4AutoLock.hh"
class G4ParticleDefinition;
class G4DecayProducts;
class G4ParticleTable;
/////@@class G4DecayChannelData
/////@@{
/////@@ // Encapsulates the fields associated to the class G4VDecayChannel that
/////@@ // may not be read-only.
/////@@
/////@@ public:
/////@@
/////@@ void initialize()
/////@@ {
/////@@ parent = 0;
/////@@ daughters = 0;
/////@@ parent_mass = 0.0;
/////@@ daughters_mass = 0;
/////@@ daughters_width = 0;
/////@@ }
/////@@
/////@@ G4ParticleDefinition* parent;
/////@@ G4ParticleDefinition** daughters;
/////@@ G4double parent_mass;
/////@@ G4double* daughters_mass;
/////@@ G4double* daughters_width;
/////@@};
/////@@
/////@@// The type G4DecayChannelManager is introduced to encapsulate the methods used
/////@@// by both the master thread and worker threads to allocate memory space for
/////@@// the fields encapsulated by the class G4DecayChannelData. When each thread
/////@@// initializes the value for these fields, it refers to them using a macro
/////@@// definition defined below. For every G4DecayChannel instance, there is
/////@@// a corresponding G4DecayChannelData instance. All G4DecayChannelData
/////@@// instances are organized by the class G4DecayChannelManager as an array.
/////@@// The field "int instanceID" is added to the class G4DecayChannel.
/////@@// The value of this field in each G4DecayChannel instance is the subscript
/////@@// of the corresponding G4DecayChannelData instance.
/////@@// In order to use the class G4DecayChannelManager, we add a static member in
/////@@// G4DecayChannel as follows: "static G4DecayChannelManager subInstanceManager".
/////@@// For the master thread, the array for G4DecayChannelData instances grows
/////@@// dynamically along with G4DecayChannel instances are created.
/////@@// For each worker thread, it copies the array of G4DecayChannelData instances
/////@@// from the master thread.
/////@@// In addition, it invokes a method similiar to the constructor explicitly
/////@@// to achieve the partial effect for each instance in the array.
/////@@//
/////@@typedef G4PDefSplitter<G4DecayChannelData> G4DecayChannelManager;
/////@@
/////@@// These macros change the references to fields that are now encapsulated
/////@@// in the class G4DecayChannelData.
/////@@//
/////@@#define G4MT_parent ((G4VDecayChannel::subInstanceManager.offset[instanceID]).parent)
/////@@#define G4MT_daughters ((G4VDecayChannel::subInstanceManager.offset[instanceID]).daughters)
/////@@#define G4MT_parent_mass ((G4VDecayChannel::subInstanceManager.offset[instanceID]).parent_mass)
/////@@#define G4MT_daughters_mass ((G4VDecayChannel::subInstanceManager.offset[instanceID]).daughters_mass)
/////@@#define G4MT_daughters_width ((G4VDecayChannel::subInstanceManager.offset[instanceID]).daughters_width)
/////@@
class G4VDecayChannel
{
// Class Description:
@@ -180,17 +128,16 @@ class G4VDecayChannel
void SetPolarization(const G4ThreeVector&);
const G4ThreeVector& GetPolarization() const;
/////@@
/////@@ // returns the instance ID.
/////@@ inline G4int GetInstanceID() const;
/////@@ // returns the private data instance manager.
/////@@ static const G4DecayChannelManager& GetSubInstanceManager();
protected: // with description
// clear daughters array
void ClearDaughtersName();
protected:
inline void CheckAndFillDaughters();
inline void CheckAndFillParent();
private:
// fill daughters array
void FillDaughters();
// fill parent
@@ -242,15 +189,13 @@ class G4VDecayChannel
static const G4String noName;
/////@@ // This field is used as instance ID.
/////@@ G4int instanceID;
/////@@ // This field helps to use the class G4DecayChannelManager introduced above.
/////@@ G4PART_DLL static G4DecayChannelManager subInstanceManager;
G4ParticleDefinition* G4MT_parent;
G4ParticleDefinition** G4MT_daughters;
G4double G4MT_parent_mass;
G4double* G4MT_daughters_mass;
G4double* G4MT_daughters_width;
G4Mutex daughtersMutex;
G4Mutex parentMutex;
};
// ------------------------------------------------------------
@@ -267,7 +212,7 @@ inline
G4ParticleDefinition* G4VDecayChannel::GetDaughter(G4int anIndex)
{
// pointers to daughter particles are filled, if they are not set yet
if (G4MT_daughters == 0) FillDaughters();
CheckAndFillDaughters();
// get the pointer to a daughter particle
if ( (anIndex>=0) && (anIndex<numberOfDaughters) ) {
@@ -311,7 +256,7 @@ inline
G4ParticleDefinition* G4VDecayChannel::GetParent()
{
// the pointer to the parent particle is filled, if it is not set yet
if (G4MT_parent == 0) FillParent();
CheckAndFillParent();
// get the pointer to the parent particle
return G4MT_parent;
}
@@ -375,8 +320,20 @@ inline
return parent_polarization;
}
/////@@inline
/////@@ G4int G4VDecayChannel::GetInstanceID() const { return instanceID; }
inline
void G4VDecayChannel::CheckAndFillDaughters() {
G4AutoLock l(&daughtersMutex);
if ( G4MT_daughters ==0 ) {
l.unlock();
FillDaughters();
}
}
inline void G4VDecayChannel::CheckAndFillParent() {
G4AutoLock l(&parentMutex);
if ( G4MT_parent == 0 ) {
l.unlock();
FillParent();
}
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VIsotopeTable.hh 69557 2013-05-08 12:01:40Z gcosmo $
// $Id: G4VIsotopeTable.hh 96314 2016-04-06 07:21:51Z gcosmo $
//
//
// ------------------------------------------------------------
@@ -38,6 +38,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4Ions.hh"
class G4IsotopeProperty;
@@ -62,7 +63,8 @@ class G4VIsotopeTable
public: // With Description
// pure virtual method
virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E)=0;
virtual G4IsotopeProperty* GetIsotope(G4int Z, G4int A, G4double E,
G4Ions::G4FloatLevelBase flb=G4Ions::G4FloatLevelBase::noFloat)=0;
virtual G4IsotopeProperty* GetIsotopeByIsoLvl(G4int Z, G4int A, G4int level=0);
// Search the isotope in the G4VIsotopeTable.
// The isotope is desingated by
@@ -70,6 +72,7 @@ class G4VIsotopeTable
// G4int A: number of nucleon (Atomic mass)
// and
// G4double E: excited energy
// G4Ions::G4FloatLevelBase flb: floating level base (enum defined in G4Ions.hh)
// or
// G4int level: isomer level
// in the given G4IsotopeProperty.