69 :
G4VEmModel(
"eCoulombScattering"), isCombined(combined)
77 mass = CLHEP::proton_mass_c2;
93 currentCouple =
nullptr;
99 if(tet >= CLHEP::pi) { cosThetaMin = -1.0; }
100 else if(tet > 0.0) { cosThetaMin = std::cos(tet); }
103 }
else if(tet > 0.0) {
104 cosThetaMin = std::cos(std::min(tet, CLHEP::pi));
107 wokvi->Initialise(part, cosThetaMin);
115 if(
nullptr == fParticleChange) {
118 if(
IsMaster() && mass < GeV && part->GetParticleName() !=
"GenericIon") {
142 std::max(recoilThreshold, (*pCuts)[
CurrentCouple()->GetIndex()]);
150 for (std::size_t j=0; j<nelm; ++j) {
151 Z = std::min(Z,(*theElementVector)[j]->GetZasInt());
155 G4double t = std::max(cut, 0.5*(cut + sqrt(2*cut*targetMass)));
178 if(kinEnergy <= 0.0) {
return cross; }
180 G4double costmin = wokvi->SetupKinematic(kinEnergy, currentMaterial);
184 if(cosThetaMax < costmin) {
186 G4double cut = (0.0 < fixedCut) ? fixedCut : cutEnergy;
187 costmin = wokvi->SetupTarget(iz, cut);
190 G4double costmax = (1 == iz && particle == theProton && cosThetaMax < 0.0)
192 if(costmin > costmax) {
193 cross = wokvi->ComputeNuclearCrossSection(costmin, costmax)
194 + wokvi->ComputeElectronCrossSection(costmin, costmax);
213 std::vector<G4DynamicParticle*>* fvect,
228 G4double cut = (0.0 < fixedCut) ? fixedCut : cutEnergy;
230 wokvi->SetupKinematic(kinEnergy, currentMaterial);
236 G4double costmin = wokvi->SetupTarget(iz, cut);
237 G4double costmax = (1 == iz && particle == theProton && cosThetaMax < 0.0)
239 if(costmin <= costmax) {
return; }
241 G4double cross = wokvi->ComputeNuclearCrossSection(costmin, costmax);
242 G4double ecross = wokvi->ComputeElectronCrossSection(costmin, costmax);
243 G4double ratio = ecross/(cross + ecross);
247 wokvi->SetTargetMass(targetMass);
250 wokvi->SampleSingleScattering(costmin, costmax, ratio);
263 fParticleChange->ProposeMomentumDirection(newDirection);
267 G4double mom2 = wokvi->GetMomentumSquare();
269 /(targetMass + (mass + kinEnergy)*(1.0 - cost));
272 trec = std::min(trec, kinEnergy);
281 if(pCuts) { tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]); }
286 newDirection*sqrt(finalT*(2*mass + finalT))).unit();
288 fvect->push_back(newdp);
291 fParticleChange->ProposeNonIonizingEnergyDeposit(edep);
301 edep = std::max(edep, 0.0);
302 fParticleChange->SetProposedKineticEnergy(finalT);
303 fParticleChange->ProposeLocalEnergyDeposit(edep);
std::vector< const G4Element * > G4ElementVector
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetLogKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4ElementVector * GetElementVector() const
std::size_t GetNumberOfElements() const
static G4NistManager * Instance()
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4IonTable * GetIonTable() const
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
G4int SelectIsotopeNumber(const G4Element *) const
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4double PolarAngleLimit() const
G4ParticleChangeForGamma * GetParticleChangeForGamma()
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4VEmModel(const G4String &nam)
const G4MaterialCutsCouple * CurrentCouple() const
const G4Element * SelectTargetAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double) final
~G4eCoulombScatteringModel() override
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4eCoulombScatteringModel(G4bool combined=true)
void DefineMaterial(const G4MaterialCutsCouple *)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void SetupParticle(const G4ParticleDefinition *)