Import Geant4 7.1.0 source tree
This commit is contained in:
@@ -20,6 +20,9 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DiffElasticHadrNucleus.cc,v 1.15 2005/06/10 13:23:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
|
||||
//G4DiffElasticHadrNucleus.cc
|
||||
|
||||
@@ -78,9 +81,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
R1 = 4.45*std::pow(Nucleus-1.0,0.309);
|
||||
R1 = 4.45*std::pow(static_cast<double>(Nucleus-1),0.309);
|
||||
if(Nucleus == 28)
|
||||
R1 = 4.25*std::pow(Nucleus-1.0,0.309);
|
||||
R1 = 4.25*std::pow(static_cast<double>(Nucleus-1),0.309);
|
||||
R2 = 2.3*std::pow(static_cast<double>(Nucleus),0.36);
|
||||
Pnucl = 0.176+0.00167*Nucleus+
|
||||
8.69E-6*Nucleus*Nucleus;
|
||||
@@ -139,7 +142,7 @@
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
}
|
||||
|
||||
if(Nucleus>238)
|
||||
if(Nucleus>208)
|
||||
{
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
}
|
||||
@@ -234,7 +237,7 @@
|
||||
ReElasticAmpl0 = ReElasticAmpl0+Prod1*N*std::sin(FiH*i);
|
||||
ImElasticAmpl0 = ImElasticAmpl0+Prod1*N*std::cos(FiH*i);
|
||||
Tot1 = Tot1+medTot*N*std::cos(FiH*i);
|
||||
if(std::abs(Prod1*N/ImElasticAmpl0) < 0.000001) break;
|
||||
if(std::fabs(Prod1*N/ImElasticAmpl0) < 0.000001) break;
|
||||
} // i
|
||||
|
||||
ImElasticAmpl0 = ImElasticAmpl0*Pi1/2.568; // The amplitude in mB
|
||||
@@ -293,7 +296,7 @@
|
||||
|
||||
Din1 = Din1+Din2*N1p*Mnoj[i]/(i+2)/(i+1)*std::cos(FiH*i);
|
||||
DTot1 = DTot1+DmedTot*N1p*Mnoj[i]/(i+2)/(i+1)*std::cos(FiH*i);
|
||||
if(std::abs(Din2*N1p/Din1) < 0.000001) break;
|
||||
if(std::fabs(Din2*N1p/Din1) < 0.000001) break;
|
||||
} // i
|
||||
|
||||
Din1 = -1*Din1*Nucleus*(Nucleus-1)
|
||||
@@ -330,5 +333,244 @@
|
||||
|
||||
return DiffCrSec2; // dSig/dOmegaCM, mb/Ster
|
||||
} // function
|
||||
// ##############################################
|
||||
G4double G4DiffElasticHadrNucleus::
|
||||
Thickness(G4int A, G4double b)
|
||||
{
|
||||
G4double An=A, Dn, Ct, Tn, Bn, En;
|
||||
G4int kk;
|
||||
G4double dr, r, WSo, WS, SumZ=0, SumN;
|
||||
|
||||
dr = rAmax*rAfm/(NpointsB-1);
|
||||
|
||||
G4double Norm =
|
||||
3.0/4.0/3.1416/rAfm/rAfm/rAfm/(1+0.53*0.53*3.14*3.14/rAfm/rAfm);
|
||||
|
||||
// Norm = 1/(SqrtPi*Rlight*Rlight*Rlight*3.1416)/
|
||||
// (1+1.5*alpha*Rlight*Rlight);
|
||||
|
||||
SumN = 0.0;
|
||||
for(kk=0; kk<NpointsB; kk++)
|
||||
{
|
||||
r = kk*dr;
|
||||
WS = 1/(1+std::exp((std::sqrt(b*b+r*r)-rAfm)/0.53));
|
||||
WSo = 1/(1+std::exp((r-rAfm)/0.53));
|
||||
|
||||
// WS = (1.0+alpha*(b*b+r*r))*
|
||||
// std::exp(-(b*b+r*r)/Rlight/Rlight);
|
||||
// WSo = (1.0+alpha*r*r)*
|
||||
// std::exp(-r*r/Rlight/Rlight);
|
||||
|
||||
SumZ += WS*dr*Norm*A*2.0;
|
||||
SumN += 4*3.1416*r*r*WSo*dr*Norm;
|
||||
// G4cout<<" ThickI r "<<r<<" WS "<<WS<<" Wo "<<WSo
|
||||
// <<" SumZ "<<SumZ<<" SumN "<<SumN<<G4endl;
|
||||
}
|
||||
|
||||
Dn = 0.42*std::pow(An,-0.26); // fm^-2
|
||||
Bn = 8.0e-4*An*An;
|
||||
Ct = An*Dn/3.1416/std::log(1+Bn);
|
||||
En = std::exp(-Dn*b*b);
|
||||
Tn = Ct*Bn*En/(1+Bn*En); // fm^-2
|
||||
/*
|
||||
G4cout<<" Th: b "<<" "<<b<<" Sz "
|
||||
<<SumZ
|
||||
<<" SumN "<<SumN<<" Norm "<<Norm
|
||||
<<" Tn "<<Tn<<G4endl;
|
||||
*/
|
||||
return SumZ;
|
||||
// return Tn;
|
||||
}
|
||||
// ##############################################
|
||||
G4double G4DiffElasticHadrNucleus::
|
||||
GetIntegrandS(G4int Anucleus,
|
||||
G4double ImpactPar,
|
||||
G4int Kind)
|
||||
{
|
||||
G4int iInt;
|
||||
G4double ValS, Integ=0;
|
||||
G4double FunS, ExpS, I0bs;
|
||||
|
||||
for(iInt=1; iInt<NpointsB; iInt++)
|
||||
{
|
||||
ValS = iInt*stepB; // GeV^(-1)
|
||||
FunS = ImpactPar*ValS/HadrSlope;
|
||||
|
||||
if(Kind == 0) Thick[iInt] =
|
||||
Thickness(Anucleus, ValS/std::sqrt(25.68))/25.68;
|
||||
|
||||
I0bs = 0.0;
|
||||
if(FunS > 320) continue;
|
||||
|
||||
ExpS = std::exp(-(ValS*ValS+ImpactPar*ImpactPar)/2.0/HadrSlope);
|
||||
I0bs = MyI0(FunS);
|
||||
|
||||
FunS = ValS*ExpS*I0bs*Thick[iInt];
|
||||
Integ += FunS;
|
||||
/*
|
||||
if(ImpactPar*ValS/Slope>200 && ImpactPar>59 && ImpactPar<60 )
|
||||
G4cout<<" Int. S: S "<<ValS<<" Exp "<<ExpS
|
||||
<<" I0 "<<I0bs<<" Th(fm) "<<Thick[iInt]*25.68
|
||||
<<" F "<<FunS<<" Int "<<Integ<<G4endl;
|
||||
*/
|
||||
}
|
||||
return Integ*stepB;
|
||||
}
|
||||
// #############################################
|
||||
void G4DiffElasticHadrNucleus::
|
||||
GetIntegrandB(G4int Anucleus)
|
||||
{
|
||||
G4double ValB;
|
||||
G4int iInt;
|
||||
G4double expB, IntegS, InExp;
|
||||
G4double Sigm=HadrTot*2.568;
|
||||
|
||||
// G4cout<<G4endl<<" Nucleus (r0,r01):"<<r0<<" "<<r01
|
||||
// <<" "<<Anucleus<<" r "<<rAfm
|
||||
// <<" fm ("<<rAGeV<<" GeV^1)"<<G4endl<<G4endl;
|
||||
|
||||
for(iInt=0; iInt<NpointsB; iInt++)
|
||||
{
|
||||
ValB = iInt*stepB;
|
||||
IntegS = GetIntegrandS(Anucleus, ValB, iInt);
|
||||
InExp = -Sigm/2/HadrSlope*IntegS;
|
||||
expB = std::exp(InExp);
|
||||
|
||||
ReIntegrand[iInt] = (1.0-expB*std::cos(HadrReIm*InExp));
|
||||
ImIntegrand[iInt] = expB*std::sin(HadrReIm*InExp);
|
||||
|
||||
// G4cout<<" b Int(b) : "<<ValB<<" InExp "<<InExp<<" "
|
||||
// <<ReIntegrand[iInt]<<" 1-Re(B) "<<ReIntegrand[iInt]
|
||||
// <<" Im(B) "<<ImIntegrand[iInt]<<G4endl;
|
||||
}
|
||||
}
|
||||
// #############################################
|
||||
G4double G4DiffElasticHadrNucleus::
|
||||
HadrNuclDifferCrSecT(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus,
|
||||
G4double aQ2,
|
||||
G4int Kind)
|
||||
{
|
||||
G4double J0qb, Re;
|
||||
G4double HadrEnergy = aHadron->GetTotalEnergy()/1000; // GeV
|
||||
G4int Nucleus = (int)aNucleus->GetN();
|
||||
|
||||
if(Nucleus<4)
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
|
||||
if(Nucleus>208)
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
|
||||
// G4cout<<" Energy (T) "<<HadrEnergy<<G4endl;
|
||||
if(HadrEnergy < 1.4)
|
||||
// G4cout<<" The hadron energy is very low for this model !!!"<<G4endl;
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
|
||||
G4double Q2 = aQ2/1000/1000; // GeV
|
||||
|
||||
G4double S, MassH, MassN, EcmH;
|
||||
|
||||
switch(Nucleus)
|
||||
{
|
||||
case(208) : r0 = 1.125;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(90) : r0 = 1.12;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(58) : r0 = 1.09;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(48) : r0 = 1.07;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
|
||||
case(40) : r0 = 1.15;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(28) : r0 = 0.93;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(16) : r0 = 0.92;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(12) : r0 = 0.8;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
case(64) : r0 = 1.1;
|
||||
r01 = 1.16*0.0;
|
||||
break;
|
||||
default : Re = std::pow(static_cast<double>(Nucleus), 0.3333);
|
||||
r0 = 1.16*(1.0-1.16/Re/Re);
|
||||
}
|
||||
|
||||
MassH = aHadron->GetMass()/1000;
|
||||
MassN = Nucleus*0.938;
|
||||
S = 2*MassN*HadrEnergy+MassN*MassN+MassH*MassH;
|
||||
EcmH = (S-MassN*MassN+MassH*MassH)/2/std::sqrt(S);
|
||||
MomentumCMN = std::sqrt(EcmH*EcmH-MassH*MassH);
|
||||
|
||||
G4int kk;
|
||||
G4double ValB;
|
||||
G4double ReIntSumm=0.0, ImIntSumm=0.0, Section;
|
||||
|
||||
if(Kind == 0)
|
||||
{
|
||||
MassH = aHadron->GetMass()/1000;
|
||||
MassN = Nucleus*0.938;
|
||||
S = 2*MassN*HadrEnergy+MassN*MassN+MassH*MassH;
|
||||
EcmH = (S-MassN*MassN+MassH*MassH)/2/std::sqrt(S);
|
||||
MomentumCMN = std::sqrt(EcmH*EcmH-MassH*MassH);
|
||||
|
||||
rAfm = r0*std::pow(static_cast<double>(Nucleus), 0.3333)*
|
||||
(1-r01/std::pow(static_cast<double>(Nucleus),0.666));
|
||||
rAGeV = rAfm*std::sqrt(25.68);
|
||||
stepB = rAmax*rAGeV/(NpointsB-1);
|
||||
|
||||
GetIntegrandB(Nucleus);
|
||||
|
||||
// G4cout<<G4endl<<" Nucleus "<<Nucleus<<" r "<<rAfm
|
||||
// <<" fm ("<<rAGeV<<" GeV^1) "<<Kind<<G4endl<<G4endl;
|
||||
}
|
||||
|
||||
if(Kind==0) InCohI = 0.0;
|
||||
for(kk=0; kk<NpointsB; kk++)
|
||||
{
|
||||
ValB = stepB*kk;
|
||||
|
||||
if(Kind==0) InCohI += Thick[kk]*ValB*
|
||||
std::exp(-HadrTot*2.568*Thick[kk])
|
||||
*2.0*3.1416*stepB
|
||||
/16/3.1416*std::pow(HadrTot*2.568,2)*
|
||||
(1+std::pow(HadrReIm,2))/2.56;
|
||||
|
||||
J0qb = MyJ0(std::sqrt(Q2)*ValB)*ValB;
|
||||
ReIntSumm += J0qb*ReIntegrand[kk];
|
||||
ImIntSumm += J0qb*ImIntegrand[kk];
|
||||
/*
|
||||
G4cout<<" Q2 "<<Q2<<" B "<<ValB<<" Re "
|
||||
<<ReIntegrand[kk]<<" Im "<<ImIntegrand[kk]
|
||||
<<" J0qb "<<J0qb<<" ReF "<<ReIntSumm
|
||||
<<" ImF "<<ImIntSumm<<G4endl;
|
||||
*/
|
||||
}
|
||||
|
||||
InCoh = InCohI*
|
||||
// 2.0*3.1416*stepB
|
||||
// /16/3.1416*std::pow(HadrTot*2.568,2)*
|
||||
// (1+std::pow(HadrReIm,2))/2.568*
|
||||
std::exp(-HadrSlope*Q2);
|
||||
|
||||
Section = (ReIntSumm*ReIntSumm+ImIntSumm*ImIntSumm)
|
||||
/2.0/3.1416*2.568*MomentumCMN*MomentumCMN
|
||||
*stepB*stepB;
|
||||
|
||||
// Section = (ReIntSumm*ReIntSumm+ImIntSumm*ImIntSumm)
|
||||
// /2.0/Pi1*2.568*MomentumCMN*MomentumCMN;
|
||||
|
||||
return Section;
|
||||
}
|
||||
|
||||
/* End of file */
|
||||
|
||||
@@ -20,14 +20,21 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElasticHadrNucleusHE.cc,v 1.20 2005/06/13 10:57:18 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
// G4ElasticHadrNucleusHE.cc
|
||||
// 19.05.04 Variant for G4 6.1: The 'ApplayYourself' was changed
|
||||
//
|
||||
// 19.05.04 Variant for G4 6.1: The 'ApplyYourself' was changed
|
||||
|
||||
#include "G4ElasticHadrNucleusHE.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "strstream"
|
||||
#include "iostream"
|
||||
#include "fstream"
|
||||
#include <strstream>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -49,7 +56,7 @@
|
||||
iPoE = 5;
|
||||
Nstep = ONQ2;
|
||||
|
||||
const G4ParticleDefinition * aHadron = aHadron1;
|
||||
G4ParticleDefinition * aHadron = const_cast<G4ParticleDefinition *>(aHadron1);
|
||||
G4String sNameHdr = aHadron->GetParticleName();
|
||||
G4int iNnucl = (int) aNucleus->GetN();
|
||||
G4double Energies[5] = {1.5, 2.0, 4.0, 6.0, 10.0};
|
||||
@@ -59,29 +66,31 @@
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
}
|
||||
|
||||
if(iNnucl>238)
|
||||
if(iNnucl>208)
|
||||
{
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
}
|
||||
|
||||
MyIonTable = const_cast<G4IonTable *>(G4ParticleTable::GetParticleTable()->GetIonTable());
|
||||
|
||||
Factorials1[0] = 1;
|
||||
for( ii = 1; ii<110; ii++)
|
||||
Factorials1[ii] = Factorial1(ii);
|
||||
|
||||
G4DynamicParticle * innerHadron = new G4DynamicParticle();
|
||||
innerHadron->SetDefinition(const_cast<G4ParticleDefinition *>(aHadron) );
|
||||
innerHadron->SetDefinition(aHadron);
|
||||
|
||||
G4ThreeVector inVector(0.,0.,0.);
|
||||
|
||||
G4double mHadr = aHadron->GetPDGMass(); // MeV
|
||||
G4double curE, curP;
|
||||
|
||||
innerHadron->SetDefinition(const_cast<G4ParticleDefinition *>(aHadron));
|
||||
innerHadron->SetDefinition(aHadron);
|
||||
|
||||
G4double dPower=1000.0;
|
||||
|
||||
// G4cout<<G4endl<<" The preparing of elastic Data array "<<G4endl;
|
||||
// G4cout<<" for '"<<sNameHdr<<"' on nucleus "<<iNnucl<<G4endl<<G4endl;
|
||||
G4cout<<G4endl<<" The preparing of elastic Data array "<<G4endl;
|
||||
G4cout<<" for '"<<sNameHdr<<"' on nucleus "<<iNnucl<<G4endl<<G4endl;
|
||||
for( ik = 0; ik<AreaNumb; ik++)
|
||||
{
|
||||
for( ii = 0; ii<iPoE; ii++)
|
||||
@@ -99,14 +108,14 @@
|
||||
{
|
||||
pTableCrSec[ii*ONQ2+kk+ik*ONQ2XE] = iIntgr[kk];
|
||||
} // kk step Q2
|
||||
// G4cout<<" Energy of "<<sNameHdr<<" = "<<curE<<G4endl;
|
||||
G4cout<<" Energy of "<<sNameHdr<<" = "<<curE<<G4endl;
|
||||
} // ii step Ei
|
||||
dPower *= 10.0;
|
||||
} // ik step power
|
||||
|
||||
// G4cout<<" The array for elastic scattering of the "<<sNameHdr<<G4endl;
|
||||
// G4cout<<" on the Nuclues "<<iNnucl<<" has been prepared !"
|
||||
// <<G4endl<<G4endl;
|
||||
G4cout<<" The array for elastic scattering of the "<<sNameHdr<<G4endl;
|
||||
G4cout<<" on the Nuclues "<<iNnucl<<" has been prepared !"
|
||||
<<G4endl<<G4endl;
|
||||
|
||||
// --------- The writing of array into sName File ---------
|
||||
|
||||
@@ -142,7 +151,7 @@
|
||||
{
|
||||
curE = Energies[kk]*dPower;
|
||||
Mult = (int) curE;
|
||||
TestFile<<" "<<Mult<<" ";
|
||||
TestFile<<" "<<Mult<<" ";
|
||||
}
|
||||
TestFile<<G4endl;
|
||||
|
||||
@@ -157,10 +166,12 @@
|
||||
} // ik
|
||||
|
||||
TestFile.close();
|
||||
|
||||
// G4cout<<" The array for elastic scattering of "<<sNameHdr<<G4endl;
|
||||
// G4cout<<" on the Nuclues "<<iNnucl<<" has been written !"<<G4endl;
|
||||
// G4cout<<" The Name of File is "<<sNameFile.str()<<G4endl<<G4endl;
|
||||
if(getenv("HEElastic_debug"))
|
||||
{
|
||||
G4cout<<" The array for elastic scattering of "<<sNameHdr<<G4endl;
|
||||
G4cout<<" on the Nuclues "<<iNnucl<<" has been written !"<<G4endl;
|
||||
G4cout<<" The Name of File is "<<sNameFile.str()<<G4endl<<G4endl;
|
||||
}
|
||||
|
||||
iContr = 0;
|
||||
} // Constructor
|
||||
@@ -179,7 +190,7 @@
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
}
|
||||
|
||||
if(iNnucl>238)
|
||||
if(iNnucl>208)
|
||||
{
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
}
|
||||
@@ -190,7 +201,6 @@
|
||||
{
|
||||
sPath = getenv("G4ELASTICDATA");
|
||||
sPath = sPath+"/Elastic/";
|
||||
// G4cout << "@@@@ Path found "<<std::endl;
|
||||
}
|
||||
else sPath = "./Elastic/";
|
||||
|
||||
@@ -198,10 +208,15 @@
|
||||
|
||||
std::ostrstream sNameFile;
|
||||
sNameFile<<sPath<<sNameHdr<<"_"<<iNnucl<<".dat"<<std::ends;
|
||||
|
||||
if(getenv("HEElastic_debug"))
|
||||
{
|
||||
G4cout <<" Reading file for: Hadron - "<<sNameHdr
|
||||
<<". Nucleus - "<<iNnucl<<G4endl;
|
||||
G4cout <<" The Name of File is "<<sNameFile.str()<<G4endl;
|
||||
}
|
||||
|
||||
// G4cout <<" Reading file for: Hadron - "<<sNameHdr
|
||||
// <<". Nucleus - "<<iNnucl<<G4endl;
|
||||
// G4cout <<" The Name of File is "<<sNameFile.str()<<G4endl;
|
||||
MyIonTable = const_cast<G4IonTable *>(G4ParticleTable::GetParticleTable()->GetIonTable());
|
||||
|
||||
GetNucleusParameters(aNucleus);
|
||||
|
||||
@@ -222,8 +237,7 @@
|
||||
if(TestFile)
|
||||
{
|
||||
ElasticData ElD;
|
||||
|
||||
// G4cout<<" The file exists "<<G4endl;
|
||||
if(getenv("HEElastic_debug")) G4cout<<" The file exists "<<G4endl;
|
||||
|
||||
ElD.hadrName = sNameHdr;
|
||||
ElD.nuclAtomicNumber = iNnucl;
|
||||
@@ -236,20 +250,14 @@
|
||||
{
|
||||
dPower = std::pow(10.0,ik);
|
||||
|
||||
for(kk=0; kk<iPoE; kk++)
|
||||
{
|
||||
if(kk+ik*iPoE >= ONE*AreaNumb) G4Exception("Fucked up !!!!!");
|
||||
TestFile >> ElD.TableE[kk+ik*iPoE];
|
||||
}
|
||||
for(kk=0; kk<iPoE; kk++) TestFile >> ElD.TableE[kk+ik*iPoE];
|
||||
|
||||
for(ii=0; ii<ONQ2; ii++)
|
||||
{
|
||||
|
||||
ElD.TableQ2[ii] = iQ2[ii];
|
||||
for(kk=0; kk<iPoE; kk++)
|
||||
{
|
||||
TestFile >> ElD.TableCrossSec[kk*ONQ2+ii+ik*ONQ2XE];
|
||||
if(kk*ONQ2+ii+ik*ONQ2XE>=ONQ2XE*AreaNumb) G4Exception("REALLY Fucked up !!!!!");
|
||||
}
|
||||
// G4cout<<" iQ2 "<<iQ2[ii];
|
||||
} // ii
|
||||
// G4cout<<G4endl;
|
||||
@@ -259,10 +267,13 @@
|
||||
|
||||
SetOfElasticData.push_back(ElD);
|
||||
|
||||
// G4cout<<" The array for elastic scattering of "<<sNameHdr;
|
||||
// G4cout<<" on the Nuclues "<<iNnucl<<G4endl;
|
||||
// G4cout<<" from the file "<<sNameFile.str()<<" has been readout !"
|
||||
// <<G4endl<<G4endl;
|
||||
if(getenv("HEElastic_debug"))
|
||||
{
|
||||
G4cout<<" The array for elastic scattering of "<<sNameHdr;
|
||||
G4cout<<" on the Nuclues "<<iNnucl<<G4endl;
|
||||
G4cout<<" from the file "<<sNameFile.str()<<" has been readout !"
|
||||
<<G4endl<<G4endl;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} // if check
|
||||
@@ -293,7 +304,7 @@
|
||||
|
||||
G4String sHadron;
|
||||
|
||||
// G4cout<<" Name "<<dHadron->GetParticleName()<<G4endl;
|
||||
G4cout<<" Name "<<dHadron->GetParticleName()<<G4endl;
|
||||
|
||||
sHadron = dHadron->GetParticleName();
|
||||
|
||||
@@ -384,6 +395,8 @@
|
||||
{
|
||||
G4int nN, nZ;
|
||||
|
||||
G4IonTable * MyIonTable = const_cast<G4IonTable *>(G4ParticleTable::GetParticleTable()->GetIonTable());
|
||||
|
||||
iContr = 133;
|
||||
|
||||
if(iContr==137)
|
||||
@@ -406,12 +419,12 @@
|
||||
G4cout<<" In Apply: HadMass HadName "<<hadrMass
|
||||
<<" "<<hadrName<<G4endl;
|
||||
|
||||
// hpw G4ParticleDefinition * hadrDef = new G4ParticleDefinition(
|
||||
// hpw hadrName, hadrMass,0,0,0,0,0,0,0,0," a ",0,0,0,0,0,0,0);
|
||||
G4ParticleDefinition * hadrDef = new G4ParticleDefinition(
|
||||
hadrName, hadrMass,0,0,0,0,0,0,0,0," a ",0,0,0,0,0,0,0);
|
||||
|
||||
G4ThreeVector hadrMomentum = aHadron.Get4Momentum().vect();
|
||||
|
||||
aParticle->SetDefinition(const_cast<G4ParticleDefinition *>(aHadron.GetDefinition() ) );
|
||||
aParticle->SetDefinition(hadrDef);
|
||||
aParticle->SetMomentum(hadrMomentum);
|
||||
|
||||
G4double inLabMom = aHadron.GetTotalMomentum(); // MeV
|
||||
@@ -426,7 +439,7 @@
|
||||
G4ParticleDefinition * secNuclDef;
|
||||
G4DynamicParticle * secNuclDyn = new G4DynamicParticle();
|
||||
|
||||
secNuclDef = MyIonTable.GetIon(nZ, nN);
|
||||
secNuclDef = MyIonTable->GetIon(nZ, nN);
|
||||
secNuclDyn->SetDefinition(secNuclDef);
|
||||
// -------------------------------------------
|
||||
size_t SizeData = SetOfElasticData.size();
|
||||
@@ -442,7 +455,7 @@
|
||||
// <<SetOfElasticData[SizeData-1].hadrName
|
||||
// <<" from main: "<<nN<<" "<<hadrName<<G4endl;
|
||||
|
||||
for(size_t kk = 0; kk<SizeData; kk++)
|
||||
for(unsigned int kk = 0; kk<SizeData; kk++)
|
||||
{
|
||||
// G4cout<<" From set kk: "<<kk<<" Atnumb, hadrName "
|
||||
// <<SetOfElasticData[kk].nuclAtomicNumber<<" "
|
||||
@@ -463,7 +476,7 @@
|
||||
|
||||
else
|
||||
{
|
||||
G4int TestFile = ReadOfData(const_cast<G4ParticleDefinition *>(aHadron.GetDefinition()), &aNucleus);
|
||||
G4int TestFile = ReadOfData(hadrDef, &aNucleus);
|
||||
if(TestFile < 0)
|
||||
{
|
||||
// G4cout<<" File for elastic scattering of hadron "
|
||||
@@ -811,8 +824,8 @@ void G4ElasticHadrNucleusHE::ArrayForHeavy(
|
||||
GetNucleusParameters(aNucleus);
|
||||
|
||||
////// G4double aNuc = aNucleus->GetN();
|
||||
G4double intgrS(0), intgStep(0);
|
||||
G4int ii(0);
|
||||
G4double intgrS=0., intgStep;
|
||||
G4int ii, Kind=0;
|
||||
|
||||
iIntgr[0] = 0;
|
||||
|
||||
@@ -829,10 +842,18 @@ void G4ElasticHadrNucleusHE::ArrayForHeavy(
|
||||
|
||||
for(G4int ll=0; ll<20; ll++)
|
||||
{
|
||||
// curSec = aDiffElHadNcls.
|
||||
// HadrNuclDifferCrSec(aHadron,
|
||||
// aNucleus,
|
||||
// curQ2);
|
||||
curSec = aDiffElHadNcls.
|
||||
HadrNuclDifferCrSec(aHadron,
|
||||
aNucleus,
|
||||
curQ2);
|
||||
HadrNuclDifferCrSecT(aHadron,
|
||||
aNucleus,
|
||||
curQ2,
|
||||
Kind);
|
||||
|
||||
// G4cout<<" ForHeavy: curQ2 curSec "<<curQ2
|
||||
// <<" "<<curSec<<" Kind "<<Kind<<G4endl;
|
||||
|
||||
curQ2 = curQ2 + ddQ2;
|
||||
curSum = curSum + curSec*aSimp;
|
||||
@@ -840,6 +861,7 @@ void G4ElasticHadrNucleusHE::ArrayForHeavy(
|
||||
if(aSimp > 3 ) aSimp = 2;
|
||||
else aSimp = 4;
|
||||
if(ll == 0) aSimp = 4;
|
||||
Kind = 1;
|
||||
} // ll
|
||||
intgStep = curSum*ddQ2/3;
|
||||
// --------------------------------------------------------------------
|
||||
@@ -965,12 +987,12 @@ void G4ElasticHadrNucleusHE::ArrayForHeavy(
|
||||
} // m2
|
||||
Prod1 = Prod1 + Prod2*N2*std::cos(FiH*(i1-i2));
|
||||
Tot0 = Tot0 + Prod2*N2*std::sin(FiH*(i1-i2));
|
||||
if (std::abs(Prod2*N2/Prod1)<1e-6) break;
|
||||
if (std::fabs(Prod2*N2/Prod1)<1e-6) break;
|
||||
|
||||
} // i2
|
||||
// ImDistr = Tot0 + Tot0*N1;
|
||||
Prod0 = Prod0 + Prod1*N1;
|
||||
if(std::abs(N1*Prod1/Prod0) < 1e-6) break;
|
||||
if(std::fabs(N1*Prod1/Prod0) < 1e-6) break;
|
||||
|
||||
} // i1
|
||||
Prod0 = Prod0*Pi1/2.568/4; // This is in mb
|
||||
@@ -994,7 +1016,7 @@ G4double G4ElasticHadrNucleusHE::InterPol(
|
||||
G4double F32 = X3*X3;
|
||||
G4double D0 = F12*X2+X1*F32+X3*F22-F32*X2-F22*X1-F12*X3;
|
||||
|
||||
if(std::abs(D0) < 1e-8 || D0 == 0)
|
||||
if(std::fabs(D0) < 1e-8 || D0 == 0)
|
||||
ranQ2 = (Y2+(X-X2)*(Y3-Y2) /(X3-X2)); // MeV^2
|
||||
|
||||
else {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
G4ParticleDefinition * dHadron = aHadron->GetDefinition();
|
||||
|
||||
G4int iHadron=-1; // dummy value to shut off compiler warning
|
||||
G4int iHadron(-1);
|
||||
|
||||
if(dHadron == G4Proton::Proton() ||
|
||||
dHadron == G4Neutron::Neutron() ||
|
||||
@@ -75,6 +75,7 @@
|
||||
|
||||
if(HadrEnergy<1.0)
|
||||
{
|
||||
G4cout<<HadrEnergy<<G4endl;
|
||||
G4Exception(" The hadron Energy is very low for this method!");
|
||||
}
|
||||
switch (iHadron)
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IntegrHadrNucleus.cc,v 1.12 2005/06/10 13:23:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
//
|
||||
// IntegrHadrNucleus.cc
|
||||
|
||||
#include "globals.hh"
|
||||
@@ -29,21 +33,21 @@
|
||||
void G4IntegrHadrNucleus::
|
||||
GetIntegralCrSec(G4Nucleus * aNucleus)
|
||||
{
|
||||
G4int i, /*k,*/ l/*, m*/;
|
||||
G4double N, N1, N2, N3, N4, Delta, Inel1/*, Inel3*/;
|
||||
G4double Tot0, Inel0, /*Inel2,*/ Prod0, Prod1,
|
||||
G4int i, l;
|
||||
G4double N, N1, N2, N3, N4, Delta, Inel1;
|
||||
G4double Tot0, Inel0, Prod0, Prod1,
|
||||
ak, Delt, Delt2, Delt3;
|
||||
G4double Rnucl, R0, Stot, Bhad, Asq, MbToB, Pi1;
|
||||
G4double Dtot, /*Dinel,*/ Dprod, Rnuc2, RB, R2B, bk, bd;
|
||||
G4double Dtot, Dprod, Rnuc2, RB, R2B, bk, bd;
|
||||
|
||||
G4int Anucleus = static_cast<G4int>( aNucleus->GetN() );
|
||||
G4int Anucleus = (int) aNucleus->GetN();
|
||||
|
||||
if(Anucleus<4)
|
||||
{
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
}
|
||||
|
||||
if(Anucleus>238)
|
||||
if(Anucleus>208)
|
||||
{
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
}
|
||||
@@ -56,12 +60,12 @@
|
||||
Asq = 1+HadrReIm*HadrReIm;
|
||||
|
||||
R0 = std::sqrt(0.99); //{ This is fermi}
|
||||
|
||||
if (Anucleus >10) R0 = std::sqrt(0.84);
|
||||
if (Anucleus >20) R0 = std::sqrt((35.34+0.5*Anucleus)
|
||||
/(40.97+Anucleus));
|
||||
if (Anucleus == 16) R0 = std::sqrt(0.75);
|
||||
if (Anucleus == 58) R0 = std::sqrt(0.6);
|
||||
|
||||
// R0 = std::sqrt(0.64);
|
||||
|
||||
Rnucl = R0*std::pow(static_cast<double>(Anucleus),0.3333); //{In Fermi }
|
||||
@@ -107,7 +111,7 @@
|
||||
|
||||
// Inel2 = Inel2+Inel1*N3;
|
||||
Prod0 = Prod0+Prod1*N3;
|
||||
if(std::abs(N1/i/Inel0) < 0.0001) break;
|
||||
if(std::fabs(N1/i/Inel0) < 0.0001) break;
|
||||
} // i
|
||||
|
||||
Tot0 = Tot0*HadrTot;
|
||||
@@ -148,8 +152,8 @@
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.5)
|
||||
G4cout << " The hadron energy is very low for this model !!!"<<G4endl;
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -164,8 +168,8 @@ if(HadrEnergy < 1.5)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.5)
|
||||
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -180,8 +184,8 @@ if(HadrEnergy < 1.5)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.5)
|
||||
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -196,8 +200,8 @@ if(HadrEnergy < 1.5)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.5)
|
||||
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -212,8 +216,8 @@ if(HadrEnergy < 1.5)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.5)
|
||||
G4cout <<" The hadron energy is very low for this model !!!"<<G4endl;
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
|
||||
Reference in New Issue
Block a user