Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -30,21 +30,20 @@
#ifndef G4PDGCodeChecker_hh
#define G4PDGCodeChecker_hh 1
#include "globals.hh"
#include "G4ios.hh"
#include "globals.hh"
class G4PDGCodeChecker
class G4PDGCodeChecker
{
public:
G4PDGCodeChecker();
~G4PDGCodeChecker() = default;
~G4PDGCodeChecker() = default;
G4int CheckPDGCode(G4int code, const G4String& type);
inline G4int GetQuarkContent(G4int flavor) const ;
inline G4int GetQuarkContent(G4int flavor) const;
inline G4int GetAntiQuarkContent(G4int flavor) const;
inline G4bool IsAntiParticle() const;
inline G4int GetQuarkFlavor(G4int idx) const;
@@ -60,20 +59,20 @@ class G4PDGCodeChecker
inline void SetVerboseLevel(G4int verbose);
protected:
enum
{
NumberOfQuarkFlavor = 8
};
enum {NumberOfQuarkFlavor = 8};
private:
private:
void GetDigits(G4int code);
G4int CheckForQuarks();
G4int CheckForDiQuarks();
G4int CheckForMesons();
G4int CheckForBaryons();
G4int CheckForNuclei();
private:
private:
G4int verboseLevel = 0;
G4int code = 0;
@@ -90,88 +89,79 @@ class G4PDGCodeChecker
G4int theQuarkContent[NumberOfQuarkFlavor];
G4int theAntiQuarkContent[NumberOfQuarkFlavor];
// The number of quark (minus Sign means anti-quark) contents
// The value of flavor is assigned as follows
// 0:d, 1:u, 2:s, 3:c,
// 4:b, 5:t, 6:l(down type quark) 7:h(up type quark)
// The number of quark (minus Sign means anti-quark) contents
// The value of flavor is assigned as follows
// 0:d, 1:u, 2:s, 3:c,
// 4:b, 5:t, 6:l(down type quark) 7:h(up type quark)
};
// ------------------------
// Inline methods
// ------------------------
inline
G4int G4PDGCodeChecker::GetQuarkContent(G4int flavor) const
inline G4int G4PDGCodeChecker::GetQuarkContent(G4int flavor) const
{
G4int value = 0;
if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor))
{
if ((flavor >= 0) && (flavor < NumberOfQuarkFlavor)) {
value = theQuarkContent[flavor];
}
return value;
}
inline
G4int G4PDGCodeChecker::GetAntiQuarkContent(G4int flavor) const
inline G4int G4PDGCodeChecker::GetAntiQuarkContent(G4int flavor) const
{
G4int value = 0;
if ((flavor>=0)&&(flavor<NumberOfQuarkFlavor))
{
if ((flavor >= 0) && (flavor < NumberOfQuarkFlavor)) {
value = theAntiQuarkContent[flavor];
}
return value;
}
inline
G4int G4PDGCodeChecker::GetQuarkFlavor(G4int idx) const
inline G4int G4PDGCodeChecker::GetQuarkFlavor(G4int idx) const
{
G4int value;
if (idx ==0) value = quark1;
else if (idx ==1) value = quark2;
else if (idx ==2) value = quark3;
else value = -1;
if (idx == 0)
value = quark1;
else if (idx == 1)
value = quark2;
else if (idx == 2)
value = quark3;
else
value = -1;
return value;
}
inline
G4int G4PDGCodeChecker::GetExotic() const
inline G4int G4PDGCodeChecker::GetExotic() const
{
return exotic;
}
inline
G4int G4PDGCodeChecker::GetRadial() const
inline G4int G4PDGCodeChecker::GetRadial() const
{
return radial;
}
inline
G4int G4PDGCodeChecker::GetMultiplet() const
inline G4int G4PDGCodeChecker::GetMultiplet() const
{
return multiplet;
}
inline
G4int G4PDGCodeChecker::GetSpin() const
inline G4int G4PDGCodeChecker::GetSpin() const
{
return spin;
}
inline
G4bool G4PDGCodeChecker::IsAntiParticle() const
inline G4bool G4PDGCodeChecker::IsAntiParticle() const
{
return (code <0);
return (code < 0);
}
inline
void G4PDGCodeChecker::SetVerboseLevel(G4int value)
inline void G4PDGCodeChecker::SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
inline
G4int G4PDGCodeChecker::GetVerboseLevel() const
inline G4int G4PDGCodeChecker::GetVerboseLevel() const
{
return verboseLevel;
}