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3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh (Version 11.3.0) and /processes/electromagnetic/standard/include/G4GoudsmitSaundersonTable.hh (Version 10.1.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
                                                   >>  26 // $Id: G4GoudsmitSaundersonTable.hh 67990 2013-03-13 10:56:28Z gcosmo $
 26 //                                                 27 //
 27 // ------------------------------------------- <<  28 // -------------------------------------------------------------------
 28 //                                                 29 //
 29 // GEANT4 Class header file                        30 // GEANT4 Class header file
 30 //                                                 31 //
 31 // File name:     G4GoudsmitSaundersonTable        32 // File name:     G4GoudsmitSaundersonTable
 32 //                                                 33 //
 33 // Author:        Mihaly Novak / (Omrane Kadri <<  34 // Author:        Omrane Kadri
 34 //                                                 35 //
 35 // Creation date: 20.02.2009                       36 // Creation date: 20.02.2009
 36 //                                                 37 //
 37 // Class description:                          << 
 38 //   Class to handle multiple scattering angul << 
 39 //   using Kawrakow-Bielajew Goudsmit-Saunders << 
 40 //   Rutherford DCS for elastic scattering of  << 
 41 //   class is used by G4GoudsmitSaundersonMscM << 
 42 //   deflection of electrons/positrons after t << 
 43 //                                             << 
 44 // Modifications:                                  38 // Modifications:
 45 // 04.03.2009 V.Ivanchenko cleanup and format      39 // 04.03.2009 V.Ivanchenko cleanup and format according to Geant4 EM style
 46 // 18.05.2015 M. Novak This class has been com << 
 47 //            class name was kept; class descr << 
 48 //            A new version of Kawrakow-Bielaj << 
 49 //            based on the screened Rutherford << 
 50 //            electrons/positrons has been int << 
 51 //            angular distributions over a 2D  << 
 52 //            and the CDFs are now stored in a << 
 53 //            together with the corresponding  << 
 54 //            The new version is several times << 
 55 //            compared to the earlier version  << 
 56 //            that use these data has been als << 
 57 // 28.04.2017 M. Novak: the GS angular distrib << 
 58 //            data size has been reduced from  << 
 59 //            representation, the class has be << 
 60 //            this new data representation.    << 
 61 // 23.08.2017 M. Novak: Added funtionality to  << 
 62 //            base GS angular distributions an << 
 63 //            parameter, first and second mome << 
 64 //            activated in the GS-MSC model.   << 
 65 //                                             << 
 66 // References:                                 << 
 67 //   [1] A.F.Bielajew, NIMB, 111 (1996) 195-20 << 
 68 //   [2] I.Kawrakow, A.F.Bielajew, NIMB 134(19 << 
 69 //                                                 40 //
 70 // ------------------------------------------- <<  41 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 71                                                << 
 72                                                    42 
 73 #ifndef G4GoudsmitSaundersonTable_h                43 #ifndef G4GoudsmitSaundersonTable_h
 74 #define G4GoudsmitSaundersonTable_h 1              44 #define G4GoudsmitSaundersonTable_h 1
 75                                                    45 
 76 #include <vector>                              <<  46 #include "globals.hh"
 77                                                    47 
 78 #include "G4Types.hh"                          <<  48 class G4GoudsmitSaundersonTable 
                                                   >>  49 {
                                                   >>  50 public:
 79                                                    51 
 80 class G4GSMottCorrection;                      <<  52   G4GoudsmitSaundersonTable();
 81 class G4MaterialCutsCouple;                    << 
 82                                                    53 
 83 class G4GoudsmitSaundersonTable {              <<  54   ~G4GoudsmitSaundersonTable();
 84                                                    55 
 85 public:                                        <<  56   G4double SampleTheta(G4double , G4double ,G4double);
 86   G4GoudsmitSaundersonTable(G4bool iselectron) << 
 87  ~G4GoudsmitSaundersonTable();                 << 
 88                                                    57 
 89   void Initialise(G4double lownergylimit, G4do <<  58 private:  
                                                   >>  59 
                                                   >>  60   //  hide assignment operator
                                                   >>  61   G4GoudsmitSaundersonTable & operator=(const  G4GoudsmitSaundersonTable &right);
                                                   >>  62   G4GoudsmitSaundersonTable(const  G4GoudsmitSaundersonTable&);
                                                   >>  63 
                                                   >>  64   void LoadPDFandCPDFdata();
                                                   >>  65 
                                                   >>  66   static G4double* PDF;
                                                   >>  67   static G4double* CPDF;
 90                                                    68 
 91   // structure to store one GS transformed ang << 
 92   struct GSMSCAngularDtr {                     << 
 93     G4int     fNumData;    // # of data points << 
 94     G4double *fUValues;    // array of transfo << 
 95     G4double *fParamA;     // array of interpo << 
 96     G4double *fParamB;     // array of interpo << 
 97   };                                           << 
 98                                                << 
 99   void   LoadMSCData();                        << 
100                                                << 
101   G4bool   Sampling(G4double lambdaval, G4doub << 
102                     G4double &cost,     G4doub << 
103                     G4double beta2,     G4int  << 
104                     G4int &mcekini, G4int &mcd << 
105                     G4bool isfirst);           << 
106                                                << 
107   G4double SampleCosTheta(G4double lambdaval,  << 
108                           G4double lekin,      << 
109                           GSMSCAngularDtr **gs << 
110                           G4double &transfPar, << 
111                                                << 
112   G4double SampleGSSRCosTheta(const GSMSCAngul << 
113                                                << 
114   G4double SingleScattering(G4double lambdaval << 
115                             G4double beta2, G4 << 
116                                                << 
117   GSMSCAngularDtr* GetGSAngularDtr(G4double sc << 
118                                    G4double &q << 
119                                                << 
120   // material dependent MSC parameters (comput << 
121   // Moliere's screening parameter             << 
122   G4double GetMoliereBc(G4int matindx)  { retu << 
123                                                << 
124   G4double GetMoliereXc2(G4int matindx) { retu << 
125                                                << 
126   void     GetMottCorrectionFactors(G4double l << 
127                                     G4int mati << 
128                                     G4double & << 
129                                                << 
130   // set option to activate/inactivate Mott-co << 
131   void     SetOptionMottCorrection(G4bool val) << 
132   // set option to activate/inactivate PWA-cor << 
133   void     SetOptionPWACorrection(G4bool val)  << 
134                                                << 
135   // this method returns with the scattering p << 
136   // interpolated from tables prepared at init << 
137   G4double ComputeScatteringPowerCorrection(co << 
138                                                << 
139   void     InitSCPCorrection();                << 
140                                                << 
141 private:                                       << 
142   // initialisation of material dependent Moli << 
143   void InitMoliereMSCParams();                 << 
144                                                << 
145                                                << 
146  private:                                      << 
147    static G4bool             gIsInitialised;   << 
148    static constexpr G4int    gLAMBNUM = 64;    << 
149    static constexpr G4int    gQNUM1   = 15;    << 
150    static constexpr G4int    gQNUM2   = 32;    << 
151    static constexpr G4int    gNUMSCR1 = 201;   << 
152    static constexpr G4int    gNUMSCR2 = 51;    << 
153    static constexpr G4double gLAMBMIN = 1.0;   << 
154    static constexpr G4double gLAMBMAX = 100000 << 
155    static constexpr G4double gQMIN1   = 0.001; << 
156    static constexpr G4double gQMAX1   = 0.99;  << 
157    static constexpr G4double gQMIN2   = 0.99;  << 
158    static constexpr G4double gQMAX2   = 7.99;  << 
159    //                                          << 
160    G4bool   fIsElectron;          // GS-table  << 
161    G4bool   fIsMottCorrection;    // flag to i << 
162    G4bool   fIsPWACorrection;     // flag to i << 
163    G4double fLogLambda0;          // ln(gLAMBM << 
164    G4double fLogDeltaLambda;      // ln(gLAMBM << 
165    G4double fInvLogDeltaLambda;   // 1/[ln(gLA << 
166    G4double fInvDeltaQ1;          // 1/[(gQMAX << 
167    G4double fDeltaQ2;             // [(gQMAX2- << 
168    G4double fInvDeltaQ2;          // 1/[(gQMAX << 
169    //                                          << 
170    G4double fLowEnergyLimit;                   << 
171    G4double fHighEnergyLimit;                  << 
172    //                                          << 
173    int      fNumSPCEbinPerDec;    // scatterin << 
174    struct SCPCorrection {                      << 
175      bool   fIsUse;               //           << 
176      double fPrCut;               // sec. e- p << 
177      double fLEmin;               // log min e << 
178      double fILDel;               // inverse l << 
179      //std::vector<double> fVEkin;  // scatter << 
180      std::vector<double> fVSCPC;  // scatterin << 
181    };                                          << 
182    std::vector<SCPCorrection*>  fSCPCPerMatCut << 
183                                                << 
184                                                << 
185    // vector to store all GS transformed angul << 
186    static std::vector<GSMSCAngularDtr*> gGSMSC << 
187    static std::vector<GSMSCAngularDtr*> gGSMSC << 
188                                                << 
189    //@{                                        << 
190    /** Precomputed \f$ b_lambda_{c} $\f and \f << 
191    *   Moliere parameters that can be used to  << 
192    *   the elastic scattering cross section (o << 
193    *   screened Rutherford cross section appro << 
194    *   G4GoudsmitSaundersonMscModel if fgIsUse << 
195    */                                          << 
196    static std::vector<double> gMoliereBc;      << 
197    static std::vector<double> gMoliereXc2;     << 
198    //                                          << 
199    //                                          << 
200    G4GSMottCorrection   *fMottCorrection;      << 
201 };                                                 69 };
202                                                    70 
                                                   >>  71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
203 #endif                                             72 #endif
                                                   >>  73 
204                                                    74