Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4DalitzDecayChannel.hh,v 1.4 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DecayProducts.hh,v 1.8 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DecayTable.hh,v 1.8 2003/06/16 16:58:02 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DecayTableMessenger.hh,v 1.7 2003/05/19 17:10:07 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
//---------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DynamicParticle.hh,v 1.11 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4DynamicParticle.hh,v 1.13 2003/10/21 20:56:13 asaim Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -62,7 +62,7 @@
class G4VProcess;
class G4DecayProducts;
class G4PrimaryParticle;
class G4DynamicParticle
{
@@ -221,7 +221,15 @@ class G4DynamicParticle
// 1: Warning message
// 2: More
private:
G4PrimaryParticle* primaryParticle;
// This void pointer is used by G4EventManager to maintain the
// link between pre-assigned decay products and corresponding
// primary particle.
public:
inline void SetPrimaryParticle(G4PrimaryParticle* p) {primaryParticle=p;}
inline G4PrimaryParticle* GetPrimaryParticle() const {return primaryParticle;}
};
#include "G4DynamicParticle.icc"
@@ -22,7 +22,7 @@
//
//
// $Id: G4DynamicParticle.icc,v 1.8 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4DynamicParticleFastVector.hh,v 1.3 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4ElectronOccupancy.hh,v 1.5 2001/07/11 10:01:55 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4IonTable.hh,v 1.20 2003/06/16 16:58:03 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4Ions.hh,v 1.10 2003/03/11 05:49:41 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4IsotopeProperty.hh,v 1.3 2001/07/11 10:01:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4KL3DecayChannel.hh,v 1.4 2001/07/11 10:01:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -1,175 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4MaterialCutsCouple.hh,v 1.4 2003/04/10 02:51:18 asaim Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is
//
// ------------------------------------------------------------
// First Implementation 17 Sep. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4MaterialCutsCouple_h
#define G4MaterialCutsCouple_h 1
#include "globals.hh"
#include "G4ios.hh"
class G4Material;
#include "G4ProductionCuts.hh"
class G4MaterialCutsCouple
{
public: // with description
// constructor
G4MaterialCutsCouple();
G4MaterialCutsCouple(const G4Material*, G4ProductionCuts* cut=0);
// copy constructor
G4MaterialCutsCouple(const G4MaterialCutsCouple &right);
G4MaterialCutsCouple & operator=(const G4MaterialCutsCouple &right);
public:
// destructor
virtual ~G4MaterialCutsCouple();
// equal opperators
G4int operator==(const G4MaterialCutsCouple &right) const;
G4int operator!=(const G4MaterialCutsCouple &right) const;
public: // with description
void SetMaterial(const G4Material*);
// Set pointer to material
const G4Material* GetMaterial() const;
// Get pointer to material
void SetProductionCuts(G4ProductionCuts*);
// Set pointer to production cuts
G4ProductionCuts* GetProductionCuts() const;
// Get pointer to production cuts
G4bool IsRecalcNeeded() const;
// return true if cut and/or material has been modified
// after last calculation of PhysicsTable
void PhysicsTableUpdated();
// inform end of calculation of PhysicsTable
void SetIndex(G4int idx);
G4int GetIndex() const;
// Set/Get the index number in G4ProductionCutsTable
void SetUseFlag(G4bool flg=true);
G4bool IsUsed() const;
private:
G4bool isMaterialModified;
const G4Material* fMaterial;
G4ProductionCuts* fCuts;
G4int indexNumber;
G4bool isUsedInGeometry;
};
#include "G4ProductionCuts.hh"
inline
void G4MaterialCutsCouple::SetIndex(G4int idx)
{ indexNumber = idx; }
inline
G4int G4MaterialCutsCouple::GetIndex() const
{ return indexNumber; }
inline
void G4MaterialCutsCouple::SetUseFlag(G4bool flg)
{ isUsedInGeometry = flg; }
inline
G4bool G4MaterialCutsCouple::IsUsed() const
{ return isUsedInGeometry; }
inline
void G4MaterialCutsCouple::SetProductionCuts(G4ProductionCuts* aCut)
{ fCuts = aCut; }
inline
G4ProductionCuts* G4MaterialCutsCouple::GetProductionCuts() const
{ return fCuts; }
inline
G4int G4MaterialCutsCouple::operator==(const G4MaterialCutsCouple &right) const
{
return (this == &right);
}
inline
G4int G4MaterialCutsCouple::operator!=(const G4MaterialCutsCouple &right) const
{
return (this != &right);
}
inline
void G4MaterialCutsCouple::SetMaterial(const G4Material* material)
{
fMaterial = material;
isMaterialModified = true;
}
inline
const G4Material* G4MaterialCutsCouple::GetMaterial() const
{
return fMaterial;
}
inline
G4bool G4MaterialCutsCouple::IsRecalcNeeded() const
{
G4bool isCutModified = false;
if (fCuts !=0 ) isCutModified = fCuts->IsModified();
return (isMaterialModified || isCutModified);
}
inline
void G4MaterialCutsCouple::PhysicsTableUpdated()
{
if (fCuts !=0 ) fCuts->PhysicsTableUpdated();
isMaterialModified = false;
}
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4MuonDecayChannel.hh,v 1.5 2001/07/11 10:01:56 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NeutronBetaDecayChannel.hh,v 1.1 2001/09/18 02:15:10 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiProperties.hh,v 1.13 2001/10/16 08:16:19 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiPropertiesTable.hh,v 1.10 2001/10/15 09:58:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
// -------------------------------------------------------------------
// GEANT 4 class file --- Copyright CERN 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4NucleiPropertiesTheoreticalTable.hh,v 1.5 2001/10/15 09:58:30 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PDGCodeChecker.hh,v 1.6 2001/07/11 10:01:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleDefinition.hh,v 1.18.2.1 2003/06/16 17:18:47 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4ParticleDefinition.hh,v 1.21 2003/09/19 19:28:07 kurasige Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -58,6 +58,7 @@ class G4ProcessManager;
class G4DecayTable;
class G4ParticleTable;
class G4Material;
class G4ParticlePropertyTable;
class G4ParticleDefinition
{
@@ -67,6 +68,8 @@ class G4ParticleDefinition
// all the processes this kind of particle can undertake.
//
friend class G4ParticlePropertyTable;
public: // With Description
// Only one type of constructor can be used for G4ParticleDefinition.
// If you want to create new particle, you must set name of the particle
@@ -113,6 +116,7 @@ class G4ParticleDefinition
// void SetApplyCutsFlag(G4bool flag);
// virtual void RestoreCuts(const G4double* cutInLength,
// const G4double* cutInEnergy ){}
// static void SetEnergyRange(G4double lowedge, G4double highedge);
public: // With Description
@@ -149,7 +153,7 @@ class G4ParticleDefinition
G4int GetAntiQuarkContent(G4int flavor) const;
// return the number of quark with flavor contained in this particle.
// The value of flavor is assigned as follows
// 1:d, 2:u, 3:s, 4:c, 5:b, 6:t, 7:l(down type quark) 8:h(up type quark)
// 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
public: // With Description
// ShortLived flag
@@ -275,14 +279,12 @@ class G4ParticleDefinition
// The Particle Data Group integer identifier of the anti-particle
protected:
enum {NumberOfQuarkFlavor = 8};
enum {NumberOfQuarkFlavor = 6};
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)
// 0:d, 1:u, 2:s, 3:c, 4:b, 5:t
private:
// Following members can be changed after construction
@@ -338,8 +340,6 @@ class G4ParticleDefinition
// Get an array of energy cuts for all materials
G4double GetEnergyThreshold(const G4Material* ) const;
// Get a energy cut for a material
static void SetEnergyRange(G4double lowedge, G4double highedge);
};
#include "G4ParticleDefinition.icc"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleDefinition.icc,v 1.4 2003/04/11 11:48:39 asaim Exp $
// GEANT4 tag $Name: geant4-05-02 $
// $Id: G4ParticleDefinition.icc,v 1.6 2003/10/03 16:00:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
inline
@@ -70,30 +70,36 @@ inline
inline
G4int G4ParticleDefinition::GetQuarkContent(G4int flavor) const
{
if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
return theQuarkContent[flavor-1];
{
G4int content = 0;
if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
content = theQuarkContent[flavor-1];
}else {
#ifdef G4VERBOSE
if (verboseLevel >0) {
G4cout << "Invalid Quark Flavor for G4ParticleDefinition::GetQuarkContent";
G4cout << ": flavor=" << flavor <<G4endl;
}
return 0;
}
}
#endif
}
return content;
}
inline
G4int G4ParticleDefinition::GetAntiQuarkContent(G4int flavor) const
{
if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
return theAntiQuarkContent[flavor-1];
{
G4int content = 0;
if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
content = theAntiQuarkContent[flavor-1];
}else {
#ifdef G4VERBOSE
if (verboseLevel >0) {
G4cout <<"Invalid Quark Flavor for G4ParticleDefinition::GetAntiQuarkContent";
G4cout << ": flavor=" << flavor <<G4endl;
}
return 0;
#endif
}
return content;
}
inline
@@ -114,4 +120,3 @@ G4bool G4ParticleDefinition::GetApplyCutsFlag() const
return fApplyCutsFlag;
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleMessenger.hh,v 1.6 2003/05/19 17:10:22 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
//---------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleMomentum.hh,v 1.5 2001/07/11 10:01:57 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -0,0 +1,219 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParticlePropertyData.hh,v 1.1 2003/06/11 07:20:06 kurasige Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// ---------------- G4ParticlePropertyData ----------------
// first implementation by H Kurashige 9 June 2003
// ------------------------------------------------------------
#ifndef G4ParticlePropertyData_h
#define G4ParticlePropertyData_h 1
#include "globals.hh"
#include "G4ios.hh"
class G4ParticlePropertyTable;
class G4ParticlePropertyData
{
// Class Description
// This class containes properties of a particle which are subset
// of properties in G4ParticleDefinition class.
// This class is used only for G4ParticlePropertyTable.
//
friend class G4ParticlePropertyTable;
public: // With Description
G4ParticlePropertyData(const G4String& particleName = "");
// The particle name should be assigned
// This particle name can not be changed except for assignment operator
G4ParticlePropertyData(const G4ParticlePropertyData &right);
virtual ~G4ParticlePropertyData();
const G4ParticlePropertyData & operator=(const G4ParticlePropertyData &right);
G4int operator==(const G4ParticlePropertyData &right) const;
G4int operator!=(const G4ParticlePropertyData &right) const;
public: // With Description
// By these following Getxxxx methods, you can get values
// for members which can not be changed
const G4String& GetParticleName() const { return theParticleName; }
G4double GetPDGMass() const { return thePDGMass; }
G4double GetPDGWidth() const { return thePDGWidth; }
G4double GetPDGCharge() const { return thePDGCharge; }
G4int GetPDGiSpin() const { return thePDGiSpin; }
G4int GetPDGiParity() const { return thePDGiParity; }
G4int GetPDGiConjugation() const { return thePDGiConjugation; }
G4int GetPDGiIsospin() const { return thePDGiIsospin; }
G4int GetPDGiIsospin3() const { return thePDGiIsospin3; }
G4int GetPDGiGParity() const { return thePDGiGParity; }
G4int GetLeptonNumber() const { return theLeptonNumber; }
G4int GetBaryonNumber() const { return theBaryonNumber; }
G4int GetPDGEncoding() const { return thePDGEncoding; }
G4int GetAntiPDGEncoding() const { return theAntiPDGEncoding; }
G4int GetQuarkContent(G4int flavor) const;
G4int GetAntiQuarkContent(G4int flavor) const;
// return the number of quark with flavor contained in this particle.
// The value of flavor is assigned as follows
// 1:d, 2:u, 3:s, 4:c, 5:b, 6:t
G4double GetPDGLifeTime() const { return thePDGLifeTime; }
// SetXXX methods
void SetPDGMass(G4double newMass);
void SetPDGWidth(G4double newWidth);
void SetPDGCharge(G4double newCharge);
void SetPDGiSpin(G4int newSpin);
void SetPDGiParity(G4int newParity);
void SetPDGiConjugation(G4int newConjugation);
void SetPDGiIsospin(G4int newIsospin);
void SetPDGiIsospin3(G4int newIsospin3);
void SetPDGiGParity(G4int newGParity);
void SetLeptonNumber(G4int newLeptonNumber);
void SetBaryonNumber(G4int newBaryonNumber);
void SetPDGEncoding(G4int newEncoding);
void SetAntiPDGEncoding(G4int newAntiEncoding);
void SetQuarkContent(G4int flavor, G4int newContent);
void SetAntiQuarkContent(G4int flavor, G4int newContent);
void SetPDGLifeTime(G4double newLifeTime);
public: // With Description
void Print() const;
// Prints information of data members.
public:
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
private:
G4String theParticleName;
// The name of the particle.
G4double thePDGMass;
// The mass of the particle, in units of equivalent energy.
G4double thePDGWidth;
// The decay width of the particle, usually the width of a
// Breit-Wigner function, assuming that you are near the
// mass center anyway. (in units of equivalent energy)
G4double thePDGCharge;
// The charge of the particle.(in units of Coulomb)
// ---- following members are quantum number
// i.e. discrete numbers can be allowded
// So, you can defined only by using integer in constructor
G4int thePDGiSpin;
// The total spin of the particle, also often denoted as
// capital J, in units of 1/2.
G4int thePDGiParity;
// The parity quantum number, in units of 1. If the parity
// is not defined for this particle, we will set this to 0.
G4int thePDGiConjugation;
// This charge conjugation quantum number in units of 1.
G4int thePDGiGParity;
// The value of the G-parity quantum number.
G4int thePDGiIsospin;
G4int thePDGiIsospin3;
// The isospin and its 3rd-component in units of 1/2.
G4int theLeptonNumber;
// The lepton quantum number.
G4int theBaryonNumber;
// The baryon quantum number.
G4int thePDGEncoding;
// The Particle Data Group integer identifier of this particle
G4int theAntiPDGEncoding;
// The Particle Data Group integer identifier of the anti-particle
G4double thePDGLifeTime;
// The Particle Life Time
enum {NumberOfQuarkFlavor = 6};
G4int theQuarkContent[NumberOfQuarkFlavor];
G4int theAntiQuarkContent[NumberOfQuarkFlavor];
// the number of quark (minus Sign means anti-quark) contents
private:
G4bool fPDGMassModified;
G4bool fPDGWidthModified;
G4bool fPDGChargeModified;
G4bool fPDGiSpinModified;
G4bool fPDGiParityModified;
G4bool fPDGiConjugationModified;
G4bool fPDGiGParityModified;
G4bool fPDGiIsospinModified;
G4bool fPDGiIsospin3Modified;
G4bool fPDGIsospinModified;
G4bool fPDGIsospin3Modified;
G4bool fLeptonNumberModified;
G4bool fBaryonNumberModified;
G4bool fPDGEncodingModified;
G4bool fAntiPDGEncodingModified;
G4bool fQuarkContentModified;
G4bool fAntiQuarkContentModified;
G4bool fPDGLifeTimeModified;
private:
G4int verboseLevel;
};
#include "G4ParticlePropertyData.icc"
#endif
@@ -0,0 +1,181 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ParticlePropertyData.icc,v 1.1 2003/06/11 07:20:06 kurasige Exp $
//
inline
void G4ParticlePropertyData::SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
inline
G4int G4ParticlePropertyData::GetVerboseLevel() const
{
return verboseLevel;
}
inline
G4int G4ParticlePropertyData::GetQuarkContent(G4int flavor) const
{
if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
return theQuarkContent[flavor-1];
}else {
return 0;
}
}
inline
G4int G4ParticlePropertyData::GetAntiQuarkContent(G4int flavor) const
{
if ((flavor>0) && (flavor<NumberOfQuarkFlavor)){
return theAntiQuarkContent[flavor-1];
}else {
return 0;
}
}
inline
void G4ParticlePropertyData::SetPDGEncoding(G4int aEncoding)
{
thePDGEncoding = aEncoding;
fPDGEncodingModified = true;
theAntiPDGEncoding = -1*aEncoding;
fAntiPDGEncodingModified = true;
}
inline
void G4ParticlePropertyData::SetAntiPDGEncoding(G4int aEncoding)
{
theAntiPDGEncoding = aEncoding;
fAntiPDGEncodingModified = true;
}
inline
void G4ParticlePropertyData::SetPDGMass(G4double newMass)
{
thePDGMass = newMass;
fPDGMassModified = true;
}
inline
void G4ParticlePropertyData::SetPDGWidth(G4double newWidth)
{
thePDGWidth = newWidth;
fPDGWidthModified = true;
}
inline
void G4ParticlePropertyData::SetPDGCharge(G4double newCharge)
{
thePDGCharge = newCharge;
fPDGChargeModified = true;
}
inline
void G4ParticlePropertyData::SetPDGiSpin(G4int newSpin)
{
thePDGiSpin = newSpin;
fPDGiSpinModified = true;
}
inline
void G4ParticlePropertyData::SetPDGiParity(G4int newParity)
{
thePDGiParity = newParity;
fPDGiParityModified = true;
}
inline
void G4ParticlePropertyData::SetPDGiConjugation(G4int newConjugation)
{
thePDGiConjugation = newConjugation;
fPDGiConjugationModified = true;
}
inline
void G4ParticlePropertyData::SetPDGiIsospin(G4int newIsospin)
{
thePDGiIsospin = newIsospin;
fPDGiIsospinModified = true;
}
inline
void G4ParticlePropertyData::SetPDGiIsospin3(G4int newIsospin3)
{
thePDGiIsospin3 = newIsospin3;
fPDGiIsospin3Modified = true;
}
inline
void G4ParticlePropertyData::SetPDGiGParity(G4int newGParity)
{
thePDGiGParity = newGParity;
fPDGiGParityModified = true;
}
inline
void G4ParticlePropertyData::SetLeptonNumber(G4int newLeptonNumber)
{
theLeptonNumber = newLeptonNumber;
fLeptonNumberModified = true;
}
inline
void G4ParticlePropertyData::SetBaryonNumber(G4int newBaryonNumber)
{
theBaryonNumber = newBaryonNumber;
fBaryonNumberModified = true;
}
inline
void G4ParticlePropertyData::SetQuarkContent(G4int flavor, G4int newContent)
{
if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
theQuarkContent[flavor-1] = newContent;
fQuarkContentModified = true;
}
}
inline
void G4ParticlePropertyData::SetAntiQuarkContent(G4int flavor, G4int newContent)
{
if ((flavor>0) && (flavor<=NumberOfQuarkFlavor)){
theAntiQuarkContent[flavor-1] = newContent;
fAntiQuarkContentModified = true;
}
}
inline
void G4ParticlePropertyData::SetPDGLifeTime(G4double newLifeTime)
{
thePDGLifeTime = newLifeTime;
fPDGLifeTimeModified = true;
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticlePropertyMessenger.hh,v 1.6 2003/05/19 17:10:22 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
//---------------------------------------------------------------
@@ -0,0 +1,116 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4ParticlePropertyTable.hh,v 1.3 2003/12/09 15:35:46 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// ---------------- G4ParticlePropertyTable ----------------
// first implementation by H Kurashige 9 June 2003
// ------------------------------------------------------------
#ifndef G4ParticlePropertyTable_h
#define G4ParticlePropertyTable_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticlePropertyData.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
class G4ParticlePropertyTable
{
// Class Description
// This class manages properties of a particle which are
// properties in G4ParticlePropertyTable class.
// This class is a singleton.
protected:
// hide default constructor because this class is a singleton
G4ParticlePropertyTable();
G4ParticlePropertyTable(const G4ParticlePropertyTable &right);
const G4ParticlePropertyTable & operator=(const G4ParticlePropertyTable &right);
public:
G4int operator==(const G4ParticlePropertyTable &right) const;
G4int operator!=(const G4ParticlePropertyTable &right) const;
public:
virtual ~G4ParticlePropertyTable();
public: //With Description
static G4ParticlePropertyTable* GetParticlePropertyTable();
// return the pointer to G4ParticlePropertyTable object
// G4ParticlePropertyTable is a "singleton" and can get its pointer
// by this function. At the first time of calling this function,
// the G4ParticleTable object is instantiated
G4ParticlePropertyData* GetParticleProperty(const G4String& aParticleName);
G4ParticlePropertyData* GetParticleProperty(const G4ParticleDefinition* aParticle);
// return the pointer to G4ParticlePropertyData object,
// which contains properties for the particle specified.
// (return 0 if the specified particle does not exist)
G4bool SetParticleProperty(const G4ParticlePropertyData& newProperty);
// change particle properties for the particle specified.
// return true if properties are sucessfully set
void Clear();
// clear and destroy arrayDataObject
public:
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
protected:
G4ParticleTable* fParticleTable;
private:
G4int verboseLevel;
static G4ParticlePropertyTable* fgParticlePropertyTable;
protected:
std::vector<G4ParticlePropertyData*> arrayDataObject;
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleTable.hh,v 1.16 2003/06/16 16:58:05 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleTable.icc,v 1.8 2001/07/11 10:01:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleTableIterator.hh,v 1.6 2003/06/16 16:58:07 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleWithCuts.hh,v 1.18 2003/06/25 10:18:53 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// --------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4PhaseSpaceDecayChannel.hh,v 1.5 2001/10/15 09:58:31 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -1,236 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ProductionCuts.hh,v 1.10 2003/06/16 16:58:08 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is
//
// ------------------------------------------------------------
// First Implementation 17 Sep. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4ProductionCuts_h
#define G4ProductionCuts_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticleDefinition.hh"
enum G4ProductionCutsIndex
{
idxG4GammaCut =0,
idxG4ElectronCut,
idxG4PositronCut,
NumberOfG4CutIndex
};
class G4ProductionCuts
{
public: // with description
// constructor
G4ProductionCuts();
// copy constructor
G4ProductionCuts(const G4ProductionCuts &right);
G4ProductionCuts & operator=(const G4ProductionCuts &right);
public:
// destructor
virtual ~G4ProductionCuts();
// equal opperators
G4int operator==(const G4ProductionCuts &right) const;
G4int operator!=(const G4ProductionCuts &right) const;
public: // with description
// Set Cuts methods
void SetProductionCut(G4double cut, G4int index = -1);
void SetProductionCut(G4double cut, G4ParticleDefinition* ptcl);
void SetProductionCut(G4double cut, const G4String& pName);
// Set the productionCut in range with an index to particle type
// if index is omitted, the value is applied to all particles
G4double GetProductionCut(G4int index) const;
// Get the productionCut in range with an index to particle type
G4double GetProductionCut(const G4String& name) const;
// Get the productionCut in range with a name of particle type
void SetProductionCuts(std::vector<G4double>&);
// Set the vector of production cuts in range for all particles
const std::vector<G4double>& GetProductionCuts() const;
// Get the vector of production cuts in range for all particles
G4bool IsModified() const;
// return true if any cut value has been modified
// after last calculation of PhysicsTable
void PhysicsTableUpdated();
// inform end of calculation of PhysicsTable to ProductionCut
public:
static G4int GetIndex(const G4String& name);
static G4int GetIndex(const G4ParticleDefinition* ptcl);
protected:
std::vector<G4double> fRangeCuts;
G4bool isModified;
private:
static const G4ParticleDefinition* gammaDef;
static const G4ParticleDefinition* electDef;
static const G4ParticleDefinition* positDef;
};
inline
G4int G4ProductionCuts::GetIndex(const G4String& name)
{
G4int index;
if ( name == "gamma" ) { index = 0; }
else if ( name == "e-" ) { index = 1; }
else if ( name == "e+" ) { index = 2; }
else { index = -1; }
return index;
}
inline
G4int G4ProductionCuts::GetIndex(const G4ParticleDefinition* ptcl)
{
if(!ptcl) return -1;
if(gammaDef==0 && ptcl->GetParticleName()=="gamma") { gammaDef = ptcl; }
if(electDef==0 && ptcl->GetParticleName()=="e-") { electDef = ptcl; }
if(positDef==0 && ptcl->GetParticleName()=="e+") { positDef = ptcl; }
G4int index;
if(ptcl==gammaDef) { index = 0; }
else if(ptcl==electDef) { index = 1; }
else if(ptcl==positDef) { index = 2; }
else { index = -1; }
return index;
}
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
void G4ProductionCuts::SetProductionCuts(std::vector<G4double>& cut)
{
for(G4int i = 0; (i<NumberOfG4CutIndex); i++) {
fRangeCuts[i] = cut[i];
}
isModified = true;
}
inline
const std::vector<G4double>& G4ProductionCuts::GetProductionCuts() const
{
return fRangeCuts;
}
inline
G4bool G4ProductionCuts::IsModified() const
{
return isModified;
}
inline
void G4ProductionCuts::PhysicsTableUpdated()
{
isModified = false;
}
#endif
@@ -1,309 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ProductionCutsTable.hh,v 1.8 2003/06/16 16:58:13 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// ------------------------------------------------------------
// First Implementation 05 Oct. 2002 M.Asai
// ------------------------------------------------------------
#ifndef G4ProductionCutsTable_h
#define G4ProductionCutsTable_h 1
class G4RegionStore;
class G4VRangeToEnergyConverter;
class G4LogicalVolume;
class G4ProductionCuts;
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4MaterialCutsCouple.hh"
#include "G4Region.hh"
class G4ProductionCutsTable
{
// Class Description
// G4ProductionCutsTable is a static singleton class of a table of
// G4ProductionCuts objects. This class also manages tables of
// production cut and energy cut for each particle type.
public: // with description
static G4ProductionCutsTable* GetProductionCutsTable();
// This static method returns the singleton pointer of this class object.
// At the first invokation of this method, the singleton object is instantiated.
protected:
G4ProductionCutsTable();
private:
G4ProductionCutsTable(const G4ProductionCutsTable& right);
public:
virtual ~G4ProductionCutsTable();
public: // with description
void UpdateCoupleTable();
// This method triggers an update of the table of G4ProductionCuts objects.
void SetEnergyRange(G4double lowedge, G4double highedge);
// This method sets the limits of energy cuts for all particles.
G4double GetLowEdgeEnergy() const;
G4double GetHighEdgeEnergy() const;
// These methods get the limits of energy cuts for all particles.
void DumpCouples() const;
// Display a list of registored couples
private:
static G4ProductionCutsTable* fG4ProductionCutsTable;
typedef std::vector<G4MaterialCutsCouple*> G4CoupleTable;
typedef std::vector<G4MaterialCutsCouple*>::const_iterator CoupleTableIterator;
typedef std::vector<G4double> G4CutVectorForAParticle;
typedef std::vector<G4CutVectorForAParticle*> G4CutTable;
G4CoupleTable coupleTable;
G4CutTable rangeCutTable;
G4CutTable energyCutTable;
G4RegionStore* fG4RegionStore;
G4VRangeToEnergyConverter* converters[NumberOfG4CutIndex];
G4ProductionCuts* defaultProductionCuts;
G4bool firstUse;
// These two vectors are for the backward comparibility
G4double* rangeDoubleVector[NumberOfG4CutIndex];
G4double* energyDoubleVector[NumberOfG4CutIndex];
public:
const std::vector<G4double>* GetRangeCutsVector(size_t pcIdx) const;
const std::vector<G4double>* GetEnergyCutsVector(size_t pcIdx) const;
// These two vectors are for the backward comparibility
G4double* GetRangeCutsDoubleVector(size_t pcIdx) const;
G4double* GetEnergyCutsDoubleVector(size_t pcIdx) const;
public: // with description
size_t GetTableSize() const;
// This method returns the size of the couple table.
const G4MaterialCutsCouple* GetMaterialCutsCouple(G4int i) const;
// This method returns the pointer to the couple.
const G4MaterialCutsCouple*
GetMaterialCutsCouple(const G4Material* aMat,
const G4ProductionCuts* aCut) const;
// This method returns the pointer to the couple.
G4int GetCoupleIndex(const G4MaterialCutsCouple* aCouple) const;
G4int GetCoupleIndex(const G4Material* aMat,
const G4ProductionCuts* aCut) const;
// These methods return the index of the couple.
// -1 is returned if index is not found.
G4bool IsModified() const;
// This method returns TRUE if at least one production cut value is modified.
void PhysicsTableUpdated();
// This method resets the status of IsModified(). This method must
// be exclusively used by RunManager when physics tables are built.
G4ProductionCuts* GetDefaultProductionCuts() const;
// This method returns the default production cuts.
private:
void ScanAndSetCouple(G4LogicalVolume* aLV,
G4MaterialCutsCouple* aCouple,
G4Region* aRegion);
bool IsCoupleUsedInTheRegion(const G4MaterialCutsCouple* aCouple,
const G4Region* aRegion) const;
public: // with description
// Store cuts and material information in files under the specified directory.
G4bool StoreCutsTable(const G4String& directory,
G4bool ascii = false);
// Retrieve cuts values information in files under the specified directory.
G4bool RetrieveCutsTable(const G4String& directory,
G4bool ascii = false);
// check stored material and cut values are consistent with the current detector setup.
G4bool CheckForRetrieveCutsTable(const G4String& directory,
G4bool ascii = false);
protected:
// Store material information in files under the specified directory.
virtual G4bool StoreMaterialInfo(const G4String& directory,
G4bool ascii = false);
// check stored material is consistent with the current detector setup.
virtual G4bool CheckMaterialInfo(const G4String& directory,
G4bool ascii = false);
// Store materialCutsCouple information in files under the specified directory.
virtual G4bool StoreMaterialCutsCoupleInfo(const G4String& directory,
G4bool ascii = false);
// check stored materialCutsCouple is consistent with the current detector setup.
virtual G4bool CheckMaterialCutsCoupleInfo(const G4String& directory,
G4bool ascii = false);
// Store cut values information in files under the specified directory.
virtual G4bool StoreCutsInfo(const G4String& directory,
G4bool ascii = false);
// Retrieve cut values information in files under the specified directory.
virtual G4bool RetrieveCutsInfo(const G4String& directory,
G4bool ascii = false);
private:
enum { FixedStringLengthForStore = 32 };
};
inline
const std::vector<G4double>* G4ProductionCutsTable::GetRangeCutsVector(size_t pcIdx) const
{
return rangeCutTable[pcIdx];
}
inline
const std::vector<G4double>* G4ProductionCutsTable::GetEnergyCutsVector(size_t pcIdx) const
{
return energyCutTable[pcIdx];
}
inline
size_t G4ProductionCutsTable::GetTableSize() const
{
return coupleTable.size();
}
inline
const G4MaterialCutsCouple* G4ProductionCutsTable::GetMaterialCutsCouple(G4int i) const
{
return coupleTable[size_t(i)];
}
inline
G4bool G4ProductionCutsTable::IsModified() const
{
if(firstUse) return true;
for(G4ProductionCutsTable::CoupleTableIterator itr=coupleTable.begin();
itr!=coupleTable.end();itr++){
if((*itr)->IsRecalcNeeded())
{
return true;
}
}
return false;
}
inline
void G4ProductionCutsTable::PhysicsTableUpdated()
{
for(G4ProductionCutsTable::CoupleTableIterator itr=coupleTable.begin();itr!=coupleTable.end();itr++){
(*itr)->PhysicsTableUpdated();
}
}
inline
G4double* G4ProductionCutsTable::GetRangeCutsDoubleVector(size_t pcIdx) const
{ return rangeDoubleVector[pcIdx]; }
inline
G4double* G4ProductionCutsTable::GetEnergyCutsDoubleVector(size_t pcIdx) const
{ return energyDoubleVector[pcIdx]; }
inline
G4ProductionCuts* G4ProductionCutsTable::GetDefaultProductionCuts() const
{ return defaultProductionCuts; }
inline
bool G4ProductionCutsTable::IsCoupleUsedInTheRegion(
const G4MaterialCutsCouple* aCouple,
const G4Region* aRegion) const
{
G4ProductionCuts* fProductionCut = aRegion->GetProductionCuts();
std::vector<G4Material*>::const_iterator mItr = aRegion->GetMaterialIterator();
size_t nMaterial = aRegion->GetNumberOfMaterials();
for(size_t iMate=0;iMate<nMaterial;iMate++, mItr++){
if(aCouple->GetMaterial()==(*mItr) &&
aCouple->GetProductionCuts()==fProductionCut){
return true;
}
}
return false;
}
inline
const G4MaterialCutsCouple*
G4ProductionCutsTable::GetMaterialCutsCouple(const G4Material* aMat,
const G4ProductionCuts* aCut) const
{
for(CoupleTableIterator cItr=coupleTable.begin();cItr!=coupleTable.end();cItr++)
{
if((*cItr)->GetMaterial()!=aMat) continue;
if((*cItr)->GetProductionCuts()==aCut) return (*cItr);
}
return 0;
}
inline
G4int G4ProductionCutsTable::GetCoupleIndex(const G4MaterialCutsCouple* aCouple) const
{
G4int idx = 0;
for(CoupleTableIterator cItr=coupleTable.begin();cItr!=coupleTable.end();cItr++)
{
if((*cItr)==aCouple) return idx;
idx++;
}
return -1;
}
inline
G4int G4ProductionCutsTable:: GetCoupleIndex(const G4Material* aMat,
const G4ProductionCuts* aCut) const
{
const G4MaterialCutsCouple* aCouple = GetMaterialCutsCouple(aMat,aCut);
return GetCoupleIndex(aCouple);
}
#endif
@@ -1,80 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForAntiNeutron.hh,v 1.3 2003/06/16 16:58:14 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for anti Neutron.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForAntiNeutron_h
#define G4RToEConvForAntiNeutron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForAntiNeutron : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForAntiNeutron();
public:
// destructor
virtual ~G4RToEConvForAntiNeutron();
// calculate energy cut from given range cut for the material
virtual G4double Convert(G4double rangeCut, const G4Material* material);
};
inline
G4double G4RToEConvForAntiNeutron::Convert(G4double , const G4Material* )
{
// reutrn lowest energy
return LowestEnergy;
}
#endif
@@ -1,72 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForAntiProton.hh,v 1.3 2003/06/16 16:58:16 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for anti proton.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForAntiProton_h
#define G4RToEConvForAntiProton_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForAntiProton : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForAntiProton();
public:
// destructor
virtual ~G4RToEConvForAntiProton();
};
#endif
@@ -1,83 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForElectron.hh,v 1.3 2003/06/16 16:58:17 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for electron.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForElectron_h
#define G4RToEConvForElectron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForElectron : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForElectron();
public:
// destructor
virtual ~G4RToEConvForElectron();
protected:
virtual G4double ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy
) const;
//-------------- Range Table ------------------------------------------
virtual void BuildRangeVector(const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector);
};
#endif
@@ -1,115 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForGamma.hh,v 1.3 2003/06/16 16:58:18 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for gamma.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForGamma_h
#define G4RToEConvForGamma_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForGamma : public G4VRangeToEnergyConverter
{
public: // with description
// constructor
G4RToEConvForGamma();
public:
// destructor
virtual ~G4RToEConvForGamma();
public: // with description
// calculate energy cut from given range cut for the material
// virtual G4double convert(G4double rangeCut, const G4Material* material);
protected:
virtual G4double ComputeLoss( G4double AtomicNumber,
G4double KineticEnergy
) const;
//-------------- Range Table ------------------------------------------
virtual void BuildRangeVector( const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector);
typedef G4LossTable G4CrossSectionTable;
void BuildAbsorptionLengthVector( const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector);
G4double ComputeCrossSection( G4double AtomicNumber,
G4double KineticEnergy
) const;
};
inline
G4double G4RToEConvForGamma::ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy) const
{
return ComputeCrossSection(AtomicNumber,KineticEnergy);
}
inline
void G4RToEConvForGamma::BuildRangeVector(
const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector)
{
BuildAbsorptionLengthVector(aMaterial, maxEnergy, aMass, rangeVector);
}
#endif
@@ -1,79 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForNeutron.hh,v 1.3 2003/06/16 16:58:19 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for Neutron.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForNeutron_h
#define G4RToEConvForNeutron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForNeutron : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForNeutron();
public:
// destructor
virtual ~G4RToEConvForNeutron();
// calculate energy cut from given range cut for the material
virtual G4double Convert(G4double rangeCut, const G4Material* material);
};
inline
G4double G4RToEConvForNeutron::Convert(G4double , const G4Material* )
{
// reutrn lowest energy
return LowestEnergy;
}
#endif
@@ -1,83 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForPositron.hh,v 1.3 2003/06/16 16:58:20 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for positron.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForPositron_h
#define G4RToEConvForPositron_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForPositron : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForPositron();
public:
// destructor
virtual ~G4RToEConvForPositron();
protected:
virtual G4double ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy
) const;
//-------------- Range Table ------------------------------------------
virtual void BuildRangeVector(const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector);
};
#endif
@@ -1,73 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4RToEConvForProton.hh,v 1.3 2003/06/16 16:58:21 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is a Range to Energy Converter for proton.
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4RToEConvForProton_h
#define G4RToEConvForProton_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4VRangeToEnergyConverter.hh"
class G4RToEConvForProton : public G4VRangeToEnergyConverter
{
public:
// constructor
G4RToEConvForProton();
public:
// destructor
virtual ~G4RToEConvForProton();
};
#endif
@@ -22,7 +22,7 @@
//
//
// $Id: G4ShortLivedTable.hh,v 1.11 2003/06/16 16:58:22 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4TauLeptonicDecayChannel.hh,v 1.1 2002/03/08 08:47:52 kurasige Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VDecayChannel.hh,v 1.10 2002/11/20 15:05:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -22,7 +22,7 @@
//
//
// $Id: G4VIsotopeTable.hh,v 1.5 2001/07/11 10:01:58 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
// GEANT4 tag $Name: geant4-06-00 $
//
//
// ------------------------------------------------------------
@@ -1,179 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VRangeToEnergyConverter.hh,v 1.4 2003/06/16 16:58:23 gunter Exp $
// GEANT4 tag $Name: geant4-05-02 $
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
//
//
// Class Description
// This class is base class for Range to Energy Converters.
// Cut in energy corresponding to given cut value in range
// is calculated for a material by using Convert method
//
// ------------------------------------------------------------
// First Implementation 5 Oct. 2002 H.Kurahige
// ------------------------------------------------------------
#ifndef G4VRangeToEnergyConverter_h
#define G4VRangeToEnergyConverter_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticleDefinition.hh"
#include "G4PhysicsTable.hh"
#include "G4Element.hh"
#include "G4Material.hh"
class G4PhysicsLogVector;
class G4VRangeToEnergyConverter
{
public: // with description
// constructor
G4VRangeToEnergyConverter();
// copy constructor
G4VRangeToEnergyConverter(const G4VRangeToEnergyConverter &right);
G4VRangeToEnergyConverter & operator=(const G4VRangeToEnergyConverter &right);
public:
// destructor
virtual ~G4VRangeToEnergyConverter();
// equal opperators
G4int operator==(const G4VRangeToEnergyConverter &right) const;
G4int operator!=(const G4VRangeToEnergyConverter &right) const;
public: // with description
// calculate energy cut from given range cut for the material
virtual G4double Convert(G4double rangeCut, const G4Material* material);
// set energy range for all particle type
static void SetEnergyRange(G4double lowedge, G4double highedge);
// get energy range for all particle type
static G4double GetLowEdgeEnergy();
static G4double GetHighEdgeEnergy();
// return pointer to the particle type which this converter takes care
const G4ParticleDefinition* GetParticleType() const;
// return the Loss Table
const G4PhysicsTable* GetLossTable() const;
//-------------- Loss Table ------------------------------------------
// theLossTable is a collection of loss vectors for all elements.
// Each loss vector has energy loss values (cross section values
// for neutral particles) which are calculated by
// ComputeLoss(G4double AtomicNumber,G4double KineticEnergy).
protected:
static G4double LowestEnergy, HighestEnergy;
const G4ParticleDefinition* theParticle;
typedef G4PhysicsTable G4LossTable;
G4LossTable* theLossTable;
G4int NumberOfElements;
typedef G4PhysicsLogVector G4LossVector;
G4int TotBin;
protected:// with description
virtual void BuildLossTable();
virtual G4double ComputeLoss(G4double AtomicNumber,
G4double KineticEnergy
) const;
//-------------- Range Table ------------------------------------------
protected:
typedef G4PhysicsLogVector G4RangeVector;
virtual void BuildRangeVector(const G4Material* aMaterial,
G4double maxEnergy,
G4double aMass,
G4RangeVector* rangeVector);
protected:
G4double ConvertCutToKineticEnergy(
G4RangeVector* theRangeVector,
G4double theCutInLength,
size_t materialIndex
) const;
G4double RangeLinSimpson(
const G4ElementVector* elementVector,
const G4double* atomicNumDensityVector,
G4double aMass,
G4double taulow, G4double tauhigh,
G4int nbin
);
G4double RangeLogSimpson(
const G4ElementVector* elementVector,
const G4double* atomicNumDensityVector,
G4double aMass,
G4double ltaulow, G4double ltauhigh,
G4int nbin
);
public: // with description
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
private:
G4int verboseLevel;
};
inline
void G4VRangeToEnergyConverter::SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
inline
G4int G4VRangeToEnergyConverter::GetVerboseLevel() const
{
return verboseLevel;
}
#endif