Back to home page

EIC code displayed by LXR

 
 

    


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

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:     G4eBremParametrizedModel
0033 //                extention of standard G4eBremsstrahlungModel
0034 //
0035 // Author:        Andreas Schaelicke 
0036 //
0037 // Creation date: 28.03.2008
0038 //
0039 // Modifications:
0040 //
0041 //
0042 // Class Description:
0043 //
0044 // Implementation of energy loss for gamma emission by electrons and
0045 // positrons including an improved version of the LPM effect
0046 
0047 // -------------------------------------------------------------------
0048 //
0049 
0050 #ifndef G4eBremParametrizedModel_h
0051 #define G4eBremParametrizedModel_h 1
0052 
0053 #include "G4VEmModel.hh"
0054 #include "G4NistManager.hh"
0055 
0056 class G4ParticleChangeForLoss;
0057 class G4PhysicsVector;
0058 
0059 class G4eBremParametrizedModel : public G4VEmModel
0060 {
0061 
0062 public:
0063 
0064   explicit G4eBremParametrizedModel(const G4ParticleDefinition* p = nullptr, 
0065                     const G4String& nam = "eBremParam");
0066 
0067   ~G4eBremParametrizedModel() override;
0068 
0069   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0070 
0071   void InitialiseLocal(const G4ParticleDefinition*, 
0072                G4VEmModel* masterModel) override;
0073 
0074   G4double MinEnergyCut(const G4ParticleDefinition*, 
0075             const G4MaterialCutsCouple*) override;
0076 
0077   G4double ComputeDEDXPerVolume(const G4Material*,
0078                 const G4ParticleDefinition*,
0079                 G4double kineticEnergy,
0080                 G4double cutEnergy) override;
0081                     
0082   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0083                       G4double tkin, 
0084                       G4double Z, G4double,
0085                       G4double cutEnergy,
0086                       G4double maxEnergy = DBL_MAX) override;
0087   
0088   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0089              const G4MaterialCutsCouple*,
0090              const G4DynamicParticle*,
0091              G4double cutEnergy,
0092              G4double maxEnergy) override;
0093 
0094   void SetupForMaterial(const G4ParticleDefinition*,
0095                         const G4Material*,G4double) override;
0096 
0097   // hide assignment operator
0098   G4eBremParametrizedModel & operator=(const  G4eBremParametrizedModel &right) = delete;
0099   G4eBremParametrizedModel(const  G4eBremParametrizedModel&) = delete;
0100 
0101 private:
0102 
0103   void InitialiseConstants();
0104 
0105   G4double ComputeBremLoss(G4double cutEnergy);
0106 
0107   G4double ComputeXSectionPerAtom(G4double cutEnergy);
0108 
0109   G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
0110 
0111   G4double ComputeParametrizedDXSectionPerAtom(G4double kineticEnergy, 
0112                            G4double gammaEnergy, 
0113                            G4double Z);
0114 
0115   void SetParticle(const G4ParticleDefinition* p);
0116 
0117   G4double ScreenFunction1(G4double ScreenVariable);
0118 
0119   G4double ScreenFunction2(G4double ScreenVariable);
0120 
0121   inline void SetCurrentElement(const G4double);
0122 
0123 protected:
0124 
0125   G4NistManager*              nist;
0126   const G4ParticleDefinition* particle;
0127   G4ParticleDefinition*       theGamma;
0128   G4ParticleChangeForLoss*    fParticleChange;
0129 
0130   static const G4double xgi[8], wgi[8];
0131 
0132   G4double minThreshold;
0133 
0134   // cash
0135   G4double particleMass;
0136   G4double kinEnergy;
0137   G4double totalEnergy;
0138   G4double currentZ;
0139   G4double z13, z23, lnZ;
0140   G4double densityFactor;
0141   G4double densityCorr;
0142   G4double Fel, Finel;
0143   G4double facFel, facFinel;
0144   G4double fMax,fCoulomb;
0145 
0146 private:
0147 
0148   G4double lowKinEnergy;
0149   G4double fMigdalConstant;
0150   G4double bremFactor;
0151 
0152   G4bool isInitialised;
0153 
0154 protected:
0155 
0156   G4bool isElectron;
0157 
0158 };
0159 
0160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0161 
0162 inline void G4eBremParametrizedModel::SetCurrentElement(const G4double Z)
0163 {
0164   if(Z != currentZ) {
0165     currentZ = Z;
0166 
0167     G4int iz = G4lrint(Z);
0168     z13 = nist->GetZ13(iz);
0169     z23 = z13*z13;
0170     lnZ = nist->GetLOGZ(iz);
0171 
0172     Fel = facFel - lnZ/3. ;
0173     Finel = facFinel - 2.*lnZ/3. ;
0174 
0175     fCoulomb = GetCurrentElement()->GetfCoulomb();
0176     fMax = Fel-fCoulomb + Finel/currentZ  +  (1.+1./currentZ)/12.;
0177   }
0178 }
0179 
0180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
0181 
0182 
0183 #endif