Back to home page

EIC code displayed by LXR

 
 

    


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

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 //
0027 
0028 #ifndef G4DNAMillerGreenExcitationModel_h
0029 #define G4DNAMillerGreenExcitationModel_h 1
0030 
0031 #include "G4VEmModel.hh"
0032 #include "G4ParticleChangeForGamma.hh"
0033 #include "G4ProductionCutsTable.hh"
0034 
0035 #include "G4Proton.hh"
0036 #include "G4DNAGenericIonsManager.hh"
0037 #include "G4DNAWaterExcitationStructure.hh"
0038 #include "Randomize.hh"
0039 #include "G4NistManager.hh"
0040 
0041 #include <deque>
0042 
0043 class G4DNAMillerGreenExcitationModel : public G4VEmModel
0044 {
0045 
0046 public:
0047 
0048   G4DNAMillerGreenExcitationModel(const G4ParticleDefinition* p = nullptr, 
0049                   const G4String& nam = "DNAMillerGreenExcitationModel");
0050 
0051   ~G4DNAMillerGreenExcitationModel() override;
0052    
0053   G4DNAMillerGreenExcitationModel & operator=(const  G4DNAMillerGreenExcitationModel &right) = delete;
0054   G4DNAMillerGreenExcitationModel(const  G4DNAMillerGreenExcitationModel&) = delete;
0055 
0056 
0057   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0058 
0059   G4double CrossSectionPerVolume(const G4Material* material,
0060                        const G4ParticleDefinition* p,
0061                        G4double ekin,
0062                        G4double emin,
0063                        G4double emax) override;
0064 
0065   G4double GetPartialCrossSection(const G4Material*,
0066                                           G4int /*level*/,
0067                                           const G4ParticleDefinition*,
0068                                           G4double /*kineticEnergy*/) override;
0069 
0070   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0071                  const G4MaterialCutsCouple*,
0072                  const G4DynamicParticle*,
0073                  G4double tmin,
0074                  G4double maxEnergy) override;
0075 
0076   inline void SelectStationary(G4bool input); 
0077 
0078 protected:
0079 
0080   G4ParticleChangeForGamma* fParticleChangeForGamma;
0081 
0082 private:
0083 
0084   G4bool statCode;
0085 
0086   // Water density table
0087   const std::vector<G4double>* fpMolWaterDensity;
0088 
0089   std::map<G4String,G4double,std::less<G4String> > lowEnergyLimit;
0090   std::map<G4String,G4double,std::less<G4String> > highEnergyLimit;
0091 
0092   G4bool isInitialised{false};
0093   G4int verboseLevel;
0094   
0095   // Cross section
0096 
0097   // Partial cross section
0098   
0099   G4double PartialCrossSection(G4double energy,G4int level, const G4ParticleDefinition* particle);
0100 
0101   G4double Sum(G4double energy, const G4ParticleDefinition* particle);
0102 
0103   G4int RandomSelect(G4double energy, const G4ParticleDefinition* particle);
0104 
0105   G4int nLevels;
0106 
0107   G4DNAWaterExcitationStructure waterExcitation;
0108   
0109   G4double S_1s(G4double t, 
0110         G4double energyTransferred, 
0111         G4double slaterEffectiveCharge,
0112         G4double shellNumber);
0113 
0114   G4double S_2s(G4double t, 
0115         G4double energyTransferred,  
0116         G4double slaterEffectiveCharge, 
0117         G4double shellNumber);
0118 
0119   G4double S_2p(G4double t, 
0120         G4double energyTransferred, 
0121         G4double slaterEffectiveCharge, 
0122         G4double shellNumber);
0123 
0124   G4double R(G4double t, 
0125          G4double energyTransferred, 
0126          G4double slaterEffectiveCharge, 
0127          G4double shellNumber);
0128 
0129   G4double kineticEnergyCorrection[4]; // 4 is the particle type index
0130   G4double slaterEffectiveCharge[3][4];
0131   G4double sCoefficient[3][4];
0132 
0133   //
0134   // Reusable particle definitions
0135   G4ParticleDefinition* protonDef = nullptr;
0136   G4ParticleDefinition* hydrogenDef = nullptr;
0137   G4ParticleDefinition* alphaPlusPlusDef = nullptr;
0138   G4ParticleDefinition* alphaPlusDef = nullptr;
0139   G4ParticleDefinition* heliumDef = nullptr;
0140   
0141 };
0142 
0143 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0144 
0145 inline void G4DNAMillerGreenExcitationModel::SelectStationary (G4bool input)
0146 { 
0147     statCode = input; 
0148 }        
0149 
0150 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0151 
0152 #endif