121{
122
123
124
125
126
127
128 G4double Ec = 800*MeV/(54. + 1.2);
129 G4double Energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
130 G4double y = Energy/Ec;
131
132
133 G4double
a, tmax, b(0.5), C;
134 if (fastTrack.GetPrimaryTrack()->GetDefinition() == G4Gamma::GammaDefinition()) C = 0.5;
135 else C = -0.5;
136 tmax = 1.0 * (std::log(y) + C);
138
139
140 G4double t, bt;
141 if (
fCsI ==
nullptr )
fCsI = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_CESIUM_IODIDE");
142 G4double X0 =
fCsI->GetRadlen();
143
144 G4double Es = 21*MeV;
145 G4double Rm = X0*Es/Ec;
146
147
148 G4ThreeVector xShower, yShower, zShower;
149 zShower = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
150 xShower = zShower.orthogonal();
151 yShower = zShower.cross(xShower);
152
153 G4ThreeVector sShower = fastTrack.GetPrimaryTrack()->GetPosition();
154
155
156 G4int nSpots = 100;
157 G4double deposit = Energy/double(nSpots);
160 G4ThreeVector ePoint;
161 G4double z, r, phi;
162
164 for (int i = 0; i < nSpots; i++)
165 {
166
167
168 bt = G4RandGamma::shoot(
a,1.0);
169 t = bt/b;
170 z = t*X0;
171
172
173
174
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;
179
180
181 ePoint = sShower +
182 z*zShower +
183 r*std::cos(phi)*xShower + r*std::sin(phi)*yShower;
184
185
187
188
190 }
191}
std::vector< ExP01TrackerHit * > a
std::vector< Par01EnergySpot > feSpotList
void SetEnergy(const G4double &E)
void SetPosition(const G4ThreeVector &point)