Import Geant4 6.0.0 source tree
This commit is contained in:
@@ -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.2 2003/09/19 14:40:59 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2003/09/19 14:41:45 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,332 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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.2 2003/11/03 02:18:44 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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;
|
||||
|
||||
// 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:
|
||||
G4bool firstUse;
|
||||
enum { FixedStringLengthForStore = 32 };
|
||||
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4ProductionCutsTable::SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4ProductionCutsTable::GetVerboseLevel() const
|
||||
{
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
|
||||
#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.1 2003/09/19 14:42:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:42:41 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:42:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:43:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:43:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:43:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.1 2003/09/19 14:44:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: G4VRangeToEnergyConverter.hh,v 1.2 2003/11/08 06:10:48 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// 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(
|
||||
G4int numberOfElements,
|
||||
const G4ElementVector* elementVector,
|
||||
const G4double* atomicNumDensityVector,
|
||||
G4double aMass,
|
||||
G4double taulow, G4double tauhigh,
|
||||
G4int nbin
|
||||
);
|
||||
|
||||
G4double RangeLogSimpson(
|
||||
G4int numberOfElements,
|
||||
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