60 PBound(0), Parameterisation(0), HMaker(0)
63 FlagParticleContainment = 1;
70 PBound(0), Parameterisation(0), HMaker(0)
73 FlagParticleContainment = 1;
99 if(FlagParamType != 0)
110 select = CheckParticleDefAndContainment(fastTrack);
120 GFlashShowerModel::CheckParticleDefAndContainment(
const G4FastTrack& fastTrack)
130 if(FlagParticleContainment == 1)
132 filter=CheckContainment(fastTrack);
149 CrossShower = DirectionShower.
cross(OrthoShower);
153 G4int CosPhi[4] = {1,0,-1,0};
154 G4int SinPhi[4] = {0,1,0,-1};
157 G4int NlateralInside=0;
160 for(
int i=0; i<4 ;i++)
163 Position = InitialPositionShower +
165 R*CosPhi[i]*OrthoShower +
166 R*SinPhi[i]*CrossShower ;
173 if(NlateralInside==4) filter=
true;
187 ElectronDoIt(fastTrack,fastStep);
191 GFlashShowerModel::ElectronDoIt(
const G4FastTrack& fastTrack,
212 CrossShower = DirectionShower.
cross(OrthoShower);
243 G4int NSpotDeposited =0;
253 if(Bound < stepLength)
263 ZEndStep=ZEndStep+Dz;
266 if(EnergyNow > EnergyStop)
268 LastEneIntegral = EneIntegral;
270 DEne = std::min( EnergyNow,
271 (EneIntegral-LastEneIntegral)*Energy);
272 LastNspIntegral = NspIntegral;
274 DNsp = std::max(1., std::floor( (NspIntegral-LastNspIntegral)
281 DNsp = std::max(1., std::floor( (1.- NspIntegral)
284 EnergyNow = EnergyNow - DEne;
297 StepLenght = StepLenght + Dz/2.00;
298 NewPositionShower = NewPositionShower +
299 StepLenght*DirectionShower;
300 StepLenght = Dz/2.00;
303 for (
int i = 0; i < DNsp; i++)
318 Dz/DNsp*DirectionShower*(i+1/2.-DNsp/2.) +
319 RSpot*std::cos(PhiSpot)*OrthoShower +
320 RSpot*std::sin(PhiSpot)*CrossShower;
324 HMaker->
make(&Spot, &fastTrack);
327 while(EnergyNow > 0.0 && Bound> 0.0);