Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Created by Z. Francis, S. Incerti 2010 
0027 //
0028 // Modified for inverse rudd function sampling 26.10.2010
0029 // Rewitten by V.Ivanchenko 21.05.2023
0030 //
0031 
0032 #ifndef G4DNARuddIonisationExtendedModel_h
0033 #define G4DNARuddIonisationExtendedModel_h 1
0034 
0035 #include "G4VEmModel.hh"
0036 #include "G4ParticleChangeForGamma.hh"
0037 #include "G4ProductionCutsTable.hh"
0038 
0039 #include "G4EmCorrections.hh"
0040 #include "G4DNAGenericIonsManager.hh"
0041 #include "G4DNACrossSectionDataSet.hh"
0042 #include "G4Electron.hh"
0043 #include "G4Proton.hh"
0044 #include "G4LogLogInterpolation.hh"
0045 
0046 #include "G4DNAWaterIonisationStructure.hh"
0047 #include "G4VAtomDeexcitation.hh"
0048 #include "G4NistManager.hh"
0049 #include <vector>
0050 
0051 class G4DNARuddIonisationExtendedModel : public G4VEmModel
0052 {
0053 public:
0054 
0055   explicit G4DNARuddIonisationExtendedModel(const G4ParticleDefinition* p = nullptr,
0056                    const G4String& nam = "DNARuddIonisationExtendedModel");
0057 
0058   ~G4DNARuddIonisationExtendedModel() override;
0059 
0060   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0061 
0062   G4double CrossSectionPerVolume(const G4Material* material,
0063                                  const G4ParticleDefinition* p,
0064                  G4double ekin,
0065                  G4double emin,
0066                  G4double emax) override;
0067 
0068   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0069              const G4MaterialCutsCouple*,
0070              const G4DynamicParticle*,
0071              G4double tmin,
0072              G4double maxEnergy) override;
0073 
0074   void SelectStationary(G4bool val) { statCode = val; }; 
0075 
0076   // method for unit tests
0077   G4double ComputeProbabilityFunction(const G4ParticleDefinition*, G4double kine,
0078                                       G4double deltae, G4int shell);
0079 
0080   G4DNARuddIonisationExtendedModel & operator=
0081   (const  G4DNARuddIonisationExtendedModel &right) = delete;
0082   G4DNARuddIonisationExtendedModel(const G4DNARuddIonisationExtendedModel&) = delete;
0083 
0084 private:
0085 
0086   void SetParticle(const G4ParticleDefinition*);
0087 
0088   G4int SelectShell(G4double energy);
0089 
0090   G4double SampleElectronEnergy(G4double kine, G4double bindingEnergy, G4int shell);
0091 
0092   G4double ProbabilityFunction(G4double kine, G4double deltae,
0093                                G4double bindingEnergy, G4int shell);
0094 
0095   G4double S_1s(G4double t,
0096         G4double energyTransferred,
0097         G4double slaterEffectiveChg,
0098         G4double shellNumber);
0099 
0100   G4double S_2s(G4double t,
0101         G4double energyTransferred,
0102         G4double slaterEffectiveChg,
0103         G4double shellNumber);
0104 
0105 
0106   G4double S_2p(G4double t,
0107         G4double energyTransferred,
0108         G4double slaterEffectiveChg,
0109         G4double shellNumber);
0110 
0111   G4double Rh(G4double t, 
0112           G4double energyTransferred,
0113           G4double slaterEffectiveChg,
0114           G4double shellNumber);
0115 
0116   G4double CorrectionFactor(G4double kine, G4int shell);
0117 
0118 protected:
0119 
0120   G4ParticleChangeForGamma* fParticleChangeForGamma{nullptr};
0121 
0122 private:
0123 
0124   // idx = 0 - hydrogen
0125   // idx = 1 - proton
0126   // idx = 2%26 - ions idx=Z
0127   // idx = -1 - alpha+
0128   // idx = -1 - helium
0129   static const G4int RUDDZMAX = 27;
0130   static G4DNACrossSectionDataSet* xsdata[RUDDZMAX];
0131   static G4DNACrossSectionDataSet* xsalphaplus;
0132   static G4DNACrossSectionDataSet* xshelium;
0133 
0134   // Water density table
0135   static const std::vector<G4double>* fpWaterDensity;
0136 
0137   G4DNACrossSectionDataSet* xscurrent{nullptr};
0138   const G4ParticleDefinition* fParticle{nullptr};
0139   G4EmCorrections* fEmCorrections;
0140   G4Pow* fGpow;
0141  
0142   //deexcitation manager to produce fluo photons and e-
0143   G4VAtomDeexcitation* fAtomDeexcitation{nullptr};
0144 
0145   // tracking cut and low-energy limit of proton x-section table
0146   G4double fLowestEnergy;
0147   // scaled low-energy limit of ion x-section table
0148   G4double fLimitEnergy;
0149 
0150   G4double fMass{0.0};
0151   G4double fAmass{0.0};
0152   G4double fMassRate{1.0};
0153   G4double fElow{0.0};
0154 
0155   G4double slaterEffectiveCharge[3] = {0.0};
0156   G4double sCoefficient[3] = {0.0};
0157   G4double fTemp[5] = {0.0};
0158 
0159   G4int idx{-1};
0160   G4int verbose{0};
0161 
0162   G4bool isIon{false};
0163   G4bool isFirst{false};
0164   G4bool isHelium{false};
0165   G4bool statCode{false};
0166   G4bool useDNAWaterStructure{true};
0167 
0168   // energy levels of water molecule  
0169   G4DNAWaterIonisationStructure waterStructure;
0170 };
0171 
0172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0173 
0174 #endif