Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:11:26 gunter Exp $
|
||||
# $Id: GNUmakefile,v 1.3 2000/10/24 13:53:02 gcosmo Exp $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
|
||||
# --------------------------------------------------------------------
|
||||
@@ -15,17 +15,16 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/magneticfield/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/management/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.1 2000/05/24 15:36:10 maire Exp $
|
||||
$Id: History,v 1.6 2000/11/17 14:55:27 maire Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,25 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
09 nov 00: mma (utils-V02-00-04)
|
||||
- G4EnergyLossMessenger : subdirectory /process/eLoss created
|
||||
+ class description
|
||||
|
||||
04 nov 00: mma (utils-V02-00-03)
|
||||
- EnergyLossTable: const G4Material* in all functions
|
||||
- G4VEnergyLoss and Messenger slighy modified for more flexibility
|
||||
only (Laszlo)
|
||||
|
||||
11 aug 00: mma (utils-V02-00-01)
|
||||
|
||||
03 aug 00: gc
|
||||
- fixed problem for event reproducibility: changed RandGauss to G4RandGauss
|
||||
in G4VEnergyLoss.cc. Needs tag "global-V02-00-02" to cowork with.
|
||||
|
||||
22 jun 00: mma (utils-V01-01-03)
|
||||
- muls: do not nuclear size correction for electron
|
||||
- move Eloss messenger --> G4VEnergyLoss
|
||||
|
||||
24 may 00: mma (utils-V01-01-02)
|
||||
- merge "plus" processes into standard
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// 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: G4EnergyLossMessenger.hh,v 1.3 2000/11/09 15:52:23 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
// This is a messenger class to interface to exchange information
|
||||
// between G4VEnergyLoss and UI.
|
||||
//
|
||||
// /process/eLoss/ directory
|
||||
//
|
||||
// Commands :
|
||||
//
|
||||
// rndmStep * Randomize the proposed step by eLoss (false/true)
|
||||
// fluct * Switch true/false the energy loss fluctuations
|
||||
// subsec * Switch true/false the subcutoff generation
|
||||
// minsubsec * Set the min. cut for subcutoff delta in range
|
||||
// StepFunction * Set the energy loss step limitation parameters
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4EnergyLossMessenger_h
|
||||
#define G4EnergyLossMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4EnergyLossMessenger: public G4UImessenger
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4EnergyLossMessenger();
|
||||
~G4EnergyLossMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
G4UIdirectory* eLossDirectory;
|
||||
G4UIcmdWithABool* RndmStepCmd;
|
||||
G4UIcmdWithABool* EnlossFlucCmd;
|
||||
G4UIcmdWithABool* SubSecCmd;
|
||||
G4UIcmdWithADoubleAndUnit* MinSubSecCmd;
|
||||
G4UIcommand* StepFuncCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyLossTables.hh,v 1.9 1999/12/15 14:52:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4EnergyLossTables.hh,v 1.10 2000/11/04 16:47:28 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
//
|
||||
@@ -98,42 +98,42 @@ public:
|
||||
static G4double GetDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetRange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetLabTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetDeltaLabTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergyStart,
|
||||
G4double KineticEnergyEnd,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetProperTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetDeltaProperTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergyStart,
|
||||
G4double KineticEnergyEnd,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
|
||||
static G4double GetPreciseDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetPreciseRangeFromEnergy(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
static G4double GetPreciseEnergyFromRange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double range,
|
||||
G4Material *aMaterial);
|
||||
const G4Material *aMaterial);
|
||||
|
||||
// to be called only by energy loss processes
|
||||
static void Register(
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyLossTables.icc,v 1.11 2000/05/23 14:24:47 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4EnergyLossTables.icc,v 1.12 2000/11/04 16:47:28 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// Inline members of the G4EnergyLossTables class
|
||||
@@ -118,7 +118,7 @@ inline G4EnergyLossTablesHelper G4EnergyLossTables::GetTables(
|
||||
inline G4double G4EnergyLossTables::GetDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ inline G4double G4EnergyLossTables::GetDEDX(
|
||||
inline G4double G4EnergyLossTables::GetLabTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ inline G4double G4EnergyLossTables::GetDeltaLabTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergyStart,
|
||||
G4double KineticEnergyEnd,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -280,7 +280,7 @@ inline G4double G4EnergyLossTables::GetDeltaLabTime(
|
||||
inline G4double G4EnergyLossTables::GetProperTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -323,7 +323,7 @@ inline G4double G4EnergyLossTables::GetDeltaProperTime(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergyStart,
|
||||
G4double KineticEnergyEnd,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -398,7 +398,7 @@ inline G4double G4EnergyLossTables::GetDeltaProperTime(
|
||||
inline G4double G4EnergyLossTables::GetRange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if(aParticle != lastParticle)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ inline G4double G4EnergyLossTables::GetRange(
|
||||
inline G4double G4EnergyLossTables::GetPreciseEnergyFromRange(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double range,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
// it returns the value of the kinetic energy for a given range
|
||||
{
|
||||
if( aParticle != lastParticle)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMultipleScattering.hh,v 1.1 2000/03/20 14:44:03 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMultipleScattering.icc,v 1.1 2000/03/20 14:44:03 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MultipleScattering.hh,v 1.1 2000/03/20 14:44:04 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MultipleScattering.icc,v 1.2 2000/03/24 08:08:08 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// -------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VEnergyLoss.hh,v 1.5 2000/05/23 14:24:48 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4VEnergyLoss.hh,v 1.9 2000/10/30 06:49:46 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "G4PhysicsLogVector.hh"
|
||||
#include "G4PhysicsLinearVector.hh"
|
||||
|
||||
class G4EnergyLossMessenger;
|
||||
|
||||
class G4VEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
{
|
||||
@@ -77,7 +78,9 @@ class G4VEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
|
||||
G4double GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial,
|
||||
G4double threshold);
|
||||
G4double ChargeSquare,
|
||||
G4double MeanLoss,
|
||||
G4double step);
|
||||
|
||||
|
||||
private:
|
||||
@@ -112,6 +115,14 @@ class G4VEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
// switch on/off the generation of the subcutoff secondaries
|
||||
// ( default = subcutoff secondary generation )
|
||||
|
||||
static void SetMinDeltaCutInRange(G4double value)
|
||||
{MinDeltaCutInRange = value;
|
||||
setMinDeltaCutInRange = true ;}
|
||||
// sets minimal cut value for the subcutoff secondaries
|
||||
// (i.e. the kinetic energy of these secondaries can not be
|
||||
// smaller than the energy corresponds to MinDeltaCutInRange).
|
||||
|
||||
|
||||
static void SetStepFunction (G4double c1, G4double c2)
|
||||
{dRoverRange = c1; finalRange = c2;
|
||||
c1lim=dRoverRange ;
|
||||
@@ -215,7 +226,13 @@ class G4VEnergyLoss : public G4VContinuousDiscreteProcess
|
||||
static G4bool EnlossFlucFlag; // control the energy loss fluctuation
|
||||
static G4bool subSecFlag; // control the generation of subcutoff secondaries
|
||||
|
||||
static G4double MinDeltaCutInRange; // minimum cut for delta rays
|
||||
static G4double* MinDeltaEnergy ;
|
||||
static G4bool* LowerLimitForced ;
|
||||
|
||||
static G4bool setMinDeltaCutInRange ;
|
||||
|
||||
static G4EnergyLossMessenger* ELossMessenger;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
// 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: G4EnergyLossMessenger.cc,v 1.3 2000/11/09 15:52:24 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4EnergyLossMessenger.hh"
|
||||
|
||||
#include "G4VEnergyLoss.hh"
|
||||
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIparameter.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
|
||||
#include "g4std/strstream"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4EnergyLossMessenger::G4EnergyLossMessenger()
|
||||
{
|
||||
eLossDirectory = new G4UIdirectory("/process/eLoss/");
|
||||
eLossDirectory->SetGuidance("Commands for G4VEnergyLoss.");
|
||||
|
||||
RndmStepCmd = new G4UIcmdWithABool("/process/eLoss/rndmStep",this);
|
||||
RndmStepCmd->SetGuidance("Randomize the proposed step by eLoss.");
|
||||
RndmStepCmd->SetParameterName("choice",true);
|
||||
RndmStepCmd->SetDefaultValue(false);
|
||||
RndmStepCmd->AvailableForStates(Idle);
|
||||
|
||||
EnlossFlucCmd = new G4UIcmdWithABool("/process/eLoss/fluct",this);
|
||||
EnlossFlucCmd->SetGuidance("Switch true/false the energy loss fluctuations.");
|
||||
EnlossFlucCmd->SetParameterName("choice",true);
|
||||
EnlossFlucCmd->SetDefaultValue(true);
|
||||
EnlossFlucCmd->AvailableForStates(Idle);
|
||||
|
||||
SubSecCmd = new G4UIcmdWithABool("/process/eLoss/subsec",this);
|
||||
SubSecCmd->SetGuidance("Switch true/false the subcutoff generation.");
|
||||
SubSecCmd->SetParameterName("choice",true);
|
||||
SubSecCmd->SetDefaultValue(true);
|
||||
SubSecCmd->AvailableForStates(Idle);
|
||||
|
||||
MinSubSecCmd = new G4UIcmdWithADoubleAndUnit("/process/eLoss/minsubsec",this);
|
||||
MinSubSecCmd->SetGuidance("Set the min. cut for subcutoff delta in range.");
|
||||
MinSubSecCmd->SetParameterName("rcmin",true);
|
||||
MinSubSecCmd->AvailableForStates(Idle);
|
||||
|
||||
StepFuncCmd = new G4UIcommand("/process/eLoss/StepFunction",this);
|
||||
StepFuncCmd->SetGuidance("Set the energy loss step limitation parameters.");
|
||||
StepFuncCmd->SetGuidance(" dRoverR : max Range variation per step");
|
||||
StepFuncCmd->SetGuidance(" finalRange: range for final step");
|
||||
|
||||
G4UIparameter* dRoverRPrm = new G4UIparameter("dRoverR",'d',false);
|
||||
dRoverRPrm->SetGuidance("max Range variation per step (fractional number)");
|
||||
dRoverRPrm->SetParameterRange("dRoverR>0. && dRoverR<=1.");
|
||||
StepFuncCmd->SetParameter(dRoverRPrm);
|
||||
|
||||
G4UIparameter* finalRangePrm = new G4UIparameter("finalRange",'d',false);
|
||||
finalRangePrm->SetGuidance("range for final step");
|
||||
finalRangePrm->SetParameterRange("finalRange>0.");
|
||||
StepFuncCmd->SetParameter(finalRangePrm);
|
||||
|
||||
G4UIparameter* unitPrm = new G4UIparameter("unit",'s',true);
|
||||
unitPrm->SetGuidance("unit of finalRange");
|
||||
unitPrm->SetDefaultValue("mm");
|
||||
G4String unitCandidates = G4UIcommand::UnitsList(G4UIcommand::CategoryOf("mm"));
|
||||
unitPrm->SetParameterCandidates(unitCandidates);
|
||||
|
||||
StepFuncCmd->SetParameter(unitPrm);
|
||||
StepFuncCmd->AvailableForStates(Idle);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4EnergyLossMessenger::~G4EnergyLossMessenger()
|
||||
{
|
||||
delete RndmStepCmd;
|
||||
delete EnlossFlucCmd;
|
||||
delete SubSecCmd;
|
||||
delete MinSubSecCmd;
|
||||
delete StepFuncCmd;
|
||||
delete eLossDirectory;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4EnergyLossMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if (command == RndmStepCmd)
|
||||
{ G4VEnergyLoss::SetRndmStep(RndmStepCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
|
||||
if (command == EnlossFlucCmd)
|
||||
{ G4VEnergyLoss::SetEnlossFluc(EnlossFlucCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
|
||||
if (command == SubSecCmd)
|
||||
{ G4VEnergyLoss::SetSubSec(SubSecCmd->GetNewBoolValue(newValue));
|
||||
}
|
||||
|
||||
if (command == MinSubSecCmd)
|
||||
{ G4VEnergyLoss::SetMinDeltaCutInRange(MinSubSecCmd->GetNewDoubleValue(newValue));
|
||||
}
|
||||
|
||||
if (command == StepFuncCmd)
|
||||
{
|
||||
G4double v1,v2;
|
||||
char unts[30];
|
||||
const char* t = newValue;
|
||||
G4std::istrstream is((char*)t);
|
||||
is >> v1 >> v2 >> unts;
|
||||
G4String unt = unts;
|
||||
v2 *= G4UIcommand::ValueOf(unt);
|
||||
G4VEnergyLoss::SetStepFunction(v1,v2);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyLossTables.cc,v 1.12 2000/05/23 14:25:26 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4EnergyLossTables.cc,v 1.13 2000/11/04 16:47:29 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// first version created by P.Urban , 06/04/1998
|
||||
@@ -61,7 +61,7 @@ void G4EnergyLossTables::Register(
|
||||
G4double G4EnergyLossTables::GetPreciseDEDX(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if( aParticle != lastParticle)
|
||||
{
|
||||
@@ -104,7 +104,7 @@ void G4EnergyLossTables::Register(
|
||||
G4double G4EnergyLossTables::GetPreciseRangeFromEnergy(
|
||||
const G4ParticleDefinition *aParticle,
|
||||
G4double KineticEnergy,
|
||||
G4Material *aMaterial)
|
||||
const G4Material *aMaterial)
|
||||
{
|
||||
if( aParticle != lastParticle)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4IMultipleScattering.cc,v 1.1 2000/03/20 14:44:04 maire Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4MultipleScattering.cc,v 1.3 2000/03/24 08:12:26 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4MultipleScattering.cc,v 1.5 2000/08/10 13:15:13 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $Id:
|
||||
// --------------------------------------------------------------
|
||||
@@ -25,6 +25,8 @@
|
||||
// 17/09/99: corr. for high energy and/or small step , L.Urban
|
||||
// 30/09/99: nuclear size effect correction, L.Urban
|
||||
// 22/03/00: value of member cpar has changed! , L.Urban
|
||||
// 20/06/00: nuclear size correction for particles other than e+/e- only , L.Urban
|
||||
// 10/08/00 values of some data members has been changed, L.Urban
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4MultipleScattering.hh"
|
||||
@@ -49,10 +51,10 @@
|
||||
thePositron(G4Positron::Positron()),
|
||||
tLast (0.0),
|
||||
zLast (0.0),
|
||||
Tlimit(0.*keV),
|
||||
Tlimit(1.*keV),
|
||||
scatteringparameter(0.9),
|
||||
tuning (1.00),
|
||||
cpar (-0.35),
|
||||
cpar (0.0),
|
||||
NuclCorrPar (0.0615),FactPar(0.40),
|
||||
fLatDisplFlag(true)
|
||||
{ }
|
||||
@@ -73,12 +75,6 @@
|
||||
|
||||
// tables are built for MATERIALS
|
||||
{
|
||||
// parameter for "low energy" msc (not for ions)
|
||||
if((&aParticleType == G4Electron::Electron()) ||
|
||||
(&aParticleType == G4Positron::Positron()) )
|
||||
// Tlimit = 100.*keV ;
|
||||
;
|
||||
|
||||
const G4double sigmafactor = twopi*classic_electr_radius*
|
||||
classic_electr_radius ;
|
||||
G4double KineticEnergy,AtomicNumber,AtomicWeight,
|
||||
@@ -218,8 +214,8 @@
|
||||
{65.87,59.06,15.87,7.570,5.567,3.650,2.682,2.182,
|
||||
1.939,1.579,1.325,1.178,1.108,1.014,0.965,0.947,
|
||||
0.941,0.938,0.940,0.944,0.946,0.954 },
|
||||
// {45.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239, misprint?
|
||||
{55.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239,
|
||||
// {45.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239, // paper.....
|
||||
{55.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239,
|
||||
1.985,1.609,1.343,1.188,1.113,1.013,0.960,0.939,
|
||||
0.933,0.930,0.933,0.936,0.939,0.949 }};
|
||||
|
||||
@@ -406,7 +402,10 @@
|
||||
|
||||
sigma *= corrfactor ;
|
||||
|
||||
sigma /= corrnuclsize ;
|
||||
// nucl. size correction for particles other than e+/e- only at present !!!!
|
||||
if((&aParticleType != G4Electron::Electron()) &&
|
||||
(&aParticleType != G4Positron::Positron()) )
|
||||
sigma /= corrnuclsize ;
|
||||
|
||||
return sigma ;
|
||||
}
|
||||
|
||||
@@ -1,43 +1,47 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4VEnergyLoss.cc,v 1.11 2000/05/26 07:40:09 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4VEnergyLoss.cc,v 1.15 2000/10/30 06:50:49 urban Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD Group
|
||||
// History: first implementation, based on object model of
|
||||
// 2nd December 1995, G.Cosmo
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// bug fixed in fluct., L.Urban 26/05/00
|
||||
// ------------------------------------------------------------
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4VEnergyLoss.hh"
|
||||
#include "G4EnergyLossMessenger.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4VEnergyLoss::ParticleMass ;
|
||||
G4double G4VEnergyLoss::taulow ;
|
||||
G4double G4VEnergyLoss::tauhigh ;
|
||||
G4double G4VEnergyLoss::ltaulow ;
|
||||
G4double G4VEnergyLoss::ltauhigh ;
|
||||
|
||||
G4double G4VEnergyLoss::ltaulow ;
|
||||
G4double G4VEnergyLoss::ltauhigh ;
|
||||
|
||||
G4bool G4VEnergyLoss::rndmStepFlag = false;
|
||||
G4bool G4VEnergyLoss::EnlossFlucFlag = true;
|
||||
|
||||
G4bool G4VEnergyLoss::subSecFlag = true;
|
||||
G4double G4VEnergyLoss::MinDeltaCutInRange = 0.100*mm ;
|
||||
G4double* G4VEnergyLoss::MinDeltaEnergy = NULL ;
|
||||
G4bool* G4VEnergyLoss::LowerLimitForced = NULL ;
|
||||
G4bool G4VEnergyLoss::setMinDeltaCutInRange = false ;
|
||||
|
||||
G4double G4VEnergyLoss::dRoverRange = 20*perCent;
|
||||
G4double G4VEnergyLoss::finalRange = 200*micrometer;
|
||||
G4double G4VEnergyLoss::c1lim = dRoverRange ;
|
||||
G4double G4VEnergyLoss::c2lim = 2.*(1.-dRoverRange)*finalRange ;
|
||||
G4double G4VEnergyLoss::c3lim = -(1.-dRoverRange)*finalRange*finalRange;
|
||||
|
||||
G4EnergyLossMessenger* G4VEnergyLoss::ELossMessenger = NULL;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -58,13 +62,14 @@ G4VEnergyLoss::G4VEnergyLoss(const G4String& aName , G4ProcessType aType)
|
||||
nmaxCont1(4),
|
||||
nmaxCont2(16)
|
||||
{
|
||||
//create (only once) EnergyLoss messenger
|
||||
if(!ELossMessenger) ELossMessenger = new G4EnergyLossMessenger();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4VEnergyLoss::~G4VEnergyLoss()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -73,8 +78,7 @@ G4VEnergyLoss::G4VEnergyLoss(G4VEnergyLoss& right)
|
||||
lastMaterial(NULL),
|
||||
nmaxCont1(4),
|
||||
nmaxCont2(16)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -316,7 +320,6 @@ G4double G4VEnergyLoss::RangeIntLog(G4PhysicsVector* physicsVector,
|
||||
return Value;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4PhysicsTable* G4VEnergyLoss::BuildLabTimeTable(G4PhysicsTable* theDEDXTable,
|
||||
@@ -867,7 +870,9 @@ G4PhysicsTable* G4VEnergyLoss::BuildRangeCoeffCTable(G4PhysicsTable* theRangeTab
|
||||
|
||||
G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
G4Material* aMaterial,
|
||||
G4double MeanLoss)
|
||||
G4double ChargeSquare,
|
||||
G4double MeanLoss,
|
||||
G4double step )
|
||||
// calculate actual loss from the mean loss
|
||||
// The model used to get the fluctuation is essentially the same as in Glandz in Geant3.
|
||||
{
|
||||
@@ -876,6 +881,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
static const G4double sumaLim = -log(probLim) ;
|
||||
static const G4double alim=10.;
|
||||
static const G4double kappa = 10. ;
|
||||
static const G4double factor = twopi_mc2_rcl2 ;
|
||||
|
||||
|
||||
// check if the material has changed ( cache mechanism)
|
||||
@@ -895,7 +901,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
ipotLogFluct = aMaterial->GetIonisation()->GetLogMeanExcEnergy();
|
||||
}
|
||||
G4double threshold,w1,w2,C,
|
||||
beta2,suma,e0,loss,lossc ,w;
|
||||
beta2,suma,e0,loss,lossc ,w,electronDensity;
|
||||
G4double a1,a2,a3;
|
||||
G4int p1,p2,p3;
|
||||
G4int nb;
|
||||
@@ -923,8 +929,10 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
// Gaussian fluctuation ?
|
||||
if(MeanLoss >= kappa*Tm)
|
||||
{
|
||||
siga = sqrt(MeanLoss*Tm*(1.-0.5*beta2)) ;
|
||||
loss = RandGauss::shoot(MeanLoss,siga) ;
|
||||
electronDensity = aMaterial->GetElectronDensity() ;
|
||||
siga = sqrt(Tm*(0.5-0.25*beta2)*step*
|
||||
factor*electronDensity*ChargeSquare/beta2) ;
|
||||
loss = G4RandGauss::shoot(MeanLoss,siga) ;
|
||||
if(loss < 0.) loss = 0. ;
|
||||
return loss ;
|
||||
}
|
||||
@@ -960,7 +968,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,int(RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -979,7 +987,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,int(RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -1008,7 +1016,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a1>alim)
|
||||
{
|
||||
siga=sqrt(a1) ;
|
||||
p1 = G4std::max(0,int(RandGauss::shoot(a1,siga)+0.5));
|
||||
p1 = G4std::max(0,int(G4RandGauss::shoot(a1,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p1 = G4Poisson(a1);
|
||||
@@ -1017,7 +1025,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a2>alim)
|
||||
{
|
||||
siga=sqrt(a2) ;
|
||||
p2 = G4std::max(0,int(RandGauss::shoot(a2,siga)+0.5));
|
||||
p2 = G4std::max(0,int(G4RandGauss::shoot(a2,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p2 = G4Poisson(a2);
|
||||
@@ -1036,7 +1044,7 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
if(a3>alim)
|
||||
{
|
||||
siga=sqrt(a3) ;
|
||||
p3 = G4std::max(0,int(RandGauss::shoot(a3,siga)+0.5));
|
||||
p3 = G4std::max(0,int(G4RandGauss::shoot(a3,siga)+0.5));
|
||||
}
|
||||
else
|
||||
p3 = G4Poisson(a3);
|
||||
@@ -1052,14 +1060,14 @@ G4double G4VEnergyLoss::GetLossWithFluct(const G4DynamicParticle* aParticle,
|
||||
rfac = dp3/(G4float(nmaxCont2)+dp3);
|
||||
namean = G4float(p3)*rfac;
|
||||
sa = G4float(nmaxCont1)*rfac;
|
||||
na = RandGauss::shoot(namean,sa);
|
||||
na = G4RandGauss::shoot(namean,sa);
|
||||
if (na > 0.)
|
||||
{
|
||||
alfa = w1*G4float(nmaxCont2+p3)/(w1*G4float(nmaxCont2)+G4float(p3));
|
||||
alfa1 = alfa*log(alfa)/(alfa-1.);
|
||||
ea = na*ipotFluct*alfa1;
|
||||
sea = ipotFluct*sqrt(na*(alfa-alfa1*alfa1));
|
||||
lossc += RandGauss::shoot(ea,sea);
|
||||
lossc += G4RandGauss::shoot(ea,sea);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user