Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4AnnihiToMuPair.cc,v 1.3 2006/06/29 19:32:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4AnnihiToMuPair.cc,v 1.5 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------ G4AnnihiToMuPair physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, November 2002
@@ -65,6 +65,8 @@ G4AnnihiToMuPair::G4AnnihiToMuPair(const G4String& processName,
HighestEnergyLimit = 1000*TeV;
CrossSecFactor = 1.;
SetProcessSubType(6);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -243,9 +245,10 @@ G4VParticleChange* G4AnnihiToMuPair::PostStepDoIt(const G4Track& aTrack,
void G4AnnihiToMuPair::PrintInfoDefinition()
{
G4String comments ="e+e->mu+mu- annihilation, atomic e- at rest.\n";
G4cout << G4endl << GetProcessName() << ": " << comments
<< " threshold at " << LowestEnergyLimit/GeV << " GeV"
G4String comments ="e+e->mu+mu- annihilation, atomic e- at rest, SubType=.";
G4cout << G4endl << GetProcessName() << ": " << comments
<< GetProcessSubType() << G4endl;
G4cout << " threshold at " << LowestEnergyLimit/GeV << " GeV"
<< " good description up to "
<< HighestEnergyLimit/TeV << " TeV for all Z." << G4endl;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BetheBlochNoDeltaModel.cc,v 1.3 2006/06/29 19:32:36 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BraggNoDeltaModel.cc,v 1.3 2006/06/29 19:32:38 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4GammaConversionToMuons.cc,v 1.4 2006/06/29 19:32:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4GammaConversionToMuons.cc,v 1.7 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------ G4GammaConversionToMuons physics process ------
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
@@ -50,7 +50,9 @@ G4GammaConversionToMuons::G4GammaConversionToMuons(const G4String& processName,
LowestEnergyLimit (4*G4MuonPlus::MuonPlus()->GetPDGMass()), // 4*Mmuon
HighestEnergyLimit(1e21*eV), // ok to 1e21eV=1e12GeV, then LPM suppression
CrossSecFactor(1.)
{ }
{
SetProcessSubType(15);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
@@ -260,9 +262,9 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
if(W<1.) W=1.; // to avoid negative cross section at xmin
G4double xxp=1.-4./3.*xPM; // the main xPlus dependence
result=xxp*log(W)*LogWmaxInv;
if(result>1.)
{ G4cout << "error in dSigxPlusGen, result=" << result << " is >1" << '\n';
exit(10);
if(result>1.) {
G4cout << "G4GammaConversionToMuons::PostStepDoIt WARNING:"
<< " in dSigxPlusGen, result=" << result << " > 1" << G4endl;
}
}
while (G4UniformRand() > result);
@@ -284,9 +286,12 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
{ t=G4UniformRand();
f1=(1.-2.*xPM+4.*xPM*t*(1.-t)) / (1.+C1/(t*t));
if(f1<0 || f1> f1_max) // should never happend
{ G4cout << "outside allowed range f1=" << f1 << G4endl;
exit(1);
}
{
G4cout << "G4GammaConversionToMuons::PostStepDoIt WARNING:"
<< "outside allowed range f1=" << f1 << " is set to zero"
<< G4endl;
f1 = 0.0;
}
}
while ( G4UniformRand()*f1_max > f1);
// generate psi by the rejection method
@@ -298,9 +303,12 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
{ psi=2.*pi*G4UniformRand();
f2=1.-2.*xPM+4.*xPM*t*(1.-t)*(1.+cos(2.*psi));
if(f2<0 || f2> f2_max) // should never happend
{ G4cout << "outside allowed range f2=" << f2 << G4endl;
exit(1);
}
{
G4cout << "G4GammaConversionToMuons::PostStepDoIt WARNING:"
<< "outside allowed range f2=" << f2 << " is set to zero"
<< G4endl;
f2 = 0.0;
}
}
while ( G4UniformRand()*f2_max > f2);
@@ -386,9 +394,10 @@ G4Element* G4GammaConversionToMuons::SelectRandomAtom(
void G4GammaConversionToMuons::PrintInfoDefinition()
{
G4String comments ="gamma->mu+mu- Bethe Heitler process.\n";
G4String comments ="gamma->mu+mu- Bethe Heitler process, SubType= ";
G4cout << G4endl << GetProcessName() << ": " << comments
<< " good cross section parametrization from "
<< GetProcessSubType() << G4endl;
G4cout << " good cross section parametrization from "
<< G4BestUnit(LowestEnergyLimit,"Energy")
<< " to " << HighestEnergyLimit/GeV << " GeV for all Z." << G4endl;
}
@@ -0,0 +1,118 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ee2KChargedModel.cc,v 1.1 2008/07/10 18:07:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4ee2KChargedModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 09.07.2008
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ee2KChargedModel.hh"
#include "Randomize.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4DynamicParticle.hh"
#include "G4PhysicsVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4eeCrossSections.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4ee2KChargedModel::G4ee2KChargedModel(G4eeCrossSections* cr):
cross(cr)
{
massK = G4KaonPlus::KaonPlus()->GetPDGMass();
massPhi = 1019.46*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ee2KChargedModel::~G4ee2KChargedModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PhysicsVector* G4ee2KChargedModel::PhysicsVector(G4double emin,
G4double emax) const
{
G4double tmin = std::max(emin, 2.0*massK);
G4double tmax = std::max(tmin, emax);
G4int nbins = (G4int)((tmax - tmin)/(1.*MeV));
G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
v->SetSpline(true);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ee2KChargedModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4double e, const G4ThreeVector& direction)
{
G4double tkin = 0.5*e - massK;
if(tkin < 0.0) tkin = 0.0;
G4double cost;
do {
cost = 2.0*G4UniformRand() - 1.0;
} while( G4UniformRand() > 1.0 - cost*cost );
G4double sint = sqrt(1.0 - cost*cost);
G4double phi = twopi * G4UniformRand();
G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
dir.rotateUz(direction);
// create G4DynamicParticle objects
G4DynamicParticle* p1 =
new G4DynamicParticle(G4KaonPlus::KaonPlus(),dir,tkin);
G4DynamicParticle* p2 =
new G4DynamicParticle(G4KaonMinus::KaonMinus(),-dir,tkin);
newp->push_back(p1);
newp->push_back(p2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,118 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4ee2KNeutralModel.cc,v 1.1 2008/07/10 18:07:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4ee2KNeutralModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 09.07.2008
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4ee2KNeutralModel.hh"
#include "Randomize.hh"
#include "G4KaonZeroLong.hh"
#include "G4KaonZeroShort.hh"
#include "G4DynamicParticle.hh"
#include "G4PhysicsVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4eeCrossSections.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4ee2KNeutralModel::G4ee2KNeutralModel(G4eeCrossSections* cr):
cross(cr)
{
massK = G4KaonZeroLong::KaonZeroLong()->GetPDGMass();
massPhi = 1019.46*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4ee2KNeutralModel::~G4ee2KNeutralModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PhysicsVector* G4ee2KNeutralModel::PhysicsVector(G4double emin,
G4double emax) const
{
G4double tmin = std::max(emin, 2.0*massK);
G4double tmax = std::max(tmin, emax);
G4int nbins = (G4int)((tmax - tmin)/(1.0*MeV));
G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
v->SetSpline(true);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4ee2KNeutralModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4double e, const G4ThreeVector& direction)
{
G4double tkin = 0.5*e - massK;
if(tkin < 0.0) tkin = 0.0;
G4double cost;
do {
cost = 2.0*G4UniformRand() - 1.0;
} while( G4UniformRand() > 1.0 - cost*cost );
G4double sint = sqrt(1.0 - cost*cost);
G4double phi = twopi * G4UniformRand();
G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
dir.rotateUz(direction);
// create G4DynamicParticle objects
G4DynamicParticle* p1 =
new G4DynamicParticle(G4KaonZeroLong::KaonZeroLong(),dir,tkin);
G4DynamicParticle* p2 =
new G4DynamicParticle(G4KaonZeroShort::KaonZeroShort(),-dir,tkin);
newp->push_back(p1);
newp->push_back(p2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeCrossSections.cc,v 1.6 2006/06/29 19:32:42 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eeCrossSections.cc,v 1.7 2008/07/10 18:06:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -38,7 +38,7 @@
// Creation date: 25.10.2003
//
// Modifications:
//
// 10.07.2008 Updated for PDG Jour. Physics, G33, 1 (2006)
//
// -------------------------------------------------------------------
//
@@ -51,6 +51,7 @@
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZeroLong.hh"
@@ -79,22 +80,22 @@ void G4eeCrossSections::Initialise()
{
MsPi = G4PionPlus::PionPlus()->GetPDGMass();
MsPi0= G4PionZero::PionZero()->GetPDGMass();
MsEta= 547.30*MeV;
MsEta= G4Eta::Eta()->GetPDGMass();
MsEtap=957.78*MeV;
MsKs = G4KaonZeroLong::KaonZeroLong()->GetPDGMass();
MsKc=G4KaonPlus::KaonPlus()->GetPDGMass();
MsRho= 770.0*MeV;
MsOm = 781.94*MeV;
MsKc = G4KaonPlus::KaonPlus()->GetPDGMass();
MsRho= 775.5*MeV;
MsOm = 782.62*MeV;
MsF0 = 980.0*MeV;
MsA0 = 983.4*MeV;
MsPhi= 1019.413*MeV;
MsA0 = 984.7*MeV;
MsPhi= 1019.46*MeV;
MsK892 = 891.66*MeV;
MsK0892 = 896.10*MeV;
GRho = 150.7*MeV;
GOm = 8.41*MeV;
GPhi = 4.43*MeV;
MsK0892 = 896.0*MeV;
GRho = 149.4*MeV;
GOm = 8.49*MeV;
GPhi = 4.26*MeV;
GK892 = 50.8*MeV;
GK0892 = 50.5*MeV;
GK0892 = 50.3*MeV;
PhRho = 0.0;
PhOm = 0.0;
PhPhi = 155.0*degree;
@@ -102,29 +103,29 @@ void G4eeCrossSections::Initialise()
BrRhoPiG = 4.5e-4;
BrRhoPi0G= 6.8e-4;
BrRhoEtaG= 2.4e-4;
BrRhoEe = 4.49e-5;
BrOm3Pi = 0.888;
BrOmPi0G= 0.085;
BrOmEtaG= 6.5e-4;
BrOm2Pi = 0.0221;
BrRhoEtaG= 2.95e-4;
BrRhoEe = 4.7e-5;
BrOm3Pi = 0.891;
BrOmPi0G= 0.089;
BrOmEtaG= 4.9e-4;
BrOm2Pi = 0.017;
PhOm2Pi = 90.0;
BrOmEe = 7.07e-5;
BrPhi2Kc = 0.491;
BrPhiKsKl= 0.341;
BrPhi3Pi = 0.155;
BrPhiPi0G= 1.31e-3;
BrPhiEtaG= 1.26e-2;
BrPhi2Pi = 8.e-5;
BrOmEe = 7.18e-5;
BrPhi2Kc = 0.492;
BrPhiKsKl= 0.34;
BrPhi3Pi = 0.153;
BrPhiPi0G= 1.25e-3;
BrPhiEtaG= 1.301e-2;
BrPhi2Pi = 7.3e-5;
PhPhi2Pi = -20.0*degree;
BrPhiEe = 2.99e-4;
BrPhiEe = 2.97e-4;
MsRho3 = MsRho*MsRho*MsRho;
MsOm3 = MsOm*MsOm*MsOm;
MsPhi3 = MsPhi*MsPhi*MsPhi;
MeVnb = 3.8938e+11*nanobarn;
Alpha = 1.0/137.036;
Alpha = fine_structure_const;
AOmRho = 3.0;
ARhoPRho = 0.72;
@@ -133,10 +134,10 @@ void G4eeCrossSections::Initialise()
gsig = 500.*MeV;
brsigpipi = 1.;
msrho1450 = 1465.*MeV;
msrho1700 = 1700.*MeV;
grho1450 = 310.*MeV;
grho1700 = 240.*MeV;
msrho1450 = 1459.*MeV;
msrho1700 = 1688.8*MeV;
grho1450 = 171.*MeV;
grho1700 = 161.*MeV;
arhoompi0 = 1.;
arho1450ompi0 = 1.;
arho1700ompi0 = 1.;
@@ -189,8 +190,7 @@ void G4eeCrossSections::Initialise()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSection2pi(G4double e)
{
{
complex<G4double> xr(cos(PhRho),sin(PhRho));
complex<G4double> xo(cos(PhOm2Pi),sin(PhOm2Pi));
complex<G4double> xf(cos(PhPhi2Pi),sin(PhPhi2Pi));
@@ -212,6 +212,97 @@ G4double G4eeCrossSections::CrossSection2pi(G4double e)
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSection3pi(G4double e)
{
complex<G4double> xf(cos(PhPhi2Pi),sin(PhPhi));
G4double s = e*e;
complex<G4double> dom = DpOm(e);
complex<G4double> dphi = DpPhi(e);
complex<G4double> amp =
sqrt(Width3p(s,MsOm,GOm,BrOm3Pi)*MsOm3*BrOmEe*GOm)/dom
+ sqrt(Width3p(s,MsPhi,GPhi,BrPhi3Pi)*MsPhi3*BrPhiEe*GPhi)*xf/dphi;
G4double cross = 12.0*pi*MeVnb*norm(amp)/(e*s);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSectionPi0G(G4double e)
{
complex<G4double> xf(cos(PhPhi),sin(PhPhi));
G4double s = e*e;
complex<G4double> drho = DpRho(e);
complex<G4double> dom = DpOm(e);
complex<G4double> dphi = DpPhi(e);
complex<G4double> amp =
sqrt(WidthPg(s,MsRho,GRho,BrRhoPi0G,MsPi0)*MsRho3*BrRhoEe*GRho)/drho
+ sqrt(WidthPg(s,MsOm,GOm,BrOmPi0G,MsPi0)*MsOm3*BrOmEe*GOm)/dom
+ sqrt(WidthPg(s,MsPhi,GPhi,BrPhiPi0G,MsPi0)*MsPhi3*BrPhiEe*GPhi)*xf/dphi;
G4double cross = 12.0*pi*MeVnb*norm(amp)/(e*s);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSectionEtaG(G4double e)
{
complex<G4double> xf(cos(PhPhi),sin(PhPhi));
G4double s = e*e;
complex<G4double> drho = DpRho(e);
complex<G4double> dom = DpOm(e);
complex<G4double> dphi = DpPhi(e);
complex<G4double> amp =
sqrt(WidthPg(s,MsRho,GRho,BrRhoEtaG,MsEta)*MsRho3*BrRhoEe*GRho)/drho
+ sqrt(WidthPg(s,MsOm,GOm,BrOmEtaG,MsEta)*MsOm3*BrOmEe*GOm)/dom
+ sqrt(WidthPg(s,MsPhi,GPhi,BrPhiEtaG,MsEta)*MsPhi3*BrPhiEe*GPhi)*xf/dphi;
G4double cross = 12.0*pi*MeVnb*norm(amp)/(e*s);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSection2Kcharged(G4double e)
{
G4double s = e*e;
complex<G4double> dphi = DpPhi(e);
complex<G4double> amp =
sqrt(Width2p(s,MsPhi,GPhi,BrPhi2Kc,MsKc)*MsPhi3*BrPhiEe*GPhi)/dphi;
G4double cross = 12.0*pi*MeVnb*norm(amp)/(e*s);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::CrossSection2Kneutral(G4double e)
{
G4double s = e*e;
complex<G4double> dphi = DpPhi(e);
complex<G4double> amp =
sqrt(Width2p(s,MsPhi,GPhi,BrPhiKsKl,MsKs)*MsPhi3*BrPhiEe*GPhi)/dphi;
G4double cross = 12.0*pi*MeVnb*norm(amp)/(e*s);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeCrossSections::Width2p(G4double s, G4double mres,
G4double g, G4double br, G4double m)
{
@@ -237,7 +328,10 @@ G4double G4eeCrossSections::Width3p(G4double s, G4double mres,
G4double G4eeCrossSections::PhaseSpace3p(G4double e)
{
// E.A.Kuraev, Z.K.Silagadze.
// Once more about the omega->3 pi contact term.
// Yadernaya Phisica, 1995, V58, N9, p.1678-1694.
// G4bool b;
// G4double x = ph3p->GetValue(e, b);
G4double x = 1.0;
@@ -0,0 +1,170 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeTo3PiModel.cc,v 1.1 2008/07/10 18:07:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4eeTo3PiModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 25.10.2003
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eeTo3PiModel.hh"
#include "Randomize.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4DynamicParticle.hh"
#include "G4PhysicsVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4eeCrossSections.hh"
#include "G4RandomDirection.hh"
#include <complex>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4eeTo3PiModel::G4eeTo3PiModel(G4eeCrossSections* cr):
cross(cr)
{
massPi = G4PionPlus::PionPlus()->GetPDGMass();
massPi0 = G4PionZero::PionZero()->GetPDGMass();
massOm = 782.62*MeV;
massPhi = 1019.46*MeV;
gcash = 0.0;
gmax = 1.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eeTo3PiModel::~G4eeTo3PiModel()
{
G4cout << "### G4eeTo3PiModel::~G4eeTo3PiModel: gmax= "
<< gmax << " gcash= " << gcash << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PhysicsVector* G4eeTo3PiModel::PhysicsVector(G4double emin,
G4double emax) const
{
G4double tmin = std::max(emin, ThresholdEnergy());
G4double tmax = std::max(tmin, emax);
G4int nbins = (G4int)((tmax - tmin)/(1.*MeV));
G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
v->SetSpline(true);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeTo3PiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4double e, const G4ThreeVector& direction)
{
if(e < ThresholdEnergy()) return;
G4double x0 = massPi0/e;
G4double x1 = massPi/e;
G4LorentzVector w0, w1, w2;
G4ThreeVector dir0, dir1, mom, mom1, mom2;
G4double e0, p0, e2, p, g, m01, m02, m12;
// max pi0 energy
G4double edel = 0.5*e*(1.0 + x0*x0 - 4.0*x1*x1) - massPi0;
do {
// pi0 sample
e0 = edel*G4UniformRand() + massPi0;
p0 = sqrt(e0 - massPi0*massPi0);
dir0 = G4RandomDirection();
w0 = G4LorentzVector(p0*dir0.x(),p0*dir0.y(),p0*dir0.z(),e0);
// pi+pi- pair
w1 = G4LorentzVector(-p0*dir0.x(),-p0*dir0.y(),-p0*dir0.z(),e-e0);
G4ThreeVector bst = w1.boostVector();
e2 = 0.25*w1.m2();
// pi+
p = sqrt(e2 - massPi*massPi);
dir1 = G4RandomDirection();
w2 = G4LorentzVector(p*dir1.x(),p*dir1.y(),p*dir1.z(),sqrt(e2));
w2.boost(bst);
mom2 = w2.vect();
// pi-
w1 -= w2;
mom1 = w2.vect();
m01 = w0*w1;
m02 = w0*w2;
m12 = w1*w2;
mom = mom1*mom2;
g = mom.mag2()*norm( 1.0/cross->DpRho(m01) + 1.0/cross->DpRho(m02)
+ 1.0/cross->DpRho(m12) );
if(g > gmax) {
G4cout << "G4eeTo3PiModel::SampleSecondaries WARNING matrix element g= "
<< g << " > " << gmax << " (majoranta)" << G4endl;
}
if(g > gcash) gcash = g;
} while( gmax*G4UniformRand() > g );
w0.rotateUz(direction);
w1.rotateUz(direction);
w2.rotateUz(direction);
// create G4DynamicParticle objects
G4DynamicParticle* dp0 =
new G4DynamicParticle(G4PionZero::PionZero(), w0);
G4DynamicParticle* dp1 =
new G4DynamicParticle(G4PionPlus::PionPlus(), w1);
G4DynamicParticle* dp2 =
new G4DynamicParticle(G4PionMinus::PionMinus(), w2);
newp->push_back(dp0);
newp->push_back(dp1);
newp->push_back(dp2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadrons.cc,v 1.7 2006/06/29 19:32:44 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eeToHadrons.cc,v 1.8 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -63,7 +63,8 @@ G4eeToHadrons::G4eeToHadrons(const G4String& name)
csFactor(1.0),
isInitialised(false)
{
SetVerboseLevel(1);
SetVerboseLevel(1);
SetProcessSubType(fAnnihilationToHadrons);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadronsModel.cc,v 1.8 2007/05/22 17:37:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eeToHadronsModel.cc,v 1.9 2008/07/10 18:06:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -64,18 +64,17 @@
using namespace std;
G4eeToHadronsModel::G4eeToHadronsModel(const G4Vee2hadrons* m,
G4int ver,
G4eeToHadronsModel::G4eeToHadronsModel(G4Vee2hadrons* m, G4int ver,
const G4String& nam)
: G4VEmModel(nam),
model(m),
crossPerElectron(0),
crossBornPerElectron(0),
isInitialised(false),
nbins(100),
verbose(ver)
model(m),
crossPerElectron(0),
crossBornPerElectron(0),
isInitialised(false),
nbins(100),
verbose(ver)
{
theGamma = G4Gamma::Gamma();
theGamma = G4Gamma::Gamma();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -95,16 +94,39 @@ void G4eeToHadronsModel::Initialise(const G4ParticleDefinition*,
if(isInitialised) return;
isInitialised = true;
// Lab system
highKinEnergy = HighEnergyLimit();
lowKinEnergy = LowEnergyLimit();
emin = model->ThresholdEnergy();
emax = 2.0*electron_mass_c2*sqrt(1.0 + 0.5*highKinEnergy/electron_mass_c2);
if(emin > emax) emin = emax;
// CM system
emin = model->LowEnergy();
emax = model->HighEnergy();
lowKinEnergy = 0.5*emin*emin/electron_mass_c2 - 2.0*electron_mass_c2;
G4double emin0 =
2.0*electron_mass_c2*sqrt(1.0 + 0.5*lowKinEnergy/electron_mass_c2);
G4double emax0 =
2.0*electron_mass_c2*sqrt(1.0 + 0.5*highKinEnergy/electron_mass_c2);
epeak = min(model->PeakEnergy(), emax);
// recompute low energy
if(emin0 > emax) {
emin0 = emax;
model->SetLowEnergy(emin0);
}
if(emin > emin0) {
emin0 = emin;
lowKinEnergy = 0.5*emin*emin/electron_mass_c2 - 2.0*electron_mass_c2;
SetLowEnergyLimit(lowKinEnergy);
}
// recompute high energy
if(emax < emax0) {
emax0 = emax;
highKinEnergy = 0.5*emax*emax/electron_mass_c2 - 2.0*electron_mass_c2;
SetHighEnergyLimit(highKinEnergy);
}
// peak energy
epeak = std::min(model->PeakEnergy(), emax);
peakKinEnergy = 0.5*epeak*epeak/electron_mass_c2 - 2.0*electron_mass_c2;
if(verbose>0) {
@@ -151,6 +173,29 @@ void G4eeToHadronsModel::Initialise(const G4ParticleDefinition*,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeToHadronsModel::CrossSectionPerVolume(
const G4Material* mat,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double, G4double)
{
return mat->GetElectronDensity()*
ComputeCrossSectionPerElectron(p, kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeToHadronsModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double Z, G4double,
G4double, G4double)
{
return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeToHadronsModel::ComputeCrossSectionPerElectron(
const G4ParticleDefinition*,
G4double kineticEnergy,
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToHadronsMultiModel.cc,v 1.4 2007/05/23 08:50:41 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eeToHadronsMultiModel.cc,v 1.6 2008/07/11 17:49:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -33,7 +33,7 @@
//
// File name: G4eeToHadronsMultiModel
//
// Author: Vladimir Ivanchenko on base of Michel Maire code
// Author: Vladimir Ivanchenko
//
// Creation date: 02.08.2004
//
@@ -50,7 +50,12 @@
#include "G4eeToHadronsMultiModel.hh"
#include "G4eeToTwoPiModel.hh"
#include "G4eeTo3PiModel.hh"
#include "G4eeToPGammaModel.hh"
#include "G4ee2KNeutralModel.hh"
#include "G4ee2KChargedModel.hh"
#include "G4eeCrossSections.hh"
#include "G4Vee2hadrons.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -79,33 +84,116 @@ G4eeToHadronsMultiModel::~G4eeToHadronsMultiModel()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToHadronsMultiModel::Initialise(const G4ParticleDefinition* p, const G4DataVector& v)
void G4eeToHadronsMultiModel::Initialise(const G4ParticleDefinition*,
const G4DataVector&)
{
if(!isInitialised) {
isInitialised = true;
thKineticEnergy = DBL_MAX;
maxKineticEnergy = HighEnergyLimit();
thKineticEnergy = DBL_MAX;
maxKineticEnergy = 1.2*GeV;
cross = new G4eeCrossSections();
G4eeToHadronsModel* model =
new G4eeToHadronsModel(new G4eeToTwoPiModel(cross), verbose);
models.push_back(model);
model->SetHighEnergyLimit(maxKineticEnergy);
model->Initialise(p, v);
G4double emin = model->LowEnergyLimit();
if(emin < thKineticEnergy) thKineticEnergy = emin;
ekinMin.push_back(emin);
ekinMax.push_back(model->HighEnergyLimit());
ekinPeak.push_back(model->PeakEnergy());
cumSum.push_back(0.0);
nModels = 1;
if(pParticleChange)
G4eeToTwoPiModel* m2pi = new G4eeToTwoPiModel(cross);
m2pi->SetHighEnergy(maxKineticEnergy);
AddEEModel(m2pi);
G4eeTo3PiModel* m3pi1 = new G4eeTo3PiModel(cross);
m3pi1->SetHighEnergy(0.95*GeV);
AddEEModel(m3pi1);
G4eeTo3PiModel* m3pi2 = new G4eeTo3PiModel(cross);
m3pi2->SetLowEnergy(0.95*GeV);
m3pi2->SetHighEnergy(maxKineticEnergy);
AddEEModel(m3pi2);
G4ee2KChargedModel* m2kc = new G4ee2KChargedModel(cross);
m2kc->SetHighEnergy(maxKineticEnergy);
AddEEModel(m2kc);
G4ee2KNeutralModel* m2kn = new G4ee2KNeutralModel(cross);
m2kn->SetHighEnergy(maxKineticEnergy);
AddEEModel(m2kn);
G4eeToPGammaModel* mpg1 = new G4eeToPGammaModel(cross,"pi0");
mpg1->SetLowEnergy(0.7*GeV);
mpg1->SetHighEnergy(maxKineticEnergy);
AddEEModel(mpg1);
G4eeToPGammaModel* mpg2 = new G4eeToPGammaModel(cross,"eta");
mpg2->SetLowEnergy(0.7*GeV);
mpg2->SetHighEnergy(maxKineticEnergy);
AddEEModel(mpg2);
nModels = models.size();
if(pParticleChange) {
fParticleChange =
reinterpret_cast<G4ParticleChangeForGamma*>(pParticleChange);
else
} else {
fParticleChange = new G4ParticleChangeForGamma();
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToHadronsMultiModel::AddEEModel(G4Vee2hadrons* mod)
{
G4eeToHadronsModel* model = new G4eeToHadronsModel(mod, verbose);
model->SetLowEnergyLimit(LowEnergyLimit());
model->SetHighEnergyLimit(HighEnergyLimit());
models.push_back(model);
G4double elow = mod->ThresholdEnergy();
ekinMin.push_back(elow);
if(thKineticEnergy > elow) thKineticEnergy = elow;
ekinMax.push_back(mod->HighEnergy());
ekinPeak.push_back(mod->PeakEnergy());
cumSum.push_back(0.0);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeToHadronsMultiModel::CrossSectionPerVolume(
const G4Material* mat,
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double, G4double)
{
return mat->GetElectronDensity()*
ComputeCrossSectionPerElectron(p, kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4eeToHadronsMultiModel::ComputeCrossSectionPerAtom(
const G4ParticleDefinition* p,
G4double kineticEnergy,
G4double Z, G4double,
G4double, G4double)
{
return Z*ComputeCrossSectionPerElectron(p, kineticEnergy);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToHadronsMultiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
const G4MaterialCutsCouple* couple,
const G4DynamicParticle* dp,
G4double, G4double)
{
G4double kinEnergy = dp->GetKineticEnergy();
if (kinEnergy > thKineticEnergy) {
G4double q = cumSum[nModels-1]*G4UniformRand();
for(G4int i=0; i<nModels; i++) {
if(q <= cumSum[i]) {
(models[i])->SampleSecondaries(newp, couple,dp);
if(newp->size() > 0) fParticleChange->ProposeTrackStatus(fStopAndKill);
break;
}
}
}
}
@@ -114,8 +202,12 @@ void G4eeToHadronsMultiModel::Initialise(const G4ParticleDefinition* p, const G4
void G4eeToHadronsMultiModel::PrintInfo()
{
if(verbose > 0) {
G4cout << " e+ annihilation into hadrons active above "
<< thKineticEnergy/GeV << " GeV"
G4double e1 = 0.5*thKineticEnergy*thKineticEnergy/electron_mass_c2
- 2.0*electron_mass_c2;
G4double e2 = 0.5*maxKineticEnergy*maxKineticEnergy/electron_mass_c2
- 2.0*electron_mass_c2;
G4cout << " e+ annihilation into hadrons active from "
<< e1/GeV << " GeV to " << e2/GeV << " GeV"
<< G4endl;
}
}
@@ -127,8 +219,8 @@ void G4eeToHadronsMultiModel::SetCrossSecFactor(G4double fac)
if(fac > 1.0) {
csFactor = fac;
if(verbose > 0)
G4cout << "### G4eeToHadronsMultiModel: The cross section for G4eeToHadronsMultiModel is "
<< "increased by the Factor= " << csFactor << G4endl;
G4cout << "### G4eeToHadronsMultiModel: The cross section for G4eeToHadronsMultiModel "
<< " is increased by the Factor= " << csFactor << G4endl;
}
}
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToPGammaModel.cc,v 1.1 2008/07/10 18:07:27 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4eeToPGammaModel
//
// Author: Vladimir Ivanchenko
//
// Creation date: 25.10.2003
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4eeToPGammaModel.hh"
#include "Randomize.hh"
#include "G4PionZero.hh"
#include "G4Eta.hh"
#include "G4Gamma.hh"
#include "G4DynamicParticle.hh"
#include "G4PhysicsVector.hh"
#include "G4PhysicsLinearVector.hh"
#include "G4eeCrossSections.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4eeToPGammaModel::G4eeToPGammaModel(G4eeCrossSections* cr, const G4String& npart):
cross(cr)
{
pi0 = G4PionZero::PionZero();
if(npart == "pi0") {
massR = 782.62*MeV;
particle = pi0;
} else {
massR = 1019.46*MeV;
particle = G4Eta::Eta();
}
massP = particle->GetPDGMass();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4eeToPGammaModel::~G4eeToPGammaModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PhysicsVector* G4eeToPGammaModel::PhysicsVector(G4double emin,
G4double emax) const
{
G4double tmin = std::max(emin, ThresholdEnergy());
G4double tmax = std::max(tmin, emax);
G4int nbins = (G4int)((tmax - tmin)/(5.*MeV));
G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
v->SetSpline(true);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToPGammaModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4double e, const G4ThreeVector& direction)
{
G4double egam = 0.5*e*(1.0 - massP*massP/(massR*massR));
G4double tkin = e - egam - massP;
if(tkin < 0.0) tkin = 0.0;
G4double cost;
do {
cost = 2.0*G4UniformRand() - 1.0;
} while( 2.0*G4UniformRand() > 1.0 + cost*cost );
G4double sint = sqrt(1.0 - cost*cost);
G4double phi = twopi * G4UniformRand();
G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
dir.rotateUz(direction);
// create G4DynamicParticle objects
G4DynamicParticle* p1 =
new G4DynamicParticle(particle,dir,tkin);
G4DynamicParticle* p2 =
new G4DynamicParticle(G4Gamma::Gamma(),-dir,egam);
newp->push_back(p1);
newp->push_back(p2);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4eeToTwoPiModel.cc,v 1.5 2007/05/22 17:37:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4eeToTwoPiModel.cc,v 1.6 2008/07/10 18:06:39 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -63,7 +63,8 @@ using namespace std;
G4eeToTwoPiModel::G4eeToTwoPiModel(G4eeCrossSections* cr):
cross(cr)
{
Initialise();
massPi = G4PionPlus::PionPlus()->GetPDGMass();
massRho = 775.5*MeV;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -73,30 +74,21 @@ G4eeToTwoPiModel::~G4eeToTwoPiModel()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToTwoPiModel::Initialise()
{
massPi = G4PionPlus::PionPlus()->GetPDGMass();
massRho = 770.*MeV;
highEnergy = 1.*GeV;
cross = new G4eeCrossSections();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4PhysicsVector* G4eeToTwoPiModel::PhysicsVector(G4double emin,
G4double emax) const
{
G4double tmin = max(emin, 2.0*massPi);
G4double tmax = max(tmin, emax);
G4double tmin = std::max(emin, 2.0*massPi);
G4double tmax = std::max(tmin, emax);
G4int nbins = (G4int)((tmax - tmin)/(5.*MeV));
G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
v->SetSpline(true);
return v;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4eeToTwoPiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4double e, const G4ThreeVector& direction) const
G4double e, const G4ThreeVector& direction)
{
G4double tkin = 0.5*e - massPi;
@@ -112,7 +104,7 @@ void G4eeToTwoPiModel::SampleSecondaries(std::vector<G4DynamicParticle*>* newp,
G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
dir.rotateUz(direction);
// create G4DynamicParticle object for delta ray
// create G4DynamicParticle objects
G4DynamicParticle* pip =
new G4DynamicParticle(G4PionPlus::PionPlus(),dir,tkin);
G4DynamicParticle* pin =
@@ -0,0 +1,102 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hBremsstrahlung.cc,v 1.3 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4hBremsstrahlung
//
// Author: Vladimir Ivanchenko on base of model for muons
//
// Creation date: 01.03.2008
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hBremsstrahlung.hh"
#include "G4Gamma.hh"
#include "G4hBremsstrahlungModel.hh"
#include "G4UniversalFluctuation.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4hBremsstrahlung::G4hBremsstrahlung(const G4String& name)
: G4VEnergyLossProcess(name),
theParticle(0),
theBaseParticle(0),
lowestKinEnergy(1.*GeV),
isInitialised(false)
{
SetProcessSubType(fBremsstrahlung);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hBremsstrahlung::~G4hBremsstrahlung()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hBremsstrahlung::InitialiseEnergyLossProcess(
const G4ParticleDefinition* part,
const G4ParticleDefinition*)
{
if(!isInitialised) {
isInitialised = true;
theParticle = part;
SetSecondaryParticle(G4Gamma::Gamma());
SetIonisation(false);
G4hBremsstrahlungModel* em = new G4hBremsstrahlungModel();
em->SetLowestKineticEnergy(lowestKinEnergy);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
em->SetLowEnergyLimit(0.1*keV);
em->SetHighEnergyLimit(100.0*TeV);
AddEmModel(1, em, fm);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hBremsstrahlung::PrintInfo()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,107 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hBremsstrahlungModel.cc,v 1.3 2008/07/22 16:15:16 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4hBremsstrahlungModel
//
// Author: Vladimir Ivanchenko on base of G4MuBremsstrahlungModel
//
// Creation date: 28.02.2008
//
// Modifications:
//
//
// Class Description:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4hBremsstrahlungModel.hh"
using namespace std;
G4hBremsstrahlungModel::G4hBremsstrahlungModel(const G4ParticleDefinition* p,
const G4String& nam)
: G4MuBremsstrahlungModel(p, nam)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4hBremsstrahlungModel::~G4hBremsstrahlungModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4hBremsstrahlungModel::ComputeDMicroscopicCrossSection(
G4double tkin,
G4double Z,
G4double gammaEnergy)
// differential cross section
{
G4double dxsection = 0.;
if( gammaEnergy > tkin) return dxsection ;
// G4cout << "G4hBremsstrahlungModel m= " << mass
// << " " << particle->GetParticleName() << G4endl;
G4double E = tkin + mass ;
G4double v = gammaEnergy/E ;
G4double delta = 0.5*mass*mass*v/(E-gammaEnergy) ;
G4double rab0=delta*sqrte ;
G4int iz = G4int(Z);
if(iz < 1) iz = 1;
G4double z13 = 1.0/nist->GetZ13(iz);
G4double dn = mass*nist->GetA27(iz)/(70.*MeV);
G4double b = btf;
if(1 == iz) b = bh;
// nucleus contribution logarithm
G4double rab1=b*z13;
G4double fn=log(rab1/(dn*(electron_mass_c2+rab0*rab1))*
(mass+delta*(dn*sqrte-2.))) ;
if(fn <0.) fn = 0. ;
G4double x = 1.0 - v;
if(particle->GetPDGSpin() != 0) x += 0.75*v*v;
dxsection = coeff*x*Z*Z*fn/gammaEnergy;
return dxsection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hPairProduction.cc,v 1.3 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4hPairProduction
//
// Author: Vladimir Ivanchenko on base of model for muons
//
// Creation date: 01.03.2008
//
// Modifications:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#include "G4hPairProduction.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4hPairProductionModel.hh"
#include "G4UniversalFluctuation.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
using namespace std;
G4hPairProduction::G4hPairProduction(const G4String& name)
: G4VEnergyLossProcess(name),
theParticle(0),
theBaseParticle(0),
lowestKinEnergy(1.*GeV),
isInitialised(false)
{
SetProcessSubType(fPairProdByCharged);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4hPairProduction::~G4hPairProduction()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hPairProduction::InitialiseEnergyLossProcess(
const G4ParticleDefinition* part,
const G4ParticleDefinition*)
{
if (!isInitialised) {
isInitialised = true;
theParticle = part;
SetSecondaryParticle(G4Positron::Positron());
SetIonisation(false);
G4hPairProductionModel* em = new G4hPairProductionModel();
em->SetLowestKineticEnergy(lowestKinEnergy);
G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
em->SetLowEnergyLimit(0.1*keV);
em->SetHighEnergyLimit(100.0*TeV);
AddEmModel(1, em, fm);
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void G4hPairProduction::PrintInfo()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,175 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hPairProductionModel.cc,v 1.1 2008/03/06 11:47:11 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class file
//
//
// File name: G4hPairProductionModel
//
// Author: Vladimir Ivanchenko on base of G4MuPairProductionModel
//
// Creation date: 28.02.2008
//
// Modifications:
//
//
// Class Description:
//
//
// -------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4hPairProductionModel.hh"
using namespace std;
G4hPairProductionModel::G4hPairProductionModel(const G4ParticleDefinition* p,
const G4String& nam)
: G4MuPairProductionModel(p, nam)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4hPairProductionModel::~G4hPairProductionModel()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4double G4hPairProductionModel::ComputeDMicroscopicCrossSection(
G4double tkin,
G4double Z,
G4double pairEnergy)
// differential cross section
{
G4double bbbtf= 183. ;
G4double bbbh = 202.4 ;
G4double g1tf = 1.95e-5 ;
G4double g2tf = 5.3e-5 ;
G4double g1h = 4.4e-5 ;
G4double g2h = 4.8e-5 ;
G4double totalEnergy = tkin + particleMass;
G4double residEnergy = totalEnergy - pairEnergy;
G4double massratio = particleMass/electron_mass_c2 ;
G4double massratio2 = massratio*massratio ;
G4double cross = 0.;
SetCurrentElement(Z);
G4double c3 = 0.75*sqrte*particleMass;
if (residEnergy <= c3*z13) return cross;
G4double c7 = 4.*electron_mass_c2;
G4double c8 = 6.*particleMass*particleMass;
G4double alf = c7/pairEnergy;
G4double a3 = 1. - alf;
if (a3 <= 0.) return cross;
// zeta calculation
G4double bbb,g1,g2;
if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
G4double zeta = 0;
G4double zeta1 = 0.073*log(totalEnergy/(particleMass+g1*z23*totalEnergy))-0.26;
if ( zeta1 > 0.)
{
G4double zeta2 = 0.058*log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
zeta = zeta1/zeta2 ;
}
G4double z2 = Z*(Z+zeta);
G4double screen0 = 2.*electron_mass_c2*sqrte*bbb/(z13*pairEnergy);
G4double a0 = totalEnergy*residEnergy;
G4double a1 = pairEnergy*pairEnergy/a0;
G4double bet = 0.5*a1;
G4double xi0 = 0.25*massratio2*a1;
G4double del = c8/a0;
G4double rta3 = sqrt(a3);
G4double tmnexp = alf/(1. + rta3) + del*rta3;
if(tmnexp >= 1.0) return cross;
G4double tmn = log(tmnexp);
G4double sum = 0.;
// Gaussian integration in ln(1-ro) ( with 8 points)
for (G4int i=0; i<8; i++)
{
G4double a4 = exp(tmn*xgi[i]); // a4 = (1.-asymmetry)
G4double a5 = a4*(2.-a4) ;
G4double a6 = 1.-a5 ;
G4double a7 = 1.+a6 ;
G4double a9 = 3.+a6 ;
G4double xi = xi0*a5 ;
G4double xii = 1./xi ;
G4double xi1 = 1.+xi ;
G4double screen = screen0*xi1/a5 ;
G4double yeu = 5.-a6+4.*bet*a7 ;
G4double yed = 2.*(1.+3.*bet)*log(3.+xii)-a6-a1*(2.-a6) ;
G4double ye1 = 1.+yeu/yed ;
G4double ale=log(bbb/z13*sqrt(xi1*ye1)/(1.+screen*ye1)) ;
G4double cre = 0.5*log(1.+2.25*z23*xi1*ye1/massratio2) ;
G4double be;
if (xi <= 1.e3) be = ((2.+a6)*(1.+bet)+xi*a9)*log(1.+xii)+(a5-bet)/xi1-a9;
else be = (3.-a6+a1*a7)/(2.*xi);
G4double fe = (ale-cre)*be;
if ( fe < 0.) fe = 0. ;
G4double ymu = 4.+a6 +3.*bet*a7 ;
G4double ymd = a7*(1.5+a1)*log(3.+xi)+1.-1.5*a6 ;
G4double ym1 = 1.+ymu/ymd ;
G4double alm_crm = log(bbb*massratio/(1.5*z23*(1.+screen*ym1)));
G4double a10,bm;
if ( xi >= 1.e-3)
{
a10 = (1.+a1)*a5 ;
bm = (a7*(1.+1.5*bet)-a10*xii)*log(xi1)+xi*(a5-bet)/xi1+a10;
} else {
bm = (5.-a6+bet*a9)*(xi/2.);
}
G4double fm = alm_crm*bm;
if ( fm < 0.) fm = 0. ;
sum += wgi[i]*a4*(fe+fm/massratio2);
}
cross = -tmn*sum*factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
return cross;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4hhIonisation.cc,v 1.6 2007/05/22 17:37:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4hhIonisation.cc,v 1.8 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -63,13 +63,9 @@ G4hhIonisation::G4hhIonisation(const G4String& name)
theBaseParticle(0),
isInitialised(false)
{
minKinEnergy = 0.1*keV;
maxKinEnergy = 100.*TeV;
SetDEDXBinning(120);
SetMinKinEnergy(minKinEnergy);
SetMaxKinEnergy(maxKinEnergy);
SetStepFunction(0.1, 0.1*mm);
SetVerboseLevel(1);
SetProcessSubType(fIonisation);
mass = 0.0;
ratio = 0.0;
}
@@ -100,6 +96,8 @@ void G4hhIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
G4int nm = 1;
minKinEnergy = MinKinEnergy();
if(eth > minKinEnergy) {
G4VEmModel* em = new G4BraggNoDeltaModel();
em->SetLowEnergyLimit(minKinEnergy);
@@ -108,16 +106,16 @@ void G4hhIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
nm++;
}
if(eth < maxKinEnergy) {
if(eth < MaxKinEnergy()) {
G4VEmModel* em1 = new G4BetheBlochNoDeltaModel();
em1->SetLowEnergyLimit(std::max(eth,minKinEnergy));
em1->SetHighEnergyLimit(maxKinEnergy);
em1->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(nm, em1, flucModel);
}
if(verboseLevel>0)
if(verboseLevel>1) {
G4cout << "G4hhIonisation is initialised: Nmodels= " << nm << G4endl;
}
isInitialised = true;
}
@@ -126,11 +124,7 @@ void G4hhIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
void G4hhIonisation::PrintInfo()
{
G4cout << " Delta-ray will not be produced; "
<< "Bether-Bloch model for E > " << std::max(eth,minKinEnergy)
<< G4endl;
if(eth > minKinEnergy) G4cout
<< " ICRU49 parametrisation scaled from protons below.";
G4cout << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4mplIonisation.cc,v 1.5 2007/05/31 11:13:31 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4mplIonisation.cc,v 1.7 2008/10/16 14:29:48 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//
@@ -63,6 +63,8 @@ G4mplIonisation::G4mplIonisation(G4double mCharge, const G4String& name)
if(magneticCharge == 0.0) magneticCharge = eplus*0.5/fine_structure_const;
SetVerboseLevel(0);
SetProcessSubType(fIonisation);
SetStepFunction(0.2, 1*mm);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -81,12 +83,10 @@ void G4mplIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition*,
SetSecondaryParticle(G4Electron::Electron());
G4mplIonisationModel* ion = new G4mplIonisationModel(magneticCharge,"PAI");
ion->SetLowEnergyLimit(0.1*keV);
ion->SetHighEnergyLimit(100.*TeV);
ion->SetLowEnergyLimit(MinKinEnergy());
ion->SetHighEnergyLimit(MaxKinEnergy());
AddEmModel(0,ion,ion);
SetStepFunction(0.2, 1*mm);
isInitialised = true;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4mplIonisationModel.cc,v 1.5 2007/11/13 18:36:29 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -------------------------------------------------------------------
//