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.p3 ] [ 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/polarisation/src/G4PolarizedGammaConversionXS.cc (Version 11.3.0) and /processes/electromagnetic/polarisation/src/G4PolarizedGammaConversionXS.cc (Version 11.1)


  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 // -------------------------------------------     26 // -------------------------------------------------------------------
 27 //                                                 27 //
 28 // Geant4 Class file                               28 // Geant4 Class file
 29 //                                                 29 //
 30 // File name:     G4PolarizedGammaConversionXS     30 // File name:     G4PolarizedGammaConversionXS
 31 //                                                 31 //
 32 // Author:        Andreas Schaelicke on the ba     32 // Author:        Andreas Schaelicke on the base of Karim Laihems code
 33                                                    33 
 34 #include "G4PolarizedGammaConversionXS.hh"         34 #include "G4PolarizedGammaConversionXS.hh"
 35                                                    35 
 36 G4double G4PolarizedGammaConversionXS::SCRN[2]     36 G4double G4PolarizedGammaConversionXS::SCRN[2][19] = {
 37   { 0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 20.0, 25.0,     37   { 0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, 50.0,
 38     60.0, 70.0, 80.0, 90.0, 100.0, 120.0 },        38     60.0, 70.0, 80.0, 90.0, 100.0, 120.0 },
 39   { 0.0145, 0.0490, 0.1400, 0.3312, 0.6758, 1.     39   { 0.0145, 0.0490, 0.1400, 0.3312, 0.6758, 1.126, 1.367, 1.564, 1.731, 1.875,
 40     2.001, 2.114, 2.216, 2.393, 2.545, 2.676,      40     2.001, 2.114, 2.216, 2.393, 2.545, 2.676, 2.793, 2.897, 3.078 }
 41 };                                                 41 };
 42                                                    42 
 43 G4PolarizedGammaConversionXS::G4PolarizedGamma     43 G4PolarizedGammaConversionXS::G4PolarizedGammaConversionXS()
 44 {                                                  44 {
 45   fFinalElectronPolarization = G4StokesVector:     45   fFinalElectronPolarization = G4StokesVector::ZERO;
 46   fFinalPositronPolarization = G4StokesVector:     46   fFinalPositronPolarization = G4StokesVector::ZERO;
 47 }                                                  47 }
 48                                                    48 
 49 G4PolarizedGammaConversionXS::~G4PolarizedGamm     49 G4PolarizedGammaConversionXS::~G4PolarizedGammaConversionXS() {}
 50                                                    50 
 51 void G4PolarizedGammaConversionXS::Initialize(     51 void G4PolarizedGammaConversionXS::Initialize(
 52   G4double aGammaE, G4double aLept0E, G4double     52   G4double aGammaE, G4double aLept0E, G4double sintheta,
 53   const G4StokesVector& beamPol, const G4Stoke     53   const G4StokesVector& beamPol, const G4StokesVector& /*p1*/, G4int /*flag*/)
 54 {                                                  54 {
 55   G4double aLept1E = aGammaE - aLept0E;            55   G4double aLept1E = aGammaE - aLept0E;
 56                                                    56 
 57   G4double Stokes_P3 = beamPol.z();                57   G4double Stokes_P3 = beamPol.z();
 58                                                    58 
 59   G4double Lept0E  = aLept0E / CLHEP::electron     59   G4double Lept0E  = aLept0E / CLHEP::electron_mass_c2 + 1.;
 60   G4double Lept0E2 = Lept0E * Lept0E;              60   G4double Lept0E2 = Lept0E * Lept0E;
 61   G4double GammaE  = aGammaE / CLHEP::electron     61   G4double GammaE  = aGammaE / CLHEP::electron_mass_c2;
 62   G4double Lept1E  = aLept1E / CLHEP::electron     62   G4double Lept1E  = aLept1E / CLHEP::electron_mass_c2 - 1.;
 63   G4double Lept1E2 = Lept1E * Lept1E;              63   G4double Lept1E2 = Lept1E * Lept1E;
 64                                                    64 
 65   // *******  Gamma Transvers Momentum             65   // *******  Gamma Transvers Momentum
 66   G4double TMom = std::sqrt(Lept0E2 - 1.) * si     66   G4double TMom = std::sqrt(Lept0E2 - 1.) * sintheta;
 67   G4double u    = TMom;                            67   G4double u    = TMom;
 68   G4double u2   = u * u;                           68   G4double u2   = u * u;
 69   G4double Xsi  = 1. / (1. + u2);                  69   G4double Xsi  = 1. / (1. + u2);
 70   G4double Xsi2 = Xsi * Xsi;                       70   G4double Xsi2 = Xsi * Xsi;
 71                                                    71 
 72   G4double delta =                                 72   G4double delta =
 73     12. * std::pow(fZ, 1. / 3.) * Lept0E * Lep     73     12. * std::pow(fZ, 1. / 3.) * Lept0E * Lept1E * Xsi / (121. * GammaE);
 74   G4double GG = 0.;                                74   G4double GG = 0.;
 75                                                    75 
 76   if(delta < 0.5)                                  76   if(delta < 0.5)
 77   {                                                77   {
 78     GG = std::log(2. * Lept0E * Lept1E / Gamma     78     GG = std::log(2. * Lept0E * Lept1E / GammaE) - 2. - fCoul;
 79   }                                                79   }
 80   else if(delta < 120.)                            80   else if(delta < 120.)
 81   {                                                81   {
 82     for(G4int j = 1; j < 19; ++j)                  82     for(G4int j = 1; j < 19; ++j)
 83     {                                              83     {
 84       if(SCRN[0][j] >= delta)                      84       if(SCRN[0][j] >= delta)
 85       {                                            85       {
 86         GG = std::log(2. * Lept0E * Lept1E / G     86         GG = std::log(2. * Lept0E * Lept1E / GammaE) - 2. - fCoul -
 87              (SCRN[1][j - 1] + (delta - SCRN[0     87              (SCRN[1][j - 1] + (delta - SCRN[0][j - 1]) *
 88                                  (SCRN[1][j] -     88                                  (SCRN[1][j] - SCRN[1][j - 1]) /
 89                                  (SCRN[0][j] -     89                                  (SCRN[0][j] - SCRN[0][j - 1]));
 90         break;                                     90         break;
 91       }                                            91       }
 92     }                                              92     }
 93   }                                                93   }
 94   else                                             94   else
 95   {                                                95   {
 96     G4double alpha_sc = (111. * std::pow(fZ, -     96     G4double alpha_sc = (111. * std::pow(fZ, -1. / 3.)) / Xsi;
 97     GG                = std::log(alpha_sc) - 2     97     GG                = std::log(alpha_sc) - 2. - fCoul;
 98   }                                                98   }
 99                                                    99 
100   if(GG < -1.)                                    100   if(GG < -1.)
101     GG = -1.;                                     101     GG = -1.;
102                                                   102 
103   G4double I_Lepton = (Lept0E2 + Lept1E2) * (3    103   G4double I_Lepton = (Lept0E2 + Lept1E2) * (3 + 2 * GG) +
104                       2. * Lept0E * Lept1E * (    104                       2. * Lept0E * Lept1E * (1. + 4. * u2 * Xsi2 * GG);
105                                                   105 
106   G4double L_Lepton1 = GammaE *                   106   G4double L_Lepton1 = GammaE *
107                        ((Lept0E - Lept1E) * (3    107                        ((Lept0E - Lept1E) * (3. + 2. * GG) +
108                         2 * Lept1E * (1. + 4.     108                         2 * Lept1E * (1. + 4. * u2 * Xsi2 * GG)) /
109                        I_Lepton;                  109                        I_Lepton;
110                                                   110 
111   G4double T_Lepton1 =                            111   G4double T_Lepton1 =
112     4. * GammaE * Lept1E * Xsi * u * (1. - 2.     112     4. * GammaE * Lept1E * Xsi * u * (1. - 2. * Xsi) * GG / I_Lepton;
113                                                   113 
114   G4double Stokes_S1 = (Stokes_P3 * T_Lepton1)    114   G4double Stokes_S1 = (Stokes_P3 * T_Lepton1);
115   G4double Stokes_S2 = 0.;                        115   G4double Stokes_S2 = 0.;
116   G4double Stokes_S3 = (Stokes_P3 * L_Lepton1)    116   G4double Stokes_S3 = (Stokes_P3 * L_Lepton1);
117                                                   117 
118   fFinalElectronPolarization.setX(Stokes_S1);     118   fFinalElectronPolarization.setX(Stokes_S1);
119   fFinalElectronPolarization.setY(Stokes_S2);     119   fFinalElectronPolarization.setY(Stokes_S2);
120   fFinalElectronPolarization.setZ(Stokes_S3);     120   fFinalElectronPolarization.setZ(Stokes_S3);
121                                                   121 
122   if(fFinalElectronPolarization.mag2() > 1.)      122   if(fFinalElectronPolarization.mag2() > 1.)
123   {                                               123   {
124     G4ExceptionDescription ed;                    124     G4ExceptionDescription ed;
125     ed << "\t" << fFinalElectronPolarization <    125     ed << "\t" << fFinalElectronPolarization << "\t GG\t" << GG << "\t delta\t"
126        << delta << "\n";                          126        << delta << "\n";
127     G4Exception("G4PolarizedGammaConversionXS:    127     G4Exception("G4PolarizedGammaConversionXS::Initialize", "pol022",
128                 JustWarning, ed);                 128                 JustWarning, ed);
129     fFinalElectronPolarization.setX(0.);          129     fFinalElectronPolarization.setX(0.);
130     fFinalElectronPolarization.setY(0.);          130     fFinalElectronPolarization.setY(0.);
131     fFinalElectronPolarization.setZ(Stokes_S3)    131     fFinalElectronPolarization.setZ(Stokes_S3);
132     if(Stokes_S3 > 1.)                            132     if(Stokes_S3 > 1.)
133       fFinalElectronPolarization.setZ(1.);        133       fFinalElectronPolarization.setZ(1.);
134   }                                               134   }
135                                                   135 
136   G4double L_Lepton2 = GammaE *                   136   G4double L_Lepton2 = GammaE *
137                        ((Lept1E - Lept0E) * (3    137                        ((Lept1E - Lept0E) * (3. + 2. * GG) +
138                         2 * Lept0E * (1. + 4.     138                         2 * Lept0E * (1. + 4. * u2 * Xsi2 * GG)) /
139                        I_Lepton;                  139                        I_Lepton;
140                                                   140 
141   G4double T_Lepton2 =                            141   G4double T_Lepton2 =
142     4. * GammaE * Lept0E * Xsi * u * (1. - 2.     142     4. * GammaE * Lept0E * Xsi * u * (1. - 2. * Xsi) * GG / I_Lepton;
143                                                   143 
144   G4double Stokes_SS1 = (Stokes_P3 * T_Lepton2    144   G4double Stokes_SS1 = (Stokes_P3 * T_Lepton2);
145   G4double Stokes_SS2 = 0.;                       145   G4double Stokes_SS2 = 0.;
146   G4double Stokes_SS3 = (Stokes_P3 * L_Lepton2    146   G4double Stokes_SS3 = (Stokes_P3 * L_Lepton2);
147                                                   147 
148   fFinalPositronPolarization.SetPhoton();         148   fFinalPositronPolarization.SetPhoton();
149                                                   149 
150   fFinalPositronPolarization.setX(Stokes_SS1);    150   fFinalPositronPolarization.setX(Stokes_SS1);
151   fFinalPositronPolarization.setY(Stokes_SS2);    151   fFinalPositronPolarization.setY(Stokes_SS2);
152   fFinalPositronPolarization.setZ(Stokes_SS3);    152   fFinalPositronPolarization.setZ(Stokes_SS3);
153                                                   153 
154   if(fFinalPositronPolarization.mag2() > 1.)      154   if(fFinalPositronPolarization.mag2() > 1.)
155   {                                               155   {
156     G4ExceptionDescription ed;                    156     G4ExceptionDescription ed;
157     ed << "\t" << fFinalPositronPolarization <    157     ed << "\t" << fFinalPositronPolarization << "\t GG\t" << GG << "\t delta\t"
158        << delta << "\n";                          158        << delta << "\n";
159     G4Exception("G4PolarizedGammaConversionXS:    159     G4Exception("G4PolarizedGammaConversionXS::Initialize", "pol023",
160                 JustWarning, ed);                 160                 JustWarning, ed);
161   }                                               161   }
162 }                                                 162 }
163                                                   163 
164 G4double G4PolarizedGammaConversionXS::XSectio    164 G4double G4PolarizedGammaConversionXS::XSection(const G4StokesVector& /*pol2*/,
165                                                   165                                                 const G4StokesVector& /*pol3*/)
166 {                                                 166 {
167   G4ExceptionDescription ed;                      167   G4ExceptionDescription ed;
168   ed << "ERROR dummy routine G4PolarizedGammaC    168   ed << "ERROR dummy routine G4PolarizedGammaConversionXS::XSection "
169         "called \n";                              169         "called \n";
170   G4Exception("G4PolarizedGammaConversionXS::I    170   G4Exception("G4PolarizedGammaConversionXS::Initialize", "pol024",
171               FatalException, ed);                171               FatalException, ed);
172   return 0.;                                      172   return 0.;
173 }                                                 173 }
174                                                   174 
175 // return expected mean polarisation              175 // return expected mean polarisation
176 G4StokesVector G4PolarizedGammaConversionXS::G    176 G4StokesVector G4PolarizedGammaConversionXS::GetPol2()
177 {                                                 177 {
178   // electron/positron                            178   // electron/positron
179   return fFinalElectronPolarization;              179   return fFinalElectronPolarization;
180 }                                                 180 }
181                                                   181 
182 G4StokesVector G4PolarizedGammaConversionXS::G    182 G4StokesVector G4PolarizedGammaConversionXS::GetPol3()
183 {                                                 183 {
184   // photon                                       184   // photon
185   return fFinalPositronPolarization;              185   return fFinalPositronPolarization;
186 }                                                 186 }
187                                                   187