44 :
G4VEmModel(
"LivermoreRayleigh"),isInitialised(false)
59 G4cout <<
"G4LivermoreRayleighModel is constructed " <<
G4endl;
85 G4cout <<
"Calling Initialise() of G4LivermoreRayleighModel." <<
G4endl
98 char* path = getenv(
"G4LEDATA");
103 for(
G4int i=0; i<numOfCouples; ++i)
111 for (
G4int j=0; j<nelm; ++j)
141 G4cout <<
"Calling ReadData() of G4LivermoreRayleighModel"
147 const char* datadir = path;
151 datadir = getenv(
"G4LEDATA");
154 G4Exception(
"G4LivermoreRayleighModelModel::ReadData()",
"em0006",
156 "Environment variable G4LEDATA not defined");
168 std::ostringstream ostCS;
169 ostCS << datadir <<
"/livermore/rayl/re-cs-" << Z <<
".dat";
170 std::ifstream finCS(ostCS.str().c_str());
172 if( !finCS .is_open() )
175 ed <<
"G4LivermoreRayleighModel data file <" << ostCS.str().c_str()
176 <<
"> is not opened!" <<
G4endl;
178 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
184 G4cout <<
"File " << ostCS.str()
185 <<
" is opened by G4LivermoreRayleighModel" <<
G4endl;
201 G4cout <<
"G4LivermoreRayleighModel::ComputeCrossSectionPerAtom()"
211 if(intZ < 1 || intZ >
maxZ) {
return xs; }
220 if(!pv) {
return xs; }
227 }
else if(e >= pv->
Energy(0)) {
233 G4cout <<
"****** DEBUG: tcs value for Z=" << Z <<
" at energy (MeV)="
235 G4cout <<
" cs (Geant4 internal unit)=" << xs <<
G4endl;
236 G4cout <<
" -> first E*E*cs value in CS data file (iu) =" << (*pv)[0]
238 G4cout <<
" -> last E*E*cs value in CS data file (iu) =" << (*pv)[
n]
240 G4cout <<
"*********************************************************"
249 std::vector<G4DynamicParticle*>*,
255 G4cout <<
"Calling SampleSecondaries() of G4LivermoreRayleighModel"
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
G4double Energy(size_t index) const
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
std::ostringstream G4ExceptionDescription
static constexpr double MeV
const G4ElementVector * GetElementVector() const
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
static G4LPhysicsFreeVector * dataCS[101]
G4LivermoreRayleighModel()
G4double Value(G4double theEnergy, size_t &lastidx) const
std::vector< G4EmElementSelector * > * GetElementSelectors()
virtual ~G4LivermoreRayleighModel()
G4double LowEnergyLimit() const
#define G4MUTEX_INITIALIZER
G4ParticleDefinition * GetDefinition() const
G4ParticleChangeForGamma * fParticleChange
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void ReadData(size_t Z, const char *path=0)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
static constexpr double eV
void SetAngularDistribution(G4VEmAngularDistribution *)
size_t GetTableSize() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Element * > G4ElementVector
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4VEmAngularDistribution * GetAngularDistribution()
const G4Material * GetMaterial() const
G4ParticleChangeForGamma * GetParticleChangeForGamma()
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0, G4double cut=0, G4double emax=DBL_MAX)
G4double HighEnergyLimit() const
static constexpr double GeV
size_t GetNumberOfElements() const
size_t GetVectorLength() const