Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/polarisation/src/G4PolarizedIonisationMollerXS.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.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/G4PolarizedIonisationMollerXS.cc (Version 11.3.0) and /processes/electromagnetic/polarisation/src/G4PolarizedIonisationMollerXS.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:     G4PolarizedIonisationMollerX     30 // File name:     G4PolarizedIonisationMollerXS
 31 //                                                 31 //
 32 // Author:        Andreas Schaelicke               32 // Author:        Andreas Schaelicke
 33 //                                                 33 //
 34 // Class Description:                              34 // Class Description:
 35 //   * calculates the differential cross secti     35 //   * calculates the differential cross section
 36 //     incoming electron K1(along positive z d     36 //     incoming electron K1(along positive z direction) scatters at an electron
 37 //     K2 at rest                                  37 //     K2 at rest
 38 //   * phi denotes the angle between the scatt     38 //   * phi denotes the angle between the scattering plane (defined by the
 39 //     outgoing electron) and X-axis               39 //     outgoing electron) and X-axis
 40 //   * all stokes vectors refer to spins in th     40 //   * all stokes vectors refer to spins in the Global System (X,Y,Z)
 41 //   * cross section as calculated by P.Starov     41 //   * cross section as calculated by P.Starovoitov
 42                                                    42 
 43 #include "G4PolarizedIonisationMollerXS.hh"        43 #include "G4PolarizedIonisationMollerXS.hh"
 44                                                    44 
 45 #include "G4PhysicalConstants.hh"                  45 #include "G4PhysicalConstants.hh"
 46                                                    46 
 47 G4PolarizedIonisationMollerXS::G4PolarizedIoni     47 G4PolarizedIonisationMollerXS::G4PolarizedIonisationMollerXS()
 48   : fPhi0(0.)                                      48   : fPhi0(0.)
 49 {                                                  49 {
 50   SetXmax(.5);                                     50   SetXmax(.5);
 51   fPhi2 = G4ThreeVector(0., 0., 0.);               51   fPhi2 = G4ThreeVector(0., 0., 0.);
 52   fPhi3 = G4ThreeVector(0., 0., 0.);               52   fPhi3 = G4ThreeVector(0., 0., 0.);
 53 }                                                  53 }
 54                                                    54 
 55 G4PolarizedIonisationMollerXS::~G4PolarizedIon     55 G4PolarizedIonisationMollerXS::~G4PolarizedIonisationMollerXS() {}
 56                                                    56 
 57 void G4PolarizedIonisationMollerXS::Initialize     57 void G4PolarizedIonisationMollerXS::Initialize(G4double e, G4double gamma,
 58                                                    58                                                G4double /*phi*/,
 59                                                    59                                                const G4StokesVector& pol0,
 60                                                    60                                                const G4StokesVector& pol1,
 61                                                    61                                                G4int flag)
 62 {                                                  62 {
 63   constexpr G4double re2     = classic_electr_     63   constexpr G4double re2     = classic_electr_radius * classic_electr_radius;
 64   G4double gamma2            = gamma * gamma;      64   G4double gamma2            = gamma * gamma;
 65   G4double gmo               = (gamma - 1.);       65   G4double gmo               = (gamma - 1.);
 66   G4double gmo2              = (gamma - 1.) *      66   G4double gmo2              = (gamma - 1.) * (gamma - 1.);
 67   G4double gpo               = (gamma + 1.);       67   G4double gpo               = (gamma + 1.);
 68   G4double pref              = gamma2 * re2 /      68   G4double pref              = gamma2 * re2 / (gmo2 * (gamma + 1.0));
 69   constexpr G4double sqrttwo = 1.4142135623730     69   constexpr G4double sqrttwo = 1.41421356237309504880;  // sqrt(2.)
 70   G4double f                 = (-1. + e);          70   G4double f                 = (-1. + e);
 71   G4double e2                = e * e;              71   G4double e2                = e * e;
 72   G4double f2                = f * f;              72   G4double f2                = f * f;
 73                                                    73 
 74   G4bool polarized = (!pol0.IsZero()) || (!pol     74   G4bool polarized = (!pol0.IsZero()) || (!pol1.IsZero());
 75                                                    75 
 76   if(flag == 0)                                    76   if(flag == 0)
 77     polarized = false;                             77     polarized = false;
 78   // Unpolarised part of XS                        78   // Unpolarised part of XS
 79   fPhi0 = gmo2 / gamma2;                           79   fPhi0 = gmo2 / gamma2;
 80   fPhi0 += ((1. - 2. * gamma) / gamma2) * (1.      80   fPhi0 += ((1. - 2. * gamma) / gamma2) * (1. / e + 1. / (1. - e));
 81   fPhi0 += 1. / (e * e) + 1. / ((1. - e) * (1.     81   fPhi0 += 1. / (e * e) + 1. / ((1. - e) * (1. - e));
 82   fPhi0 *= 0.25;                                   82   fPhi0 *= 0.25;
 83   // Initial state polarisarion dependence         83   // Initial state polarisarion dependence
 84   if(polarized)                                    84   if(polarized)
 85   {                                                85   {
 86     G4bool usephi = true;                          86     G4bool usephi = true;
 87     if(flag <= 1)                                  87     if(flag <= 1)
 88       usephi = false;                              88       usephi = false;
 89     G4double xx = (gamma - f * e * gmo * (3. +     89     G4double xx = (gamma - f * e * gmo * (3. + gamma)) / (4. * f * e * gamma2);
 90     G4double yy = (-1. + f * e * gmo2 + 2. * g     90     G4double yy = (-1. + f * e * gmo2 + 2. * gamma) / (4. * f * e * gamma2);
 91     G4double zz = (-(e * gmo * (3. + gamma)) +     91     G4double zz = (-(e * gmo * (3. + gamma)) + e2 * gmo * (3. + gamma) +
 92                    gamma * (-1. + 2. * gamma))     92                    gamma * (-1. + 2. * gamma)) /
 93                   (4. * f * e * gamma2);           93                   (4. * f * e * gamma2);
 94                                                    94 
 95     fPhi0 += xx * pol0.x() * pol1.x() + yy * p     95     fPhi0 += xx * pol0.x() * pol1.x() + yy * pol0.y() * pol1.y() +
 96              zz * pol0.z() * pol1.z();             96              zz * pol0.z() * pol1.z();
 97                                                    97 
 98     if(usephi)                                     98     if(usephi)
 99     {                                              99     {
100       G4double xy = 0.;                           100       G4double xy = 0.;
101       G4double xz = -((-1. + 2. * e) * gmo) /     101       G4double xz = -((-1. + 2. * e) * gmo) /
102                     (2. * sqrttwo * gamma2 * s    102                     (2. * sqrttwo * gamma2 * std::sqrt(-((f * e) / gpo)));
103       G4double yx = 0.;                           103       G4double yx = 0.;
104       G4double yz = 0.;                           104       G4double yz = 0.;
105       G4double zx = -((-1. + 2. * e) * gmo) /     105       G4double zx = -((-1. + 2. * e) * gmo) /
106                     (2. * sqrttwo * gamma2 * s    106                     (2. * sqrttwo * gamma2 * std::sqrt(-((f * e) / gpo)));
107       G4double zy = 0.;                           107       G4double zy = 0.;
108       fPhi0 += yx * pol0.y() * pol1.x() + xy *    108       fPhi0 += yx * pol0.y() * pol1.x() + xy * pol0.x() * pol1.y();
109       fPhi0 += zx * pol0.z() * pol1.x() + xz *    109       fPhi0 += zx * pol0.z() * pol1.x() + xz * pol0.x() * pol1.z();
110       fPhi0 += zy * pol0.z() * pol1.y() + yz *    110       fPhi0 += zy * pol0.z() * pol1.y() + yz * pol0.y() * pol1.z();
111     }                                             111     }
112   }                                               112   }
113   // Final state polarisarion dependence          113   // Final state polarisarion dependence
114   fPhi2 = G4ThreeVector();                        114   fPhi2 = G4ThreeVector();
115   fPhi3 = G4ThreeVector();                        115   fPhi3 = G4ThreeVector();
116                                                   116 
117   if(flag >= 1)                                   117   if(flag >= 1)
118   {                                               118   {
119     // Final Electron P1                          119     // Final Electron P1
120     // initial electron K1                        120     // initial electron K1
121     if(!pol0.IsZero())                            121     if(!pol0.IsZero())
122     {                                             122     {
123       G4double xxP1K1 =                           123       G4double xxP1K1 =
124         (std::sqrt(gpo / (1. + e2 * gmo + gamm    124         (std::sqrt(gpo / (1. + e2 * gmo + gamma - 2. * e * gamma)) *
125          (gamma - e * gpo)) /                     125          (gamma - e * gpo)) /
126         (4. * e2 * gamma);                        126         (4. * e2 * gamma);
127       G4double xyP1K1 = 0.;                       127       G4double xyP1K1 = 0.;
128       G4double xzP1K1 = (-1. + 2. * e * gamma)    128       G4double xzP1K1 = (-1. + 2. * e * gamma) /
129                         (2. * sqrttwo * f * ga    129                         (2. * sqrttwo * f * gamma *
130                          std::sqrt(e * e2 * (1    130                          std::sqrt(e * e2 * (1. + e + gamma - e * gamma)));
131       G4double yxP1K1 = 0.;                       131       G4double yxP1K1 = 0.;
132       G4double yyP1K1 =                           132       G4double yyP1K1 =
133         (-gamma2 + e * (-1. + gamma * (2. + ga    133         (-gamma2 + e * (-1. + gamma * (2. + gamma))) / (4. * f * e2 * gamma2);
134       G4double yzP1K1 = 0.;                       134       G4double yzP1K1 = 0.;
135       G4double zxP1K1 = (1. + 2. * e2 * gmo -     135       G4double zxP1K1 = (1. + 2. * e2 * gmo - 2. * e * gamma) /
136                         (2. * sqrttwo * f * e     136                         (2. * sqrttwo * f * e * gamma *
137                          std::sqrt(e * (1. + e    137                          std::sqrt(e * (1. + e + gamma - e * gamma)));
138       G4double zyP1K1 = 0.;                       138       G4double zyP1K1 = 0.;
139       G4double zzP1K1 =                           139       G4double zzP1K1 =
140         (-gamma + e * (1. - 2. * e * gmo + gam    140         (-gamma + e * (1. - 2. * e * gmo + gamma)) /
141         (4. * f * e2 * gamma * std::sqrt(1. -     141         (4. * f * e2 * gamma * std::sqrt(1. - (2. * e) / (f * gpo)));
142       fPhi2[0] += xxP1K1 * pol0.x() + xyP1K1 *    142       fPhi2[0] += xxP1K1 * pol0.x() + xyP1K1 * pol0.y() + xzP1K1 * pol0.z();
143       fPhi2[1] += yxP1K1 * pol0.x() + yyP1K1 *    143       fPhi2[1] += yxP1K1 * pol0.x() + yyP1K1 * pol0.y() + yzP1K1 * pol0.z();
144       fPhi2[2] += zxP1K1 * pol0.x() + zyP1K1 *    144       fPhi2[2] += zxP1K1 * pol0.x() + zyP1K1 * pol0.y() + zzP1K1 * pol0.z();
145     }                                             145     }
146     // initial electron K2                        146     // initial electron K2
147     if(!pol1.IsZero())                            147     if(!pol1.IsZero())
148     {                                             148     {
149       G4double xxP1K2 =                           149       G4double xxP1K2 =
150         ((1. + e * (-3. + gamma)) *               150         ((1. + e * (-3. + gamma)) *
151          std::sqrt(gpo / (1. + e2 * gmo + gamm    151          std::sqrt(gpo / (1. + e2 * gmo + gamma - 2. * e * gamma))) /
152         (4. * f * e * gamma);                     152         (4. * f * e * gamma);
153       G4double xyP1K2 = 0.;                       153       G4double xyP1K2 = 0.;
154       G4double xzP1K2 =                           154       G4double xzP1K2 =
155         (-2. + 2. * e + gamma) / (2. * sqrttwo    155         (-2. + 2. * e + gamma) / (2. * sqrttwo * f2 * gamma *
156                                   std::sqrt(e     156                                   std::sqrt(e * (1. + e + gamma - e * gamma)));
157       G4double yxP1K2 = 0.;                       157       G4double yxP1K2 = 0.;
158       G4double yyP1K2 = (1. - 2. * gamma + e *    158       G4double yyP1K2 = (1. - 2. * gamma + e * (-1. + gamma * (2. + gamma))) /
159                         (4. * f2 * e * gamma2)    159                         (4. * f2 * e * gamma2);
160       G4double yzP1K2 = 0.;                       160       G4double yzP1K2 = 0.;
161       G4double zxP1K2 = (2. * e * (1. + e * gm    161       G4double zxP1K2 = (2. * e * (1. + e * gmo - 2. * gamma) + gamma) /
162                         (2. * sqrttwo * f2 * g    162                         (2. * sqrttwo * f2 * gamma *
163                          std::sqrt(e * (1. + e    163                          std::sqrt(e * (1. + e + gamma - e * gamma)));
164       G4double zyP1K2 = 0.;                       164       G4double zyP1K2 = 0.;
165       G4double zzP1K2 =                           165       G4double zzP1K2 =
166         (1. - 2. * gamma + e * (-1. - 2. * e *    166         (1. - 2. * gamma + e * (-1. - 2. * e * gmo + 3. * gamma)) /
167         (4. * f2 * e * gamma * std::sqrt(1. -     167         (4. * f2 * e * gamma * std::sqrt(1. - (2. * e) / (f * gpo)));
168       fPhi2[0] += xxP1K2 * pol1.x() + xyP1K2 *    168       fPhi2[0] += xxP1K2 * pol1.x() + xyP1K2 * pol1.y() + xzP1K2 * pol1.z();
169       fPhi2[1] += yxP1K2 * pol1.x() + yyP1K2 *    169       fPhi2[1] += yxP1K2 * pol1.x() + yyP1K2 * pol1.y() + yzP1K2 * pol1.z();
170       fPhi2[2] += zxP1K2 * pol1.x() + zyP1K2 *    170       fPhi2[2] += zxP1K2 * pol1.x() + zyP1K2 * pol1.y() + zzP1K2 * pol1.z();
171     }                                             171     }
172                                                   172 
173     // Final Electron P2                          173     // Final Electron P2
174     // initial electron K1                        174     // initial electron K1
175     if(!pol0.IsZero())                            175     if(!pol0.IsZero())
176     {                                             176     {
177       G4double xxP2K1 =                           177       G4double xxP2K1 =
178         (-1. + e + e * gamma) /                   178         (-1. + e + e * gamma) /
179         (4. * f2 * gamma * std::sqrt((e * (2.     179         (4. * f2 * gamma * std::sqrt((e * (2. + e * gmo)) / gpo));
180       G4double xyP2K1 = 0.;                       180       G4double xyP2K1 = 0.;
181       G4double xzP2K1 =                           181       G4double xzP2K1 =
182         -((1. + 2. * f * gamma) * std::sqrt(f     182         -((1. + 2. * f * gamma) * std::sqrt(f / (-2. + e - e * gamma))) /
183         (2. * sqrttwo * f2 * e * gamma);          183         (2. * sqrttwo * f2 * e * gamma);
184       G4double yxP2K1 = 0.;                       184       G4double yxP2K1 = 0.;
185       G4double yyP2K1 = (1. - 2. * gamma + e *    185       G4double yyP2K1 = (1. - 2. * gamma + e * (-1. + gamma * (2. + gamma))) /
186                         (4. * f2 * e * gamma2)    186                         (4. * f2 * e * gamma2);
187       G4double yzP2K1 = 0.;                       187       G4double yzP2K1 = 0.;
188       G4double zxP2K1 =                           188       G4double zxP2K1 =
189         (1. + 2. * e * (-2. + e + gamma - e *     189         (1. + 2. * e * (-2. + e + gamma - e * gamma)) /
190         (2. * sqrttwo * f * e * std::sqrt(-(f     190         (2. * sqrttwo * f * e * std::sqrt(-(f * (2. + e * gmo))) * gamma);
191       G4double zyP2K1 = 0.;                       191       G4double zyP2K1 = 0.;
192       G4double zzP2K1 =                           192       G4double zzP2K1 =
193         (std::sqrt((e * gpo) / (2. + e * gmo))    193         (std::sqrt((e * gpo) / (2. + e * gmo)) *
194          (-3. + e * (5. + 2. * e * gmo - 3. *     194          (-3. + e * (5. + 2. * e * gmo - 3. * gamma) + 2. * gamma)) /
195         (4. * f2 * e * gamma);                    195         (4. * f2 * e * gamma);
196                                                   196 
197       fPhi3[0] += xxP2K1 * pol0.x() + xyP2K1 *    197       fPhi3[0] += xxP2K1 * pol0.x() + xyP2K1 * pol0.y() + xzP2K1 * pol0.z();
198       fPhi3[1] += yxP2K1 * pol0.x() + yyP2K1 *    198       fPhi3[1] += yxP2K1 * pol0.x() + yyP2K1 * pol0.y() + yzP2K1 * pol0.z();
199       fPhi3[2] += zxP2K1 * pol0.x() + zyP2K1 *    199       fPhi3[2] += zxP2K1 * pol0.x() + zyP2K1 * pol0.y() + zzP2K1 * pol0.z();
200     }                                             200     }
201     // initial electron K2                        201     // initial electron K2
202     if(!pol1.IsZero())                            202     if(!pol1.IsZero())
203     {                                             203     {
204       G4double xxP2K2 =                           204       G4double xxP2K2 =
205         (-2. - e * (-3. + gamma) + gamma) /       205         (-2. - e * (-3. + gamma) + gamma) /
206         (4. * f * e * gamma * std::sqrt((e * (    206         (4. * f * e * gamma * std::sqrt((e * (2. + e * gmo)) / gpo));
207       G4double xyP2K2 = 0.;                       207       G4double xyP2K2 = 0.;
208       G4double xzP2K2 =                           208       G4double xzP2K2 =
209         ((-2. * e + gamma) * std::sqrt(f / (-2    209         ((-2. * e + gamma) * std::sqrt(f / (-2. + e - e * gamma))) /
210         (2. * sqrttwo * f * e2 * gamma);          210         (2. * sqrttwo * f * e2 * gamma);
211       G4double yxP2K2 = 0.;                       211       G4double yxP2K2 = 0.;
212       G4double yyP2K2 =                           212       G4double yyP2K2 =
213         (-gamma2 + e * (-1. + gamma * (2. + ga    213         (-gamma2 + e * (-1. + gamma * (2. + gamma))) / (4. * f * e2 * gamma2);
214       G4double yzP2K2 = 0.;                       214       G4double yzP2K2 = 0.;
215       G4double zxP2K2 =                           215       G4double zxP2K2 =
216         (gamma + 2. * e * (-1. + e - e * gamma    216         (gamma + 2. * e * (-1. + e - e * gamma)) /
217         (2. * sqrttwo * e2 * std::sqrt(-(f * (    217         (2. * sqrttwo * e2 * std::sqrt(-(f * (2. + e * gmo))) * gamma);
218       G4double zyP2K2 = 0.;                       218       G4double zyP2K2 = 0.;
219       G4double zzP2K2 = (std::sqrt((e * gpo) /    219       G4double zzP2K2 = (std::sqrt((e * gpo) / (2. + e * gmo)) *
220                          (-2. + e * (3. + 2. *    220                          (-2. + e * (3. + 2. * e * gmo - gamma) + gamma)) /
221                         (4. * f * e2 * gamma);    221                         (4. * f * e2 * gamma);
222       fPhi3[0] += xxP2K2 * pol1.x() + xyP2K2 *    222       fPhi3[0] += xxP2K2 * pol1.x() + xyP2K2 * pol1.y() + xzP2K2 * pol1.z();
223       fPhi3[1] += yxP2K2 * pol1.x() + yyP2K2 *    223       fPhi3[1] += yxP2K2 * pol1.x() + yyP2K2 * pol1.y() + yzP2K2 * pol1.z();
224       fPhi3[2] += zxP2K2 * pol1.x() + zyP2K2 *    224       fPhi3[2] += zxP2K2 * pol1.x() + zyP2K2 * pol1.y() + zzP2K2 * pol1.z();
225     }                                             225     }
226   }                                               226   }
227   fPhi0 *= pref;                                  227   fPhi0 *= pref;
228   fPhi2 *= pref;                                  228   fPhi2 *= pref;
229   fPhi3 *= pref;                                  229   fPhi3 *= pref;
230 }                                                 230 }
231                                                   231 
232 G4double G4PolarizedIonisationMollerXS::XSecti    232 G4double G4PolarizedIonisationMollerXS::XSection(const G4StokesVector& pol2,
233                                                   233                                                  const G4StokesVector& pol3)
234 {                                                 234 {
235   G4double xs = fPhi0;                            235   G4double xs = fPhi0;
236                                                   236 
237   G4bool polarized = (!pol2.IsZero()) || (!pol    237   G4bool polarized = (!pol2.IsZero()) || (!pol3.IsZero());
238   if(polarized)                                   238   if(polarized)
239   {                                               239   {
240     xs += fPhi2 * pol2 + fPhi3 * pol3;            240     xs += fPhi2 * pol2 + fPhi3 * pol3;
241   }                                               241   }
242   return xs;                                      242   return xs;
243 }                                                 243 }
244                                                   244 
245 G4double G4PolarizedIonisationMollerXS::TotalX    245 G4double G4PolarizedIonisationMollerXS::TotalXSection(
246   G4double xmin, G4double xmax, G4double gamma    246   G4double xmin, G4double xmax, G4double gamma, const G4StokesVector& pol0,
247   const G4StokesVector& pol1)                     247   const G4StokesVector& pol1)
248 {                                                 248 {
249   G4double xs = 0.;                               249   G4double xs = 0.;
250   G4double x  = xmin;                             250   G4double x  = xmin;
251                                                   251 
252   if(xmax != 0.5)                                 252   if(xmax != 0.5)
253   {                                               253   {
254     G4ExceptionDescription ed;                    254     G4ExceptionDescription ed;
255     ed << " warning xmax expected to be 1/2 bu    255     ed << " warning xmax expected to be 1/2 but is " << xmax << "\n";
256     G4Exception("G4PolarizedIonisationMollerXS    256     G4Exception("G4PolarizedIonisationMollerXS::TotalXSection", "pol020",
257                 JustWarning, ed);                 257                 JustWarning, ed);
258   }                                               258   }
259                                                   259 
260   constexpr G4double re2 = classic_electr_radi    260   constexpr G4double re2 = classic_electr_radius * classic_electr_radius;
261   G4double gamma2        = gamma * gamma;         261   G4double gamma2        = gamma * gamma;
262   G4double gmo2          = (gamma - 1.) * (gam    262   G4double gmo2          = (gamma - 1.) * (gamma - 1.);
263   G4double logMEM        = std::log(1. / x - 1    263   G4double logMEM        = std::log(1. / x - 1.);
264   G4double pref          = twopi * gamma2 * re    264   G4double pref          = twopi * gamma2 * re2 / (gmo2 * (gamma + 1.0));
265   // unpolarised XS                               265   // unpolarised XS
266   G4double sigma0 = (gmo2 / gamma2) * (0.5 - x    266   G4double sigma0 = (gmo2 / gamma2) * (0.5 - x);
267   sigma0 += ((1. - 2. * gamma) / gamma2) * log    267   sigma0 += ((1. - 2. * gamma) / gamma2) * logMEM;
268   sigma0 += 1. / x - 1. / (1. - x);               268   sigma0 += 1. / x - 1. / (1. - x);
269   //    longitudinal part                         269   //    longitudinal part
270   G4double sigma2 = ((gamma2 + 2. * gamma - 3.    270   G4double sigma2 = ((gamma2 + 2. * gamma - 3.) / gamma2) * (0.5 - x);
271   sigma2 += (1. / gamma - 2.) * logMEM;           271   sigma2 += (1. / gamma - 2.) * logMEM;
272   //    transverse part                           272   //    transverse part
273   G4double sigma3 = (2. * (1. - gamma) / gamma    273   G4double sigma3 = (2. * (1. - gamma) / gamma2) * (0.5 - x);
274   sigma3 += (1. - 3. * gamma) / (2. * gamma2)     274   sigma3 += (1. - 3. * gamma) / (2. * gamma2) * logMEM;
275   // total cross section                          275   // total cross section
276   xs += pref * (sigma0 + sigma2 * pol0.z() * p    276   xs += pref * (sigma0 + sigma2 * pol0.z() * pol1.z() +
277                 sigma3 * (pol0.x() * pol1.x()     277                 sigma3 * (pol0.x() * pol1.x() + pol0.y() * pol1.y()));
278                                                   278 
279   return xs;                                      279   return xs;
280 }                                                 280 }
281                                                   281 
282 G4StokesVector G4PolarizedIonisationMollerXS::    282 G4StokesVector G4PolarizedIonisationMollerXS::GetPol2()
283 {                                                 283 {
284   // Note, mean polarization can not contain c    284   // Note, mean polarization can not contain correlation effects.
285   return G4StokesVector(1. / fPhi0 * fPhi2);      285   return G4StokesVector(1. / fPhi0 * fPhi2);
286 }                                                 286 }
287 G4StokesVector G4PolarizedIonisationMollerXS::    287 G4StokesVector G4PolarizedIonisationMollerXS::GetPol3()
288 {                                                 288 {
289   // Note, mean polarization can not contain c    289   // Note, mean polarization can not contain correlation effects.
290   return G4StokesVector(1. / fPhi0 * fPhi3);      290   return G4StokesVector(1. / fPhi0 * fPhi3);
291 }                                                 291 }
292                                                   292