Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:31

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 
0026 // class description
0027 //
0028 // The class contains few (physical) quantities related to the Ionisation
0029 // process, for a material defined by its pointer G4Material*
0030 //
0031 // 09-07-98: data moved from G4Material (mma)
0032 // 09-03-01: copy constructor and assignement operator in public (mma)
0033 // 28-10-02: add setMeanExcitationEnergy (V.Ivanchenko)
0034 // 27-09-07: add computation of parameters for ions (V.Ivanchenko)
0035 // 04-03-08: add fBirks constant (mma)
0036 // 16-01-19, add exact computation of the density effect (M. Strait)
0037 
0038 #ifndef G4IonisParamMat_HH
0039 #define G4IonisParamMat_HH
0040 
0041 #include "G4DensityEffectCalculator.hh"
0042 #include "G4ios.hh"
0043 #include "globals.hh"
0044 
0045 class G4Material;
0046 class G4DensityEffectData;
0047 
0048 class G4IonisParamMat
0049 {
0050  public:
0051   G4IonisParamMat(const G4Material*);
0052   ~G4IonisParamMat();
0053   G4IonisParamMat& operator=(const G4IonisParamMat&) = delete;
0054   G4IonisParamMat(const G4IonisParamMat&) = delete;
0055 
0056   // parameters for mean energy loss calculation:
0057   inline G4double GetMeanExcitationEnergy() const { return fMeanExcitationEnergy; };
0058 
0059   void SetMeanExcitationEnergy(G4double value);
0060   G4double FindMeanExcitationEnergy(const G4Material*) const;
0061 
0062   inline G4double GetLogMeanExcEnergy() const { return fLogMeanExcEnergy; };
0063   inline G4double* GetShellCorrectionVector() const { return fShellCorrectionVector; };
0064   inline G4double GetTaul() const { return fTaul; };
0065 
0066   // parameters of the density correction:
0067   inline G4double GetPlasmaEnergy() const { return fPlasmaEnergy; };
0068   inline G4double GetAdjustmentFactor() const { return fAdjustmentFactor; };
0069   inline G4double GetCdensity() const { return fCdensity; };
0070   inline G4double GetMdensity() const { return fMdensity; };
0071   inline G4double GetAdensity() const { return fAdensity; };
0072   inline G4double GetX0density() const { return fX0density; };
0073   inline G4double GetX1density() const { return fX1density; };
0074   inline G4double GetD0density() const { return fD0density; };
0075 
0076   // user defined density correction parameterisation
0077   void SetDensityEffectParameters(
0078     G4double cd, G4double md, G4double ad, G4double x0, G4double x1, G4double d0);
0079 
0080   // defined density correction parameterisation via base material
0081   void SetDensityEffectParameters(const G4Material* bmat);
0082 
0083   void ComputeDensityEffectOnFly(G4bool);
0084 
0085   inline G4DensityEffectCalculator* GetDensityEffectCalculator() const
0086   {
0087     return fDensityEffectCalc;
0088   }
0089 
0090   // compute density correction as a function of the kinematic variable
0091   // x = log10(beta*gamma) using parameterisation of calculator
0092   inline G4double DensityCorrection(G4double x) const
0093   {
0094     return (nullptr == fDensityEffectCalc) ? GetDensityCorrection(x)
0095                                            : fDensityEffectCalc->ComputeDensityCorrection(x);
0096   }
0097 
0098   // use parameterisation
0099   G4double GetDensityCorrection(G4double x) const;
0100 
0101   static G4DensityEffectData* GetDensityEffectData();
0102 
0103   // parameters of the energy loss fluctuation model:
0104   inline G4double GetF1fluct() const { return fF1fluct; };
0105   inline G4double GetF2fluct() const { return fF2fluct; };
0106   inline G4double GetEnergy1fluct() const { return fEnergy1fluct; };
0107   inline G4double GetLogEnergy1fluct() const { return fLogEnergy1fluct; };
0108   inline G4double GetEnergy2fluct() const { return fEnergy2fluct; };
0109   inline G4double GetLogEnergy2fluct() const { return fLogEnergy2fluct; };
0110   inline G4double GetEnergy0fluct() const { return fEnergy0fluct; };
0111   inline G4double GetRateionexcfluct() const { return fRateionexcfluct; };
0112 
0113   // parameters for ion corrections computations
0114   inline G4double GetZeffective() const { return fZeff; };
0115   inline G4double GetFermiEnergy() const { return fFermiEnergy; };
0116   inline G4double GetLFactor() const { return fLfactor; };
0117   inline G4double GetInvA23() const { return fInvA23; };
0118 
0119   // parameters for Birks attenuation:
0120   inline void SetBirksConstant(G4double value) { fBirks = value; };
0121   inline G4double GetBirksConstant() const { return fBirks; };
0122 
0123   // parameters for average energy per ion
0124   inline void SetMeanEnergyPerIonPair(G4double value) { fMeanEnergyPerIon = value; };
0125   inline G4double GetMeanEnergyPerIonPair() const { return fMeanEnergyPerIon; };
0126 
0127   // operators
0128   G4bool operator==(const G4IonisParamMat&) const = delete;
0129   G4bool operator!=(const G4IonisParamMat&) const = delete;
0130 
0131  private:
0132   // Compute mean parameters : ExcitationEnergy,Shell corretion vector ...
0133   void ComputeMeanParameters();
0134 
0135   // Compute parameters for the density effect
0136   void ComputeDensityEffectParameters();
0137 
0138   // Compute parameters for the energy fluctuation model
0139   void ComputeFluctModel();
0140 
0141   // Compute parameters for ion parameterizations
0142   void ComputeIonParameters();
0143 
0144   //
0145   // data members
0146   //
0147   const G4Material* fMaterial;  // this material
0148 
0149   G4DensityEffectCalculator* fDensityEffectCalc;  // online calculator
0150   G4double* fShellCorrectionVector;  // shell correction coefficients
0151 
0152   // parameters for mean energy loss calculation
0153   G4double fMeanExcitationEnergy;  //
0154   G4double fLogMeanExcEnergy;  //
0155   G4double fTaul;  // lower limit of Bethe-Bloch formula
0156 
0157   // parameters of the density correction
0158   G4double fCdensity;  // mat.constant
0159   G4double fMdensity;  // exponent
0160   G4double fAdensity;  //
0161   G4double fX0density;  //
0162   G4double fX1density;  //
0163   G4double fD0density;
0164 
0165   G4double fPlasmaEnergy;
0166   G4double fAdjustmentFactor;
0167 
0168   // parameters of the energy loss fluctuation model
0169   G4double fF1fluct;
0170   G4double fF2fluct;
0171   G4double fEnergy1fluct;
0172   G4double fLogEnergy1fluct;
0173   G4double fEnergy2fluct;
0174   G4double fLogEnergy2fluct;
0175   G4double fEnergy0fluct;
0176   G4double fRateionexcfluct;
0177 
0178   // parameters for ion corrections computations
0179   G4double fZeff;
0180   G4double fFermiEnergy;
0181   G4double fLfactor;
0182   G4double fInvA23;
0183 
0184   // parameter for Birks attenuation
0185   G4double fBirks;
0186   // average energy per ion pair
0187   G4double fMeanEnergyPerIon;
0188   G4double twoln10;
0189 
0190   // static data created only once
0191   static G4DensityEffectData* fDensityData;
0192 };
0193 
0194 #endif