128 G4double Ec = 800*MeV/(54. + 1.2);
129 G4double Energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
130 G4double y = Energy/Ec;
133 G4double
a, tmax, b(0.5), C;
134 if (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Gamma::GammaDefinition()) C = 0.5;
136 tmax = 1.0 * (std::log(y) + C);
141 if (
fCsI ==
nullptr )
fCsI = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CESIUM_IODIDE");
142 G4double X0 =
fCsI->GetRadlen();
144 G4double Es = 21*MeV;
145 G4double Rm = X0*Es/Ec;
148 G4ThreeVector xShower, yShower, zShower;
149 zShower = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
150 xShower = zShower.orthogonal();
151 yShower = zShower.cross(xShower);
153 G4ThreeVector sShower = fastTrack.GetPrimaryTrack()->GetPosition();
157 G4double deposit = Energy/double(nSpots);
160 G4ThreeVector ePoint;
164 for (
int i = 0; i < nSpots; i++)
168 bt = G4RandGamma::shoot(
a,1.0);
175 G4double xr = G4UniformRand();
176 if (xr < 0.9) r = xr/0.9*Rm;
177 else r = ((xr - 0.9)/0.1*2.5 + 1.0)*Rm;
178 phi = G4UniformRand()*twopi;
183 r*std::cos(phi)*xShower + r*std::sin(phi)*yShower;