62 G4cout <<
"G4BoldyshevTripletModel is constructed " <<
G4endl;
87 G4cout <<
"Calling Initialise() of G4BoldyshevTripletModel."
100 std::sqrt(momentumThreshold_N*momentumThreshold_N + 1.0));
105 G4double J1 = 0.5*(t*cosht/sinht - logsinht);
106 G4double J2 = (-2./3.)*logsinht + t*cosht/sinht
107 + (sinht - t*cosht*cosht*cosht)/(3.*sinht*sinht*sinht);
115 char* path = getenv(
"G4LEDATA");
122 for(
G4int i=0; i<numOfCouples; ++i)
129 for (
G4int j=0; j<nelm; ++j)
157 G4cout <<
"Calling ReadData() of G4BoldyshevTripletModel"
161 if(
data[Z]) {
return; }
163 const char* datadir = path;
167 datadir = getenv(
"G4LEDATA");
172 "Environment variable G4LEDATA not defined");
178 std::ostringstream ost;
179 ost << datadir <<
"/livermore/tripdata/pp-trip-cs-" << Z <<
".dat";
180 std::ifstream
fin(ost.str().c_str());
185 ed <<
"G4BoldyshevTripletModel data file <" << ost.str().c_str()
186 <<
"> is not opened!" <<
G4endl;
189 ed,
"G4LEDATA version should be G4EMLOW6.27 or later.");
197 <<
" is opened by G4BoldyshevTripletModel" <<
G4endl;}
203 data[
Z]->SetSpline(
true);
214 G4cout <<
"Calling ComputeCrossSectionPerAtom() of G4BoldyshevTripletModel"
230 if(!pv) {
return xs; }
233 xs = pv->
Value(GammaEnergy);
237 G4cout <<
"*** Triplet conversion xs for Z=" << Z <<
" at energy E(MeV)="
246 std::vector<G4DynamicParticle*>* fvect,
255 G4cout <<
"Calling SampleSecondaries() of G4BoldyshevTripletModel"
270 G4double loga, f1_re, greject, cost;
274 if (cosThetaMax > 1.) {
283 cost =
G4Exp(logcostm*rndmEngine->
flat());
285 G4double bre = (1.-5.*cost*cost)/(2.*cost);
286 loga =
G4Log((1.+ cost)/(1.- cost));
287 f1_re = 1. - bre*loga;
288 greject = (cost < costlim) ? are*f1_re : 1.0;
291 }
while(greject < rndmEngine->
flat());
294 G4double sint2 = (1. - cost)*(1. + cost);
300 rt = (1. - std::cos(2.*phi_re)*fp/f1_re)/
twopi;
303 }
while(rt < rndmEngine->
flat());
309 G4double D2 = 4.*S * electron_mass_c2*electron_mass_c2 + P2*P2*sint2;
316 G4ThreeVector electronRDirection (sint*std::cos(phi_re), sint*std::sin(phi_re), cost);
317 electronRDirection.
rotateUz(photonDirection);
320 electronRKineEnergy);
337 epsilon = c1/(2.*
xb) + (xb - 4.)/(2.*
c1) + 0.5;
339 G4double photonEnergy1 = photonEnergy - ener_re ;
341 G4double positronTotEnergy =
std::max(epsilon*photonEnergy1, electron_mass_c2);
342 G4double electronTotEnergy =
std::max(photonEnergy1 - positronTotEnergy, electron_mass_c2);
345 static const G4double a2 = 0.5333333333;
347 G4double u = (0.25 > rndmEngine->
flat()) ? uu*a1 : uu*a2;
349 G4double thetaEle = u*electron_mass_c2/electronTotEnergy;
350 G4double sinte = std::sin(thetaEle);
351 G4double coste = std::cos(thetaEle);
353 G4double thetaPos = u*electron_mass_c2/positronTotEnergy;
354 G4double sintp = std::sin(thetaPos);
355 G4double costp = std::cos(thetaPos);
367 G4ThreeVector electronDirection (sinte*cosp, sinte*sinp, coste);
368 electronDirection.
rotateUz(photonDirection);
376 G4ThreeVector positronDirection (-sintp*cosp, -sintp*sinp, costp);
377 positronDirection.
rotateUz(photonDirection);
381 positronDirection, positronKineEnergy);
384 fvect->push_back(particle1);
385 fvect->push_back(particle2);
387 if(particle3) { fvect->push_back(particle3); }
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
std::ostringstream G4ExceptionDescription
std::vector< ExP01TrackerHit * > a
G4double momentumThreshold_c
static constexpr double MeV
G4ParticleChangeForGamma * fParticleChange
const G4ThreeVector & GetMomentumDirection() const
const G4ElementVector * GetElementVector() const
static const G4double * P2[nN]
virtual ~G4BoldyshevTripletModel()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cut=0., G4double emax=DBL_MAX)
Hep3Vector & rotateUz(const Hep3Vector &)
G4double Value(G4double theEnergy, size_t &lastidx) const
G4double G4Log(G4double x)
G4double LowEnergyLimit() const
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double)
const XML_Char const XML_Char * data
#define G4MUTEX_INITIALIZER
static constexpr double millibarn
static constexpr double electron_mass_c2
static constexpr double twopi
static G4Positron * Positron()
static G4Electron * Electron()
size_t GetTableSize() const
static G4LPhysicsFreeVector * data[100]
double epsilon(double density, double temperature)
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4Element * > G4ElementVector
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
const G4Material * GetMaterial() const
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4BoldyshevTripletModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="BoldyshevTripletConversion")
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double HighEnergyLimit() const
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
void ProposeTrackStatus(G4TrackStatus status)
virtual void InitialiseForElement(const G4ParticleDefinition *, G4int Z)
static constexpr double GeV
static constexpr double pi
size_t GetNumberOfElements() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void ReadData(size_t Z, const char *path=nullptr)