Back to home page

EIC code displayed by LXR

 
 

    


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

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 // File name:     G4GSPWACorrections
0032 //
0033 // Author:        Mihaly Novak
0034 //
0035 // Creation date: 17.10.2017
0036 //
0037 // Modifications:
0038 //
0039 // Class description: class to describe and store correction factors to the
0040 //   integrated quantities of G4GoudsmitSaundersonMscModel (screening parameter,
0041 //   first and second moments) derived by using accurate Dirac-PWA based
0042 //   integrated quantities.
0043 //
0044 // ----------------------------------------------------------------------------
0045 
0046 #ifndef G4GSPWACorrections_h
0047 #define G4GSPWACorrections_h 1
0048 
0049 #include <CLHEP/Units/SystemOfUnits.h>
0050 
0051 #include "globals.hh"
0052 
0053 #include <vector>
0054 #include <string>
0055 #include <sstream>
0056 
0057 class G4Material;
0058 class G4Element;
0059 
0060 
0061 class G4GSPWACorrections {
0062 public:
0063   G4GSPWACorrections(G4bool iselectron=true);
0064 
0065  ~G4GSPWACorrections();
0066 
0067   void     Initialise();
0068 
0069   void     GetPWACorrectionFactors(G4double logekin, G4double beta2, G4int matindx,
0070                                    G4double &corToScr, G4double &corToQ1, G4double &corToG2PerG1);
0071 private:
0072   void     InitDataPerElement();
0073 
0074   void     InitDataPerMaterials();
0075 
0076   void     LoadDataElement(const G4Element*);
0077 
0078   void     InitDataMaterial(const G4Material*);
0079 
0080   void     ClearDataPerElement();
0081 
0082   void     ClearDataPerMaterial();
0083 
0084   // either per material or per Z
0085   struct DataPerMaterial {
0086     std::vector<G4double>   fCorScreening;    // correction factor to Moliere screening parameter
0087     std::vector<G4double>   fCorFirstMoment;  // correction factor to first moment
0088     std::vector<G4double>   fCorSecondMoment; // correction factor to second
0089   };
0090 
0091 
0092 // data members
0093 private:
0094   G4bool   fIsElectron;
0095   static constexpr G4int     gMaxZet    = 98;                 // max. Z for which correction data were computed (98)
0096   static constexpr G4int     gNumEkin   = 31;                 // number of kinetic energy grid points for Mott correction
0097   static constexpr G4int     gNumBeta2  = 16;                 // \beta^2 values between [fMinBeta2-fMaxBeta2]
0098   static constexpr G4double  gMinEkin   =   1.*CLHEP::keV;    // minimum kinetic energy value
0099   static constexpr G4double  gMidEkin   = 100.*CLHEP::keV;    // kinetic energy at the border of the E_{kin}-\beta^2 grids
0100   static constexpr G4double  gMaxBeta2  =   0.9999;           // maximum \beta^2 value
0101   //
0102   G4double                   fMaxEkin;        // from max fMaxBeta2 = 0.9999 (~50.5889 [MeV])
0103   G4double                   fLogMinEkin;     // \ln[fMinEkin]
0104   G4double                   fInvLogDelEkin;  // 1/[\ln(fMidEkin/fMinEkin)/(fNumEkin-fNumBeta2)]
0105   G4double                   fMinBeta2;       // <= E_{kin}=100 [keV] (~0.300546)
0106   G4double                   fInvDelBeta2;    // 1/[(fMaxBeta2-fMinBeta2)/(fNumBeta2-1)]
0107   //
0108   static const std::string   gElemSymbols[];
0109   //
0110   std::vector<DataPerMaterial*>  fDataPerElement;   // size will be gMaxZet+1; won't be null only at used Z indices
0111   std::vector<DataPerMaterial*>  fDataPerMaterial;  // size will #materials; won't be null only at used mat. indices
0112 
0113 };
0114 
0115 #endif