Import Geant4 11.0.1 source tree
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4LossFluctuationDummy
|
||||
//
|
||||
// Author: V.Ivanchenko
|
||||
//
|
||||
// Creation date: 14.02.2022
|
||||
//
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4LossFluctuationDummy_h
|
||||
#define G4LossFluctuationDummy_h 1
|
||||
|
||||
#include "G4VEmFluctuationModel.hh"
|
||||
|
||||
class G4LossFluctuationDummy : public G4VEmFluctuationModel
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
explicit G4LossFluctuationDummy(const G4String& nam = "DummyFluc");
|
||||
|
||||
~G4LossFluctuationDummy() override;
|
||||
|
||||
G4double SampleFluctuations(const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
const G4double, const G4double,
|
||||
const G4double, const G4double) final;
|
||||
|
||||
G4double Dispersion(const G4Material*,
|
||||
const G4DynamicParticle*,
|
||||
const G4double, const G4double,
|
||||
const G4double) final;
|
||||
|
||||
// Initialisation prestep
|
||||
void SetParticleAndCharge(const G4ParticleDefinition*, G4double) final;
|
||||
|
||||
// hide assignment operator
|
||||
G4LossFluctuationDummy & operator=
|
||||
(const G4LossFluctuationDummy &right) = delete;
|
||||
G4LossFluctuationDummy(const G4LossFluctuationDummy&) = delete;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
@@ -40,7 +39,7 @@
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Implementation of energy loss fluctuations
|
||||
// Implementation of energy loss fluctuations made by L.Urban in 2021
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -72,59 +71,64 @@ public:
|
||||
const G4double, const G4double,
|
||||
const G4double) override;
|
||||
|
||||
void InitialiseMe(const G4ParticleDefinition*) final;
|
||||
// Initialisation for a new particle type
|
||||
void InitialiseMe(const G4ParticleDefinition*) override;
|
||||
|
||||
// Initialisation prestep
|
||||
void SetParticleAndCharge(const G4ParticleDefinition*,
|
||||
G4double q2) final;
|
||||
void SetParticleAndCharge(const G4ParticleDefinition*,
|
||||
G4double q2) override;
|
||||
|
||||
// hide assignment operator
|
||||
G4UniversalFluctuation & operator=(const G4UniversalFluctuation &right) = delete;
|
||||
G4UniversalFluctuation(const G4UniversalFluctuation&) = delete;
|
||||
G4UniversalFluctuation & operator=
|
||||
(const G4UniversalFluctuation &right) = delete;
|
||||
G4UniversalFluctuation(const G4UniversalFluctuation&) = delete;
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
virtual G4double SampleGlandz(CLHEP::HepRandomEngine* rndm,
|
||||
const G4Material*, const G4double tcut);
|
||||
|
||||
inline void AddExcitation(CLHEP::HepRandomEngine* rndm,
|
||||
G4double a, G4double e, G4double& eav,
|
||||
const G4double ax, const G4double ex,
|
||||
G4double& eav,
|
||||
G4double& eloss, G4double& esig2);
|
||||
|
||||
inline void SampleGauss(CLHEP::HepRandomEngine* rndm,
|
||||
G4double eav, G4double esig2,
|
||||
const G4double eav, const G4double esig2,
|
||||
G4double& eloss);
|
||||
|
||||
const G4ParticleDefinition* particle = nullptr;
|
||||
const G4Material* lastMaterial = nullptr;
|
||||
|
||||
// particle properties
|
||||
G4double particleMass = 0.0;
|
||||
|
||||
// Derived quantities
|
||||
G4double m_Inv_particleMass = DBL_MAX;
|
||||
G4double m_massrate = DBL_MAX;
|
||||
G4double chargeSquare = 1.0;
|
||||
|
||||
// data members to speed up the fluctuation calculation
|
||||
// material properties
|
||||
G4double ipotFluct = 0.0;
|
||||
G4double ipotLogFluct = 0.0;
|
||||
G4double e0 = 0.0;
|
||||
G4double e1 = 0.0;
|
||||
|
||||
// model parameters
|
||||
G4double minNumberInteractionsBohr = 10.0;
|
||||
G4double minLoss;
|
||||
G4double nmaxCont = 8.0;
|
||||
G4double rate = 0.56;
|
||||
G4double fw = 5.0;
|
||||
G4double a0 = 15.0;
|
||||
G4double fw = 4.0;
|
||||
G4double a0 = 42.0;
|
||||
G4double w2 = 0.0;
|
||||
G4double meanLoss = 0.0;
|
||||
|
||||
G4int sizearray = 30;
|
||||
const G4ParticleDefinition* particle = nullptr;
|
||||
G4double* rndmarray = nullptr;
|
||||
G4int sizearray = 30;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
inline void
|
||||
G4UniversalFluctuation::AddExcitation(CLHEP::HepRandomEngine* rndm,
|
||||
G4double ax, G4double ex, G4double& eav,
|
||||
const G4double ax, const G4double ex,
|
||||
G4double& eav,
|
||||
G4double& eloss, G4double& esig2)
|
||||
{
|
||||
if(ax > nmaxCont) {
|
||||
@@ -136,9 +140,11 @@ G4UniversalFluctuation::AddExcitation(CLHEP::HepRandomEngine* rndm,
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void
|
||||
G4UniversalFluctuation::SampleGauss(CLHEP::HepRandomEngine* rndm,
|
||||
G4double eav, G4double esig2,
|
||||
const G4double eav, const G4double esig2,
|
||||
G4double& eloss)
|
||||
{
|
||||
G4double x = eav;
|
||||
@@ -154,5 +160,7 @@ G4UniversalFluctuation::SampleGauss(CLHEP::HepRandomEngine* rndm,
|
||||
eloss += x;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4UrbanFluctuation
|
||||
//
|
||||
// Author: V.Ivanchenko make a class with the Laszlo Urban model
|
||||
//
|
||||
// Creation date: 14.02.2022
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
//
|
||||
// Class Description:
|
||||
//
|
||||
// Implementation of energy loss fluctuations made by L.Urban for
|
||||
// Geant4 10.X series for updated design of 11.X by V.Ivanchenko
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4UrbanFluctuation_h
|
||||
#define G4UrbanFluctuation_h 1
|
||||
|
||||
#include "G4UniversalFluctuation.hh"
|
||||
|
||||
class G4UrbanFluctuation : public G4UniversalFluctuation
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
explicit G4UrbanFluctuation(const G4String& nam = "UrbanFluc");
|
||||
|
||||
~G4UrbanFluctuation() override;
|
||||
|
||||
// hide assignment operator
|
||||
G4UrbanFluctuation & operator =
|
||||
(const G4UrbanFluctuation &right) = delete;
|
||||
G4UrbanFluctuation(const G4UrbanFluctuation&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
G4double SampleGlandz(CLHEP::HepRandomEngine* rndm,
|
||||
const G4Material*, const G4double tcut) override;
|
||||
|
||||
private:
|
||||
|
||||
// material properties
|
||||
const G4Material* lastMaterial = nullptr;
|
||||
G4double f1Fluct = 0.0;
|
||||
G4double f2Fluct = 0.0;
|
||||
G4double e1Fluct = 0.0;
|
||||
G4double e2Fluct = 0.0;
|
||||
G4double e1LogFluct = 0.0;
|
||||
G4double e2LogFluct = 0.0;
|
||||
G4double esmall = 0.0;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
@@ -186,14 +186,14 @@ private:
|
||||
static std::vector<mscData*> msc;
|
||||
|
||||
// index of G4MaterialCutsCouple
|
||||
G4int idx;
|
||||
G4int idx;
|
||||
|
||||
G4bool firstStep;
|
||||
G4bool insideskin;
|
||||
|
||||
G4bool latDisplasmentbackup;
|
||||
G4bool dispAlg96;
|
||||
G4bool firstStep;
|
||||
G4bool insideskin;
|
||||
|
||||
G4bool latDisplasmentbackup;
|
||||
G4bool dispAlg96;
|
||||
G4bool isFirstInstance = false;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user