Import Geant4 8.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:07:44 +02:00
parent fe73f43734
commit 75c7fd177d
764 changed files with 45230 additions and 95238 deletions
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: G4BGGNucleonElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4BGGNucleonElasticXS
//
// Author: Vladimir Ivanchenko
//
// Creation date: 13.03.2007
// Modifications:
//
//
// Class Description:
//
// Wrapper of proton and neutron elastic cross-sections using Barashenkov
// parametersation below 100 GeV and Glauber-Gribov model above
//
// -------------------------------------------------------------------
//
#ifndef G4BGGNucleonElasticXS_h
#define G4BGGNucleonElasticXS_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
#include "G4ParticleDefinition.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4GlauberGribovCrossSection;
class G4NucleonNuclearCrossSection;
class G4BGGNucleonElasticXS : public G4VCrossSectionDataSet
{
public:
G4BGGNucleonElasticXS (const G4ParticleDefinition*);
virtual ~G4BGGNucleonElasticXS();
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual
void DumpPhysicsTable(const G4ParticleDefinition&);
private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonElasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonElasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4BGGNucleonElasticXS::GetCrossSection(const G4DynamicParticle* dp,
const G4Element* elm,
G4double temp)
{
return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: G4BGGNucleonInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4BGGNucleonInelasticXS
//
// Author: Vladimir Ivanchenko
//
// Creation date: 13.03.2007
// Modifications:
//
//
// Class Description:
//
// Wrapper of proton and neutron inelastic cross-sections using Barashenkov
// parametersation below 100 GeV and Glauber-Gribov model above
//
// -------------------------------------------------------------------
//
#ifndef G4BGGNucleonInelasticXS_h
#define G4BGGNucleonInelasticXS_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
#include "G4ParticleDefinition.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4GlauberGribovCrossSection;
class G4NucleonNuclearCrossSection;
class G4BGGNucleonInelasticXS : public G4VCrossSectionDataSet
{
public:
G4BGGNucleonInelasticXS (const G4ParticleDefinition*);
virtual ~G4BGGNucleonInelasticXS();
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual
void DumpPhysicsTable(const G4ParticleDefinition&);
private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonInelasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGNucleonInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4BGGNucleonInelasticXS::GetCrossSection(const G4DynamicParticle* dp,
const G4Element* elm,
G4double temp)
{
return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: G4BGGPionElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4BGGPionElasticXS
//
// Author: Vladimir Ivanchenko
//
// Creation date: 01.10.2003
// Modifications:
//
//
// Class Description:
//
// Wrapper of pi+ and pi- inelastic cross-sections using Barashenkov
// parametersation below 100 GeV and Glauber-Gribov model above
//
// -------------------------------------------------------------------
//
#ifndef G4BGGPionElasticXS_h
#define G4BGGPionElasticXS_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
#include "G4ParticleDefinition.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4GlauberGribovCrossSection;
class G4UPiNuclearCrossSection;
class G4BGGPionElasticXS : public G4VCrossSectionDataSet
{
public:
G4BGGPionElasticXS (const G4ParticleDefinition*);
virtual ~G4BGGPionElasticXS();
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual
void DumpPhysicsTable(const G4ParticleDefinition&);
private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4UPiNuclearCrossSection* fPion;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionElasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4BGGPionElasticXS::GetCrossSection(const G4DynamicParticle* dp,
const G4Element* elm,
G4double temp)
{
return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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: G4BGGPionInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
// -------------------------------------------------------------------
//
// GEANT4 Class header file
//
//
// File name: G4BGGPionInelasticXS
//
// Author: Vladimir Ivanchenko
//
// Creation date: 01.10.2003
// Modifications:
//
//
// Class Description:
//
// Wrapper of pi+ and pi- inelastic cross-sections using Barashenkov
// parametersation below 100 GeV and Glauber-Gribov model above
//
// -------------------------------------------------------------------
//
#ifndef G4BGGPionInelasticXS_h
#define G4BGGPionInelasticXS_h
#include "globals.hh"
#include "G4VCrossSectionDataSet.hh"
#include "G4ParticleDefinition.hh"
#include "G4Element.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4GlauberGribovCrossSection;
class G4UPiNuclearCrossSection;
class G4BGGPionInelasticXS : public G4VCrossSectionDataSet
{
public:
G4BGGPionInelasticXS (const G4ParticleDefinition*);
virtual ~G4BGGPionInelasticXS();
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
virtual
void DumpPhysicsTable(const G4ParticleDefinition&);
private:
void Initialise();
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
const G4ParticleDefinition* particle;
G4GlauberGribovCrossSection* fGlauber;
G4UPiNuclearCrossSection* fPion;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionInelasticXS::IsApplicable(const G4DynamicParticle* dp,
const G4Element* elm)
{
return IsZAApplicable(dp, elm->GetZ(), elm->GetN());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4bool G4BGGPionInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,
G4double Z, G4double/* A*/)
{
return (dp->GetDefinition() == particle && Z > 1.5);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline
G4double G4BGGPionInelasticXS::GetCrossSection(const G4DynamicParticle* dp,
const G4Element* elm,
G4double temp)
{
return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -23,15 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// GEANT4 physics class: G4CrossSectionDataStore -- header file
// F.W. Jones, TRIUMF, 19-NOV-97
//
// Class Description
// This is the class to which to register data-sets. You can get the instance
// from energy hadronic process, and use its 'AddDataSet(...)' method to tailor
// the cross-sectinos for your application.
// This is the class to which cross section data sets may be registered.
// An instance of it is contained in each hadronic process, allowing
// the use of the AddDataSet() method to tailor the cross sections to
// your application.
// Class Description - End
#ifndef G4CrossSectionDataStore_h
@@ -39,7 +35,9 @@
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "G4Isotope.hh"
#include "G4Element.hh"
#include "G4Material.hh"
#include "G4VCrossSectionDataSet.hh"
@@ -49,16 +47,26 @@ public:
G4CrossSectionDataStore() :
NDataSetList(0), verboseLevel(0)
{
}
{}
~G4CrossSectionDataStore()
{
}
{}
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
G4double GetCrossSection(const G4DynamicParticle*,
const G4Isotope*, G4double aTemperature);
G4double GetCrossSection(const G4DynamicParticle*,
G4double Z, G4double A, G4double aTemperature);
// to replace GetMicroscopicCrossSection
G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);
std::pair<G4double/*Z*/, G4double/*A*/>
SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);
void AddDataSet(G4VCrossSectionDataSet*);
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -35,7 +35,7 @@
//
#ifndef G4EMDissociationCrossSection_h
#define G4EMDissociationCrossSection_h 1
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// MODULE: G4EMDissociationCrossSection.hh
//
@@ -46,7 +46,7 @@
// Customer: ESA/ESTEC, NOORDWIJK
// Contract: 17191/03/NL/LvH
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// CHANGE HISTORY
// --------------
@@ -57,8 +57,8 @@
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
////////////////////////////////////////////////////////////////////////////////
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
///////////////////////////////////////////////////////////////////////////////
//
#include "G4VCrossSectionDataSet.hh"
#include "G4DynamicParticle.hh"
@@ -67,7 +67,8 @@
#include "G4EMDissociationSpectrum.hh"
#include "G4PhysicsFreeVector.hh"
#include "globals.hh"
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
class G4EMDissociationCrossSection : public G4VCrossSectionDataSet
{
@@ -75,11 +76,18 @@ class G4EMDissociationCrossSection : public G4VCrossSectionDataSet
G4EMDissociationCrossSection ();
~G4EMDissociationCrossSection ();
virtual G4bool IsApplicable (const G4DynamicParticle *, const G4Element *);
virtual G4bool IsApplicable (const G4DynamicParticle*, const G4Element*);
virtual G4bool IsZAApplicable(const G4DynamicParticle*, G4double ZZ,
G4double AA);
virtual G4double GetCrossSection (const G4DynamicParticle *,
const G4Element *, G4double);
virtual G4double GetIsoZACrossSection(const G4DynamicParticle*,
G4double ZZ, G4double AA,
G4double temperature);
G4PhysicsFreeVector *GetCrossSectionForProjectile
(G4double, G4double, G4double, G4double, G4double, G4double);
G4PhysicsFreeVector *GetCrossSectionForTarget
@@ -101,6 +109,6 @@ class G4EMDissociationCrossSection : public G4VCrossSectionDataSet
G4double epsilon;
G4double xd;
};
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-08-02 $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
@@ -59,16 +59,25 @@ public:
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* )
{
//return theHadronCrossSections->IsApplicable(aParticle, anElement);
// Possible prototype
G4bool result = false;
if( aParticle->GetDefinition()==G4Electron::ElectronDefinition()) result = true;
if( aParticle->GetDefinition()==G4Positron::PositronDefinition()) result = true;
return result;
return IsZAApplicable(aParticle, 0., 0.);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement,
G4double T=0.);
G4bool IsZAApplicable(const G4DynamicParticle* aParticle, G4double /*ZZ*/,
G4double /*AA*/)
{
G4bool result = false;
if( aParticle->GetDefinition()==G4Electron::ElectronDefinition()) result = true;
if( aParticle->GetDefinition()==G4Positron::PositronDefinition()) result = true;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double T=0.);
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA, G4double T=0.);
G4double GetEquivalentPhotonEnergy();
@@ -90,9 +90,15 @@ class G4GeneralSpaceNNCrossSection : public G4VCrossSectionDataSet
virtual G4bool IsApplicable(const G4DynamicParticle* theProjectile,
const G4Element* theTarget);
virtual G4bool IsZAApplicable(const G4DynamicParticle* theProjectile,
G4double ZZ, G4double AA);
virtual G4double GetCrossSection(const G4DynamicParticle* theProjectile,
const G4Element* theTarget, G4double theTemperature);
virtual G4double GetIsoZACrossSection(const G4DynamicParticle* theProjectile,
G4double ZZ, G4double AA, G4double theTemperature);
virtual void BuildPhysicsTable(const G4ParticleDefinition&)
{;}
@@ -33,6 +33,10 @@
//
//
// 17.07.06 V. Grichine - first implementation
// 22.01.07 V.Ivanchenko - add interface with Z and A
// 05.03.07 V.Ivanchenko - add IfZAApplicable
// 06.03.07 V.Ivanchenko - add GetElasticGlauberGribov and GetElasticGlauberGribov
// for combined dataset
//
//
@@ -57,9 +61,18 @@ public:
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
const G4Element*,
G4double aTemperature = 0.0);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*,
G4double Z, G4double A,
G4double aTemperature = 0.0);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
@@ -82,6 +95,9 @@ public:
G4double CalcMandelstamS( const G4double , const G4double , const G4double );
G4double GetElasticGlauberGribov(const G4DynamicParticle*,G4double Z, G4double A);
G4double GetInelasticGlauberGribov(const G4DynamicParticle*,G4double Z, G4double A);
G4double GetTotalGlauberGribovXsc() { return fTotalXsc; };
G4double GetElasticGlauberGribovXsc() { return fElasticXsc; };
G4double GetInelasticGlauberGribovXsc(){ return fInelasticXsc; };
@@ -132,4 +148,20 @@ private:
};
inline
G4double G4GlauberGribovCrossSection::GetElasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
{
GetIsoZACrossSection(dp, Z, A);
return fElasticXsc;
}
inline
G4double G4GlauberGribovCrossSection::GetInelasticGlauberGribov(
const G4DynamicParticle* dp, G4double Z, G4double A)
{
GetIsoZACrossSection(dp, Z, A);
return fInelasticXsc;
}
#endif
@@ -63,6 +63,12 @@ public:
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA)
{
return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double )
{
@@ -70,6 +76,13 @@ public:
anElement);
}
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return theHadronCrossSections->GetCaptureCrossSection(aParticle, ZZ, AA);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-08-02 $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// GEANT4 Hadron physics class -- header file
@@ -109,34 +109,46 @@ public:
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* )
{
return (GetParticleCode(aParticle) > 0);
return (GetParticleCode(aParticle) > 0);
}
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
G4bool IsApplicable(const G4DynamicParticle* aParticle,
G4double /*ZZ*/, G4double /*AA*/)
{
if (aParticle->GetDefinition() != prevParticleDefinition ||
anElement != prevElement ||
aParticle->GetKineticEnergy() != prevKineticEnergy)
CalcScatteringCrossSections(aParticle, anElement);
return sigelastic;
return (GetParticleCode(aParticle) > 0);
}
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
G4double GetElasticCrossSection(const G4DynamicParticle*, const G4Element*);
G4double GetElasticCrossSection(const G4DynamicParticle*,
G4double /*ZZ*/, G4double /*AA*/);
G4double GetInelasticCrossSection(const G4DynamicParticle*,
const G4Element*);
G4double GetInelasticCrossSection(const G4DynamicParticle*,
G4double /*ZZ*/, G4double /*AA*/);
G4double GetCaptureCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
if (aParticle->GetDefinition() != prevParticleDefinition ||
anElement != prevElement ||
aParticle->GetKineticEnergy() != prevKineticEnergy)
CalcScatteringCrossSections(aParticle, anElement);
return siginelastic;
return GetCaptureCrossSection(aParticle, anElement->GetZ(),
anElement->GetN());
}
G4double GetCaptureCrossSection(const G4DynamicParticle*,
const G4Element*);
G4double /*ZZ*/, G4double /*AA*/);
G4double GetFissionCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return GetFissionCrossSection(aParticle, anElement->GetZ(),
anElement->GetN());
}
G4double GetFissionCrossSection(const G4DynamicParticle*,
const G4Element*);
G4double /*ZZ*/, G4double /*AA*/);
static void SetCorrectInelasticNearZero(G4bool value)
{
@@ -162,8 +174,8 @@ private:
G4int GetParticleCode(const G4DynamicParticle*);
void CalcScatteringCrossSections(const G4DynamicParticle*,
const G4Element*);
void CalcScatteringCrossSections(const G4DynamicParticle*,
G4double /*ZZ*/, G4double /*AA*/);
static G4HadronCrossSections* theInstance;
@@ -62,6 +62,13 @@ public:
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA)
{
return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double )
{
@@ -69,6 +76,14 @@ public:
anElement);
}
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return theHadronCrossSections->GetElasticCrossSection(aParticle, ZZ, AA);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
@@ -61,6 +61,13 @@ public:
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA)
{
return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double )
{
@@ -68,6 +75,14 @@ public:
anElement);
}
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return theHadronCrossSections->GetFissionCrossSection(aParticle, ZZ, AA);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
{
}
@@ -54,17 +54,33 @@ public:
{
}
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement)
{
return theHadronCrossSections->IsApplicable(aParticle, anElement);
return theHadronCrossSections->IsApplicable(aParticle, anElement);
}
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA)
{
return theHadronCrossSections->IsApplicable(aParticle, ZZ, AA);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double /*aTemperature*/)
const G4Element* anElement,
G4double /*aTemperature*/)
{
return theHadronCrossSections->GetInelasticCrossSection(aParticle,
anElement);
return theHadronCrossSections->GetInelasticCrossSection(aParticle,
anElement);
}
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return theHadronCrossSections->GetInelasticCrossSection(aParticle, ZZ, AA);
}
void BuildPhysicsTable(const G4ParticleDefinition&)
@@ -0,0 +1,133 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// Calculation of the total, elastic and inelastic cross-sections
// based on parametrisations of (proton, pion, kaon, photon) nucleon
// cross-sections and the hadron-nucleous cross-section model in
// the framework of Glauber-Gribov approach
//
//
//
//
//
// 14.03.07 V. Grichine - first implementation
//
//
#ifndef G4HadronNucleonXsc_h
#define G4HadronNucleonXsc_h
#include "globals.hh"
#include "G4Proton.hh"
#include "G4Nucleus.hh"
#include "G4VCrossSectionDataSet.hh"
class G4ParticleDefinition;
class G4DynamicParticle;
class G4HadronNucleonXsc : public G4VCrossSectionDataSet
{
public:
G4HadronNucleonXsc ();
virtual ~G4HadronNucleonXsc ();
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP, G4double Z, G4double A);
virtual
void DumpPhysicsTable(const G4ParticleDefinition&)
{G4cout << "G4HadronNucleonXsc: uses parametrisation"<<G4endl;}
// Xsc parametrisations
G4double GetHadronNucleonXscEL(const G4DynamicParticle*, const G4ParticleDefinition*);
G4double GetHadronNucleonXscPDG(const G4DynamicParticle*, const G4ParticleDefinition*);
G4double GetHadronNucleonXscNS(const G4DynamicParticle*, const G4ParticleDefinition*);
G4double GetHadronNucleonXscVU(const G4DynamicParticle*, const G4ParticleDefinition*);
// kinematics and set/get
G4double CalculateEcmValue ( const G4double , const G4double , const G4double );
G4double CalcMandelstamS( const G4double , const G4double , const G4double );
G4double GetTotalHadronNucleonXsc() { return fTotalXsc; };
G4double GetElasticHadronNucleonXsc() { return fElasticXsc; };
G4double GetInelasticHadronNucleonXsc(){ return fInelasticXsc; };
private:
const G4double fUpperLimit;
const G4double fLowerLimit;
G4double fTotalXsc, fElasticXsc, fInelasticXsc;
G4double fHadronNucleonXsc;
G4ParticleDefinition* theGamma;
G4ParticleDefinition* theProton;
G4ParticleDefinition* theNeutron;
G4ParticleDefinition* theAProton;
G4ParticleDefinition* theANeutron;
G4ParticleDefinition* thePiPlus;
G4ParticleDefinition* thePiMinus;
G4ParticleDefinition* thePiZero;
G4ParticleDefinition* theKPlus;
G4ParticleDefinition* theKMinus;
G4ParticleDefinition* theK0S;
G4ParticleDefinition* theK0L;
G4ParticleDefinition* theL;
G4ParticleDefinition* theAntiL;
G4ParticleDefinition* theSPlus;
G4ParticleDefinition* theASPlus;
G4ParticleDefinition* theSMinus;
G4ParticleDefinition* theASMinus;
G4ParticleDefinition* theS0;
G4ParticleDefinition* theAS0;
G4ParticleDefinition* theXiMinus;
G4ParticleDefinition* theXi0;
G4ParticleDefinition* theAXiMinus;
G4ParticleDefinition* theAXi0;
G4ParticleDefinition* theOmega;
G4ParticleDefinition* theAOmega;
G4ParticleDefinition* theD;
G4ParticleDefinition* theT;
G4ParticleDefinition* theA;
G4ParticleDefinition* theHe3;
};
#endif
@@ -43,27 +43,43 @@ class G4IonProtonCrossSection : public G4VCrossSectionDataSet
public:
virtual
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*anEle)
G4bool IsZAApplicable(const G4DynamicParticle* aPart, G4double /*ZZ*/,
G4double AA)
{
G4bool result = false;
if(( anEle->GetN()<1.1) &&
( aPart->GetKineticEnergy()/aPart->GetDefinition()->GetBaryonNumber()<20*GeV&&
aPart->GetDefinition()->GetBaryonNumber()>4)
if((AA < 1.1) &&
( aPart->GetKineticEnergy()/aPart->GetDefinition()
->GetBaryonNumber() < 20*GeV &&
aPart->GetDefinition()->GetBaryonNumber() > 4)
) result = true;
return result;
}
virtual
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element* anEle)
{
return IsZAApplicable(aPart, 0., anEle->GetN());
}
virtual
G4double GetCrossSection(const G4DynamicParticle* aPart,
const G4Element*, G4double )
{
G4ProtonInelasticCrossSection theForward;
G4double result = theForward.GetCrossSection(aPart->GetKineticEnergy(),
aPart->GetDefinition()->GetBaryonNumber(),
aPart->GetDefinition()->GetPDGCharge());
return result;
return GetIsoZACrossSection(aPart, 0., 0., 0.);
}
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle* aPart,
G4double /*ZZ*/, G4double /*AA*/,
G4double /*temperature*/)
{
G4ProtonInelasticCrossSection theForward;
return theForward.GetCrossSection(aPart->GetKineticEnergy(),
aPart->GetDefinition()->GetBaryonNumber(),
aPart->GetDefinition()->GetPDGCharge());
}
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -53,9 +53,15 @@ class G4IonsKoxCrossSection : public G4VCrossSectionDataSet
{
}
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
{
return IsZAApplicable(aDP, 0., 0.);
}
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP, G4double /*ZZ*/,
G4double /*AA*/)
{
G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber();
G4double kineticEnergy = aDP->GetKineticEnergy();
@@ -68,6 +74,10 @@ class G4IonsKoxCrossSection : public G4VCrossSectionDataSet
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double ZZ,
G4double AA, G4double aTemperature);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -39,6 +39,8 @@
// 0 is returned to a partilce with energy lowae than 10 MeV/n
// 15-Nov-2006 Change upper limit to 1 TeV/n
// However above 10GeV/n XS become constant.
// 23-Dec-2006 Isotope dependence added by D. Wright
//
#include "globals.hh"
#include "G4Proton.hh"
@@ -57,6 +59,13 @@ class G4IonsShenCrossSection : public G4VCrossSectionDataSet
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
{
return IsZAApplicable(aDP, 0., 0.);
}
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP,
G4double /*ZZ*/, G4double /*AA*/)
{
G4int baryonNumber = aDP->GetDefinition()->GetBaryonNumber();
G4double kineticEnergy = aDP->GetKineticEnergy();
@@ -65,10 +74,15 @@ class G4IonsShenCrossSection : public G4VCrossSectionDataSet
return false;
}
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double ZZ,
G4double AA, G4double aTemperature);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -34,6 +34,8 @@
// Valid for 100>MeV/nucleon
// Class Description - End
//
// 23-Dec-2006 Isotope dependence added by D. Wright
//
#include "globals.hh"
#include "G4Proton.hh"
@@ -50,6 +52,13 @@ class G4IonsSihverCrossSection : public G4VCrossSectionDataSet
virtual
G4bool IsApplicable(const G4DynamicParticle* aDP, const G4Element*)
{
return IsZAApplicable(aDP, 0., 0.);
}
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aDP, G4double /*ZZ*/,
G4double /*AA*/)
{
G4int BaryonNumber = aDP->GetDefinition()->GetBaryonNumber();
G4double KineticEnergy = aDP->GetKineticEnergy();
@@ -62,6 +71,10 @@ class G4IonsSihverCrossSection : public G4VCrossSectionDataSet
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double ZZ,
G4double AA, G4double aTemperature);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -24,6 +24,8 @@
// ********************************************************************
//
// by JPW, working, but to be cleaned up. @@@@
// D. Wright, 23-Dec-2006 Added isotope dependence
//
#ifndef G4NeutronInelasticCrossSection_h
#define G4NeutronInelasticCrossSection_h
@@ -54,10 +56,30 @@ class G4NeutronInelasticCrossSection : public G4VCrossSectionDataSet
return result;
}
G4bool IsZAApplicable(const G4DynamicParticle* aPart,
G4double ZZ, G4double /*AA*/)
{
G4bool result = false;
if(( aPart->GetDefinition() == G4Neutron::Neutron()) &&
( aPart->GetKineticEnergy() < 20*GeV) &&
aPart->GetKineticEnergy() > 19.9*MeV) result = true;
if(ZZ < 2) result = false;
return result;
}
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return GetCrossSection(aParticle->GetKineticEnergy(), AA, ZZ);
}
G4double GetCrossSection(G4double anEnergy, G4double anA, G4double aZ);
virtual
@@ -0,0 +1,198 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// author: Vladimir.Grichine@cern.ch
//
// Implements data from: Barashenkov V.S., Nucleon-Nucleus Cross Section,
// Preprint JINR P2-89-770, p. 12, Dubna 1989 (scanned version from KEK)
// Based on G. Folger version of G4PiNuclearCrossSection class
//
// Modified:
// 05.03.07 V.Ivanchenko - add IfZAApplicable, remove "debug"
// 06.03.07 V.Ivanchenko - add GetElasticCrossSection for combined dataset
//
#ifndef G4NucleonNuclearCrossSection_h
#define G4NucleonNuclearCrossSection_h
#include "G4VCrossSectionDataSet.hh"
#include "G4ParticleDefinition.hh"
#include "globals.hh"
#include "G4PiData.hh"
#include "G4HadTmpUtil.hh"
class G4NucleonNuclearCrossSection : public G4VCrossSectionDataSet
{
public:
G4NucleonNuclearCrossSection();
virtual ~G4NucleonNuclearCrossSection();
virtual G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement);
virtual G4bool IsZAApplicable(const G4DynamicParticle* aParticle, G4double Z, G4double A);
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement,
G4double T=0.);
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA, G4double T=0. );
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA);
G4double GetTotalXsc() { return fTotalXsc; };
G4double GetElasticXsc(){ return fElasticXsc; };
void BuildPhysicsTable(const G4ParticleDefinition&) {}
void DumpPhysicsTable(const G4ParticleDefinition&) {}
private:
G4double Interpolate(G4int Z1, G4int Z2, G4int Z, G4double x1, G4double x2);
// add Hydrogen from PDG group.
static const G4double e1[44];
static const G4double he_m_t[44];
static const G4double he_m_in[44];
static const G4double he_p_in[44];
static const G4double be_m_t[44];
static const G4double be_m_in[44];
static const G4double be_p_in[44];
static const G4double c_m_t[44];
static const G4double c_m_in[44];
static const G4double c_p_in[44];
static const G4double e2[44];
static const G4double n_m_t[44];
static const G4double n_m_in[44];
static const G4double n_p_in[44];
static const G4double o_m_t[44];
static const G4double o_m_in[44];
static const G4double o_p_in[44];
static const G4double na_m_t[44];
static const G4double na_m_in[44];
static const G4double na_p_in[44];
static const G4double e3[45];
// static const G4double e3_1[31];
static const G4double al_m_t[45];
static const G4double al_m_in[45];
static const G4double al_p_in[45];
static const G4double si_m_t[45];
static const G4double si_m_in[45];
static const G4double si_p_in[45];
static const G4double ca_m_t[45];
static const G4double ca_m_in[45];
static const G4double ca_p_in[45];
static const G4double e4[47];
static const G4double fe_m_t[47];
static const G4double fe_m_in[47];
static const G4double fe_p_in[47];
static const G4double cu_m_t[47];
static const G4double cu_m_in[47];
static const G4double cu_p_in[47];
static const G4double mo_m_t[47];
static const G4double mo_m_in[47];
static const G4double mo_p_in[47];
static const G4double e5[48];
static const G4double cd_m_t[48];
static const G4double cd_m_in[48];
static const G4double cd_p_in[48];
static const G4double sn_m_t[48];
static const G4double sn_m_in[48];
static const G4double sn_p_in[48];
static const G4double w_m_t[48];
static const G4double w_m_in[48];
static const G4double w_p_in[48];
static const G4double e6[46];
// static const G4double e7[46];
static const G4double pb_m_t[46];
static const G4double pb_m_in[46];
static const G4double pb_p_in[46];
static const G4double u_m_t[46];
static const G4double u_m_in[46];
static const G4double u_p_in[46];
// vectors for treatment
std::vector< G4int > theZ;
std::vector< G4PiData* > thePipData;
std::vector< G4PiData* > thePimData;
// cross sections
G4double fTotalXsc;
G4double fElasticXsc;
// particles
const G4ParticleDefinition* theProton;
const G4ParticleDefinition* theNeutron;
};
inline
G4double G4NucleonNuclearCrossSection::GetElasticCrossSection(
const G4DynamicParticle* dp, G4double ZZ, G4double AA)
{
GetIsoZACrossSection(dp, ZZ, AA);
return fElasticXsc;
}
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-08-02 $
// GEANT4 tag $Name: geant4-08-03 $
//
//
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
@@ -56,21 +56,28 @@ public:
~G4PhotoNuclearCrossSection() {}
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* )
G4bool IsApplicable(const G4DynamicParticle* particle, const G4Element* )
{
//return theHadronCrossSections->IsApplicable(aParticle, anElement);
// Possible prototype
G4bool result = false;
if( aParticle->GetDefinition()->GetPDGEncoding()==22) result = true;
return result;
return IsZAApplicable(particle, 0, 0);
}
G4double GetCrossSection(const G4DynamicParticle* aParticle, const G4Element* anElement,
G4double T=0.);
//{
// return theHadronCrossSections->GetInelasticCrossSection(aParticle,
// anElement);
//}
G4bool IsZAApplicable(const G4DynamicParticle* particle,
G4double /*ZZ*/, G4double /*AA*/)
{
G4bool result = false;
if( particle->GetDefinition()->GetPDGEncoding()==22) result = true;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* particle,
const G4Element* element, G4double temp = 0.);
G4double GetIsoZACrossSection(const G4DynamicParticle* particle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/);
void BuildPhysicsTable(const G4ParticleDefinition&) {}
@@ -122,10 +129,15 @@ inline G4double G4PhotoNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
// ---------
G4double mP= infEn;
//if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1)) mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1);
if(Z && G4NucleiPropertiesTable::IsInTable(Z-1,A-1))
{
mP = G4NucleiProperties::GetNuclearMass(A-1,Z-1);
}
else
{
G4cerr<<"G4PhotoNucCrossSect.hh::ThrEn:Z="<<Z-1<<",A="<<A-1<<" element isn't in G4NucP"<<G4endl;
G4cerr << "G4PhotoNucCrossSect.hh::ThrEn:Z=" << Z-1 << ",A="
<< A-1 << " element isn't in G4NucP" << G4endl;
}
G4double mN= infEn;
//if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
@@ -35,11 +35,16 @@
class G4PiData : public std::vector<std::pair<G4double, std::pair<G4double, G4double > > >
{
public:
G4PiData(const G4double * aTotal, const G4double * aInelastic, const G4double * anEnergy, G4int nPoints);
G4PiData(const G4double * aTotal, const G4double * aInelastic,
const G4double * anEnergy, G4int nPoints);
struct Delete{void operator()(G4PiData * aP){delete aP;} };
G4bool AppliesTo(G4double kineticEnergy);
G4double ReactionXSection(G4double kineticEnergy);
G4double ElasticXSection(G4double kineticEnergy);
G4double TotalXSection(G4double kineticEnergy);
private:
@@ -40,6 +40,7 @@ class G4PiNuclearCrossSection : public G4VCrossSectionDataSet
G4PiNuclearCrossSection();
virtual ~G4PiNuclearCrossSection();
G4bool IsApplicable(const G4DynamicParticle* aParticle, const G4Element* anElement)
{
G4bool result = false;
@@ -49,9 +50,34 @@ class G4PiNuclearCrossSection : public G4VCrossSectionDataSet
if(aParticle->GetKineticEnergy() > 999.9*GeV) result=false;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement,
G4double T=0.);
G4bool IsZAApplicable(const G4DynamicParticle* particle,
G4double ZZ, G4double /*AA*/)
{
G4bool result = false;
if(particle->GetDefinition() == G4PionMinus::PionMinus()) result=true;
if(particle->GetDefinition() == G4PionPlus::PionPlus()) result=true;
if(G4lrint(ZZ) == 1) result = false;
if(particle->GetKineticEnergy() > 999.9*GeV) result=false;
return result;
}
G4double GetCrossSection(const G4DynamicParticle* particle,
const G4Element* element,
G4double temperature)
{
return GetIsoZACrossSection(particle, element->GetZ(),
element->GetN(), temperature);
}
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/);
G4double GetTotalXsc() { return fTotalXsc; };
G4double GetElasticXsc(){ return fElasticXsc; };
void BuildPhysicsTable(const G4ParticleDefinition&) {}
void DumpPhysicsTable(const G4ParticleDefinition&) {}
@@ -136,6 +162,12 @@ std::vector<G4int> theZ;
std::vector<G4PiData *> thePipData;
std::vector<G4PiData *> thePimData;
// cross sections
G4double fTotalXsc;
G4double fElasticXsc;
};
#endif
@@ -25,6 +25,8 @@
//
// by JPW, working, but to be cleaned up. @@@@
// G.Folger, 29-sept-2006: extend to 1TeV, using a constant above 20GeV
// D. Wright, 23-Dec-2006: added isotope dependence
//
#ifndef G4ProtonInelasticCrossSection_h
#define G4ProtonInelasticCrossSection_h
@@ -34,7 +36,8 @@
// energy threshold behaviour right.
// H.P. Wellisch (TRIUMF), D. Axen (British Columbia U.). 1996.
// Published in Phys.Rev.C54:1329-1332,1996
// Implements corrected parameterization from http://laws.lanl.gov/XCI/PEOPLE/rep/pdf/RPS96.pdf
// Implements corrected parameterization from
// http://laws.lanl.gov/XCI/PEOPLE/rep/pdf/RPS96.pdf
// Class Description - End
@@ -57,10 +60,28 @@ class G4ProtonInelasticCrossSection : public G4VCrossSectionDataSet
return result;
}
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double ZZ, G4double /*AA*/)
{
G4bool result = false;
if (( aParticle->GetDefinition() == G4Proton::Proton()) &&
( aParticle->GetKineticEnergy() < 1*TeV) ) result = true;
if (ZZ < 3) result = false;
return result;
}
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double ZZ, G4double AA,
G4double /*aTemperature*/)
{
return GetCrossSection(aParticle->GetKineticEnergy(), AA, ZZ);
}
G4double GetCrossSection(G4double anEnergy, G4double anA, G4double aZ);
virtual
@@ -44,6 +44,13 @@ class G4TripathiCrossSection : public G4VCrossSectionDataSet
virtual
G4bool IsApplicable(const G4DynamicParticle* aPart, const G4Element*)
{
return IsZAApplicable(aPart, 0., 0.);
}
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aPart, G4double /*ZZ*/,
G4double /*AA*/)
{
G4bool result = false;
if(( aPart->GetDefinition()->GetBaryonNumber()>2.5) &&
@@ -51,10 +58,15 @@ class G4TripathiCrossSection : public G4VCrossSectionDataSet
return result;
}
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double ZZ,
G4double AA, G4double aTemperature);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -57,6 +57,8 @@
// 15 March 2004, P R Truscott, QinetiQ Ltd, UK
// Beta release
//
// 26 Dec 2006, D. Wright - added isotope dependence
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//
// Class Description
@@ -83,9 +85,17 @@ class G4TripathiLightCrossSection : public G4VCrossSectionDataSet
virtual G4bool IsApplicable(const G4DynamicParticle* theProjectile,
const G4Element* theTarget);
virtual G4bool IsZAApplicable(const G4DynamicParticle* theProjectile,
G4double ZZ, G4double AA);
virtual G4double GetCrossSection(const G4DynamicParticle* theProjectile,
const G4Element* theTarget, G4double theTemperature);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle* theProjectile,
G4double ZZ, G4double AA,
G4double theTemperature);
virtual void BuildPhysicsTable(const G4ParticleDefinition&)
{}
@@ -27,6 +27,9 @@
// original componetns
//
// 12.08.06 V.Ivanchenko - first implementation
// 22.01.07 V.Ivanchenko - add GetIsoZACrossSection
// 05.03.07 V.Ivanchenko - use G4NucleonNuclearCrossSection
// 06.03.07 V.Ivanchenko - add Initialise function
//
//
@@ -40,23 +43,32 @@
class G4ParticleDefinition;
class G4GlauberGribovCrossSection;
class G4HadronCrossSections;
class G4NucleonNuclearCrossSection;
class G4UPiNuclearCrossSection;
class G4HadronCrossSections;
class G4ParticleDefinition;
class G4UElasticCrossSection : public G4VCrossSectionDataSet
{
public:
G4UElasticCrossSection ();
G4UElasticCrossSection (const G4ParticleDefinition* p=0);
virtual ~G4UElasticCrossSection ();
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -66,12 +78,16 @@ public:
private:
G4int idx;
void Initialise(const G4ParticleDefinition*);
G4GlauberGribovCrossSection* fGlauber;
G4HadronCrossSections* fGheisha;
G4UPiNuclearCrossSection* fUPi;
G4bool hasGlauber;
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4GlauberGribovCrossSection* fGlauber;
G4NucleonNuclearCrossSection* fNucleon;
G4UPiNuclearCrossSection* fUPi;
G4HadronCrossSections* fGheisha;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -27,6 +27,9 @@
// original componetns
//
// 12.08.06 V.Ivanchenko - first implementation
// 22.01.07 V.Ivanchenko - add GetIsoZACrossSection
// 05.03.07 V.Ivanchenko - use G4NucleonNuclearCrossSection
// 06.03.07 V.Ivanchenko - add Initialise function
//
//
@@ -40,8 +43,7 @@
class G4ParticleDefinition;
class G4GlauberGribovCrossSection;
class G4ProtonInelasticCrossSection;
class G4NeutronInelasticCrossSection;
class G4NucleonNuclearCrossSection;
class G4UPiNuclearCrossSection;
class G4HadronCrossSections;
class G4ParticleDefinition;
@@ -57,9 +59,16 @@ public:
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*);
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*, G4double aTemperature);
const G4Element*, G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&);
@@ -69,11 +78,14 @@ public:
private:
G4int idx;
void Initialise(const G4ParticleDefinition*);
G4bool hasGlauber;
G4double thEnergy; // threshold of Glauber model
G4double theFac[93];
G4GlauberGribovCrossSection* fGlauber;
G4ProtonInelasticCrossSection* fGhadProton;
G4NeutronInelasticCrossSection* fGhadNeutron;
G4NucleonNuclearCrossSection* fNucleon;
G4UPiNuclearCrossSection* fUPi;
G4HadronCrossSections* fGheisha;
@@ -27,6 +27,8 @@
// based on Barashenkov parametrisations of pion data
//
// 16.08.06 V.Ivanchenko - first implementation
// 22.01.07 V.Ivanchenko - add cross section interfaces with Z and A
// 05.03.07 V.Ivanchenko - add IfZAApplicable
//
@@ -49,18 +51,34 @@ public:
virtual ~G4UPiNuclearCrossSection();
virtual
G4bool IsApplicable(const G4DynamicParticle* aParticle,
const G4Element* anElement);
virtual
G4bool IsZAApplicable(const G4DynamicParticle* aParticle,
G4double Z, G4double A);
virtual
G4double GetCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement, G4double);
const G4Element* anElement, G4double T=0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle* aParticle,
G4double Z, G4double A, G4double T=0.);
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement);
G4double GetElasticCrossSection(const G4DynamicParticle* aParticle,
G4double Z, G4double A);
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
const G4Element* anElement);
G4double GetInelasticCrossSection(const G4DynamicParticle* aParticle,
G4double Z, G4double A);
void BuildPhysicsTable(const G4ParticleDefinition&);
void DumpPhysicsTable(const G4ParticleDefinition&);
@@ -94,17 +112,45 @@ private:
inline G4bool G4UPiNuclearCrossSection::IsApplicable(
const G4DynamicParticle* part,
const G4Element* elm)
{
return IsZAApplicable(part, elm->GetZ(), elm->GetN());
}
inline G4bool G4UPiNuclearCrossSection::IsZAApplicable(
const G4DynamicParticle* part,
G4double Z, G4double)
{
return ((part->GetDefinition() == piMinus ||
part->GetDefinition() == piPlus) &&
elm->GetZ() > 1.5);
Z > 1.5);
}
inline G4double G4UPiNuclearCrossSection::GetCrossSection(
const G4DynamicParticle* dp,
const G4Element* elm, G4double)
{
return GetInelasticCrossSection(dp, elm);
return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN());
}
inline G4double G4UPiNuclearCrossSection::GetIsoZACrossSection(
const G4DynamicParticle* dp,
G4double Z, G4double A, G4double)
{
return GetInelasticCrossSection(dp, Z, A);
}
inline G4double G4UPiNuclearCrossSection::GetInelasticCrossSection(
const G4DynamicParticle* dp,
const G4Element* elm)
{
return GetInelasticCrossSection(dp, elm->GetZ(), elm->GetN());
}
inline G4double G4UPiNuclearCrossSection::GetElasticCrossSection(
const G4DynamicParticle* dp,
const G4Element* elm)
{
return GetElasticCrossSection(dp, elm->GetZ(), elm->GetN());
}
#endif
@@ -24,15 +24,13 @@
// ********************************************************************
//
//
//
//
// GEANT4 physics abstract class: G4VCrossSectionData -- header file
// F.W. Jones, TRIUMF, 20-JAN-97
//
// Class Description
// This class serves as base class for cross-section data sets in geant4
// hadronic physics. Users can derive their specialized classes, and register with
// the system, or use provided data sets.
// This is a base class for hadronic cross section data sets. Users may
// derive specialized cross section classes and register them with the
// appropriate process, or use provided data sets.
// Class Description - End
#ifndef G4VCrossSectionDataSet_h
@@ -48,24 +46,33 @@ public:
G4VCrossSectionDataSet() :
verboseLevel(0)
{
}
{}
virtual ~G4VCrossSectionDataSet()
{
}
{}
public: //with description
// the following methods need to be implemented for a new data-set.
// The following methods need to be implemented for each new data set.
virtual
G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0;
virtual
G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/);
virtual
G4double GetCrossSection(const G4DynamicParticle*,
const G4Element*,
G4double aTemperature = 0.) = 0;
virtual
G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*,
G4double aTemperature = 0.);
virtual
G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/,
G4double /*A*/, G4double aTemperature = 0.);
virtual
void BuildPhysicsTable(const G4ParticleDefinition&) = 0;