Back to home page

EIC code displayed by LXR

 
 

    


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

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 //
0029 // GEANT4 Class header file
0030 //
0031 //
0032 // File name:     G4hCoulombScatteringModel
0033 //
0034 // Author:        Vladimir Ivanchenko 
0035 //
0036 // Creation date: 08.06.2012 from G4eCoulombScatteringModel
0037 //
0038 // Modifications:
0039 //
0040 // Class Description:
0041 //
0042 // Implementation of Coulomb Scattering of a charge particle 
0043 // on Atomic Nucleus for interval of scattering anles in Lab system 
0044 // thetaMin - ThetaMax.
0045 //   The model based on analysis of J.M.Fernandez-Varea et al. 
0046 // NIM B73(1993)447 originated from G.Wentzel Z.Phys. 40(1927)590 with 
0047 // screening parameter from H.A.Bethe Phys. Rev. 89 (1953) 1256.
0048 // 
0049 
0050 // -------------------------------------------------------------------
0051 //
0052 
0053 #ifndef G4hCoulombScatteringModel_h
0054 #define G4hCoulombScatteringModel_h 1
0055 
0056 #include "G4VEmModel.hh"
0057 #include "globals.hh"
0058 #include "G4MaterialCutsCouple.hh"
0059 #include "G4WentzelVIRelXSection.hh"
0060 
0061 class G4ParticleChangeForGamma;
0062 class G4ParticleDefinition;
0063 class G4IonTable;
0064 class G4NistManager;
0065 
0066 class G4hCoulombScatteringModel : public G4VEmModel
0067 {
0068 
0069 public:
0070 
0071   explicit G4hCoulombScatteringModel(G4bool combined = true);
0072  
0073   ~G4hCoulombScatteringModel() override;
0074 
0075   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0076 
0077   void InitialiseLocal(const G4ParticleDefinition*, 
0078                        G4VEmModel* masterModel) override;
0079 
0080   G4double ComputeCrossSectionPerAtom(
0081                                 const G4ParticleDefinition*,
0082                 G4double kinEnergy, 
0083                 G4double Z, 
0084                 G4double A, 
0085                 G4double cut,
0086                 G4double emax) override;
0087 
0088   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0089              const G4MaterialCutsCouple*,
0090              const G4DynamicParticle*,
0091              G4double tmin,
0092              G4double maxEnergy) override;
0093 
0094   G4double MinPrimaryEnergy(const G4Material*,
0095                 const G4ParticleDefinition*,
0096                 G4double) final;
0097 
0098   // defines low energy limit of the model
0099   inline void SetLowEnergyThreshold(G4double val);
0100 
0101   // user definition of low-energy threshold of recoil
0102   inline void SetRecoilThreshold(G4double eth);
0103 
0104   // defines low energy limit on energy transfer to atomic electron
0105   inline void SetFixedCut(G4double);
0106 
0107   // low energy limit on energy transfer to atomic electron
0108   inline G4double GetFixedCut() const;
0109 
0110   // hide assignment operator
0111   G4hCoulombScatteringModel & operator=
0112   (const G4hCoulombScatteringModel &right) = delete;
0113   G4hCoulombScatteringModel(const  G4hCoulombScatteringModel&) = delete;
0114 
0115 protected:
0116 
0117   inline void DefineMaterial(const G4MaterialCutsCouple*);
0118 
0119   inline void SetupParticle(const G4ParticleDefinition*);
0120 
0121 private:
0122  
0123   G4IonTable*               theIonTable;
0124   G4ParticleChangeForGamma* fParticleChange;
0125   G4WentzelVIRelXSection*   wokvi;
0126   G4NistManager*            fNistManager;
0127 
0128   const G4ParticleDefinition*  particle;
0129   const G4ParticleDefinition*  theProton;
0130   const std::vector<G4double>* pCuts;
0131 
0132   const G4MaterialCutsCouple* currentCouple;
0133   const G4Material*           currentMaterial;
0134   G4int                       currentMaterialIndex;
0135 
0136   G4double                  cosThetaMin;
0137   G4double                  cosThetaMax;
0138   G4double                  recoilThreshold;
0139   G4double                  elecRatio;
0140   G4double                  mass;
0141 
0142   G4double                  fixedCut;
0143 
0144   G4bool                    isCombined;  
0145 };
0146 
0147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0148 
0149 inline
0150 void G4hCoulombScatteringModel::DefineMaterial(const G4MaterialCutsCouple* cup) 
0151 { 
0152   if(cup != currentCouple) {
0153     currentCouple = cup;
0154     currentMaterial = cup->GetMaterial();
0155     currentMaterialIndex = currentCouple->GetIndex(); 
0156   }
0157 }
0158 
0159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0160 
0161 inline 
0162 void G4hCoulombScatteringModel::SetupParticle(const G4ParticleDefinition* p)
0163 {
0164   // Initialise mass and charge
0165   if(p != particle) {
0166     particle = p;
0167     mass = particle->GetPDGMass();
0168     wokvi->SetupParticle(p);
0169   }
0170 }
0171 
0172 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0173 
0174 inline void G4hCoulombScatteringModel::SetRecoilThreshold(G4double eth)
0175 {
0176   recoilThreshold = eth;
0177 }
0178 
0179 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0180 
0181 inline void G4hCoulombScatteringModel::SetFixedCut(G4double val)
0182 {
0183   fixedCut = val;
0184 }
0185 
0186 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0187 
0188 inline G4double G4hCoulombScatteringModel::GetFixedCut() const
0189 {
0190   return fixedCut;
0191 }
0192 
0193 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0194 
0195 #endif