Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // Geant4 Class file 27 // 28 // File name: G4PolarizedComptonXS 29 // 30 // Author: Andreas Schaelicke 31 // 32 // Class Description: 33 // determine the polarization of the final 34 // process employing the differential cross 35 // ( Physica 20 (1954) 395 ) 36 // recalculated by P.Starovoitov 37 38 #include "G4PolarizedComptonXS.hh" 39 40 //....oooOO0OOooo........oooOO0OOooo........oo 41 G4PolarizedComptonXS::G4PolarizedComptonXS() 42 { 43 SetYmin(0.); 44 45 fPhi0 = 0.; 46 fPolXS = 0.; 47 fUnpXS = 0.; 48 fPhi2 = G4ThreeVector(0., 0., 0.); 49 fPhi3 = G4ThreeVector(0., 0., 0.); 50 polxx = polyy = polzz = polxz = polzx = poly 51 } 52 53 //....oooOO0OOooo........oooOO0OOooo........oo 54 G4PolarizedComptonXS::~G4PolarizedComptonXS() 55 56 //....oooOO0OOooo........oooOO0OOooo........oo 57 void G4PolarizedComptonXS::Initialize(G4double 58 G4double 59 const G4 60 const G4 61 { 62 G4double cosT = 1. - (1. / eps - 1.) / X; 63 if(cosT > 1. + 1.e-8) 64 cosT = 1.; 65 else if(cosT < -1. - 1.e-8) 66 cosT = -1.; 67 G4double cosT2 = cosT * cosT; 68 G4double cosT3 = cosT2 * cosT; 69 G4double sinT2 = 1. - cosT2; 70 if(sinT2 > 1. + 1.e-8) 71 sinT2 = 1.; 72 else if(sinT2 < 0.) 73 sinT2 = 0.; 74 G4double sinT = std::sqrt(sinT2); 75 G4double cos2T = 2. * cosT2 - 1.; 76 G4double sin2T = 2. * sinT * cosT; 77 G4double eps2 = sqr(eps); 78 DefineCoefficients(pol0, pol1); 79 G4double diffXSFactor = re2 / (4. * X); 80 81 // unpolarized Cross Section 82 fUnpXS = (eps2 + 1. - eps * sinT2) / (2. * e 83 // initial polarization dependence 84 fPolXS = -sinT2 * pol0.x() + (1. - eps) * si 85 ((eps2 - 1.) / eps) * cosT * polzz; 86 fPolXS *= 0.5; 87 88 fPhi0 = fUnpXS + fPolXS; 89 90 if(flag == 2) 91 { 92 // polarization of outgoing photon 93 G4double phi21 = -sinT2 + 0.5 * (cos2T + 3 94 ((1. - eps) / eps) * sinT 95 phi21 *= 0.5; 96 G4double phi22 = cosT * pol0.y() + ((1. - 97 G4double phi23 = ((eps2 + 1.) / eps) * cos 98 ((1. - eps) / eps) * (eps 99 phi23 += 0.5 * (1. - eps) * sin2T * pol1.x 100 phi23 += (eps - 1.) * (-sinT2 * polxz + si 101 phi23 *= 0.5; 102 103 fPhi2 = G4ThreeVector(phi21, phi22, phi23) 104 105 // polarization of outgoing electron 106 G4double phi32 = -sinT2 * polxy + ((1. - e 107 0.5 * (cos2T + 3.) * pol1 108 phi32 *= 0.5; 109 110 G4double phi31 = 0.; 111 G4double phi31add = 0.; 112 G4double phi33 = 0.; 113 G4double phi33add = 0.; 114 115 if((1. - eps) > 1.e-12) 116 { 117 G4double helpVar = std::sqrt(eps2 - 2. * 118 119 phi31 = (1. - eps) * (1. + cosT) * sinT 120 phi31 += 121 (-eps * cosT3 + eps * cosT2 + (eps - 2 122 phi31 += -(eps * cosT2 - eps * cosT + co 123 phi31 /= 2. * helpVar; 124 125 phi31add = -eps * sqr(1. - cosT) * (1. + 126 phi31add += (1. - eps) * sinT2 * polyy; 127 phi31add += -(-eps2 + cosT * (cosT * eps 128 sinT * polxz / eps; 129 phi31add /= 2. * helpVar; 130 131 phi33 = ((1. - eps) / eps) * 132 (-eps * cosT2 + eps * (eps + 1.) 133 phi33 += -(eps * cosT2 + (1. - eps) * ep 134 phi33 += 135 -(-eps2 * cosT3 + eps * (eps2 - eps + 136 pol1.z() / eps; 137 phi33 /= -2. * helpVar; 138 139 phi33add = (eps * (eps - cosT - 1.) * co 140 phi33add += -(-eps2 + cosT * eps + eps - 141 phi33add += (eps - 1.) * (cosT - eps) * 142 phi33add /= -2. * helpVar; 143 } 144 else 145 { 146 phi31 = -pol1.z() - 147 (X - 1.) * std::sqrt(1. - eps) * 148 phi31add = -(-X * X * pol1.z() - 2. * X 149 (4. * pol0.x() + 5.) * pol1 150 (1. - eps) / (4. * X); 151 152 phi33 = pol1.x() - 153 (X - 1.) * std::sqrt(1. - eps) * 154 phi33add = -(X * X - 2. * X + 4. * pol0. 155 pol1.x() / (4. * X); 156 } 157 fPhi3 = G4ThreeVector(phi31 + phi31add, ph 158 } 159 fUnpXS *= diffXSFactor; 160 fPolXS *= diffXSFactor; 161 fPhi0 *= diffXSFactor; 162 fPhi2 *= diffXSFactor; 163 fPhi3 *= diffXSFactor; 164 } 165 166 G4double G4PolarizedComptonXS::XSection(const 167 const 168 { 169 G4bool gammaPol2 = !(pol2 == G4StokesVect 170 G4bool electronPol3 = !(pol3 == G4StokesVect 171 172 G4double phi = 0.; 173 // polarization independent part 174 phi += fPhi0; 175 176 if(gammaPol2) 177 { 178 // part depending on the polarization of t 179 phi += fPhi2 * pol2; 180 } 181 182 if(electronPol3) 183 { 184 // part depending on the polarization of t 185 phi += fPhi3 * pol3; 186 } 187 188 // return cross section. 189 return phi; 190 } 191 192 //....oooOO0OOooo........oooOO0OOooo........oo 193 G4double G4PolarizedComptonXS::TotalXSection(G 194 G 195 c 196 c 197 { 198 G4double k1 = 1. + 2. * k0; 199 200 G4double unit = fZ * CLHEP::pi * CLHEP::clas 201 CLHEP::classic_electr_radius 202 203 G4double pre = unit / (sqr(k0) * sqr(1. + 2. 204 205 G4double xs_0 = ((k0 - 2.) * k0 - 2.) * sqr( 206 2. * k0 * (k0 * (k0 + 1.) * 207 G4double xs_pol = (k0 + 1.) * sqr(k1) * std: 208 2. * k0 * (5. * sqr(k0) + 209 210 return pre * (xs_0 / k0 + pol0.p3() * pol1.z 211 } 212 213 //....oooOO0OOooo........oooOO0OOooo........oo 214 G4StokesVector G4PolarizedComptonXS::GetPol2() 215 { 216 // Note, mean polarization can not contain c 217 return G4StokesVector(1. / fPhi0 * fPhi2); 218 } 219 220 //....oooOO0OOooo........oooOO0OOooo........oo 221 G4StokesVector G4PolarizedComptonXS::GetPol3() 222 { 223 // Note, mean polarization can not contain c 224 return G4StokesVector(1. / fPhi0 * fPhi3); 225 } 226 227 //....oooOO0OOooo........oooOO0OOooo........oo 228 void G4PolarizedComptonXS::DefineCoefficients( 229 230 { 231 polxx = pol0.x() * pol1.x(); 232 polyy = pol0.y() * pol1.y(); 233 polzz = pol0.z() * pol1.z(); 234 235 polxz = pol0.x() * pol1.z(); 236 polzx = pol0.z() * pol1.x(); 237 238 polyz = pol0.y() * pol1.z(); 239 polzy = pol0.z() * pol1.y(); 240 241 polxy = pol0.x() * pol1.y(); 242 polyx = pol0.y() * pol1.x(); 243 } 244