Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DalitzDecayChannel.hh,v 1.4 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DecayProducts.hh,v 1.8 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DecayTable.hh,v 1.7 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DecayTableMessenger.hh,v 1.6 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DynamicParticle.hh,v 1.11 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DynamicParticle.icc,v 1.8 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DynamicParticleFastVector.hh,v 1.3 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectronOccupancy.hh,v 1.5 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IonTable.hh,v 1.18 2001/07/11 10:01:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4IonTable.hh,v 1.19 2003/03/10 08:43:51 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -160,9 +160,6 @@ class G4IonTable
|
||||
void AddProcessManager(const G4String& ionName);
|
||||
// Add process manager to ions with name of 'ionName'
|
||||
|
||||
void SetCuts(G4ParticleDefinition* ion);
|
||||
// Set cut value same as "GenericIon" and build physics tables
|
||||
|
||||
G4int GetVerboseLevel() const;
|
||||
// get Verbose Level defined in G4ParticleTable
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Ions.hh,v 1.9 2001/10/15 09:58:30 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4Ions.hh,v 1.10 2003/03/11 05:49:41 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -40,13 +40,13 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleWithCuts.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
// ######################################################################
|
||||
// ### Ions ###
|
||||
// ######################################################################
|
||||
|
||||
class G4Ions : public G4ParticleWithCuts
|
||||
class G4Ions : public G4ParticleDefinition
|
||||
{
|
||||
// Class Description
|
||||
// All nuclei/ions created on the fly are objects of this class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4IsotopeProperty.hh,v 1.3 2001/07/11 10:01:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4KL3DecayChannel.hh,v 1.4 2001/07/11 10:01:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronBetaDecayChannel.hh,v 1.1 2001/09/18 02:15:10 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NucleiProperties.hh,v 1.13 2001/10/16 08:16:19 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4NucleiPropertiesTable.hh,v 1.10 2001/10/15 09:58:30 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// 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-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PDGCodeChecker.hh,v 1.6 2001/07/11 10:01:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleDefinition.hh,v 1.12 2001/10/15 09:58:30 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4ParticleDefinition.hh,v 1.18 2003/04/11 11:48:39 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -44,6 +44,7 @@
|
||||
// fixed some improper codings H.Kurashige 08 Apr. 1999
|
||||
// added sub-type H.Kurashige 15 Feb. 2000
|
||||
// added RestoreCuts H.Kurashige 09 Mar. 2001
|
||||
// restructuring for Cuts per Region by Hisaya 11 MAr.2003
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4ParticleDefinition_h
|
||||
@@ -97,34 +98,21 @@ class G4ParticleDefinition
|
||||
|
||||
virtual ~G4ParticleDefinition();
|
||||
|
||||
public: // With Description
|
||||
// These methods concerning cut values are provided
|
||||
// to invoke corresponding methods for each particle type.
|
||||
// Actual implementation can be seen in the class
|
||||
// G4ParticleWithCuts
|
||||
virtual void SetCuts(G4double );
|
||||
virtual void SetRangeCut(G4double ,const G4Material*);
|
||||
virtual void SetRangeCutVector(G4std::vector<G4double>&);
|
||||
|
||||
virtual G4double* GetEnergyCuts() const;
|
||||
virtual G4double GetEnergyThreshold(const G4Material* ) const;
|
||||
|
||||
virtual G4double* GetLengthCuts() const;
|
||||
virtual G4double GetRangeThreshold(const G4Material* ) const;
|
||||
|
||||
virtual void ResetCuts();
|
||||
virtual void ReCalcCuts();
|
||||
|
||||
// applyCuts flag
|
||||
G4bool GetApplyCutsFlag() const;
|
||||
void SetApplyCutsFlag(G4bool flag);
|
||||
|
||||
public:
|
||||
// This method concerning cut values is supposed to be used by
|
||||
// G4VUserPhysicsList to restore cutvalues witout calculation
|
||||
// Actual implementation can be seen in the class G4ParticleWithCuts
|
||||
virtual void RestoreCuts(const G4double* cutInLength,
|
||||
const G4double* cutInEnergy ){}
|
||||
public:
|
||||
// These methods concerning cut values are obsolete
|
||||
// virtual void SetCuts(G4double );
|
||||
// virtual void SetRangeCut(G4double ,const G4Material*);
|
||||
// virtual void SetRangeCutVector(G4std::vector<G4double>&);
|
||||
// virtual G4double* GetEnergyCuts() const;
|
||||
// virtual G4double GetEnergyThreshold(const G4Material* ) const ;
|
||||
// virtual G4double* GetLengthCuts() const;
|
||||
// virtual G4double GetRangeThreshold(const G4Material* ) const;
|
||||
// virtual void ResetCuts();
|
||||
// virtual void ReCalcCuts();
|
||||
// G4bool GetApplyCutsFlag() const;
|
||||
// void SetApplyCutsFlag(G4bool flag);
|
||||
// virtual void RestoreCuts(const G4double* cutInLength,
|
||||
// const G4double* cutInEnergy ){}
|
||||
|
||||
|
||||
public: // With Description
|
||||
@@ -321,12 +309,37 @@ class G4ParticleDefinition
|
||||
|
||||
G4ParticleTable* theParticleTable;
|
||||
|
||||
// ApplyCuts flag
|
||||
G4bool fApplyCutsFlag;
|
||||
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
|
||||
private:
|
||||
G4bool fApplyCutsFlag;
|
||||
public:
|
||||
|
||||
void SetApplyCutsFlag(G4bool);
|
||||
G4bool GetApplyCutsFlag() const;
|
||||
|
||||
public: // With Description
|
||||
// Following methods are moved from G4ParticleWithCuts class
|
||||
// for keeping backward compatibility. These methods are obsolete
|
||||
// and will be completely removed away in near future.
|
||||
void SetCuts(G4double aCut);
|
||||
// Set the range of aCut for all materials
|
||||
void SetRangeCut(G4double aCut, const G4Material*);
|
||||
// Set the cut range of aCut for a material
|
||||
void SetRangeCutVector(G4std::vector<G4double>&);
|
||||
// Set the vector of range cuts for all material
|
||||
|
||||
G4double* GetLengthCuts() const;
|
||||
// Get an array of range cuts for all materials
|
||||
G4double GetRangeThreshold(const G4Material* ) const;
|
||||
// Get a range cut for a material
|
||||
G4double* GetEnergyCuts() const;
|
||||
// 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.1 2001/10/15 09:58:31 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4ParticleDefinition.icc,v 1.4 2003/04/11 11:48:39 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
|
||||
inline
|
||||
@@ -43,17 +43,6 @@ inline
|
||||
theDecayTable = aDecayTable;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetApplyCutsFlag(G4bool flag)
|
||||
{
|
||||
fApplyCutsFlag = flag;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4ParticleDefinition::GetApplyCutsFlag() const
|
||||
{
|
||||
return fApplyCutsFlag;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetVerboseLevel(G4int value)
|
||||
@@ -112,42 +101,17 @@ inline
|
||||
{
|
||||
theParticleSubType = subtype;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::ResetCuts(){}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetCuts(G4double ){}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetRangeCut(G4double, const G4Material*){}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetRangeCutVector(G4std::vector<G4double>&){}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::ReCalcCuts(){}
|
||||
|
||||
inline
|
||||
G4double* G4ParticleDefinition::GetLengthCuts() const {return 0;}
|
||||
|
||||
inline
|
||||
G4double G4ParticleDefinition::GetRangeThreshold(const G4Material* ) const
|
||||
{
|
||||
return -1.0 * mm;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double* G4ParticleDefinition::GetEnergyCuts() const {return 0;}
|
||||
|
||||
inline
|
||||
G4double G4ParticleDefinition::GetEnergyThreshold(const G4Material* ) const
|
||||
{
|
||||
return -1.0 * eV;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ParticleDefinition::SetAntiPDGEncoding(G4int aEncoding)
|
||||
{
|
||||
theAntiPDGEncoding = aEncoding;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4ParticleDefinition::GetApplyCutsFlag() const
|
||||
{
|
||||
return fApplyCutsFlag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleMessenger.hh,v 1.5 2001/07/11 10:01:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleMomentum.hh,v 1.5 2001/07/11 10:01:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticlePropertyMessenger.hh,v 1.5 2001/07/11 10:01:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleTable.hh,v 1.15 2001/07/11 10:01:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleTable.icc,v 1.8 2001/07/11 10:01:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleTableIterator.hh,v 1.5 2001/07/11 10:01:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
@@ -21,254 +20,31 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleWithCuts.hh,v 1.14 2001/10/30 20:08:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4ParticleWithCuts.hh,v 1.17 2003/03/17 00:51:03 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// --------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// History:
|
||||
// first implementation, based on object model of Hisaya Kurashige,
|
||||
// 21 Oct 1996
|
||||
// calculation of Range Table is based on implementeation for Muon
|
||||
// by L.Urban, 10 May 1996
|
||||
// added RestoreCuts H.Kurashige 09 Mar. 2001
|
||||
// introduced material dependent range cuts 08 Sep. 2001
|
||||
// restructuring for Cuts per Region by Hisaya 07 Oct.2002
|
||||
// change to dummy class by Hisaya 11 MAr.2003
|
||||
// ----------------------------------------------------------------
|
||||
// Class Description
|
||||
// "theCutInMaxInteractionLength", for charged particles, is
|
||||
// coincident with a cut in stopping range; for neutral
|
||||
// particles it corresponds to the distance allowed by
|
||||
// the total cross section.
|
||||
// "theKineticEnergyCuts" is the vector of cuts in kinetic
|
||||
// energy (a value per material); it is allocated/computed
|
||||
// in the specific SetCuts method.
|
||||
// void SetCuts(G4double aCut):
|
||||
// Sets the cuts values relative to this particle type in stopping
|
||||
// range (or absorption length) and converts those cuts into energy cuts
|
||||
// for all the materials defined in the Material table.
|
||||
// It also triggers the recomputation of the physics tables of the
|
||||
// void SetRangeCut(G4double aCut, const G4Material*):
|
||||
// Set a cut value in range for the specified material and converts
|
||||
// it into an energy cut.
|
||||
// void ReCalcCuts():
|
||||
// Re calculate energy cut values with the previous cut value in range
|
||||
// void ResetCuts():
|
||||
// Reset alll cut values in energy, though theCutInMaxInteractionLength
|
||||
// remains unchanged
|
||||
// const G4double* GetLengthCuts():
|
||||
// Returns an array of cuts in range (ordered per material)
|
||||
// G4double GetRangeThreshold(const G4Material* ) const:
|
||||
// Returns a range cut for a material
|
||||
// const G4double* GetEnergyCuts():
|
||||
// Returns an array of energy cuts (ordered per material)
|
||||
// G4double GetEnergyThreshold(const G4Material* ) const:
|
||||
// Returns a energy cut for a material
|
||||
// Dummy to be removed in future
|
||||
//
|
||||
|
||||
#ifndef G4ParticleWithCuts_h
|
||||
#define G4ParticleWithCuts_h 1
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
#include "G4PhysicsTable.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4Material.hh"
|
||||
class G4PhysicsLogVector;
|
||||
|
||||
|
||||
class G4ParticleWithCuts : public G4ParticleDefinition
|
||||
{
|
||||
public:
|
||||
G4ParticleWithCuts(const G4String& aName,
|
||||
G4double mass,
|
||||
G4double width,
|
||||
G4double charge,
|
||||
G4int iSpin,
|
||||
G4int iParity,
|
||||
G4int iConjugation,
|
||||
G4int iIsospin,
|
||||
G4int iIsospinZ,
|
||||
G4int gParity,
|
||||
const G4String& pType,
|
||||
G4int lepton,
|
||||
G4int baryon,
|
||||
G4int encoding,
|
||||
G4bool stable,
|
||||
G4double lifetime,
|
||||
G4DecayTable *decaytable,
|
||||
G4bool resonance = false);
|
||||
virtual ~G4ParticleWithCuts();
|
||||
|
||||
//--------------for SetCuts-------------------------------------------
|
||||
protected:
|
||||
G4double* theCutInMaxInteractionLength;
|
||||
G4double* theKineticEnergyCuts;
|
||||
|
||||
public: // With Description
|
||||
// G4ParticleWithCuts
|
||||
// virtual methods derived from G4ParticleDefinition
|
||||
|
||||
// Set Cuts methods
|
||||
virtual void SetCuts(G4double aCut);
|
||||
// Set the range of aCut for all materials
|
||||
virtual void SetRangeCut(G4double aCut, const G4Material*);
|
||||
// Set the cut range of aCut for a material
|
||||
virtual void SetRangeCutVector(G4std::vector<G4double>&);
|
||||
// Set the vector of range cuts for all material
|
||||
|
||||
// Get cuts methods
|
||||
virtual G4double* GetLengthCuts() const;
|
||||
// Get an array of range cuts for all materials
|
||||
virtual G4double GetRangeThreshold(const G4Material* ) const;
|
||||
// Get a range cut for a material
|
||||
virtual G4double* GetEnergyCuts() const;
|
||||
// Get an array of energy cuts for all materials
|
||||
virtual G4double GetEnergyThreshold(const G4Material* ) const;
|
||||
// Get a energy cut for a material
|
||||
|
||||
// Other methods related with cuts
|
||||
virtual void ResetCuts();
|
||||
// Reset alll cut values in energy
|
||||
// but theCutInMaxInteractionLength remain unchanged
|
||||
virtual void ReCalcCuts();
|
||||
// Set cut values in energy derived from theCutInMaxInteractionLength
|
||||
|
||||
// set energy range
|
||||
static void SetEnergyRange(G4double lowedge, G4double highedge) ;
|
||||
|
||||
public: // With Description
|
||||
// This method concerning cut values is supposed to be used by
|
||||
// G4VUserPhysicsList to restore cutvalues witout calculation
|
||||
|
||||
virtual void RestoreCuts(const G4double* cutInLength,
|
||||
const G4double* cutInEnergy );
|
||||
|
||||
protected:
|
||||
void SetCutInMaxInteractionLength(G4double aCut);
|
||||
// Set a value of theCutInMaxInteractionLength for all materials
|
||||
void SetCutInMaxInteractionLength(G4double aCut , G4int matrialIndex);
|
||||
// Set a value of theCutInMaxInteractionLength for a material
|
||||
void SetCutInMaxInteractionLength(G4double aCut ,
|
||||
const G4Material* aMaterial);
|
||||
// Set a value of theCutInMaxInteractionLength for a material
|
||||
void SetEnergyCutValues(G4double energyCuts);
|
||||
// Set a energy cut value for all materials
|
||||
|
||||
virtual void CalcEnergyCuts(const G4Material* material=0);
|
||||
// Calculate energy cut values by using range cuts
|
||||
|
||||
// BuildPhysicsTable is defined as a dummy routine
|
||||
void BuildPhysicsTable() {};
|
||||
|
||||
protected:
|
||||
// cut values for proton is used for all heavy charged particles
|
||||
static G4ParticleDefinition* theProton;
|
||||
G4bool UseProtonCut();
|
||||
|
||||
G4bool CheckEnergyBinSetting() 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:
|
||||
typedef G4PhysicsTable G4LossTable;
|
||||
G4LossTable* theLossTable;
|
||||
G4int NumberOfElements;
|
||||
|
||||
typedef G4PhysicsLogVector G4LossVector;
|
||||
static G4double LowestEnergy, HighestEnergy;
|
||||
G4int TotBin;
|
||||
|
||||
protected:
|
||||
virtual void BuildLossTable();
|
||||
virtual G4double ComputeLoss(G4double AtomicNumber,
|
||||
G4double KineticEnergy
|
||||
) const;
|
||||
|
||||
//-------------- Range Table ------------------------------------------
|
||||
protected:
|
||||
typedef G4PhysicsLogVector G4RangeVector;
|
||||
virtual void BuildRangeVector(const G4Material* aMaterial,
|
||||
const G4LossTable* aLossTable,
|
||||
G4double maxEnergy,
|
||||
G4double aMass,
|
||||
G4RangeVector* rangeVector);
|
||||
|
||||
protected:
|
||||
G4double ConvertCutToKineticEnergy(
|
||||
G4RangeVector* theRangeVector,
|
||||
size_t materialIndex
|
||||
) const;
|
||||
|
||||
static G4double RangeLinSimpson(
|
||||
const G4ElementVector* elementVector,
|
||||
const G4double* atomicNumDensityVector,
|
||||
const G4LossTable* aLossTable,
|
||||
G4double aMass,
|
||||
G4double taulow, G4double tauhigh,
|
||||
G4int nbin, G4int NumEl
|
||||
);
|
||||
static G4double RangeLogSimpson(
|
||||
const G4ElementVector* elementVector,
|
||||
const G4double* atomicNumDensityVector,
|
||||
const G4LossTable* aLossTable,
|
||||
G4double aMass,
|
||||
G4double ltaulow, G4double ltauhigh,
|
||||
G4int nbin, G4int NumEl
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
inline G4double* G4ParticleWithCuts::GetLengthCuts() const
|
||||
{
|
||||
return theCutInMaxInteractionLength;
|
||||
}
|
||||
|
||||
inline G4double* G4ParticleWithCuts::GetEnergyCuts() const
|
||||
{
|
||||
return theKineticEnergyCuts;
|
||||
}
|
||||
|
||||
inline void G4ParticleWithCuts::ResetCuts()
|
||||
{
|
||||
if(theKineticEnergyCuts) delete [] theKineticEnergyCuts;
|
||||
theKineticEnergyCuts = 0;
|
||||
}
|
||||
|
||||
inline void G4ParticleWithCuts::ReCalcCuts()
|
||||
{
|
||||
if (theCutInMaxInteractionLength != 0) {
|
||||
CalcEnergyCuts();
|
||||
} else {
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cout << "G4ParticleWithCuts::ReCalcCuts() :";
|
||||
G4cout << "theCutInMaxInteractionLength is not defined " << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "G4Material.hh"
|
||||
|
||||
inline
|
||||
G4double G4ParticleWithCuts::GetEnergyThreshold(const G4Material* aMaterial) const
|
||||
{
|
||||
return theKineticEnergyCuts[aMaterial->GetIndex()];
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4ParticleWithCuts::GetRangeThreshold(const G4Material* aMaterial) const
|
||||
{
|
||||
return theCutInMaxInteractionLength[aMaterial->GetIndex()];
|
||||
}
|
||||
|
||||
typedef G4ParticleDefinition G4ParticleWithCuts;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -280,3 +56,5 @@ inline
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PhaseSpaceDecayChannel.hh,v 1.5 2001/10/15 09:58:31 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.8 2003/04/10 02:51:18 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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);
|
||||
// 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(G4std::vector<G4double>&);
|
||||
// Set the vector of production cuts in range for all particles
|
||||
|
||||
const G4std::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:
|
||||
G4std::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
|
||||
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(G4std::vector<G4double>& cut)
|
||||
{
|
||||
for(G4int i = 0; (i<NumberOfG4CutIndex); i++) {
|
||||
fRangeCuts[i] = cut[i];
|
||||
}
|
||||
isModified = true;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4std::vector<G4double>& G4ProductionCuts::GetProductionCuts() const
|
||||
{
|
||||
return fRangeCuts;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4ProductionCuts::IsModified() const
|
||||
{
|
||||
return isModified;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ProductionCuts::PhysicsTableUpdated()
|
||||
{
|
||||
isModified = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.7 2003/04/10 02:51:18 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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 G4std::vector<G4MaterialCutsCouple*> G4CoupleTable;
|
||||
typedef G4std::vector<G4MaterialCutsCouple*>::const_iterator CoupleTableIterator;
|
||||
typedef G4std::vector<G4double> G4CutVectorForAParticle;
|
||||
typedef G4std::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 G4std::vector<G4double>* GetRangeCutsVector(size_t pcIdx) const;
|
||||
const G4std::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 G4std::vector<G4double>* G4ProductionCutsTable::GetRangeCutsVector(size_t pcIdx) const
|
||||
{
|
||||
return rangeCutTable[pcIdx];
|
||||
}
|
||||
|
||||
inline
|
||||
const G4std::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();
|
||||
G4std::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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/vector"
|
||||
|
||||
#include "G4VRangeToEnergyConverter.hh"
|
||||
|
||||
|
||||
class G4RToEConvForAntiProton : public G4VRangeToEnergyConverter
|
||||
{
|
||||
public:
|
||||
// constructor
|
||||
G4RToEConvForAntiProton();
|
||||
|
||||
public:
|
||||
// destructor
|
||||
virtual ~G4RToEConvForAntiProton();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2002/12/16 11:15:43 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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.10 2001/07/11 10:01:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TauLeptonicDecayChannel.hh,v 1.1 2002/03/08 08:47:52 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VDecayChannel.hh,v 1.10 2002/11/20 15:05:55 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VIsotopeTable.hh,v 1.5 2001/07/11 10:01:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.3 2003/01/07 23:52:24 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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 "g4std/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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user