Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -24,16 +24,17 @@
// ********************************************************************
//
//
// $Id: G4FTFParameters.cc,v 1.16 2010/12/07 10:42:40 vuzhinsk Exp $
// $Id$
// GEANT4 tag $Name: $
//
#include <utility>
#include "G4FTFParameters.hh"
#include "G4ios.hh"
#include <utility>
#include "G4VComponentCrossSection.hh" // 31 May 2011
#include "G4ComponentCHIPShadronNuclearXS.hh" // 31 May 2011
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4ParticleDefinition.hh" // 31 May 2011
@@ -45,18 +46,39 @@
#include "G4KaonPlus.hh" // 31 May 2011
#include "G4KaonMinus.hh" // 31 May 2011
G4FTFParameters::G4FTFParameters()
{FTFxsManager=0;}
G4FTFParameters::G4FTFParameters() :
//A.R. 14-Aug-2012 : Coverity fix.
FTFhNcmsEnergy(0.0),
FTFxsManager(0),
FTFXtotal(0.0), FTFXelastic(0.0), FTFXinelastic(0.0), FTFXannihilation(0.0),
ProbabilityOfAnnihilation(0.0), ProbabilityOfElasticScatt(0.0),
RadiusOfHNinteractions2(0.0), FTFSlope(0.0),
AvaragePt2ofElasticScattering(0.0), FTFGamma0(0.0),
MagQuarkExchange(0.0), SlopeQuarkExchange(0.0), DeltaProbAtQuarkExchange(0.0),
ProbOfSameQuarkExchange(0.0), ProjMinDiffMass(0.0), ProjMinNonDiffMass(0.0),
ProbabilityOfProjDiff(0.0), TarMinDiffMass(0.0), TarMinNonDiffMass(0.0),
ProbabilityOfTarDiff(0.0), AveragePt2(0.0), ProbLogDistr(0.0),
Pt2kink(0.0),
MaxNumberOfCollisions(0.0), ProbOfInelInteraction(0.0), CofNuclearDestruction(0.0),
R2ofNuclearDestruction(0.0), ExcitationEnergyPerWoundedNucleon(0.0),
DofNuclearDestruction(0.0), Pt2ofNuclearDestruction(0.0), MaxPt2ofNuclearDestruction(0.0)
{}
G4FTFParameters::~G4FTFParameters()
{delete FTFxsManager;}
{}
//**********************************************************************************************
G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
G4int theA,
G4int theZ,
G4double PlabPerParticle)
{
//A.R. 25-Jul-2012 Coverity fix.
FTFXannihilation = 0.0;
FTFhNcmsEnergy = 0.0;
ProbOfSameQuarkExchange = 0.0;
G4int ProjectilePDGcode = particle->GetPDGEncoding();
G4int ProjectileabsPDGcode = std::abs(ProjectilePDGcode);
G4double ProjectileMass = particle->GetPDGMass();
@@ -88,7 +110,7 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
G4double Elab = std::sqrt(Plab*Plab+ProjectileMass2);
G4double KineticEnergy = Elab-ProjectileMass; // 31 May 2011
G4double s=ProjectileMass2 + TargetMass2 + 2.*TargetMass*Elab;
G4double S=ProjectileMass2 + TargetMass2 + 2.*TargetMass*Elab;
//G4cout<<"Proj Plab "<<ProjectilePDGcode<<" "<<Plab<<G4endl;
//G4cout<<"Mass KinE "<<ProjectileMass<<" "<<KineticEnergy<<G4endl;
@@ -99,15 +121,15 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
Ylab=0.5*std::log((Elab+Plab)/(Elab-Plab));
G4double ECMSsqr=s/GeV/GeV;
G4double SqrtS =std::sqrt(s)/GeV;
G4double ECMSsqr=S/GeV/GeV;
G4double SqrtS =std::sqrt(S)/GeV;
//G4cout<<"Sqrt(s) "<<SqrtS<<G4endl;
TargetMass /=GeV; TargetMass2 /=(GeV*GeV);
ProjectileMass /=GeV; ProjectileMass2 /=(GeV*GeV);
// ------------------- Cross section calculation from CHIPS -------------
FTFxsManager = new G4ComponentCHIPShadronNuclearXS(); // 31 May 2011
static G4ChipsComponentXS* _instance = new G4ChipsComponentXS(); // Witek Pokorski
FTFxsManager = _instance;
Plab/=GeV;
// G4double LogPlab = std::log( Plab );
@@ -497,6 +519,7 @@ if(Xtotal-Xelastic != 0.)
//G4cout<<"AvaragePt2ofElasticScattering "<<GetAvaragePt2ofElasticScattering()<<G4endl;
//----------- Parameters of excitations ---------------------------------------------
G4double Xinel=Xtotal-Xelastic; // Uzhi 25.04.2012
//G4cout<<"Param ProjectilePDGcode "<<ProjectilePDGcode<<G4endl;
if( ProjectilePDGcode > 1000 ) //------Projectile is baryon --------
{
@@ -506,16 +529,19 @@ if(Xtotal-Xelastic != 0.)
if(NumberOfTargetNucleons > 26) {SetProbOfSameQuarkExchange(1.);}
else {SetProbOfSameQuarkExchange(0.);}
SetProjMinDiffMass(1.16); // GeV
SetProjMinNonDiffMass(1.16); // GeV
//G4cout<<"Param Get Min Dif "<<GetProjMinNonDiffMass()<<G4endl;
SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5 0.805
SetProjMinDiffMass(1.16); // GeV
SetProjMinNonDiffMass(1.16); // GeV
// SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab)); // Uzhi 21.05.2012
SetProbabilityOfProjDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
SetTarMinDiffMass(1.16); // GeV
SetTarMinNonDiffMass(1.16); // GeV
SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab));// 0.5
SetTarMinDiffMass(1.16); // GeV
SetTarMinNonDiffMass(1.16); // GeV
// SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab)); // Uzhi 21.05.2012
SetProbabilityOfTarDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
// SetAveragePt2(0.15); // 0.15 GeV^2
SetAveragePt2(0.3); // 0.30 GeV^2 Uzhi 21.05.2012
SetAveragePt2(0.15); // 0.15 GeV^2
SetProbLogDistr(0.5); // Uzhi 21.05.2012
}
else if( ProjectilePDGcode < -1000 ) //------Projectile is anti_baryon --------
{
@@ -524,36 +550,41 @@ if(Xtotal-Xelastic != 0.)
SetDeltaProbAtQuarkExchange(0.);
SetProbOfSameQuarkExchange(0.);
SetProjMinDiffMass(ProjectileMass+0.22); // GeV
SetProjMinNonDiffMass(ProjectileMass+0.22); // GeV
SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab));// 0.5
//SetProbabilityOfProjDiff(0.5);
//G4cout<<"PrDif "<<GetProbabilityOfProjDiff()<<" "<<1.-2.*GetProbabilityOfProjDiff()<<G4endl;
//G4int Uzhi; G4cin>>Uzhi;
SetProjMinDiffMass(ProjectileMass+0.22); // GeV
SetProjMinNonDiffMass(ProjectileMass+0.22); // GeV
// SetProbabilityOfProjDiff(0.805*std::exp(-0.35*Ylab)); // Uzhi 21.05.2012
SetProbabilityOfProjDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
SetTarMinDiffMass(TargetMass+0.22); // GeV
SetTarMinNonDiffMass(TargetMass+0.22); // GeV
SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab)); // 0.5
//SetProbabilityOfTarDiff(0.5);
SetAveragePt2(0.15); // 0.15 GeV^2
// SetProbabilityOfTarDiff(0.805*std::exp(-0.35*Ylab)); // Uzhi 21.05.2012
SetProbabilityOfTarDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
SetAveragePt2(0.3); // 0.15 GeV^2 // Uzhi 21.05.2012
SetProbLogDistr(0.5); // Uzhi 21.05.2012
}
else if( ProjectileabsPDGcode == 211 ||
ProjectilePDGcode == 111) //------Projectile is Pion -----------
{
SetMagQuarkExchange(240.);
SetSlopeQuarkExchange(2.); // 2.
SetSlopeQuarkExchange(2.);
SetDeltaProbAtQuarkExchange(0.56); //(0.35);
SetProjMinDiffMass(0.5); // GeV
SetProjMinNonDiffMass(0.5); // GeV 0.3
SetProbabilityOfProjDiff(0.);//(0.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
SetProjMinDiffMass(0.5); // GeV
SetProjMinNonDiffMass(0.5); // GeV 0.3
// SetProbabilityOfProjDiff(0.); // Uzhi 3.06.2012
SetProbabilityOfProjDiff((6.2-3.7*std::exp(-sqr(SqrtS-7.)/16.))/Xinel*0.);
SetTarMinDiffMass(1.16); // GeV
SetTarMinNonDiffMass(1.16); // GeV
// SetProbabilityOfTarDiff(1.);//(2.*0.62*std::pow(s/GeV/GeV,-0.51));
// SetProbabilityOfTarDiff(2.6*std::exp(-0.46*Ylab));
SetProbabilityOfTarDiff(0.8*std::exp(-0.6*(Ylab-3.)));
SetTarMinDiffMass(1.16); // GeV
SetTarMinNonDiffMass(1.16); // GeV
// SetProbabilityOfTarDiff(0.8*std::exp(-0.6*(Ylab-3.))); // Uzhi 3.06.2012
SetProbabilityOfTarDiff((2.+22./ECMSsqr)/Xinel);
SetAveragePt2(0.15); // GeV^2 7 June 2011
SetAveragePt2(0.3); // GeV^2 7 June 2011
SetProbLogDistr(0.); // Uzhi 21.05.2012
SetProbLogDistr(1.);
}
else if( (ProjectileabsPDGcode == 321) ||
(ProjectileabsPDGcode == 311) ||
@@ -563,24 +594,23 @@ if(Xtotal-Xelastic != 0.)
SetMagQuarkExchange(40.);
SetSlopeQuarkExchange(2.25);
SetDeltaProbAtQuarkExchange(0.6);
//SetMagQuarkExchange(0.);
//SetSlopeQuarkExchange(0.);
//SetDeltaProbAtQuarkExchange(0.);
SetProjMinDiffMass(0.6); // GeV 0.7
SetProjMinNonDiffMass(0.6); // GeV 0.7
SetProbabilityOfProjDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
SetProbabilityOfProjDiff(0.);
SetProjMinDiffMass(0.6); // GeV 0.7 0.6
SetProjMinNonDiffMass(0.6); // GeV 0.7 0.6
// SetProbabilityOfProjDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
SetProbabilityOfProjDiff(0.*4.7/Xinel); // Uzhi 5.06.2012
SetTarMinDiffMass(1.1); // GeV
SetTarMinNonDiffMass(1.1); // GeV
SetProbabilityOfTarDiff(0.45*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
SetAveragePt2(0.15); // GeV^2 7 June 2011
SetTarMinDiffMass(1.1); // GeV
SetTarMinNonDiffMass(1.1); // GeV
// SetProbabilityOfTarDiff(0.45*std::pow(s/GeV/GeV,-0.5));// 40/32 X-dif/X-inel
SetProbabilityOfTarDiff(1.5/Xinel); // Uzhi 5.06.2012
SetAveragePt2(0.3); // GeV^2 7 June 2011
SetProbLogDistr(1.); // Uzhi 5.06.2012
}
else //------Projectile is undefined,
//------Nucleon assumed
{
/* // Uzhi 6.06.2012
SetMagQuarkExchange(1.85); // 7 June 2011
SetSlopeQuarkExchange(0.7); // 7 June 2011
SetDeltaProbAtQuarkExchange(0.); // 7 June 2011
@@ -592,10 +622,29 @@ SetProbabilityOfProjDiff(0.);
SetTarMinDiffMass(1.16); // GeV
SetTarMinNonDiffMass(1.16); // GeV
SetProbabilityOfTarDiff(0.805*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
*/
SetAveragePt2(0.15); // GeV^2
SetMagQuarkExchange(0.);
SetSlopeQuarkExchange(0.);
SetDeltaProbAtQuarkExchange(0.);
SetProbOfSameQuarkExchange(0.);
SetProjMinDiffMass(ProjectileMass+0.22); // GeV
SetProjMinNonDiffMass(ProjectileMass+0.22); // GeV
SetProbabilityOfProjDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
SetTarMinDiffMass(TargetMass+0.22); // GeV
SetTarMinNonDiffMass(TargetMass+0.22); // GeV
SetProbabilityOfTarDiff(6./Xinel+1.5/ECMSsqr); // Uzhi 25.04.2012
SetAveragePt2(0.3); // 0.15 GeV^2 Uzhi 21.05.2012
SetProbLogDistr(0.5); // Uzhi 21.05.2012
}
// if(theA > 4) SetProbabilityOfProjDiff(0.); // Uzhi 6.07.2012 Closed
//G4cout<<"Param Get Min Dif "<<GetProjMinNonDiffMass()<<G4endl;
// ---------- Set parameters of a string kink -------------------------------
SetPt2Kink(6.*GeV*GeV);
G4double Puubar(1./3.), Pddbar(1./3.), Pssbar(1./3.); // SU(3) symmetry
@@ -612,13 +661,13 @@ SetProbabilityOfProjDiff(0.);
SetR2ofNuclearDestruction(1.5*fermi*fermi);
SetDofNuclearDestruction(0.4);
SetDofNuclearDestruction(0.3);
SetPt2ofNuclearDestruction((0.035+0.04*std::exp(4.*(Ylab-2.5))/
(1.+std::exp(4.*(Ylab-2.5))))*GeV*GeV); //0.09
//G4cout<<"Parm Pt2 Y "<<(0.035+0.04*std::exp(4.*(Ylab-2.5))/(1.+std::exp(4.*(Ylab-2.5))))<<" "<<Ylab<<G4endl;
SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV);
SetExcitationEnergyPerWoundedNucleon(75.*MeV);
SetExcitationEnergyPerWoundedNucleon(100.*MeV);
} else if( ProjectilePDGcode < -1000 ) // for anti-baryon projectile
{
//G4cout<<"Nucl destruct Anti Bar"<<G4endl;
@@ -629,12 +678,12 @@ SetProbabilityOfProjDiff(0.);
SetR2ofNuclearDestruction(1.5*fermi*fermi);
SetDofNuclearDestruction(0.4);
SetDofNuclearDestruction(0.3);
SetPt2ofNuclearDestruction((0.035+0.04*std::exp(4.*(Ylab-2.5))/
(1.+std::exp(4.*(Ylab-2.5))))*GeV*GeV); //0.09
SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV);
SetExcitationEnergyPerWoundedNucleon(75.*MeV);
SetExcitationEnergyPerWoundedNucleon(100.*MeV);
if(Plab < 2.) // 2 GeV/c
{ // For slow anti-baryon we have to garanty putting on mass-shell
@@ -653,12 +702,12 @@ SetProbabilityOfProjDiff(0.);
SetR2ofNuclearDestruction(1.5*fermi*fermi);
SetDofNuclearDestruction(0.4);
SetDofNuclearDestruction(0.3);
SetPt2ofNuclearDestruction((0.035+0.04*std::exp(4.*(Ylab-2.5))/
(1.+std::exp(4.*(Ylab-2.5))))*GeV*GeV); //0.09
SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV);
SetExcitationEnergyPerWoundedNucleon(75.*MeV);
SetExcitationEnergyPerWoundedNucleon(100.*MeV);
}
//SetCofNuclearDestruction(0.47*std::exp(2.*(Ylab-2.5))/(1.+std::exp(2.*(Ylab-2.5))));