Import Geant4 10.6.0.beta source tree
This commit is contained in:
@@ -75,6 +75,9 @@ public:
|
||||
void Dump(const G4ParticleDefinition* p = nullptr);
|
||||
|
||||
inline const G4Element* SelectRandomAtom(G4double kineticEnergy) const;
|
||||
inline const G4Element* SelectRandomAtom(const G4double kineticEnergy,
|
||||
const G4double logEKin,
|
||||
size_t &lastIndx);
|
||||
|
||||
inline const G4Material* GetMaterial() const;
|
||||
|
||||
@@ -118,6 +121,27 @@ inline const G4Element* G4EmElementSelector::SelectRandomAtom(G4double e) const
|
||||
return element;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
inline const G4Element*
|
||||
G4EmElementSelector::SelectRandomAtom(const G4double e, const G4double loge,
|
||||
size_t &lastIndx)
|
||||
{
|
||||
const G4Element* element = (*theElementVector)[nElmMinusOne];
|
||||
if (nElmMinusOne > 0) {
|
||||
const G4double x = G4UniformRand();
|
||||
for (G4int i=0; i<nElmMinusOne; ++i) {
|
||||
if (x <= (xSections[i])->Value(e, loge, lastIndx)) {
|
||||
element = (*theElementVector)[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
inline const G4Material* G4EmElementSelector::GetMaterial() const
|
||||
{
|
||||
return material;
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
// File name: G4EmExtraParameters
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
// Creation date: 06.05.2019
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// An internal utility class, responsable for keeping parameters
|
||||
// for EM processes and models.
|
||||
//
|
||||
// It is initialized by the master thread but can be updated
|
||||
// at any moment via G4EmParameters interface. It is not assumed
|
||||
// to be used for a direct initialisation
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4EmExtraParameters_h
|
||||
#define G4EmExtraParameters_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4EmExtraParametersMessenger;
|
||||
class G4VEnergyLossProcess;
|
||||
class G4VEmProcess;
|
||||
class G4VAtomDeexcitation;
|
||||
|
||||
class G4EmExtraParameters
|
||||
{
|
||||
public:
|
||||
|
||||
explicit G4EmExtraParameters();
|
||||
|
||||
~G4EmExtraParameters();
|
||||
|
||||
void Initialise();
|
||||
|
||||
G4bool GetDirectionalSplitting();
|
||||
void SetDirectionalSplitting(G4bool v);
|
||||
|
||||
G4bool QuantumEntanglement();
|
||||
void SetQuantumEntanglement(G4bool v);
|
||||
|
||||
void SetDirectionalSplittingRadius(G4double r);
|
||||
G4double GetDirectionalSplittingRadius();
|
||||
|
||||
void SetDirectionalSplittingTarget(const G4ThreeVector& v);
|
||||
G4ThreeVector GetDirectionalSplittingTarget() const;
|
||||
|
||||
void SetStepFunction(G4double v1, G4double v2);
|
||||
G4double GetStepFunctionP1() const;
|
||||
G4double GetStepFunctionP2() const;
|
||||
|
||||
void SetStepFunctionMuHad(G4double v1, G4double v2);
|
||||
G4double GetStepFunctionMuHadP1() const;
|
||||
G4double GetStepFunctionMuHadP2() const;
|
||||
|
||||
// parameters per region or per process
|
||||
void AddPAIModel(const G4String& particle,
|
||||
const G4String& region,
|
||||
const G4String& type);
|
||||
const std::vector<G4String>& ParticlesPAI() const;
|
||||
const std::vector<G4String>& RegionsPAI() const;
|
||||
const std::vector<G4String>& TypesPAI() const;
|
||||
|
||||
void AddPhysics(const G4String& region, const G4String& type);
|
||||
const std::vector<G4String>& RegionsPhysics() const;
|
||||
const std::vector<G4String>& TypesPhysics() const;
|
||||
|
||||
void SetSubCutoff(G4bool val, const G4String& region = "");
|
||||
|
||||
void SetProcessBiasingFactor(const G4String& procname,
|
||||
G4double val, G4bool wflag);
|
||||
|
||||
void ActivateForcedInteraction(const G4String& procname,
|
||||
const G4String& region,
|
||||
G4double length,
|
||||
G4bool wflag);
|
||||
|
||||
void ActivateSecondaryBiasing(const G4String& name,
|
||||
const G4String& region,
|
||||
G4double factor,
|
||||
G4double energyLimit);
|
||||
|
||||
// initialisation methods
|
||||
void DefineRegParamForLoss(G4VEnergyLossProcess*,
|
||||
G4bool isElectron) const;
|
||||
void DefineRegParamForEM(G4VEmProcess*) const;
|
||||
|
||||
G4EmExtraParameters(G4EmExtraParameters &) = delete;
|
||||
G4EmExtraParameters & operator=
|
||||
(const G4EmExtraParameters &right) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4String CheckRegion(const G4String&) const;
|
||||
|
||||
void PrintWarning(G4ExceptionDescription& ed) const;
|
||||
|
||||
G4EmExtraParametersMessenger* theMessenger;
|
||||
|
||||
G4bool directionalSplitting;
|
||||
G4bool quantumEntanglement;
|
||||
|
||||
G4double dRoverRange;
|
||||
G4double finalRange;
|
||||
G4double dRoverRangeMuHad;
|
||||
G4double finalRangeMuHad;
|
||||
|
||||
G4double directionalSplittingRadius;
|
||||
G4ThreeVector directionalSplittingTarget;
|
||||
|
||||
std::vector<G4String> m_particlesPAI;
|
||||
std::vector<G4String> m_regnamesPAI;
|
||||
std::vector<G4String> m_typesPAI;
|
||||
|
||||
std::vector<G4String> m_regnamesPhys;
|
||||
std::vector<G4String> m_typesPhys;
|
||||
|
||||
std::vector<G4String> m_regnamesSubCut;
|
||||
std::vector<G4bool> m_subCuts;
|
||||
|
||||
std::vector<G4String> m_procBiasedXS;
|
||||
std::vector<G4double> m_factBiasedXS;
|
||||
std::vector<G4bool> m_weightBiasedXS;
|
||||
|
||||
std::vector<G4String> m_procForced;
|
||||
std::vector<G4String> m_regnamesForced;
|
||||
std::vector<G4double> m_lengthForced;
|
||||
std::vector<G4bool> m_weightForced;
|
||||
|
||||
std::vector<G4String> m_procBiasedSec;
|
||||
std::vector<G4String> m_regnamesBiasedSec;
|
||||
std::vector<G4double> m_factBiasedSec;
|
||||
std::vector<G4double> m_elimBiasedSec;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
// File name: G4EmExtraParametersMessenger
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
// Creation date: 07-05-2019
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
// Class Description:
|
||||
// This is a messenger class to interface to exchange information
|
||||
// between G4VEm and UI.
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4EmExtraParametersMessenger_h
|
||||
#define G4EmExtraParametersMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
class G4EmExtraParameters;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4EmExtraParametersMessenger: public G4UImessenger
|
||||
{
|
||||
public: // with description
|
||||
|
||||
explicit G4EmExtraParametersMessenger(G4EmExtraParameters*);
|
||||
virtual ~G4EmExtraParametersMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
G4EmExtraParameters* theParameters;
|
||||
|
||||
G4UIcmdWithABool* dirSplitCmd;
|
||||
G4UIcmdWithABool* qeCmd;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* dirSplitRadiusCmd;
|
||||
|
||||
G4UIcommand* paiCmd;
|
||||
G4UIcommand* mscoCmd;
|
||||
|
||||
G4UIcommand* SubSecCmd;
|
||||
G4UIcommand* bfCmd;
|
||||
G4UIcommand* fiCmd;
|
||||
G4UIcommand* bsCmd;
|
||||
G4UIcommand* StepFuncCmd;
|
||||
G4UIcommand* StepFuncCmd1;
|
||||
|
||||
G4UIcmdWith3VectorAndUnit* dirSplitTargetCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
// File name: G4EmLowEParameters
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
// Creation date: 06.05.2019
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// An internal utility class, responsable for keeping parameters
|
||||
// for low-energy EM and DNA physics processes and models.
|
||||
//
|
||||
// It is initialized by the master thread but can be updated
|
||||
// at any moment via G4EmParameters interface. It is not assumed
|
||||
// to be used for a direct initialisation
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4EmLowEParameters_h
|
||||
#define G4EmLowEParameters_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DNAModelSubType.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4EmLowEParametersMessenger;
|
||||
class G4VAtomDeexcitation;
|
||||
|
||||
class G4EmLowEParameters
|
||||
{
|
||||
public:
|
||||
|
||||
explicit G4EmLowEParameters();
|
||||
|
||||
~G4EmLowEParameters();
|
||||
|
||||
void Initialise();
|
||||
|
||||
// boolean flags
|
||||
void SetFluo(G4bool val);
|
||||
G4bool Fluo() const;
|
||||
|
||||
void SetBeardenFluoDir(G4bool val);
|
||||
G4bool BeardenFluoDir() const;
|
||||
|
||||
void SetAuger(G4bool val);
|
||||
G4bool Auger() const;
|
||||
|
||||
void SetPixe(G4bool val);
|
||||
G4bool Pixe() const;
|
||||
|
||||
void SetDeexcitationIgnoreCut(G4bool val);
|
||||
G4bool DeexcitationIgnoreCut() const;
|
||||
|
||||
void SetDNAFast(G4bool val);
|
||||
G4bool DNAFast() const;
|
||||
|
||||
void SetDNAStationary(G4bool val);
|
||||
G4bool DNAStationary() const;
|
||||
|
||||
void SetDNAElectronMsc(G4bool val);
|
||||
G4bool DNAElectronMsc() const;
|
||||
|
||||
// integer parameters
|
||||
void SetDNAeSolvationSubType(G4DNAModelSubType val);
|
||||
G4DNAModelSubType DNAeSolvationSubType() const;
|
||||
|
||||
// string parameters
|
||||
void SetPIXECrossSectionModel(const G4String&);
|
||||
const G4String& PIXECrossSectionModel();
|
||||
|
||||
void SetPIXEElectronCrossSectionModel(const G4String&);
|
||||
const G4String& PIXEElectronCrossSectionModel();
|
||||
|
||||
// parameters per region or per process
|
||||
void AddMicroElec(const G4String& region);
|
||||
const std::vector<G4String>& RegionsMicroElec() const;
|
||||
|
||||
void AddDNA(const G4String& region, const G4String& type);
|
||||
const std::vector<G4String>& RegionsDNA() const;
|
||||
const std::vector<G4String>& TypesDNA() const;
|
||||
|
||||
void SetDeexActiveRegion(const G4String& region, G4bool fdeex,
|
||||
G4bool fauger, G4bool fpixe);
|
||||
|
||||
// initialisation methods
|
||||
void DefineRegParamForDeex(G4VAtomDeexcitation*) const;
|
||||
|
||||
G4EmLowEParameters(G4EmLowEParameters &) = delete;
|
||||
G4EmLowEParameters & operator=
|
||||
(const G4EmLowEParameters &right) = delete;
|
||||
|
||||
private:
|
||||
|
||||
G4String CheckRegion(const G4String&) const;
|
||||
|
||||
void PrintWarning(G4ExceptionDescription& ed) const;
|
||||
|
||||
G4EmLowEParametersMessenger* theMessenger;
|
||||
|
||||
G4bool fluo;
|
||||
G4bool beardenFluoDir;
|
||||
G4bool auger;
|
||||
G4bool pixe;
|
||||
G4bool deexIgnoreCut;
|
||||
|
||||
G4bool dnaFast;
|
||||
G4bool dnaStationary;
|
||||
G4bool dnaMsc;
|
||||
|
||||
G4DNAModelSubType dnaElectronSolvation;
|
||||
|
||||
G4String namePIXE;
|
||||
G4String nameElectronPIXE;
|
||||
|
||||
std::vector<G4String> m_regnamesME;
|
||||
|
||||
std::vector<G4String> m_regnamesDNA;
|
||||
std::vector<G4String> m_typesDNA;
|
||||
|
||||
std::vector<G4String> m_regnamesDeex;
|
||||
std::vector<G4bool> m_fluo;
|
||||
std::vector<G4bool> m_auger;
|
||||
std::vector<G4bool> m_pixe;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
// File name: G4EmLowEParametersMessenger
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
// Creation date: 07-05-2019
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
// Class Description:
|
||||
// This is a messenger class to interface to exchange information
|
||||
// between G4VEm and UI.
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef G4EmLowEParametersMessenger_h
|
||||
#define G4EmLowEParametersMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
class G4EmLowEParameters;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4EmLowEParametersMessenger: public G4UImessenger
|
||||
{
|
||||
public: // with description
|
||||
|
||||
explicit G4EmLowEParametersMessenger(G4EmLowEParameters*);
|
||||
virtual ~G4EmLowEParametersMessenger();
|
||||
|
||||
virtual void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
|
||||
G4EmLowEParameters* theParameters;
|
||||
|
||||
G4UIcmdWithABool* deCmd;
|
||||
G4UIcmdWithABool* dirFluoCmd;
|
||||
G4UIcmdWithABool* auCmd;
|
||||
G4UIcmdWithABool* auCascadeCmd;
|
||||
G4UIcmdWithABool* pixeCmd;
|
||||
G4UIcmdWithABool* dcutCmd;
|
||||
G4UIcmdWithABool* dnafCmd;
|
||||
G4UIcmdWithABool* dnasCmd;
|
||||
G4UIcmdWithABool* dnamscCmd;
|
||||
|
||||
G4UIcmdWithAString* pixeXsCmd;
|
||||
G4UIcmdWithAString* pixeeXsCmd;
|
||||
G4UIcmdWithAString* dnaSolCmd;
|
||||
|
||||
G4UIcmdWithAString* meCmd;
|
||||
G4UIcommand* dnaCmd;
|
||||
G4UIcommand* deexCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,12 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
//
|
||||
// File name: G4EmParameters
|
||||
//
|
||||
// Author: Vladimir Ivanchenko for migration to MT
|
||||
@@ -60,13 +58,16 @@
|
||||
#include "G4NuclearFormfactorType.hh"
|
||||
#include "G4DNAModelSubType.hh"
|
||||
#include "G4EmSaturation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Threading.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4EmParametersMessenger;
|
||||
class G4EmExtraParameters;
|
||||
class G4EmLowEParameters;
|
||||
class G4VAtomDeexcitation;
|
||||
class G4VEnergyLossProcess;
|
||||
class G4VEmProcess;
|
||||
class G4VAtomDeexcitation;
|
||||
class G4StateManager;
|
||||
|
||||
class G4EmParameters
|
||||
@@ -80,7 +81,7 @@ public:
|
||||
void SetDefaults();
|
||||
|
||||
// printing
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
void StreamInfo(std::ostream& os) const;
|
||||
void Dump() const;
|
||||
friend std::ostream& operator<< (std::ostream& os, const G4EmParameters&);
|
||||
|
||||
@@ -164,12 +165,20 @@ public:
|
||||
void SetEnableSamplingTable(G4bool val);
|
||||
G4bool EnableSamplingTable() const;
|
||||
|
||||
void SetEmSaturation(G4EmSaturation*);
|
||||
G4EmSaturation* GetEmSaturation();
|
||||
void SetEnablePolarisation(G4bool val);
|
||||
G4bool EnablePolarisation() const;
|
||||
|
||||
G4bool GetDirectionalSplitting();
|
||||
void SetDirectionalSplitting(G4bool v);
|
||||
|
||||
G4bool QuantumEntanglement();
|
||||
void SetQuantumEntanglement(G4bool v);
|
||||
|
||||
// 5d
|
||||
void SetOnIsolated(G4bool val);
|
||||
bool OnIsolated() const;
|
||||
G4bool OnIsolated() const;
|
||||
|
||||
void ActivateDNA();
|
||||
|
||||
// double parameters with values
|
||||
void SetMinSubRange(G4double val);
|
||||
@@ -226,10 +235,19 @@ public:
|
||||
void SetScreeningFactor(G4double val);
|
||||
G4double ScreeningFactor() const;
|
||||
|
||||
void SetMaxNIELEnergy(G4double val);
|
||||
G4double MaxNIELEnergy() const;
|
||||
|
||||
void SetStepFunction(G4double v1, G4double v2);
|
||||
|
||||
void SetStepFunctionMuHad(G4double v1, G4double v2);
|
||||
|
||||
void SetDirectionalSplittingRadius(G4double r);
|
||||
G4double GetDirectionalSplittingRadius();
|
||||
|
||||
void SetDirectionalSplittingTarget(const G4ThreeVector& v);
|
||||
G4ThreeVector GetDirectionalSplittingTarget() const;
|
||||
|
||||
// integer parameters
|
||||
void SetNumberOfBins(G4int val);
|
||||
G4int NumberOfBins() const;
|
||||
@@ -281,11 +299,6 @@ public:
|
||||
const std::vector<G4String>& RegionsDNA() const;
|
||||
const std::vector<G4String>& TypesDNA() const;
|
||||
|
||||
// obsolete methods
|
||||
void AddMsc(const G4String& region, const G4String& type);
|
||||
const std::vector<G4String>& RegionsMsc() const;
|
||||
const std::vector<G4String>& TypesMsc() const;
|
||||
|
||||
void AddPhysics(const G4String& region, const G4String& type);
|
||||
const std::vector<G4String>& RegionsPhysics() const;
|
||||
const std::vector<G4String>& TypesPhysics() const;
|
||||
@@ -308,17 +321,8 @@ public:
|
||||
G4double factor,
|
||||
G4double energyLimit);
|
||||
|
||||
G4bool GetDirectionalSplitting() { return directionalSplitting; }
|
||||
void SetDirectionalSplitting(G4int v) { directionalSplitting = v; }
|
||||
|
||||
void SetDirectionalSplittingTarget(G4ThreeVector v)
|
||||
{ directionalSplittingTarget = v; }
|
||||
G4ThreeVector GetDirectionalSplittingTarget()
|
||||
{ return directionalSplittingTarget; }
|
||||
void SetDirectionalSplittingRadius(G4double r)
|
||||
{ directionalSplittingRadius = r; }
|
||||
G4double GetDirectionalSplittingRadius()
|
||||
{ return directionalSplittingRadius; }
|
||||
void SetEmSaturation(G4EmSaturation*);
|
||||
G4EmSaturation* GetEmSaturation();
|
||||
|
||||
// initialisation methods
|
||||
void DefineRegParamForLoss(G4VEnergyLossProcess*,
|
||||
@@ -337,17 +341,15 @@ private:
|
||||
|
||||
G4bool IsLocked() const;
|
||||
|
||||
G4String CheckRegion(const G4String&) const;
|
||||
|
||||
void PrintWarning(G4ExceptionDescription& ed) const;
|
||||
void PrintWarning(G4ExceptionDescription& ed) const;
|
||||
|
||||
static G4EmParameters* theInstance;
|
||||
|
||||
G4EmParametersMessenger* theMessenger;
|
||||
|
||||
G4StateManager* fStateManager;
|
||||
|
||||
G4EmSaturation* emSaturation;
|
||||
G4EmExtraParameters* fBParameters;
|
||||
G4EmLowEParameters* fCParameters;
|
||||
G4StateManager* fStateManager;
|
||||
G4EmSaturation* emSaturation;
|
||||
|
||||
G4bool lossFluctuation;
|
||||
G4bool buildCSDARange;
|
||||
@@ -355,12 +357,6 @@ private:
|
||||
G4bool spline;
|
||||
G4bool cutAsFinalRange;
|
||||
G4bool applyCuts;
|
||||
G4bool fluo;
|
||||
G4bool beardenFluoDir;
|
||||
G4bool auger;
|
||||
G4bool augerCascade;
|
||||
G4bool pixe;
|
||||
G4bool deexIgnoreCut;
|
||||
G4bool lateralDisplacement;
|
||||
G4bool lateralDisplacementAlg96;
|
||||
G4bool muhadLateralDisplacement;
|
||||
@@ -370,13 +366,11 @@ private:
|
||||
G4bool integral;
|
||||
G4bool birks;
|
||||
G4bool fICRU90;
|
||||
G4bool dnaFast;
|
||||
G4bool dnaStationary;
|
||||
G4bool dnaMsc;
|
||||
G4bool gener;
|
||||
G4bool enableSamplingTable;
|
||||
G4bool fSamplingTable;
|
||||
G4bool fPolarisation;
|
||||
G4bool onIsolated; // 5d model conversion on free ions
|
||||
G4bool directionalSplitting;
|
||||
G4bool fDNA;
|
||||
|
||||
G4double minSubRange;
|
||||
G4double minKinEnergy;
|
||||
@@ -391,16 +385,12 @@ private:
|
||||
G4double factorForAngleLimit;
|
||||
G4double thetaLimit;
|
||||
G4double energyLimit;
|
||||
G4double maxNIELEnergy;
|
||||
G4double rangeFactor;
|
||||
G4double rangeFactorMuHad;
|
||||
G4double geomFactor;
|
||||
G4double skin;
|
||||
G4double dRoverRange;
|
||||
G4double finalRange;
|
||||
G4double dRoverRangeMuHad;
|
||||
G4double finalRangeMuHad;
|
||||
G4double factorScreen;
|
||||
G4double directionalSplittingRadius;
|
||||
|
||||
G4int nbins;
|
||||
G4int nbinsPerDecade;
|
||||
@@ -408,49 +398,9 @@ private:
|
||||
G4int workerVerbose;
|
||||
G4int tripletConv; // 5d model triplet generation type
|
||||
|
||||
G4ThreeVector directionalSplittingTarget;
|
||||
|
||||
G4MscStepLimitType mscStepLimit;
|
||||
G4MscStepLimitType mscStepLimitMuHad;
|
||||
G4NuclearFormfactorType nucFormfactor;
|
||||
G4DNAModelSubType dnaElectronSolvation;
|
||||
|
||||
G4String namePIXE;
|
||||
G4String nameElectronPIXE;
|
||||
|
||||
std::vector<G4String> m_particlesPAI;
|
||||
std::vector<G4String> m_regnamesPAI;
|
||||
std::vector<G4String> m_typesPAI;
|
||||
|
||||
std::vector<G4String> m_regnamesME;
|
||||
|
||||
std::vector<G4String> m_regnamesDNA;
|
||||
std::vector<G4String> m_typesDNA;
|
||||
|
||||
std::vector<G4String> m_regnamesPhys;
|
||||
std::vector<G4String> m_typesPhys;
|
||||
|
||||
std::vector<G4String> m_regnamesSubCut;
|
||||
std::vector<G4bool> m_subCuts;
|
||||
|
||||
std::vector<G4String> m_regnamesDeex;
|
||||
std::vector<G4bool> m_fluo;
|
||||
std::vector<G4bool> m_auger;
|
||||
std::vector<G4bool> m_pixe;
|
||||
|
||||
std::vector<G4String> m_procBiasedXS;
|
||||
std::vector<G4double> m_factBiasedXS;
|
||||
std::vector<G4bool> m_weightBiasedXS;
|
||||
|
||||
std::vector<G4String> m_procForced;
|
||||
std::vector<G4String> m_regnamesForced;
|
||||
std::vector<G4double> m_lengthForced;
|
||||
std::vector<G4bool> m_weightForced;
|
||||
|
||||
std::vector<G4String> m_procBiasedSec;
|
||||
std::vector<G4String> m_regnamesBiasedSec;
|
||||
std::vector<G4double> m_factBiasedSec;
|
||||
std::vector<G4double> m_elimBiasedSec;
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
static G4Mutex emParametersMutex;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
@@ -34,8 +33,6 @@
|
||||
//
|
||||
// Creation date: 22-05-2013
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
@@ -90,12 +87,6 @@ private:
|
||||
G4UIcmdWithABool* splCmd;
|
||||
G4UIcmdWithABool* rsCmd;
|
||||
G4UIcmdWithABool* aplCmd;
|
||||
G4UIcmdWithABool* deCmd;
|
||||
G4UIcmdWithABool* dirFluoCmd;
|
||||
G4UIcmdWithABool* auCmd;
|
||||
G4UIcmdWithABool* auCascadeCmd;
|
||||
G4UIcmdWithABool* pixeCmd;
|
||||
G4UIcmdWithABool* dcutCmd;
|
||||
G4UIcmdWithABool* latCmd;
|
||||
G4UIcmdWithABool* lat96Cmd;
|
||||
G4UIcmdWithABool* mulatCmd;
|
||||
@@ -104,14 +95,10 @@ private:
|
||||
G4UIcmdWithABool* IntegCmd;
|
||||
G4UIcmdWithABool* mottCmd;
|
||||
G4UIcmdWithABool* birksCmd;
|
||||
G4UIcmdWithABool* dnafCmd;
|
||||
G4UIcmdWithABool* dnasCmd;
|
||||
G4UIcmdWithABool* dnamscCmd;
|
||||
G4UIcmdWithABool* sharkCmd;
|
||||
G4UIcmdWithABool* onIsolatedCmd;
|
||||
G4UIcmdWithABool* sampleTCmd;
|
||||
G4UIcmdWithABool* icru90Cmd;
|
||||
G4UIcmdWithABool* dirSplitCmd;
|
||||
|
||||
G4UIcmdWithADouble* minSubSecCmd;
|
||||
G4UIcmdWithADoubleAndUnit* minEnCmd;
|
||||
@@ -126,12 +113,12 @@ private:
|
||||
G4UIcmdWithADouble* mscfCmd;
|
||||
G4UIcmdWithADoubleAndUnit* angCmd;
|
||||
G4UIcmdWithADoubleAndUnit* msceCmd;
|
||||
G4UIcmdWithADoubleAndUnit* nielCmd;
|
||||
G4UIcmdWithADouble* frCmd;
|
||||
G4UIcmdWithADouble* fr1Cmd;
|
||||
G4UIcmdWithADouble* fgCmd;
|
||||
G4UIcmdWithADouble* skinCmd;
|
||||
G4UIcmdWithADouble* screCmd;
|
||||
G4UIcmdWithADoubleAndUnit* dirSplitRadiusCmd;
|
||||
|
||||
G4UIcmdWithAnInteger* dedxCmd;
|
||||
G4UIcmdWithAnInteger* lamCmd;
|
||||
@@ -143,27 +130,10 @@ private:
|
||||
|
||||
G4UIcmdWithAString* mscCmd;
|
||||
G4UIcmdWithAString* msc1Cmd;
|
||||
|
||||
G4UIcmdWithAString* pixeXsCmd;
|
||||
G4UIcmdWithAString* pixeeXsCmd;
|
||||
G4UIcmdWithAString* dnaSolCmd;
|
||||
|
||||
G4UIcommand* paiCmd;
|
||||
G4UIcmdWithAString* meCmd;
|
||||
G4UIcommand* dnaCmd;
|
||||
G4UIcommand* mscoCmd;
|
||||
G4UIcommand* dumpCmd;
|
||||
|
||||
G4UIcommand* SubSecCmd;
|
||||
G4UIcommand* StepFuncCmd;
|
||||
G4UIcommand* StepFuncCmd1;
|
||||
G4UIcommand* deexCmd;
|
||||
G4UIcommand* bfCmd;
|
||||
G4UIcommand* fiCmd;
|
||||
G4UIcommand* bsCmd;
|
||||
G4UIcmdWithAString* nffCmd;
|
||||
|
||||
G4UIcmdWith3VectorAndUnit* dirSplitTargetCmd;
|
||||
G4UIcommand* dumpCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
@@ -37,29 +35,7 @@
|
||||
//
|
||||
// Creation date: 03.01.2002
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// 20-01-03 Migrade to cut per region (V.Ivanchenko)
|
||||
// 17-02-03 Fix problem of store/restore tables for ions (V.Ivanchenko)
|
||||
// 10-03-03 Add Ion registration (V.Ivanchenko)
|
||||
// 25-03-03 Add deregistration (V.Ivanchenko)
|
||||
// 26-03-03 Add GetDEDXDispersion (V.Ivanchenko)
|
||||
// 02-04-03 Change messenger (V.Ivanchenko)
|
||||
// 23-07-03 Add exchange with G4EnergyLossTables (V.Ivanchenko)
|
||||
// 05-10-03 Add G4VEmProcesses registration (V.Ivanchenko)
|
||||
// 17-10-03 Add SetParameters method (V.Ivanchenko)
|
||||
// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
|
||||
// 14-01-04 Activate precise range calculation (V.Ivanchenko)
|
||||
// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
|
||||
// 10-01-06 PreciseRange -> CSDARange (V.Ivantchenko)
|
||||
// 20-01-06 Introduce GetSubDEDX method (VI)
|
||||
// 26-01-06 Rename GetRange -> GetRangeFromRestricteDEDX (V.Ivanchenko)
|
||||
// 10-05-06 Add methods SetMscStepLimitation, FacRange and MscFlag (VI)
|
||||
// 22-05-06 Add methods Set/Get bremsTh (VI)
|
||||
// 12-02-07 Add SetSkin, SetLinearLossLimit (V.Ivanchenko)
|
||||
// 18-06-07 Move definition of msc parameters to G4EmProcessOptions (V.Ivanchenko)
|
||||
// 12-04-10 Added PreparePhsyicsTables and BuildPhysicsTables entries (V.Ivanchenko)
|
||||
// 04-06-13 Adaptation for MT mode, new method LocalPhysicsTables (V.Ivanchenko)
|
||||
// Modifications by V.Ivanchenko
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
@@ -93,6 +69,7 @@ class G4Region;
|
||||
class G4EmSaturation;
|
||||
class G4EmConfigurator;
|
||||
class G4ElectronIonPair;
|
||||
class G4NIELCalculator;
|
||||
class G4VMultipleScattering;
|
||||
class G4VEmProcess;
|
||||
|
||||
@@ -107,12 +84,6 @@ public:
|
||||
|
||||
~G4LossTableManager();
|
||||
|
||||
//-------------------------------------------------
|
||||
// called from destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
void Clear();
|
||||
|
||||
//-------------------------------------------------
|
||||
// initialisation before a new run
|
||||
//-------------------------------------------------
|
||||
@@ -178,6 +149,7 @@ public:
|
||||
|
||||
//-------------------------------------------------
|
||||
// Methods to be called only at initialisation
|
||||
// and at the end of the job
|
||||
//-------------------------------------------------
|
||||
|
||||
void Register(G4VEnergyLossProcess* p);
|
||||
@@ -192,6 +164,10 @@ public:
|
||||
|
||||
void DeRegister(G4VEmProcess* p);
|
||||
|
||||
void Register(G4VProcess* p);
|
||||
|
||||
void DeRegister(G4VProcess* p);
|
||||
|
||||
void Register(G4VEmModel* p);
|
||||
|
||||
void DeRegister(G4VEmModel* p);
|
||||
@@ -209,6 +185,8 @@ public:
|
||||
|
||||
void SetSubCutProducer(G4VSubCutProducer*);
|
||||
|
||||
void SetNIELCalculator(G4NIELCalculator*);
|
||||
|
||||
//-------------------------------------------------
|
||||
// Access methods
|
||||
//-------------------------------------------------
|
||||
@@ -229,6 +207,8 @@ public:
|
||||
|
||||
G4ElectronIonPair* ElectronIonPair();
|
||||
|
||||
G4NIELCalculator* NIELCalculator();
|
||||
|
||||
inline G4EmCorrections* EmCorrections();
|
||||
|
||||
inline G4VAtomDeexcitation* AtomDeexcitation();
|
||||
@@ -253,6 +233,8 @@ private:
|
||||
|
||||
G4LossTableManager();
|
||||
|
||||
void Clear();
|
||||
|
||||
void ResetParameters();
|
||||
|
||||
G4VEnergyLossProcess* BuildTables(const G4ParticleDefinition* aParticle);
|
||||
@@ -287,6 +269,7 @@ private:
|
||||
std::vector<G4VEmProcess*> emp_vector;
|
||||
std::vector<G4VEmModel*> mod_vector;
|
||||
std::vector<G4VEmFluctuationModel*> fmod_vector;
|
||||
std::vector<G4VProcess*> p_vector;
|
||||
|
||||
// cache
|
||||
G4VEnergyLossProcess* currentLoss;
|
||||
@@ -305,6 +288,7 @@ private:
|
||||
G4EmCorrections* emCorrections;
|
||||
G4EmConfigurator* emConfigurator;
|
||||
G4ElectronIonPair* emElectronIonPair;
|
||||
G4NIELCalculator* nielCalculator;
|
||||
G4VAtomDeexcitation* atomDeexcitation;
|
||||
G4VSubCutProducer* subcutProducer;
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4NIELCalculator_h
|
||||
#define G4NIELCalculator_h 1
|
||||
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
//
|
||||
// File name: G4NIELCalculator
|
||||
//
|
||||
// Author: Vladimir Ivanchenko
|
||||
//
|
||||
// Creation date: 30.05.2019
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
// This is a helper class to compute NIEL in user stepping action
|
||||
// or sensitive detector code. User should provide G4VEmModel
|
||||
// objects, which has NIEL model
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class G4Step;
|
||||
class G4VEmModel;
|
||||
|
||||
class G4NIELCalculator
|
||||
{
|
||||
public:
|
||||
|
||||
explicit G4NIELCalculator(G4VEmModel*, G4int verb);
|
||||
|
||||
~G4NIELCalculator();
|
||||
|
||||
// initialisation before start of run
|
||||
void Initialise();
|
||||
|
||||
// compute nuclear stopping power
|
||||
G4double ComputeNIEL(const G4Step*);
|
||||
|
||||
// kinetic energy of recoil nucleus or zero
|
||||
G4double RecoilEnergy(const G4Step*);
|
||||
|
||||
// replace model of NIEL
|
||||
void AddEmModel(G4VEmModel*);
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4NIELCalculator & operator=(const G4NIELCalculator &right) = delete;
|
||||
G4NIELCalculator(const G4NIELCalculator&) = delete;
|
||||
|
||||
G4VEmModel* fModel;
|
||||
G4int fVerbose;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -284,6 +284,14 @@ public:
|
||||
G4double kineticEnergy,
|
||||
G4double cutEnergy = 0.0,
|
||||
G4double maxEnergy = DBL_MAX);
|
||||
// same as SelectRandomAtom above but more efficient since log-ekin is known
|
||||
inline const G4Element* SelectTargetAtom(const G4MaterialCutsCouple*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double kineticEnergy,
|
||||
G4double logKineticEnergy,
|
||||
G4double cutEnergy = 0.0,
|
||||
G4double maxEnergy = DBL_MAX);
|
||||
|
||||
|
||||
// to select atom cross section per volume is recomputed for each element
|
||||
const G4Element* SelectRandomAtom(const G4Material*,
|
||||
@@ -429,6 +437,7 @@ protected:
|
||||
const std::vector<G4double>* theDensityFactor;
|
||||
const std::vector<G4int>* theDensityIdx;
|
||||
size_t idxTable;
|
||||
size_t fIdxTableElmSelector;
|
||||
G4bool lossFlucFlag;
|
||||
G4double inveplus;
|
||||
|
||||
@@ -559,6 +568,26 @@ G4VEmModel::SelectRandomAtom(const G4MaterialCutsCouple* couple,
|
||||
return fCurrentElement;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline const G4Element*
|
||||
G4VEmModel::SelectTargetAtom(const G4MaterialCutsCouple* couple,
|
||||
const G4ParticleDefinition* part,
|
||||
G4double kinEnergy,
|
||||
G4double logKinEnergy,
|
||||
G4double cutEnergy,
|
||||
G4double maxEnergy)
|
||||
{
|
||||
fCurrentCouple = couple;
|
||||
fCurrentElement = (nSelectors > 0)
|
||||
? ((*elmSelectors)[couple->GetIndex()])->SelectRandomAtom(kinEnergy,
|
||||
logKinEnergy, fIdxTableElmSelector)
|
||||
: SelectRandomAtom(couple->GetMaterial(),part,kinEnergy,cutEnergy,maxEnergy);
|
||||
fCurrentIsotope = nullptr;
|
||||
return fCurrentElement;
|
||||
}
|
||||
|
||||
|
||||
// ======== Get/Set inline methods used at initialisation ================
|
||||
|
||||
inline G4VEmFluctuationModel* G4VEmModel::GetModelOfFluctuations()
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
// It returns the cross section per volume for energy/ material
|
||||
G4double CrossSectionPerVolume(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
const G4MaterialCutsCouple* couple);
|
||||
|
||||
// It returns the cross section of the process per atom
|
||||
G4double ComputeCrossSectionPerAtom(G4double kineticEnergy,
|
||||
@@ -162,6 +162,9 @@ public:
|
||||
// It returns cross section per volume
|
||||
inline G4double GetLambda(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
inline G4double GetLambda(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Specific methods to build and access Physics Tables
|
||||
@@ -312,15 +315,20 @@ private:
|
||||
|
||||
void PrintWarning(G4String tit, G4double val);
|
||||
|
||||
void ComputeIntegralLambda(G4double kinEnergy);
|
||||
// void ComputeIntegralLambda(G4double kinEnergy);
|
||||
void ComputeIntegralLambda(G4double kinEnergy, G4double logKinEnergy);
|
||||
|
||||
inline void DefineMaterial(const G4MaterialCutsCouple* couple);
|
||||
|
||||
inline G4double GetLambdaFromTable(G4double kinEnergy);
|
||||
inline G4double GetLambdaFromTable(G4double kinEnergy, G4double logKinEnergy);
|
||||
|
||||
inline G4double GetLambdaFromTablePrim(G4double kinEnergy);
|
||||
inline G4double GetLambdaFromTablePrim(G4double kinEnergy,
|
||||
G4double logKinEnergy);
|
||||
|
||||
inline G4double GetCurrentLambda(G4double kinEnergy);
|
||||
inline G4double GetCurrentLambda(G4double kinEnergy, G4double logKinEnergy);
|
||||
|
||||
inline G4double ComputeCurrentLambda(G4double kinEnergy);
|
||||
|
||||
@@ -363,6 +371,7 @@ private:
|
||||
G4double minKinEnergyPrim;
|
||||
G4double maxKinEnergy;
|
||||
G4double lambdaFactor;
|
||||
G4double logLambdaFactor;
|
||||
G4double biasFactor;
|
||||
G4double massRatio;
|
||||
|
||||
@@ -402,6 +411,7 @@ protected:
|
||||
|
||||
G4double mfpKinEnergy;
|
||||
G4double preStepKinEnergy;
|
||||
G4double preStepLogKinEnergy;
|
||||
G4double preStepLambda;
|
||||
|
||||
private:
|
||||
@@ -503,6 +513,11 @@ inline G4double G4VEmProcess::GetLambdaFromTable(G4double e)
|
||||
return ((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda);
|
||||
}
|
||||
|
||||
inline G4double G4VEmProcess::GetLambdaFromTable(G4double e, G4double loge)
|
||||
{
|
||||
return ((*theLambdaTable)[basedCoupleIndex])->Value(e, loge, idxLambda);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e)
|
||||
@@ -510,6 +525,12 @@ inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e)
|
||||
return ((*theLambdaTablePrim)[basedCoupleIndex])->Value(e, idxLambdaPrim)/e;
|
||||
}
|
||||
|
||||
inline G4double G4VEmProcess::GetLambdaFromTablePrim(G4double e, G4double loge)
|
||||
{
|
||||
return
|
||||
((*theLambdaTablePrim)[basedCoupleIndex])->Value(e, loge, idxLambdaPrim)/e;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4VEmProcess::ComputeCurrentLambda(G4double e)
|
||||
@@ -529,6 +550,15 @@ inline G4double G4VEmProcess::GetCurrentLambda(G4double e)
|
||||
return fFactor*x;
|
||||
}
|
||||
|
||||
inline G4double G4VEmProcess::GetCurrentLambda(G4double e, G4double loge)
|
||||
{
|
||||
G4double x(0.0);
|
||||
if(e >= minKinEnergyPrim) { x = GetLambdaFromTablePrim(e, loge); }
|
||||
else if(theLambdaTable) { x = GetLambdaFromTable(e, loge); }
|
||||
else if(currentModel) { x = ComputeCurrentLambda(e); }
|
||||
return fFactor*x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline void
|
||||
@@ -541,13 +571,20 @@ G4VEmProcess::CurrentSetup(const G4MaterialCutsCouple* couple, G4double energy)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEmProcess::GetLambda(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
G4VEmProcess::GetLambda(G4double kinEnergy, const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
CurrentSetup(couple, kinEnergy);
|
||||
return GetCurrentLambda(kinEnergy);
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEmProcess::GetLambda(G4double kinEnergy, const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy)
|
||||
{
|
||||
CurrentSetup(couple, kinEnergy);
|
||||
return GetCurrentLambda(kinEnergy, logKinEnergy);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
|
||||
@@ -213,6 +213,9 @@ public:
|
||||
// Access to cross section table
|
||||
G4double CrossSectionPerVolume(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
G4double CrossSectionPerVolume(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKineticEnergy);
|
||||
|
||||
// access to cross section
|
||||
G4double MeanFreePath(const G4Track& track);
|
||||
@@ -365,20 +368,26 @@ public:
|
||||
inline G4double CrossSectionBiasingFactor() const;
|
||||
|
||||
// Return values for given G4MaterialCutsCouple
|
||||
inline G4double GetDEDX(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetDEDX(G4double kineticEnergy, const G4MaterialCutsCouple*);
|
||||
inline G4double GetDEDX(G4double kineticEnergy, const G4MaterialCutsCouple*,
|
||||
G4double logKineticEnergy);
|
||||
inline G4double GetDEDXForSubsec(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetRange(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetRange(G4double kineticEnergy, const G4MaterialCutsCouple*);
|
||||
inline G4double GetRange(G4double kineticEnergy, const G4MaterialCutsCouple*,
|
||||
G4double logKineticEnergy);
|
||||
inline G4double GetCSDARange(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetRangeForLoss(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetRangeForLoss(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*,
|
||||
G4double logKineticEnergy);
|
||||
inline G4double GetKineticEnergy(G4double range,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetLambda(G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple*);
|
||||
inline G4double GetLambda(G4double kineticEnergy,const G4MaterialCutsCouple*);
|
||||
inline G4double GetLambda(G4double kineticEnergy,const G4MaterialCutsCouple*,
|
||||
G4double logKineticEnergy);
|
||||
|
||||
inline G4bool TablesAreBuilt() const;
|
||||
|
||||
@@ -417,16 +426,24 @@ private:
|
||||
//------------------------------------------------------------------------
|
||||
// Compute values using scaling relation, mass and charge of based particle
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
inline G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetDEDXForScaledEnergy(G4double scaledKinEnergy,
|
||||
G4double logScaledKinEnergy);
|
||||
inline G4double GetSubDEDXForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetIonisationForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetSubIonisationForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetScaledRangeForScaledEnergy(G4double scaledKinEnergy,
|
||||
G4double logScaledKinEnergy);
|
||||
inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetLimitScaledRangeForScaledEnergy(G4double scaledKinEnergy,
|
||||
G4double logScaledKinEnergy);
|
||||
inline G4double ScaledKinEnergyForLoss(G4double range);
|
||||
inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy);
|
||||
void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy);
|
||||
inline G4double GetLambdaForScaledEnergy(G4double scaledKinEnergy,
|
||||
G4double logScaledKinEnergy);
|
||||
void ComputeLambdaForScaledEnergy(G4double scaledKinEnergy,
|
||||
G4double logScaledKinEnergy);
|
||||
|
||||
// hide assignment operator
|
||||
G4VEnergyLossProcess(G4VEnergyLossProcess &) = delete;
|
||||
@@ -509,6 +526,7 @@ private:
|
||||
G4double dRoverRange;
|
||||
G4double finalRange;
|
||||
G4double lambdaFactor;
|
||||
G4double logLambdafactor;
|
||||
G4double biasFactor;
|
||||
|
||||
G4bool lossFluctuationFlag;
|
||||
@@ -541,7 +559,9 @@ protected:
|
||||
G4double fRange;
|
||||
G4double computedRange;
|
||||
G4double preStepKinEnergy;
|
||||
G4double preStepLogKinEnergy;
|
||||
G4double preStepScaledEnergy;
|
||||
G4double preStepLogScaledEnergy;
|
||||
G4double preStepRangeEnergy;
|
||||
G4double mfpKinEnergy;
|
||||
|
||||
@@ -559,6 +579,7 @@ private:
|
||||
size_t lastIdx;
|
||||
|
||||
G4double massRatio;
|
||||
G4double logMassRatio;
|
||||
G4double fFactor;
|
||||
G4double reduceFactor;
|
||||
G4double chargeSqRatio;
|
||||
@@ -616,6 +637,7 @@ inline void G4VEnergyLossProcess::SetDynamicMassCharge(G4double massratio,
|
||||
G4double charge2ratio)
|
||||
{
|
||||
massRatio = massratio;
|
||||
logMassRatio = G4Log(massRatio);
|
||||
fFactor = charge2ratio*biasFactor*(*theDensityFactor)[currentCoupleIndex];
|
||||
chargeSqRatio = charge2ratio;
|
||||
reduceFactor = 1.0/(fFactor*massRatio);
|
||||
@@ -635,6 +657,19 @@ inline G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e)
|
||||
return x;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4VEnergyLossProcess::GetDEDXForScaledEnergy(G4double e, G4double loge)
|
||||
{
|
||||
/*
|
||||
G4cout << "G4VEnergyLossProcess::GetDEDX: Idx= "
|
||||
<< basedCoupleIndex << " E(MeV)= " << e
|
||||
<< " Emin= " << minKinEnergy << " Factor= " << fFactor
|
||||
<< " " << theDEDXTable << G4endl; */
|
||||
G4double x = fFactor*(*theDEDXTable)[basedCoupleIndex]->Value(e,loge,idxDEDX);
|
||||
if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4VEnergyLossProcess::GetSubDEDXForScaledEnergy(G4double e)
|
||||
@@ -677,7 +712,27 @@ inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e)
|
||||
lastIdx = basedCoupleIndex;
|
||||
preStepRangeEnergy = e;
|
||||
computedRange =
|
||||
((*theRangeTableForLoss)[basedCoupleIndex])->Value(e, idxRange);
|
||||
((*theRangeTableForLoss)[basedCoupleIndex])->Value(e, idxRange);
|
||||
if(e < minKinEnergy) { computedRange *= std::sqrt(e/minKinEnergy); }
|
||||
}
|
||||
//G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= "
|
||||
// << basedCoupleIndex << " E(MeV)= " << e
|
||||
// << " R= " << fRange << " " << theRangeTableForLoss << G4endl;
|
||||
|
||||
return computedRange;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e, G4double loge)
|
||||
{
|
||||
//G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= "
|
||||
// << basedCoupleIndex << " E(MeV)= " << e
|
||||
// << " lastIdx= " << lastIdx << " " << theRangeTableForLoss << G4endl;
|
||||
if(basedCoupleIndex != lastIdx || preStepRangeEnergy != e) {
|
||||
lastIdx = basedCoupleIndex;
|
||||
preStepRangeEnergy = e;
|
||||
computedRange =
|
||||
((*theRangeTableForLoss)[basedCoupleIndex])->Value(e, loge, idxRange);
|
||||
if(e < minKinEnergy) { computedRange *= std::sqrt(e/minKinEnergy); }
|
||||
}
|
||||
//G4cout << "G4VEnergyLossProcess::GetScaledRange: Idx= "
|
||||
@@ -688,7 +743,6 @@ inline G4double G4VEnergyLossProcess::GetScaledRangeForScaledEnergy(G4double e)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e)
|
||||
{
|
||||
@@ -703,6 +757,21 @@ G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e)
|
||||
return x;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetLimitScaledRangeForScaledEnergy(G4double e,
|
||||
G4double loge)
|
||||
{
|
||||
G4double x;
|
||||
if (e < maxKinEnergyCSDA) {
|
||||
x = ((*theCSDARangeTable)[basedCoupleIndex])->Value(e, loge, idxCSDA);
|
||||
if(e < minKinEnergy) { x *= std::sqrt(e/minKinEnergy); }
|
||||
} else {
|
||||
x = theRangeAtMaxEnergy[basedCoupleIndex] +
|
||||
(e - maxKinEnergyCSDA)/theDEDXAtMaxEnergy[basedCoupleIndex];
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double G4VEnergyLossProcess::ScaledKinEnergyForLoss(G4double r)
|
||||
@@ -728,14 +797,29 @@ inline G4double G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e)
|
||||
return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e, idxLambda);
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetLambdaForScaledEnergy(G4double e, G4double loge)
|
||||
{
|
||||
return fFactor*((*theLambdaTable)[basedCoupleIndex])->Value(e,loge,idxLambda);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetDEDX(G4double kineticEnergy,
|
||||
G4VEnergyLossProcess::GetDEDX(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
DefineMaterial(couple);
|
||||
return GetDEDXForScaledEnergy(kineticEnergy*massRatio);
|
||||
return GetDEDXForScaledEnergy(kinEnergy*massRatio);
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetDEDX(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy)
|
||||
{
|
||||
DefineMaterial(couple);
|
||||
return GetDEDXForScaledEnergy(kinEnergy*massRatio, logKinEnergy+logMassRatio);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -751,16 +835,32 @@ G4VEnergyLossProcess::GetDEDXForSubsec(G4double kineticEnergy,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetRange(G4double kineticEnergy,
|
||||
G4VEnergyLossProcess::GetRange(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
G4double x = fRange;
|
||||
DefineMaterial(couple);
|
||||
if(theCSDARangeTable) {
|
||||
x = GetLimitScaledRangeForScaledEnergy(kineticEnergy*massRatio)
|
||||
* reduceFactor;
|
||||
x = reduceFactor * GetLimitScaledRangeForScaledEnergy(kinEnergy*massRatio);
|
||||
} else if(theRangeTableForLoss) {
|
||||
x = GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
|
||||
x = reduceFactor * GetScaledRangeForScaledEnergy(kinEnergy*massRatio);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetRange(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy)
|
||||
{
|
||||
G4double x = fRange;
|
||||
DefineMaterial(couple);
|
||||
if(theCSDARangeTable) {
|
||||
x = reduceFactor * GetLimitScaledRangeForScaledEnergy(kinEnergy*massRatio,
|
||||
logKinEnergy+logMassRatio);
|
||||
} else if(theRangeTableForLoss) {
|
||||
x = reduceFactor * GetScaledRangeForScaledEnergy(kinEnergy*massRatio,
|
||||
logKinEnergy+logMassRatio);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
@@ -780,12 +880,23 @@ G4VEnergyLossProcess::GetCSDARange(G4double kineticEnergy,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetRangeForLoss(G4double kineticEnergy,
|
||||
G4VEnergyLossProcess::GetRangeForLoss(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
// G4cout << "GetRangeForLoss: Range from " << GetProcessName() << G4endl;
|
||||
DefineMaterial(couple);
|
||||
return GetScaledRangeForScaledEnergy(kineticEnergy*massRatio)*reduceFactor;
|
||||
return reduceFactor * GetScaledRangeForScaledEnergy(kinEnergy*massRatio);
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetRangeForLoss(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy)
|
||||
{
|
||||
// G4cout << "GetRangeForLoss: Range from " << GetProcessName() << G4endl;
|
||||
DefineMaterial(couple);
|
||||
return reduceFactor * GetScaledRangeForScaledEnergy(kinEnergy*massRatio,
|
||||
logKinEnergy+logMassRatio);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -801,11 +912,22 @@ G4VEnergyLossProcess::GetKineticEnergy(G4double range,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetLambda(G4double kineticEnergy,
|
||||
G4VEnergyLossProcess::GetLambda(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
DefineMaterial(couple);
|
||||
return theLambdaTable ? GetLambdaForScaledEnergy(kineticEnergy*massRatio) : 0.0;
|
||||
return theLambdaTable ? GetLambdaForScaledEnergy(kinEnergy*massRatio) : 0.0;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VEnergyLossProcess::GetLambda(G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKinEnergy)
|
||||
{
|
||||
DefineMaterial(couple);
|
||||
return theLambdaTable
|
||||
? GetLambdaForScaledEnergy(kinEnergy*massRatio, logKinEnergy+logMassRatio)
|
||||
: 0.0;
|
||||
}
|
||||
|
||||
// ======== Get/Set inline methods used at initialisation ================
|
||||
|
||||
@@ -139,12 +139,20 @@ public:
|
||||
G4double limit);
|
||||
|
||||
inline G4double GetDEDX(const G4ParticleDefinition* part,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
inline G4double GetDEDX(const G4ParticleDefinition* part,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKineticEnergy);
|
||||
|
||||
inline G4double GetRange(const G4ParticleDefinition* part,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple);
|
||||
const G4MaterialCutsCouple* couple);
|
||||
inline G4double GetRange(const G4ParticleDefinition* part,
|
||||
G4double kineticEnergy,
|
||||
const G4MaterialCutsCouple* couple,
|
||||
G4double logKineticEnergy);
|
||||
|
||||
inline G4double GetEnergy(const G4ParticleDefinition* part,
|
||||
G4double range,
|
||||
@@ -153,7 +161,11 @@ public:
|
||||
// G4MaterialCutsCouple should be defined before call to this method
|
||||
inline
|
||||
G4double GetTransportMeanFreePath(const G4ParticleDefinition* part,
|
||||
G4double kinEnergy);
|
||||
G4double kinEnergy);
|
||||
inline
|
||||
G4double GetTransportMeanFreePath(const G4ParticleDefinition* part,
|
||||
G4double kinEnergy,
|
||||
G4double logKinEnergy);
|
||||
|
||||
private:
|
||||
|
||||
@@ -264,13 +276,28 @@ inline G4double G4VMscModel::ComputeGeomLimit(const G4Track& track,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetDEDX(const G4ParticleDefinition* part,
|
||||
G4double kinEnergy, const G4MaterialCutsCouple* couple)
|
||||
G4VMscModel::GetDEDX(const G4ParticleDefinition* part, G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
G4double x;
|
||||
if(ionisation) { x = ionisation->GetDEDX(kinEnergy, couple); }
|
||||
else {
|
||||
G4double q = part->GetPDGCharge()*inveplus;
|
||||
if (ionisation) {
|
||||
x = ionisation->GetDEDX(kinEnergy, couple);
|
||||
} else {
|
||||
const G4double q = part->GetPDGCharge()*inveplus;
|
||||
x = dedx*q*q;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetDEDX(const G4ParticleDefinition* part, G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple, G4double logKinEnergy)
|
||||
{
|
||||
G4double x;
|
||||
if (ionisation) {
|
||||
x = ionisation->GetDEDX(kinEnergy, couple, logKinEnergy);
|
||||
} else {
|
||||
const G4double q = part->GetPDGCharge()*inveplus;
|
||||
x = dedx*q*q;
|
||||
}
|
||||
return x;
|
||||
@@ -279,23 +306,41 @@ G4VMscModel::GetDEDX(const G4ParticleDefinition* part,
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetRange(const G4ParticleDefinition* part,
|
||||
G4double kinEnergy, const G4MaterialCutsCouple* couple)
|
||||
G4VMscModel::GetRange(const G4ParticleDefinition* part,G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple)
|
||||
{
|
||||
//G4cout << "G4VMscModel::GetRange E(MeV)= " << kinEnergy << " "
|
||||
// << ionisation << " " << part->GetParticleName()
|
||||
// << G4endl;
|
||||
// << G4endl;
|
||||
localtkin = kinEnergy;
|
||||
if(ionisation) {
|
||||
if (ionisation) {
|
||||
localrange = ionisation->GetRangeForLoss(kinEnergy, couple);
|
||||
} else {
|
||||
G4double q = part->GetPDGCharge()*inveplus;
|
||||
} else {
|
||||
const G4double q = part->GetPDGCharge()*inveplus;
|
||||
localrange = kinEnergy/(dedx*q*q*couple->GetMaterial()->GetDensity());
|
||||
}
|
||||
//G4cout << "R(mm)= " << localrange << " " << ionisation << G4endl;
|
||||
return localrange;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetRange(const G4ParticleDefinition* part,G4double kinEnergy,
|
||||
const G4MaterialCutsCouple* couple, G4double logKinEnergy)
|
||||
{
|
||||
//G4cout << "G4VMscModel::GetRange E(MeV)= " << kinEnergy << " "
|
||||
// << ionisation << " " << part->GetParticleName()
|
||||
// << G4endl;
|
||||
localtkin = kinEnergy;
|
||||
if (ionisation) {
|
||||
localrange = ionisation->GetRangeForLoss(kinEnergy, couple, logKinEnergy);
|
||||
} else {
|
||||
const G4double q = part->GetPDGCharge()*inveplus;
|
||||
localrange = kinEnergy/(dedx*q*q*couple->GetMaterial()->GetDensity());
|
||||
}
|
||||
//G4cout << "R(mm)= " << localrange << " " << ionisation << G4endl;
|
||||
return localrange;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline G4double
|
||||
@@ -337,16 +382,32 @@ inline void G4VMscModel::SetIonisation(G4VEnergyLossProcess* p,
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetTransportMeanFreePath(const G4ParticleDefinition* part,
|
||||
G4double ekin)
|
||||
G4double ekin)
|
||||
{
|
||||
G4double x;
|
||||
if(xSectionTable) {
|
||||
G4int idx = CurrentCouple()->GetIndex();
|
||||
x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin, idxTable)
|
||||
*(*theDensityFactor)[idx]/(ekin*ekin);
|
||||
if (xSectionTable) {
|
||||
const G4int idx = CurrentCouple()->GetIndex();
|
||||
x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin, idxTable)
|
||||
*(*theDensityFactor)[idx]/(ekin*ekin);
|
||||
} else {
|
||||
x = CrossSectionPerVolume(CurrentCouple()->GetMaterial(), part, ekin,
|
||||
0.0, DBL_MAX);
|
||||
0.0, DBL_MAX);
|
||||
}
|
||||
return (x > 0.0) ? 1.0/x : DBL_MAX;
|
||||
}
|
||||
|
||||
inline G4double
|
||||
G4VMscModel::GetTransportMeanFreePath(const G4ParticleDefinition* part,
|
||||
G4double ekin, G4double logekin)
|
||||
{
|
||||
G4double x;
|
||||
if (xSectionTable) {
|
||||
const G4int idx = CurrentCouple()->GetIndex();
|
||||
x = (*xSectionTable)[(*theDensityIdx)[idx]]->Value(ekin, logekin, idxTable)
|
||||
*(*theDensityFactor)[idx]/(ekin*ekin);
|
||||
} else {
|
||||
x = CrossSectionPerVolume(CurrentCouple()->GetMaterial(), part, ekin,
|
||||
0.0, DBL_MAX);
|
||||
}
|
||||
return (x > 0.0) ? 1.0/x : DBL_MAX;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user