Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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: G4CHIPSElastic.hh,v 1.3 2009/10/08 18:56:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// Geant4 Header : G4CHIPSElastic
//
// Author : V.Ivanchenko 29 June 2009 (redesign old elastic model)
//
// Modified:
//
// Class Description
// Default model for elastic scattering; GHEISHA algorithm is used
// Class Description - End
#ifndef G4CHIPSElastic_h
#define G4CHIPSElastic_h 1
#include "G4VHadronElastic.hh"
#include "globals.hh"
class G4VQCrossSection;
class G4CHIPSElastic : public G4VHadronElastic
{
public:
G4CHIPSElastic();
virtual ~G4CHIPSElastic();
virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab,
G4int Z, G4int A);
private:
static G4VQCrossSection* xsManager;
};
#endif
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ChargeExchange.hh,v 1.4 2008/11/19 18:28:36 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ChargeExchange.hh,v 1.6 2009/09/22 16:21:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// G4 Model: Charge and strangness exchange based on G4LightMedia model
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DiffuseElastic.hh,v 1.13 2007/11/06 17:01:20 grichine Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DiffuseElastic.hh,v 1.17 2009/09/22 16:21:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// G4 Model: optical elastic scattering with 4-momentum balance
@@ -163,7 +163,8 @@ public:
G4double ThetaLabToThetaCMS(const G4DynamicParticle* aParticle,
G4double tmass, G4double thetaLab);
void TestAngleTable(const G4ParticleDefinition* theParticle, G4double partMom,
G4double Z, G4double A);
@@ -174,6 +175,7 @@ public:
G4double GetDiffElasticProb(G4double theta);
G4double GetDiffElasticSumProb(G4double theta);
G4double GetDiffElasticSumProbA(G4double alpha);
G4double GetIntegrandFunction(G4double theta);
@@ -442,18 +444,18 @@ inline G4double G4DiffuseElastic::CalculateNuclearRad( G4double A)
{
G4double r0;
if(A < 50.)
if( A < 50. )
{
if(A > 10.) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
else r0 = 1.1*fermi;
if( A > 10. ) r0 = 1.16*( 1 - std::pow(A, -2./3.) )*fermi; // 1.08*fermi;
else r0 = 1.1*fermi;
fNuclearRadius = r0*std::pow(A, 1./3.);
}
else
{
r0 = 1.7*fermi;
r0 = 1.7*fermi; // 1.7*fermi;
fNuclearRadius = r0*std::pow(A, 0.27);
fNuclearRadius = r0*std::pow(A, 0.27); // 0.27);
}
return fNuclearRadius;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ElasticHadrNucleusHE.hh,v 1.45 2007/12/19 18:27:16 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ElasticHadrNucleusHE.hh,v 1.47 2009/09/22 16:21:46 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// G4ElasticHadrNucleusHe.hh
@@ -50,8 +50,7 @@
#include "G4ParticleDefinition.hh"
#include "G4ParticleChange.hh"
#include "G4Nucleus.hh"
#include "G4HadronicInteraction.hh"
#include "G4VHadronElastic.hh"
class G4NistManager;
@@ -71,7 +70,7 @@ class G4ElasticData
public:
G4ElasticData(const G4ParticleDefinition* h,
G4int Z, G4double A, G4double* eGeV);
G4int Z, G4double A, G4double* eGeV);
~G4ElasticData(){}
@@ -105,7 +104,7 @@ public:
//
//
class G4ElasticHadrNucleusHE : public G4HadronicInteraction
class G4ElasticHadrNucleusHE : public G4VHadronElastic
{
public:
@@ -113,11 +112,14 @@ public:
virtual ~G4ElasticHadrNucleusHE();
G4HadFinalState * ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& G4Nucleus);
virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab,
G4int Z, G4int A);
G4double SampleT(const G4ParticleDefinition* p, G4double plab,
G4double SampleT(const G4ParticleDefinition* p,
G4double plab,
G4int Z, G4int A);
G4double HadronNucleusQ2_2(G4ElasticData * pElD, G4int Z,
G4double plabGeV, G4double tmax);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4HadronElastic.hh,v 1.27 2008/05/19 09:59:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4HadronElastic.hh,v 1.31 2009/10/08 18:56:57 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
// G4 Model: Low energy elastic scattering with 4-momentum balance
@@ -107,7 +107,8 @@ private:
G4double aa, G4double bb, G4double cc, G4double dd,
G4double rr);
G4VQCrossSection* qCManager;
static G4VQCrossSection* qCManager;
G4ElasticHadrNucleusHE* hElastic;
G4ParticleDefinition* theProton;
@@ -123,11 +124,6 @@ private:
G4double lowestEnergyLimit;
G4double plabLowLimit;
G4int nnans;
G4int npos;
G4int nneg;
G4int neneg;
};
inline void G4HadronElastic::SetRecoilKinEnergyLimit(G4double value)
@@ -0,0 +1,103 @@
//
// ********************************************************************
// * 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: G4VHadronElastic.hh,v 1.4 2009/09/23 14:37:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// Geant4 Header : G4VHadronElastic
//
// Author : V.Ivanchenko 29 June 2009 (redesign old elastic model)
//
// Modified:
//
// Class Description
// Default model for elastic scattering; GHEISHA algorithm is used
// Class Description - End
#ifndef G4VHadronElastic_h
#define G4VHadronElastic_h 1
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4HadProjectile.hh"
#include "G4Nucleus.hh"
#include "G4NucleiProperties.hh"
class G4ParticleDefinition;
class G4VHadronElastic : public G4HadronicInteraction
{
public:
G4VHadronElastic(const G4String& name = "hElasticLHEP");
virtual ~G4VHadronElastic();
// implementation of the G4HadronicInteraction interface
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus);
// sample momentum transfer using Lab. momentum
virtual G4double SampleInvariantT(const G4ParticleDefinition* p,
G4double plab,
G4int Z, G4int A);
inline void SetLowestEnergyLimit(G4double value);
inline void ComputeMomentumCMS(const G4ParticleDefinition* p,
G4double plab, G4int Z, G4int A);
protected:
G4double momentumCMS;
private:
G4ParticleDefinition* theProton;
G4ParticleDefinition* theNeutron;
G4ParticleDefinition* theDeuteron;
G4ParticleDefinition* theAlpha;
G4double lowestEnergyLimit;
};
inline void G4VHadronElastic::SetLowestEnergyLimit(G4double value)
{
lowestEnergyLimit = value;
}
inline void
G4VHadronElastic::ComputeMomentumCMS(const G4ParticleDefinition* p,
G4double plab, G4int Z, G4int A)
{
G4double m1 = p->GetPDGMass();
G4double m12= m1*m1;
G4double m2 = G4NucleiProperties::GetNuclearMass(A, Z);
momentumCMS = plab*m2/std::sqrt(m12 + m2*m2 + 2.*m2*std::sqrt(m12 + plab*plab));
}
#endif
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * 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: G4WHadronElasticProcess.hh,v 1.2 2009/09/22 17:35:07 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// Geant4 Hadron Elastic Scattering Process -- header file
//
// Created 21 April 2006 V.Ivanchenko
//
// Modified:
// 26.09.06 V.Ivanchenko add lowestEnergy
//
// Class Description
// Process for hadron nuclear elastic scattering using optimal
// combination of Geant4 models
// Class Description - End
#ifndef G4WHadronElasticProcess_h
#define G4WHadronElasticProcess_h 1
#include "globals.hh"
#include "G4HadronicProcess.hh"
#include "G4Nucleus.hh"
class G4VQCrossSection;
class G4ParticleDefinition;
class G4CrossSectionDataStore;
class G4WHadronElasticProcess : public G4HadronicProcess
{
public:
G4WHadronElasticProcess(const G4String& procName = "hadElastic");
virtual ~G4WHadronElasticProcess();
virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
virtual G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
inline void SetLowestEnergy(G4double);
inline void SetLowestEnergyNeutron(G4double);
private:
const G4ParticleDefinition* theNeutron;
G4Nucleus targetNucleus;
G4double lowestEnergy;
G4double lowestEnergyNeutron;
};
inline void
G4WHadronElasticProcess::SetLowestEnergy(G4double val)
{
lowestEnergy = val;
}
inline void
G4WHadronElasticProcess::SetLowestEnergyNeutron(G4double val)
{
lowestEnergyNeutron = val;
}
#endif