Import Geant4 6.2.0 source tree
This commit is contained in:
+125
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#ifndef G4DiffElasticHadrNucleus_h
|
||||
#define G4DiffElasticHadrNucleus_h 1
|
||||
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4HadronValues.hh"
|
||||
#include "G4IntegrHadrNucleus.hh"
|
||||
|
||||
class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
G4IntegrHadrNucleus
|
||||
{
|
||||
|
||||
public:
|
||||
G4DiffElasticHadrNucleus() : // G4HadronValues(),
|
||||
G4IntegrHadrNucleus() {Factors();}
|
||||
|
||||
~G4DiffElasticHadrNucleus() {;}
|
||||
|
||||
G4double HadrNuclDifferCrSec(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus,
|
||||
G4double Q2);
|
||||
|
||||
void GetNucleusParameters(G4Nucleus * aNucleus);
|
||||
|
||||
private:
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double binom(G4int N, G4int M)
|
||||
{
|
||||
G4double Fact1 = 1;
|
||||
if ((N>1) & (N>=M))
|
||||
{
|
||||
Fact1 = Factorials[N]/Factorials[M]/
|
||||
Factorials[N-M];
|
||||
}
|
||||
return Fact1;
|
||||
}
|
||||
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double Factorial(G4int N)
|
||||
{
|
||||
G4double Res;
|
||||
Res = 1;
|
||||
if(N == 0) return Res;
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
if(N >= 100) Res = 2.50662827*exp(-N-1.0)*pow(N+1.0,N+0.5)*
|
||||
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
|
||||
139/51840/(N+1)/(N+1)/(N+1)-
|
||||
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
|
||||
|
||||
return Res;
|
||||
}
|
||||
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
void Factors()
|
||||
{
|
||||
G4int ii, ll, mm;
|
||||
G4double Sum1, Fac1, Fac3, Sum3;
|
||||
|
||||
Factorials[0] = 1;
|
||||
|
||||
for( ii = 1; ii<250; ii++)
|
||||
{
|
||||
if(ii >= 100) Mnoj[ii] = 3.03; // there is the saturation
|
||||
else
|
||||
{
|
||||
Sum1 = 0;
|
||||
Fac1 = 1;
|
||||
|
||||
Factorials[ii] = Factorial(ii);
|
||||
|
||||
for( ll = 0; ll<=ii; ll++)
|
||||
{
|
||||
Fac1 = binom(ii,ll);
|
||||
|
||||
Fac3 = 1;
|
||||
Sum3 = 1;
|
||||
for( mm = 1; mm<=ii-ll; mm++)
|
||||
{
|
||||
Fac3 = binom(ii-ll,mm);
|
||||
Sum3 = Sum3 + 1/Fac3;
|
||||
} // mm
|
||||
Sum1 = Sum1 + Sum3/Fac1;
|
||||
} // ll
|
||||
Mnoj[ii] = Sum1;
|
||||
} // else
|
||||
} // ii
|
||||
Mnoj[0] = 1;
|
||||
|
||||
} // Factors
|
||||
// --------------------------------------------------------
|
||||
|
||||
G4double Mnoj[250], Factorials[250];
|
||||
|
||||
public:
|
||||
|
||||
G4double R1, R2, Pnucl, Aeff, AIm, ARe, DIm;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,181 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4ElasticHadrNucleusHe.hh
|
||||
|
||||
#ifndef G4ElasticHadrNucleusHE_h
|
||||
#define G4ElasticHadrNucleusHE_h 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Ions.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
#include "G4DiffElasticHadrNucleus.hh"
|
||||
#include "G4IntegrHadrNucleus.hh"
|
||||
#include "G4HadronicInteraction.hh"
|
||||
|
||||
#define ONQ2 150 // The number of steps on Q2
|
||||
#define ONE 5 // The number of steps on E
|
||||
#define AreaNumb 6 // The number of order steps on E
|
||||
#define ONQ2XE ONQ2*ONE // The dimension of a distr. func. array
|
||||
#define MaxN 10 // The atomic number where the calculation
|
||||
// on the formula is changed on the integral
|
||||
// one
|
||||
|
||||
class ElasticData
|
||||
{
|
||||
public:
|
||||
G4String hadrName;
|
||||
G4int nuclAtomicNumber;
|
||||
G4double TableE[ONE*AreaNumb];
|
||||
G4double TableQ2[ONQ2];
|
||||
G4double TableCrossSec[ONQ2XE*AreaNumb];
|
||||
|
||||
ElasticData() {;}
|
||||
~ElasticData(){;}
|
||||
|
||||
ElasticData (const ElasticData &t)
|
||||
{
|
||||
G4int k;
|
||||
|
||||
hadrName = t.hadrName;
|
||||
nuclAtomicNumber = t.nuclAtomicNumber;
|
||||
for(k = 0; k<ONE*AreaNumb; k++)
|
||||
TableE[k] = t.TableE[k];
|
||||
|
||||
for(k = 0; k<ONQ2; k++)
|
||||
TableQ2[k] = t.TableQ2[k];
|
||||
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++)
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
}
|
||||
|
||||
ElasticData & operator=(const ElasticData &t)
|
||||
{
|
||||
G4int k;
|
||||
if(this!=&t)
|
||||
{
|
||||
hadrName = t.hadrName;
|
||||
nuclAtomicNumber = t.nuclAtomicNumber;
|
||||
for(k = 0; k<ONE*AreaNumb; k++)
|
||||
TableE[k] = t.TableE[k];
|
||||
|
||||
for(k = 0; k<ONQ2; k++)
|
||||
TableQ2[k] = t.TableQ2[k];
|
||||
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++)
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class G4ElasticHadrNucleusHE : public G4DiffElasticHadrNucleus,
|
||||
public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4ElasticHadrNucleusHE(const G4ParticleDefinition * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4ElasticHadrNucleusHE();
|
||||
|
||||
~G4ElasticHadrNucleusHE() {;}
|
||||
|
||||
G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack,
|
||||
G4Nucleus &aNucleus);
|
||||
|
||||
G4double RandomElastic0();
|
||||
|
||||
G4double RandomElastic1( const G4DynamicParticle * aHadron,
|
||||
const ElasticData * aData);
|
||||
|
||||
private:
|
||||
G4int ReadOfData(G4ParticleDefinition * aParticle,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4String GetHadronName(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double GetQ2limit(G4double R1);
|
||||
|
||||
void CreationArray(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForHeavy(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForLight(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double InterPol(G4double X1, G4double X2, G4double X3,
|
||||
G4double Y1, G4double Y2, G4double Y3,
|
||||
G4double X);
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double Factorial1(G4int N)
|
||||
{
|
||||
G4double Res;
|
||||
Res = 1;
|
||||
if(N == 0) return Res;
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
else Res = 2.50662827*exp(-N-1.0)*pow(N+1.0,N+0.5)*
|
||||
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
|
||||
139/51840/(N+1)/(N+1)/(N+1)-
|
||||
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
|
||||
return Res;
|
||||
}
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
std::vector<ElasticData> SetOfElasticData;
|
||||
|
||||
G4IonTable MyIonTable;
|
||||
G4DiffElasticHadrNucleus aDiffElHadNcls;
|
||||
// G4HadFinalState FinState;
|
||||
|
||||
G4int Nstep, // The number of steps on Q2
|
||||
iKindWork, //
|
||||
iContr, //
|
||||
iPoE; // The number of steps on E
|
||||
G4int iTypeWork;
|
||||
G4double aNucleon; //,
|
||||
// * pTableCrSec, // The array of distr. func.
|
||||
// // at all energies
|
||||
// * pTableE; // The array of E values
|
||||
G4double iQ2[ONQ2], // The array of Q2 values
|
||||
pTableCrSec[ONQ2XE*AreaNumb],
|
||||
pTableE[ONE*AreaNumb],
|
||||
iIntgr[ONQ2], // The array of distr. func.
|
||||
// at one energy
|
||||
Factorials1[250]; // The array for factorials
|
||||
G4double dEbeg1, dEend1, dQ2, maxQ2;
|
||||
|
||||
}; // The end of the class description
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4HadronValues.hh
|
||||
|
||||
#ifndef G4HadronValues_h
|
||||
#define G4HadronValues_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
#include "G4XiMinus.hh"
|
||||
#include "G4XiZero.hh"
|
||||
#include "G4OmegaMinus.hh"
|
||||
|
||||
#include "G4AntiNeutron.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4AntiLambda.hh"
|
||||
#include "G4AntiSigmaPlus.hh"
|
||||
#include "G4AntiSigmaMinus.hh"
|
||||
#include "G4AntiSigmaZero.hh"
|
||||
#include "G4AntiXiMinus.hh"
|
||||
#include "G4AntiXiZero.hh"
|
||||
#include "G4AntiOmegaMinus.hh"
|
||||
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
|
||||
#define MyPi 3.141593
|
||||
#define MbToGeV2 2.568
|
||||
#define GeV2ToMb 0.38939
|
||||
#define MbToFm2 25.68
|
||||
|
||||
class G4HadronValues
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronValues() {;}
|
||||
~G4HadronValues() {;}
|
||||
|
||||
// protected:
|
||||
|
||||
void GetHadronValues(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double HadrTot, HadrSlope, HadrReIm, DDSect2, DDSect3,
|
||||
MomentumCM;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4IntegrHadrNucleus.hh
|
||||
|
||||
#ifndef G4IntegrHadrNucleus_h
|
||||
#define G4IntegrHadrNucleus_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4HadronValues.hh"
|
||||
|
||||
class G4IntegrHadrNucleus : public G4HadronValues
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4IntegrHadrNucleus() : G4HadronValues() {;}
|
||||
~G4IntegrHadrNucleus() {;}
|
||||
|
||||
G4double GetElasticCrossSection(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double GetTotalCrossSection(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double GetProductionCrossSection(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
|
||||
G4double GetInelasticCrossSection(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
|
||||
G4double GetQuasyElasticCrossSection(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
private:
|
||||
|
||||
void GetIntegralCrSec(G4Nucleus * aNucleus);
|
||||
|
||||
G4double TotalCrSec, InelCrSec, ProdCrSec, ElasticCrSec,
|
||||
QuasyElasticCrSec, HadrEnergy;
|
||||
|
||||
// protected:
|
||||
public:
|
||||
G4double Tot00, DTot00;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user