92 lowestKinEnergy(1.0*GeV),
101 for(
G4int i=1; i<93; ++i) {
105 fDN[i] /= std::pow(dn, 1./
G4double(i));
116 size_t n = partialSumSigma.size();
118 for(
size_t i=0; i<n; i++) {
119 delete partialSumSigma[i];
147 G4int nn = partialSumSigma.size();
148 G4int nc = cuts.size();
151 if(nn == numOfCouples) {
return; }
155 for (
G4int ii=0; ii<nn; ii++){
157 if ( a ) {
delete a; }
159 partialSumSigma.clear();
162 if (numOfCouples>0) {
163 for (
G4int i=0; i<numOfCouples; i++) {
167 if(i < nc) { cute = cuts[i]; }
172 G4DataVector* dv = ComputePartialSumSigma(material,fixedEnergy,cute);
173 partialSumSigma.push_back(dv);
191 if (kineticEnergy <= lowestKinEnergy)
return dedx;
194 G4double cut = std::min(cutEnergy,tmax);
195 if(cut < minThreshold) cut = minThreshold;
198 const G4double* theAtomicNumDensityVector =
207 dedx += loss*theAtomicNumDensityVector[i];
210 if(dedx < 0.) dedx = 0.;
222 G4double xgi[]={0.03377,0.16940,0.38069,0.61931,0.83060,0.96623};
223 G4double wgi[]={0.08566,0.18038,0.23396,0.23396,0.18038,0.08566};
231 if(vcut>vmax) bbb=vmax ;
236 for(
G4int l=0; l<kkk; l++)
238 for(
G4int i=0; i<6; i++)
240 G4double ep = (aa + xgi[i]*hhh)*totalEnergy;
246 loss *=hhh*totalEnergy ;
261 G4double xgi[]={0.03377,0.16940,0.38069,0.61931,0.83060,0.96623};
262 G4double wgi[]={0.08566,0.18038,0.23396,0.23396,0.18038,0.08566};
265 if(cut >= tkin)
return cross;
277 for(
G4int l=0; l<kkk; l++)
279 for(
G4int i=0; i<6; i++)
281 G4double ep = exp(aa + xgi[i]*hhh)*totalEnergy;
304 if( gammaEnergy > tkin)
return dxsection ;
313 else if(iz > 92) iz = 92;
330 G4double fn=log(rab1/(dnstar*(electron_mass_c2+rab0*rab1))*
336 if(gammaEnergy<epmax1)
340 (electron_mass_c2+rab0*rab2))) ;
344 dxsection =
coeff*(1.-v*(1. - 0.75*v))*Z*(fn*Z +
fe)/gammaEnergy;
359 if (kineticEnergy <= lowestKinEnergy)
return cross;
360 G4double tmax = std::min(maxEnergy, kineticEnergy);
361 G4double cut = std::min(cutEnergy, kineticEnergy);
362 if(cut < minThreshold) cut = minThreshold;
363 if (cut >= tmax)
return cross;
366 if(tmax < kineticEnergy) {
374G4DataVector* G4MuBremsstrahlungModel::ComputePartialSumSigma(
385 const G4double* theAtomNumDensityVector =
392 for (
G4int i=0; i<nElements; i++ ) {
393 cross += theAtomNumDensityVector[i]
395 (*theElementVector)[i]->GetZ(), cut);
396 dv->push_back(cross);
404 std::vector<G4DynamicParticle*>* vdp,
412 G4double tmax = std::min(kineticEnergy, maxEnergy);
413 G4double tmin = std::min(kineticEnergy, minEnergy);
414 if(tmin < minThreshold) tmin = minThreshold;
415 if(tmin >= tmax)
return;
422 const G4Element* anElement = SelectRandomAtom(couple);
426 G4double totalMomentum = sqrt(kineticEnergy*(kineticEnergy + 2.0*
mass));
435 G4double xmax = log(kineticEnergy/tmin);
439 epksi = MeV*exp(lnepksi);
449 G4double rmax = gam*std::min(1.0, totalEnergy/gEnergy - 1.0);
453 G4double theta = sqrt(x/(1.0 - x))/gam;
456 G4double dirx = sint*cos(phi), diry = sint*sin(phi), dirz = cos(theta) ;
461 partDirection *= totalMomentum;
462 partDirection -= gEnergy*gDirection;
463 partDirection = partDirection.
unit();
466 kineticEnergy -= gEnergy;
473 vdp->push_back(aGamma);
478const G4Element* G4MuBremsstrahlungModel::SelectRandomAtom(
486 if(1 == nElements) {
return (*theElementVector)[0]; }
487 else if(1 > nElements) {
return 0; }
491 for (
G4int i=0; i<nElements; i++) {
492 if (rval <= (*dv)[i]) {
return (*theElementVector)[i]; }
494 return (*theElementVector)[nElements-1];
std::vector< G4Element * > G4ElementVector
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4Material * GetMaterial() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetAtomicNumDensityVector() const
virtual ~G4MuBremsstrahlungModel()
G4MuBremsstrahlungModel(const G4ParticleDefinition *p=0, const G4String &nam="MuBrem")
void SetParticle(const G4ParticleDefinition *)
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin, G4double Z, G4double gammaEnergy)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
G4double ComputeMicroscopicCrossSection(G4double tkin, G4double Z, G4double cut)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
G4double ComputMuBremLoss(G4double Z, G4double tkin, G4double cut)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4double GetZ13(G4double Z)
static G4NistManager * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4double HighEnergyLimit() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()