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
@@ -24,16 +24,19 @@
// ********************************************************************
//
//
// $Id: G4DiffractiveExcitation.cc,v 1.4 2006/06/29 20:55:35 gunter Exp $
// $Id: G4DiffractiveExcitation.cc,v 1.5 2007/04/24 10:37:10 gunter Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
// ---------------- G4DiffractiveExcitation --------------
// by Gunter Folger, October 1998.
// diffractive Excitation used by strings models
// Take a projectile and a target
// excite the projectile and target
// ------------------------------------------------------------
// diffractive Excitation used by strings models
// Take a projectile and a target
// excite the projectile and target
// Essential changed by V. Uzhinsky in November - December 2006
// in order to put it in a correspondence with original FRITIOF
// model. Variant of FRITIOF with nucleon de-excitation is implemented.
// ---------------------------------------------------------------------
#include "globals.hh"
@@ -47,10 +50,7 @@
#include "G4ExcitedString.hh"
//#include "G4ios.hh"
G4DiffractiveExcitation::G4DiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
:
widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
minmass(x0mass)
G4DiffractiveExcitation::G4DiffractiveExcitation() // Uzhi
{
}
@@ -59,12 +59,67 @@ G4bool G4DiffractiveExcitation::
{
G4LorentzVector Pprojectile=projectile->Get4Momentum();
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
// -------------------- Projectile parameters -----------------------------------
G4bool PutOnMassShell=0;
// G4double M0projectile=projectile->GetDefinition()->GetPDGMass(); // With de-excitation
G4double M0projectile = Pprojectile.mag(); // Without de-excitation
if(M0projectile < projectile->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0projectile=projectile->GetDefinition()->GetPDGMass();
}
G4double Mprojectile2 = M0projectile * M0projectile;
G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding();
G4int absPDGcode=std::abs(PDGcode);
G4double ProjectileDiffCut;
G4double AveragePt2;
if( absPDGcode > 1000 ) //------Projectile is baryon --------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion -----------
{
ProjectileDiffCut = 1.0; // GeV
AveragePt2 = 0.3; // GeV^2
}
else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon -----------
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
}
else //------Projectile is undefined, Nucleon assumed
{
ProjectileDiffCut = 1.1; // GeV
AveragePt2 = 0.3; // GeV^2
};
ProjectileDiffCut = ProjectileDiffCut * GeV;
AveragePt2 = AveragePt2 * GeV*GeV;
// -------------------- Target parameters ----------------------------------------------
G4LorentzVector Ptarget=target->Get4Momentum();
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
// G4cout << "E proj, target :" << Pprojectile.e() << ", " <<
// Ptarget.e() << G4endl;
G4double M0target = Ptarget.mag();
if(M0target < target->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
M0target=target->GetDefinition()->GetPDGMass();
}
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); // for AA-inter.
G4double NuclearNucleonDiffCut = 1.1*GeV;
G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut;
G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut;
// Transform momenta to cms and then rotate parallel to z axis;
@@ -78,25 +133,64 @@ G4bool G4DiffractiveExcitation::
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
// G4cout << " abort Collision!! " << G4endl;
//G4cout << " abort Collision!! " << G4endl;
return false;
}
toCms.rotateZ(-1*Ptmp.phi());
toCms.rotateY(-1*Ptmp.theta());
// G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
// G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
G4LorentzRotation toLab(toCms.inverse());
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
// G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl;
// G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
G4double Pt2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4double PZcms2, PZcms;
G4double PMinusNew, TPlusNew;
G4double S=Psum.mag2();
G4double SqrtS=std::sqrt(S);
if(SqrtS < 2200*MeV) {return false;} // The model cannot work for pp-interactions
// at Plab < 1.3 GeV/c. Uzhi
PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
if(PZcms2 < 0)
{return false;} // It can be in an interaction with off-shell nuclear nucleon
PZcms = std::sqrt(PZcms2);
if(PutOnMassShell)
{
if(Pprojectile.z() > 0.)
{
Pprojectile.setPz( PZcms);
Ptarget.setPz( -PZcms);
}
else
{
Pprojectile.setPz(-PZcms);
Ptarget.setPz( PZcms);
};
Pprojectile.setE(std::sqrt(Mprojectile2+
Pprojectile.x()*Pprojectile.x()+
Pprojectile.y()*Pprojectile.y()+
PZcms2));
Ptarget.setE(std::sqrt( Mtarget2 +
Ptarget.x()*Ptarget.x()+
Ptarget.y()*Ptarget.y()+
PZcms2));
}
G4double maxPtSquare = PZcms2;
//G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl;
//G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
// G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl;
// G4cout << " Projectile Xplus / Xminus : " <<
@@ -105,28 +199,31 @@ G4bool G4DiffractiveExcitation::
// Ptarget.plus() << " / " << Ptarget.minus() << G4endl;
G4LorentzVector Qmomentum;
G4double Qminus, Qplus;
// /* Vova
G4int whilecount=0;
do {
// Generate pt
G4double maxPtSquare=sqr(Ptarget.pz());
if (whilecount++ >= 500 && (whilecount%100)==0)
// G4cout << "G4DiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << G4endl;
if (whilecount > 1000 )
{
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
// G4cout << "G4DiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
return false; // Ignore this interaction
}
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
// G4cout << "generated Pt " << Qmomentum << G4endl;
// G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl;
// G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl;
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
//G4cout << "generated Pt " << Qmomentum << G4endl;
//G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl;
//G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl;
// Momentum transfer
/* // Uzhi
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
@@ -138,26 +235,89 @@ G4bool G4DiffractiveExcitation::
G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
*/ // Uzhi *
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
ProjMassT2=Mprojectile2+Pt2;
ProjMassT =std::sqrt(ProjMassT2);
TargMassT2=Mtarget2+Pt2;
TargMassT =std::sqrt(TargMassT2);
PZcms2=(S*S+ProjMassT2*ProjMassT2+
TargMassT2*TargMassT2-
2.*S*ProjMassT2-2.*S*TargMassT2-
2.*ProjMassT2*TargMassT2)/4./S;
if(PZcms2 < 0 ) {PZcms2=0;};
PZcms =std::sqrt(PZcms2);
G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms;
G4double PMinusMax=SqrtS-TargMassT;
PMinusNew=ChooseP(PMinusMin,PMinusMax);
Qminus=PMinusNew-Pprojectile.minus();
G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms;
G4double TPlusMax=SqrtS-ProjMassT;
TPlusNew=ChooseP(TPlusMin, TPlusMax);
Qplus=-(TPlusNew-Ptarget.plus());
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
// G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
//G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
// G4cout << "pt2" << pt2 << G4endl;
// G4cout << "Qmomentum " << Qmomentum << G4endl;
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
/* // Uzhi
} while ( (Pprojectile+Qmomentum).mag2() <= Mprojectile2 ||
(Ptarget-Qmomentum).mag2() <= Mtarget2 );
*/ // Uzhi *
} while (( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // Uzhi No without excitation
(Ptarget -Qmomentum).mag2() < Mtarget2 ) || // Uzhi
( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // Uzhi No double Diffraction
(Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );// Uzhi
if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2) // Uzhi Projectile diffraction
{
G4double TMinusNew=SqrtS-PMinusNew;
Qminus=Ptarget.minus()-TMinusNew;
TPlusNew=TargMassT2/TMinusNew;
Qplus=Ptarget.plus()-TPlusNew;
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
}
else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2) // Uzhi Target diffraction
{
G4double PPlusNew=SqrtS-TPlusNew;
Qplus=PPlusNew-Pprojectile.plus();
PMinusNew=ProjMassT2/PPlusNew;
Qminus=PMinusNew-Pprojectile.minus();
Qmomentum.setPz( (Qplus-Qminus)/2 );
Qmomentum.setE( (Qplus+Qminus)/2 );
};
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
// G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
// G4cout << "Ptarget with Q : " << Ptarget << G4endl;
// Vova
/*
Pprojectile.setPz(0.);
Pprojectile.setE(SqrtS-M0target);
Ptarget.setPz(0.);
Ptarget.setE(M0target);
*/
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
@@ -166,18 +326,18 @@ G4bool G4DiffractiveExcitation::
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
// G4cout << "Target mass " << Ptarget.mag() << G4endl;
//G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
target->Set4Momentum(Ptarget);
//
// G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
projectile->Set4Momentum(Pprojectile);
return true;
return true;
}
@@ -215,6 +375,7 @@ G4ExcitedString * G4DiffractiveExcitation::
G4double maxAvailMomentumSquared=
sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) );
G4double widthOfPtSquare = 0.25; // Uzhi <Pt^2>=0.25 ??????????????????
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
@@ -260,49 +421,53 @@ G4ExcitedString * G4DiffractiveExcitation::
// --------- private methods ----------------------
G4double G4DiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
G4double G4DiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const // Uzhi
{
// choose an x between Xmin and Xmax with P(x) ~ 1/x
// to be improved...
G4double range=Xmax-Xmin;
G4double range=Pmax-Pmin; // Uzhi
if ( Xmin <= 0. || range <=0. )
if ( Pmin <= 0. || range <=0. )
{
G4cout << " Xmin, range : " << Xmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation::ChooseX : Invalid arguments ");
G4cout << " Pmin, range : " << Pmin << " , " << range << G4endl;
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation::ChooseP : Invalid arguments ");
}
G4double x;
G4double P;
/* // Uzhi
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() );
*/ // Uzhi
P=Pmin * std::pow(Pmax/Pmin,G4UniformRand()); // Uzhi
//debug-hpw cout << "DiffractiveX "<<x<<G4endl;
return x;
return P;
}
G4ThreeVector G4DiffractiveExcitation::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
G4ThreeVector G4DiffractiveExcitation::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const // Uzhi
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
G4double pt2;
G4double Pt2;
/* // Uzhi
do {
pt2=widthSquare * std::log( G4UniformRand() );
} while ( pt2 > maxPtSquare);
*/ // Uzhi
Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() * (std::exp(-maxPtSquare/AveragePt2)-1.));// Uzhi
pt2=std::sqrt(pt2);
G4double Pt=std::sqrt(Pt2);
G4double phi=G4UniformRand() * twopi;
return G4ThreeVector (pt2*std::cos(phi), pt2*std::sin(phi), 0.);
return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
}
G4DiffractiveExcitation::G4DiffractiveExcitation(const G4DiffractiveExcitation &)
:
widthOfPtSquare(0) , minExtraMass(0),
minmass(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation copy contructor not meant to be called");
}
@@ -331,8 +496,3 @@ int G4DiffractiveExcitation::operator!=(const G4DiffractiveExcitation &) const
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation != operator meant to be called");
return true;
}
@@ -0,0 +1,194 @@
//
// ********************************************************************
// * 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: G4FTFCrossSection.cc,v 1.2 2007/04/24 10:37:10 gunter Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
#include "G4FTFCrossSection.hh"
G4FTFCrossSection::G4FTFCrossSection()
{;}
G4FTFCrossSection::~G4FTFCrossSection()
{;}
//**********************************************************************************************
G4FTFCrossSection::G4FTFCrossSection(const G4ParticleDefinition * particle, G4double s)
{
G4int PDGcode = particle->GetPDGEncoding();
G4int absPDGcode = std::abs(PDGcode);
G4double Elab = (s - 2*0.88*GeV*GeV)/(2*0.939*GeV)/GeV;
G4double Plab = std::sqrt(Elab * Elab - 0.88);
G4double LogPlab = std::log( Plab );
G4double sqrLogPlab = LogPlab * LogPlab;
//G4cout<<"G4FTFCrossSection Plab "<<Plab<<G4endl;
G4int NumberOfTargetProtons = 1; //aNucleus.GetZ(); // ??????????????????????
G4int NumberOfTargetNeutrons = 1; //aNucleus.GetN();
G4int NumberOfTargetNucleons = NumberOfTargetProtons + NumberOfTargetNeutrons;
G4double Xtotal, Xelastic;
if( absPDGcode > 1000 ) //------Projectile is baryon --------
{
G4double XtotPP = 48.0 + 0. *std::pow(Plab, 0. ) + 0.522*sqrLogPlab - 4.51*LogPlab;
G4double XtotPN = 47.3 + 0. *std::pow(Plab, 0. ) + 0.513*sqrLogPlab - 4.27*LogPlab;
G4double XelPP = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
G4double XelPN = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotPP +
NumberOfTargetNeutrons * XtotPN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelPP +
NumberOfTargetNeutrons * XelPN ) / NumberOfTargetNucleons;
}
else if( PDGcode == 211 ) //------Projectile is PionPlus -------
{
G4double XtotPiP = 16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab;
G4double XtotPiN = 33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab;
G4double XelPiP = 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab;
G4double XelPiN = 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotPiP +
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelPiP +
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
}
else if( PDGcode == -211 ) //------Projectile is PionMinus -------
{
G4double XtotPiP = 33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab;
G4double XtotPiN = 16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab;
G4double XelPiP = 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab;
G4double XelPiN = 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotPiP +
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelPiP +
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
}
else if( PDGcode == 111 ) //------Projectile is PionZero -------
{
G4double XtotPiP =(16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab + //Pi+
33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab)/2; //Pi-
G4double XtotPiN =(33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab + //Pi+
16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
G4double XelPiP =( 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab + //Pi+
1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
G4double XelPiN =( 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab + //Pi+
0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
Xtotal = ( NumberOfTargetProtons * XtotPiP +
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelPiP +
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
}
else if( PDGcode == 321 ) //------Projectile is KaonPlus -------
{
G4double XtotKP = 18.1 + 0. *std::pow(Plab, 0. ) + 0.26 *sqrLogPlab - 1.0 *LogPlab;
G4double XtotKN = 18.7 + 0. *std::pow(Plab, 0. ) + 0.21 *sqrLogPlab - 0.89*LogPlab;
G4double XelKP = 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab;
G4double XelKN = 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotKP +
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelKP +
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
}
else if( PDGcode ==-321 ) //------Projectile is KaonMinus ------
{
G4double XtotKP = 32.1 + 0. *std::pow(Plab, 0. ) + 0.66 *sqrLogPlab - 5.6 *LogPlab;
G4double XtotKN = 25.2 + 0. *std::pow(Plab, 0. ) + 0.38 *sqrLogPlab - 2.9 *LogPlab;
G4double XelKP = 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab;
G4double XelKN = 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotKP +
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelKP +
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
}
else if( PDGcode == 311 ) //------Projectile is KaonZero ------
{
G4double XtotKP =( 18.1 + 0. *std::pow(Plab, 0. ) + 0.26 *sqrLogPlab - 1.0 *LogPlab + //K+
32.1 + 0. *std::pow(Plab, 0. ) + 0.66 *sqrLogPlab - 5.6 *LogPlab)/2; //K-
G4double XtotKN =( 18.7 + 0. *std::pow(Plab, 0. ) + 0.21 *sqrLogPlab - 0.89*LogPlab + //K+
25.2 + 0. *std::pow(Plab, 0. ) + 0.38 *sqrLogPlab - 2.9 *LogPlab)/2; //K-
G4double XelKP =( 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab + //K+
7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab)/2; //K-
G4double XelKN =( 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab + //K+
5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab)/2; //K-
Xtotal = ( NumberOfTargetProtons * XtotKP +
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelKP +
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
}
else //------Projectile is undefined, Nucleon assumed
{
G4double XtotPP = 48.0 + 0. *std::pow(Plab, 0. ) + 0.522*sqrLogPlab - 4.51*LogPlab;
G4double XtotPN = 47.3 + 0. *std::pow(Plab, 0. ) + 0.513*sqrLogPlab - 4.27*LogPlab;
G4double XelPP = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
G4double XelPN = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
Xtotal = ( NumberOfTargetProtons * XtotPP +
NumberOfTargetNeutrons * XtotPN ) / NumberOfTargetNucleons;
Xelastic = ( NumberOfTargetProtons * XelPP +
NumberOfTargetNeutrons * XelPN ) / NumberOfTargetNucleons;
};
SetTotalCrossSection(Xtotal);
SetElastisCrossSection(Xelastic);
SetInelasticCrossSection(Xtotal-Xelastic);
//G4cout<<"G4FTFCrossSection Xt Xel "<<Xtotal<<" "<<Xelastic<<G4endl;
//-----------------------------------------------------------------------------------
SetSlope( Xtotal*Xtotal/16./pi/Xelastic/0.3894 ); // Slope parameter of elastic scattering
// (GeV/c)^(-2))
// Gaussian parametrization of
// elastic scattering amplitude assumed
//G4cout<<"G4FTFCrossSection Slope "<<GetSlope()<<G4endl;
//-----------------------------------------------------------------------------------
SetGamma0( GetSlope()*Xtotal/10./2./pi );
//-----------------------------------------------------------------------------------
//G4cout<<"G4FTFCrossSection Out"<<G4endl;
}
//**********************************************************************************************
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PomeronCrossSection.cc,v 1.4 2006/06/29 20:55:41 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4PomeronCrossSection.cc,v 1.6 2006/11/07 12:51:39 gunter Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
#include "G4PomeronCrossSection.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SingleDiffractiveExcitation.cc,v 1.4 2006/06/29 20:55:43 gunter Exp $
// $Id: G4SingleDiffractiveExcitation.cc,v 1.5 2006/11/07 12:48:29 gunter Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -185,8 +185,8 @@ G4bool G4SingleDiffractiveExcitation::
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
// G4cout << "Target mass " << Ptarget.mag() << G4endl;
// G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
// G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
// G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VPartonStringModel.cc,v 1.4 2006/06/29 20:55:49 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
// $Id: G4VPartonStringModel.cc,v 1.5 2007/01/24 10:29:30 gunter Exp $
// GEANT4 tag $Name: geant4-08-03 $
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -34,6 +34,8 @@
// by Gunter Folger, May 1998.
// abstract class for all Parton String Models
// ------------------------------------------------------------
// debug switch
//#define debug_PartonStringModel
#include "G4VPartonStringModel.hh"
@@ -110,8 +112,29 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
(*strings)[astring]->LorentzRotate(toLab);
}
// G4cout << "Total string energy = "<<stringEnergy<<G4endl;
#ifdef debug_PartonStringModel
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
// loop over wounded nucleus
G4int hits(0);
G4Nucleon * theCurrentNucleon = fancynucleus->StartLoop() ? fancynucleus->GetNextNucleon() : NULL;
while(theCurrentNucleon != NULL)
{
if(theCurrentNucleon->AreYouHit())
{
hits++;
}
theCurrentNucleon = fancynucleus->GetNextNucleon();
}
G4cout << " strE, nucleons, inE "
<< stringEnergy << " "
<< hits << " "
<< Ptmp.e() << " "
<< stringEnergy - 939.*hits - Ptmp.e()<< G4endl;
#endif
theResult = stringFragmentationModel->FragmentStrings(strings);
std::for_each(strings->begin(), strings->end(), DeleteString() );
delete strings;