71 if(aFastTrack.GetPrimaryTrack()->GetKineticEnergy() < 1 * GeV)
79 G4double X0 = aFastTrack.GetPrimaryTrack()->GetMaterial()->GetRadlen();
80 auto particleDirection = aFastTrack.GetPrimaryTrackLocalDirection();
81 auto particlePosition = aFastTrack.GetPrimaryTrackLocalPosition();
82 G4double detectorDepthInMM = aFastTrack.GetEnvelopeSolid()->DistanceToOut(
83 particlePosition, particleDirection);
84 G4double detectorDepthInX0 = detectorDepthInMM / X0;
99 aFastStep.KillPrimaryTrack();
100 aFastStep.ProposePrimaryTrackPathLength(0.0);
101 G4double energy = aFastTrack.GetPrimaryTrack()->GetKineticEnergy();
104 aFastStep.ProposeTotalEnergyDeposited(0);
105 auto particlePosition = aFastTrack.GetPrimaryTrackLocalPosition();
106 auto particleDirection = aFastTrack.GetPrimaryTrackLocalDirection();
111 auto material = aFastTrack.GetPrimaryTrack()->GetMaterial();
112 G4double materialX0 = material->GetRadlen();
113 G4double materialZ = material->GetZ();
115 G4double materialEc = 610 * MeV / (materialZ + 1.24);
117 G4double materialRM = 21.2052 * MeV * materialX0 / materialEc;
118 G4double particleY = energy / materialEc;
125 G4double particleTmax = std::log(particleY);
126 if(aFastTrack.GetPrimaryTrack()->GetParticleDefinition() ==
127 G4Gamma::GammaDefinition())
143 fSigma = materialRM / 1.645;
148 G4RotationMatrix rotMatrix = G4RotationMatrix();
149 double particleTheta = particleDirection.theta();
150 double particlePhi = particleDirection.phi();
151 double epsilon = 1e-3;
152 rotMatrix.rotateY(particleTheta);
154 if(!(std::fabs(particleDirection.x()) < epsilon &&
155 std::fabs(particleDirection.y()) < epsilon))
156 rotMatrix.rotateZ(particlePhi);
164 G4int generatedHits = 0;
168 G4double random2 = G4UniformRand() * gammaMax;
172 G4double phiPosition = G4UniformRand() * 2 * CLHEP::pi;
173 G4double rhoPosition = G4RandGauss::shoot(0,
fSigma);
175 rotMatrix * G4ThreeVector(rhoPosition * std::sin(phiPosition),
176 rhoPosition * std::cos(phiPosition),
177 random1 * materialX0);