Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
@@ -37,7 +37,19 @@ G4DiffractiveHHScatterer::G4DiffractiveHHScatterer()
theStringFragmentation(new G4LundStringFragmentation())
{}
// -------------------------------------------------------------------
void G4DiffractiveHHScatterer::CreateStrings()
/*
G4VSplitableHadron * aHadron,
G4bool isProjectile,
G4ExcitedString * FirstString,
G4ExcitedString * SecondString,
G4FTFParameters *theParameters)
*/
const
{}
/* -------------------------------------------------------------------
G4KineticTrackVector * G4DiffractiveHHScatterer::
Scatter(const G4KineticTrack & aTrack, const G4KineticTrack & bTrack)
{
@@ -75,3 +87,4 @@ Scatter(const G4KineticTrack & aTrack, const G4KineticTrack & bTrack)
return result;
}
*/
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DiffractiveSplitableHadron.cc,v 1.7 2008/03/31 15:34:01 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DiffractiveSplitableHadron.cc,v 1.8 2009/07/31 11:03:00 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// ------------------------------------------------------------
@@ -86,13 +86,13 @@ void G4DiffractiveSplitableHadron::SplitUp()
// flavours of quark ends
G4int PDGcode=GetDefinition()->GetPDGEncoding();
G4int stringStart, stringEnd;
ChooseStringEnds(PDGcode, &stringStart,&stringEnd);
Parton[0] = new G4Parton(stringStart);
Parton[1] = new G4Parton(stringEnd);
PartonIndex=-1;
}
G4Parton * G4DiffractiveSplitableHadron::GetNextParton()
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4ElasticHNScattering.cc,v 1.3 2008/05/19 12:56:36 vuzhinsk Exp $
// $Id: G4ElasticHNScattering.cc,v 1.14 2009/12/16 17:51:13 gunter Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -45,7 +45,7 @@
#include "G4ParticleDefinition.hh"
#include "G4VSplitableHadron.hh"
#include "G4ExcitedString.hh"
#include "G4FTFParameters.hh" // Uzhi 29.03.08
#include "G4FTFParameters.hh"
//#include "G4ios.hh"
G4ElasticHNScattering::G4ElasticHNScattering()
@@ -57,42 +57,42 @@ G4bool G4ElasticHNScattering::
G4VSplitableHadron *target,
G4FTFParameters *theParameters) const
{
//G4cout<<"G4ElasticHNScattering::ElasticScattering"<<G4endl;
// -------------------- Projectile parameters -----------------------------------
G4LorentzVector Pprojectile=projectile->Get4Momentum();
// -------------------- Projectile parameters -----------------------------------
G4bool PutOnMassShell=0;
if(Pprojectile.z() < 0.)
{
target->SetStatus(2);
return false;
}
G4bool PutOnMassShell(false);
G4double M0projectile = Pprojectile.mag();
if(M0projectile < projectile->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
{
PutOnMassShell=true;
M0projectile=projectile->GetDefinition()->GetPDGMass();
}
}
G4double Mprojectile2 = M0projectile * M0projectile;
// G4double AveragePt2=theParameters->GetSlope(); // Uzhi ???
// AveragePt2 = AveragePt2 * GeV*GeV;
G4double AveragePt2=theParameters->GetAvaragePt2ofElasticScattering();
// -------------------- Target parameters ----------------------------------------------
G4LorentzVector Ptarget=target->Get4Momentum();
G4double M0target = Ptarget.mag();
//G4cout<<" Mp Mt Pt2 "<<M0projectile<<" "<<M0target<<" "<<AveragePt2/GeV/GeV<<G4endl;
if(M0target < target->GetDefinition()->GetPDGMass())
{
PutOnMassShell=1;
{
PutOnMassShell=true;
M0target=target->GetDefinition()->GetPDGMass();
}
}
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2();
// for AA-inter.
G4double Mtarget2 = M0target * M0target;
// Transform momenta to cms and then rotate parallel to z axis;
G4LorentzVector Psum;
@@ -102,10 +102,11 @@ G4bool G4ElasticHNScattering::
G4LorentzVector Ptmp=toCms*Pprojectile;
if ( Ptmp.pz() <= 0. ) // Uzhi ???
if ( Ptmp.pz() <= 0. )
{
// "String" moving backwards in CMS, abort collision !!
//G4cout << " abort Collision!! " << G4endl;
target->SetStatus(2);
return false;
}
@@ -117,52 +118,73 @@ G4bool G4ElasticHNScattering::
Pprojectile.transform(toCms);
Ptarget.transform(toCms);
// ---------------------- Sampling of transfered Pt ------------------------
G4double Pt2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
// ---------------------- Putting on mass-on-shell, if needed ------------------------
G4double PZcms2, PZcms;
G4double S=Psum.mag2();
// G4double SqrtS=std::sqrt(S);
// G4double SqrtS=std::sqrt(S);
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
if(PZcms2 < 0.)
{ // It can be in an interaction with off-shell nuclear nucleon
if(M0projectile > projectile->GetDefinition()->GetPDGMass())
{ // An attempt to de-excite the projectile
// It is assumed that the target is in the ground state
M0projectile = projectile->GetDefinition()->GetPDGMass();
Mprojectile2=M0projectile*M0projectile;
PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
2*S*Mprojectile2 - 2*S*Mtarget2 - 2*Mprojectile2*Mtarget2)
/4./S;
if(PZcms2 < 0.){ return false;} // Non succesful attempt after the de-excitation
}
else // if(M0projectile > projectile->GetDefinition()->GetPDGMass())
{
target->SetStatus(2);
return false; // The projectile was not excited,
// but the energy was too low to put
// the target nucleon on mass-shell
} // end of if(M0projectile > projectile->GetDefinition()->GetPDGMass())
} // end of if(PZcms2 < 0.)
PZcms = std::sqrt(PZcms2);
if(PutOnMassShell)
{
{
if(Pprojectile.z() > 0.)
{
{
Pprojectile.setPz( PZcms);
Ptarget.setPz( -PZcms);
}
else
{
}
else // if(Pprojectile.z() > 0.)
{
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));
}
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));
} // end of if(PutOnMassShell)
G4double maxPtSquare = PZcms2;
// ------ Now we can calculate the transfered Pt --------------------------
G4double Pt2;
G4double ProjMassT2, ProjMassT;
G4double TargMassT2, TargMassT;
G4LorentzVector Qmomentum;
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
//G4cout<<"Pt2 GeV^2 "<<(Pt2)/GeV/GeV<<G4endl;
ProjMassT2=Mprojectile2+Pt2;
ProjMassT =std::sqrt(ProjMassT2);
@@ -174,61 +196,30 @@ G4bool G4ElasticHNScattering::
TargMassT2*TargMassT2-
2.*S*ProjMassT2-2.*S*TargMassT2-
2.*ProjMassT2*TargMassT2)/4./S;
if(PZcms2 < 0 ) {PZcms2=0;};
if(PZcms2 < 0 ) {PZcms2=0;};// to avoid the exactness problem
PZcms =std::sqrt(PZcms2);
Pprojectile.setPz( PZcms); // Uzhi Proj can move backward
Ptarget.setPz( -PZcms); // Uzhi Proj can move backward
//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;
Pprojectile.setPz( PZcms);
Ptarget.setPz( -PZcms);
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
//G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
//G4cout << "Ptarget with Q : " << Ptarget << G4endl;
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
// Transform back and update SplitableHadron Participant.
Pprojectile.transform(toLab);
Ptarget.transform(toLab);
/* // Maybe it will be needed for an exact calculations--------------------
G4double TargetMomentum=std::sqrt(Ptarget.x()*Ptarget.x()+
Ptarget.y()*Ptarget.y()+
Ptarget.z()*Ptarget.z());
*/
//G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
G4double ZcoordinateOfCurrentInteraction = target->GetPosition().z();
// It is assumed that nucleon z-coordinates are ordered on increasing -----------
G4double betta_z=projectile->Get4Momentum().pz()/projectile->Get4Momentum().e();
G4double ZcoordinateOfPreviousCollision=projectile->GetPosition().z();
if(projectile->GetSoftCollisionCount()==0) {
projectile->SetTimeOfCreation(0.);
target->SetTimeOfCreation(0.);
ZcoordinateOfPreviousCollision=ZcoordinateOfCurrentInteraction;
}
G4ThreeVector thePosition(projectile->GetPosition().x(),
projectile->GetPosition().y(),
ZcoordinateOfCurrentInteraction);
projectile->SetPosition(thePosition);
G4double TimeOfPreviousCollision=projectile->GetTimeOfCreation();
G4double TimeOfCurrentCollision=TimeOfPreviousCollision+
(ZcoordinateOfCurrentInteraction-ZcoordinateOfPreviousCollision)/betta_z;
projectile->SetTimeOfCreation(TimeOfCurrentCollision);
target->SetTimeOfCreation(TimeOfCurrentCollision);
// Calculation of the creation time ---------------------
projectile->SetTimeOfCreation(target->GetTimeOfCreation());
projectile->SetPosition(target->GetPosition());
// Creation time and position of target nucleon were determined at
// ReggeonCascade() of G4FTFModel
// ------------------------------------------------------
projectile->Set4Momentum(Pprojectile);
target->Set4Momentum(Ptarget);
@@ -245,10 +236,13 @@ G4bool G4ElasticHNScattering::
G4ThreeVector G4ElasticHNScattering::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
G4double Pt2;
Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() *
G4double Pt2(0.);
if(AveragePt2 <= 0.) {Pt2=0.;}
else
{
Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() *
(std::exp(-maxPtSquare/AveragePt2)-1.));
}
G4double Pt=std::sqrt(Pt2);
G4double phi=G4UniformRand() * twopi;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FTFModel.cc,v 1.13 2008/12/09 10:40:52 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4FTFModel.cc,v 1.34 2009/12/15 19:14:31 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// ------------------------------------------------------------
@@ -37,48 +37,46 @@
// ------------------------------------------------------------
#include "G4FTFModel.hh"
#include "G4FTFParameters.hh" // Uzhi 29.03.08
#include "G4FTFParameters.hh"
#include "G4FTFParticipants.hh"
#include "G4DiffractiveSplitableHadron.hh"
#include "G4InteractionContent.hh"
#include "G4LorentzRotation.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTable.hh"
#include "G4ios.hh"
#include <utility> // Uzhi 29.03.08
#include <utility>
#include "G4IonTable.hh"
// Class G4FTFModel
G4FTFModel::G4FTFModel():theExcitation(new G4DiffractiveExcitation()),
theElastic(new G4ElasticHNScattering()) // Uzhi 29.03.08
theElastic(new G4ElasticHNScattering())
{
G4VPartonStringModel::SetThisPointer(this);
theParameters=0; // Uzhi 9.12.08
theParameters=0;
NumberOfInvolvedNucleon=0;
}
/*
G4FTFModel::G4FTFModel(G4double , G4double , G4double ):theExcitation(new // Uzhi 9.12.08 G4DiffractiveExcitation())
{
G4VPartonStringModel::SetThisPointer(this);
}
G4FTFModel::G4FTFModel(G4DiffractiveExcitation * anExcitation)
:
theExcitation(anExcitation)
{
G4VPartonStringModel::SetThisPointer(this);
}
*/
G4FTFModel::~G4FTFModel()
{
if( theParameters != 0 ) delete theParameters; // Uzhi 5.12.08
// Because FTF model can be called for various particles
// theParameters must be erased at the end of each call.
// Thus the delete is olso in G4FTFModel::GetStrings() method
if( theExcitation != 0 ) delete theExcitation; // Uzhi 5.12.08
if( theElastic != 0 ) delete theElastic; // Uzhi 5.12.08
}
// Thus the delete is also in G4FTFModel::GetStrings() method
if( theParameters != 0 ) delete theParameters;
if( theExcitation != 0 ) delete theExcitation;
if( theElastic != 0 ) delete theElastic;
if( NumberOfInvolvedNucleon != 0)
{
for(G4int i=0; i < NumberOfInvolvedNucleon; i++)
{
G4VSplitableHadron * aNucleon = TheInvolvedNucleon[i]->GetSplitableHadron();
if(aNucleon) delete aNucleon;
}
}
}
const G4FTFModel & G4FTFModel::operator=(const G4FTFModel &)
{
@@ -86,7 +84,6 @@ const G4FTFModel & G4FTFModel::operator=(const G4FTFModel &)
return *this;
}
int G4FTFModel::operator==(const G4FTFModel &right) const
{
return this==&right;
@@ -101,115 +98,515 @@ int G4FTFModel::operator!=(const G4FTFModel &right) const
void G4FTFModel::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile)
{
theProjectile = aProjectile;
//G4cout<<"G4FTFModel::Init "<<aNucleus.GetN()<<" "<<aNucleus.GetZ()<<G4endl;
theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ());
// Uzhi N-mass number Z-charge ------------------------- Uzhi 29.03.08
// ----------- N-mass number Z-charge -------------------------
// --- cms energy
G4double s = sqr( theProjectile.GetMass() ) +
sqr( G4Proton::Proton()->GetPDGMass() ) +
2*theProjectile.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass();
/*
G4cout << " primary Total E (GeV): " << theProjectile.GetTotalEnergy()/GeV << G4endl;
G4cout << " primary Mass (GeV): " << theProjectile.GetMass() /GeV << G4endl;
G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl;
*/
if( theParameters != 0 ) delete theParameters; // Uzhi 9.12.08
if( theParameters != 0 ) delete theParameters;
theParameters = new G4FTFParameters(theProjectile.GetDefinition(),
aNucleus.GetN(),aNucleus.GetZ(),
s);// ------------------------- Uzhi 19.04.08
//theParameters->SetProbabilityOfElasticScatt(0.); // To turn on/off (1/0) elastic scattering
s);
//theParameters->SetProbabilityOfElasticScatt(0.);
// To turn on/off (1/0) elastic scattering
}
// ------------------------------------------------------------
struct DeleteVSplitableHadron { void operator()(G4VSplitableHadron * aH){ delete aH;} };
// ------------------------------------------------------------
G4ExcitedStringVector * G4FTFModel::GetStrings()
{
//G4cout<<"theParticipants.GetList"<<G4endl;
{
G4ExcitedStringVector * theStrings(0);
theParticipants.GetList(theProjectile,theParameters);
//G4cout<<"ExciteParticipants()"<<G4endl;
if (! ExciteParticipants()) return NULL;;
//G4cout<<"theStrings = BuildStrings()"<<G4endl;
G4ExcitedStringVector * theStrings = BuildStrings();
//G4cout<<"Return to theStrings "<<G4endl;
if( theParameters != 0 ) // Uzhi 9.12.08
{ // Uzhi 9.12.08
delete theParameters; // Uzhi 9.12.08
theParameters=0; // Uzhi 9.12.08
} // Uzhi 9.12.08
return theStrings;
ReggeonCascade();
G4bool Success(true);
if( PutOnMassShell() )
{
if( ExciteParticipants() )
{
theStrings = BuildStrings();
GetResidualNucleus();
if( theParameters != 0 )
{
delete theParameters;
theParameters=0;
}
} else // if( ExciteParticipants() )
{ Success=false;}
} else // if( PutOnMassShell() )
{ Success=false;}
if(!Success)
{
// -------------- Erase the projectile ----------------
std::vector<G4VSplitableHadron *> primaries;
theParticipants.StartLoop(); // restart a loop
while ( theParticipants.Next() )
{
const G4InteractionContent & interaction=theParticipants.GetInteraction();
// do not allow for duplicates ...
if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
interaction.GetProjectile()) )
primaries.push_back(interaction.GetProjectile());
}
std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
primaries.clear();
}
// -------------- Cleaning of the memory --------------
// -------------- Erase the target nucleons -----------
G4VSplitableHadron * aNucleon = 0;
for(G4int i=0; i < NumberOfInvolvedNucleon; i++)
{
aNucleon = TheInvolvedNucleon[i]->GetSplitableHadron();
if(aNucleon) delete aNucleon;
}
NumberOfInvolvedNucleon=0;
return theStrings;
}
//-------------------------------------------------------------------
void G4FTFModel::ReggeonCascade()
{ //--- Implementation of reggeon theory inspired model-------
NumberOfInvolvedNucleon=0;
theParticipants.StartLoop();
while (theParticipants.Next())
{
const G4InteractionContent & collision=theParticipants.GetInteraction();
G4Nucleon * TargetNucleon=collision.GetTargetNucleon();
TheInvolvedNucleon[NumberOfInvolvedNucleon]=TargetNucleon;
NumberOfInvolvedNucleon++;
G4double XofWoundedNucleon = TargetNucleon->GetPosition().x();
G4double YofWoundedNucleon = TargetNucleon->GetPosition().y();
theParticipants.theNucleus->StartLoop();
G4Nucleon * Neighbour(0);
while ( (Neighbour = theParticipants.theNucleus->GetNextNucleon()) )
{
if(!Neighbour->AreYouHit())
{
G4double impact2= sqr(XofWoundedNucleon - Neighbour->GetPosition().x()) +
sqr(YofWoundedNucleon - Neighbour->GetPosition().y());
if(G4UniformRand() < theParameters->GetCofNuclearDestruction()*
std::exp(-impact2/theParameters->GetR2ofNuclearDestruction()))
{ // The neighbour nucleon is involved in the reggeon cascade
TheInvolvedNucleon[NumberOfInvolvedNucleon]=Neighbour;
NumberOfInvolvedNucleon++;
G4VSplitableHadron *targetSplitable;
targetSplitable = new G4DiffractiveSplitableHadron(*Neighbour);
Neighbour->Hit(targetSplitable);
targetSplitable->SetStatus(2);
}
} // end of if(!Neighbour->AreYouHit())
} // end of while (theParticipant.theNucleus->GetNextNucleon())
} // end of while (theParticipants.Next())
// ---------------- Calculation of creation time for each target nucleon -----------
theParticipants.StartLoop(); // restart a loop
theParticipants.Next();
G4VSplitableHadron * primary = theParticipants.GetInteraction().GetProjectile();
G4double betta_z=primary->Get4Momentum().pz()/primary->Get4Momentum().e();
primary->SetTimeOfCreation(0.);
G4double ZcoordinateOfPreviousCollision(0.);
G4double ZcoordinateOfCurrentInteraction(0.);
G4double TimeOfPreviousCollision(0.);
G4double TimeOfCurrentCollision(0);
theParticipants.theNucleus->StartLoop();
G4Nucleon * aNucleon;
G4bool theFirstInvolvedNucleon(true);
while ( (aNucleon = theParticipants.theNucleus->GetNextNucleon()) )
{
if(aNucleon->AreYouHit())
{
if(theFirstInvolvedNucleon)
{
ZcoordinateOfPreviousCollision=aNucleon->GetPosition().z();
theFirstInvolvedNucleon=false;
}
ZcoordinateOfCurrentInteraction=aNucleon->GetPosition().z();
TimeOfCurrentCollision=TimeOfPreviousCollision+
(ZcoordinateOfCurrentInteraction-ZcoordinateOfPreviousCollision)/betta_z;
// It is assumed that the nucleons are ordered on increasing z-coordinate ------------
aNucleon->GetSplitableHadron()->SetTimeOfCreation(TimeOfCurrentCollision);
ZcoordinateOfPreviousCollision=ZcoordinateOfCurrentInteraction;
TimeOfPreviousCollision=TimeOfCurrentCollision;
} // end of if(aNucleon->AreYouHit())
} // end of while (theParticipant.theNucleus->GetNextNucleon())
//
// The algorithm can be improved, but it will be more complicated, and will require
// changes in G4DiffractiveExcitation.cc and G4ElasticHNScattering.cc
} // Uzhi 26 July 2009
// ------------------------------------------------------------
struct DeleteVSplitableHadron { void operator()(G4VSplitableHadron * aH){delete aH;} };
G4bool G4FTFModel::PutOnMassShell()
{
// -------------- Properties of the projectile ----------------
theParticipants.StartLoop(); // restart a loop
theParticipants.Next();
G4VSplitableHadron * primary = theParticipants.GetInteraction().GetProjectile();
G4LorentzVector Pprojectile=primary->Get4Momentum();
// To get original projectile particle
if(Pprojectile.z() < 0.){return false;}
G4double Mprojectile = Pprojectile.mag();
G4double M2projectile = Pprojectile.mag2();
//-------------------------------------------------------------
G4LorentzVector Psum = Pprojectile;
G4double SumMasses = Mprojectile + 20.*MeV; // 13.12.09
// Separation energy for projectile
//--------------- Target nucleus ------------------------------
G4V3DNucleus *theNucleus = GetWoundedNucleus();
G4Nucleon * aNucleon;
G4int ResidualMassNumber=theNucleus->GetMassNumber();
G4int ResidualCharge =theNucleus->GetCharge();
ResidualExcitationEnergy=0.;
G4LorentzVector PnuclearResidual(0.,0.,0.,0.);
G4double ExcitationEnergyPerWoundedNucleon=
theParameters->GetExcitationEnergyPerWoundedNucleon();
theNucleus->StartLoop();
while ((aNucleon = theNucleus->GetNextNucleon()))
{
if(aNucleon->AreYouHit())
{ // Involved nucleons
Psum += aNucleon->Get4Momentum();
SumMasses += aNucleon->GetDefinition()->GetPDGMass();
SumMasses += 20.*MeV; // 13.12.09 Separation energy for a nucleon
ResidualMassNumber--;
ResidualCharge-=(G4int) aNucleon->GetDefinition()->GetPDGCharge();
ResidualExcitationEnergy+=ExcitationEnergyPerWoundedNucleon;
}
else
{ // Spectator nucleons
PnuclearResidual += aNucleon->Get4Momentum();
} // end of if(!aNucleon->AreYouHit())
} // end of while (theNucleus->GetNextNucleon())
Psum += PnuclearResidual;
G4double ResidualMass(0.);
if(ResidualMassNumber == 0)
{
ResidualMass=0.;
ResidualExcitationEnergy=0.;
}
else
{
ResidualMass=G4ParticleTable::GetParticleTable()->GetIonTable()->
GetIonMass(ResidualCharge ,ResidualMassNumber);
if(ResidualMassNumber == 1) {ResidualExcitationEnergy=0.;}
}
// ResidualMass +=ResidualExcitationEnergy; // Will be given after checks
SumMasses += ResidualMass;
//-------------------------------------------------------------
G4double SqrtS=Psum.mag();
G4double S=Psum.mag2();
if(SqrtS < SumMasses) {return false;} // It is impossible to simulate
// after putting nuclear nucleons
// on mass-shell
if(SqrtS < SumMasses+ResidualExcitationEnergy) {ResidualExcitationEnergy=0.;}
ResidualMass +=ResidualExcitationEnergy;
SumMasses +=ResidualExcitationEnergy;
//-------------------------------------------------------------
// Sampling of nucleons what are transfered to delta-isobars --
G4int MaxNumberOfDeltas = (int)((SqrtS - SumMasses)/(400.*MeV));
G4int NumberOfDeltas(0);
if(theNucleus->GetMassNumber() != 1)
{
G4double ProbDeltaIsobar(0.); // 1. *** Can be set if it is needed
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
if((G4UniformRand() < ProbDeltaIsobar)&&(NumberOfDeltas < MaxNumberOfDeltas))
{
NumberOfDeltas++;
G4VSplitableHadron * targetSplitable=TheInvolvedNucleon[i]->GetSplitableHadron();
SumMasses-=targetSplitable->GetDefinition()->GetPDGMass();
G4int PDGcode = targetSplitable->GetDefinition()->GetPDGEncoding();
G4int newPDGcode = PDGcode/10; newPDGcode=newPDGcode*10+4; // Delta
G4ParticleDefinition* ptr =
G4ParticleTable::GetParticleTable()->FindParticle(newPDGcode);
targetSplitable->SetDefinition(ptr);
SumMasses+=targetSplitable->GetDefinition()->GetPDGMass();
}
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
} // end of if(theNucleus.GetMassNumber() != 1)
//-------------------------------------------------------------
G4LorentzRotation toCms(-1*Psum.boostVector());
G4LorentzVector Ptmp=toCms*Pprojectile;
if ( Ptmp.pz() <= 0. )
{ // "String" moving backwards in CMS, abort collision !!
//G4cout << " abort ColliDeleteVSplitableHadronsion!! " << G4endl;
return false;
}
// toCms.rotateZ(-1*Ptmp.phi()); // Uzhi 5.12.09
// toCms.rotateY(-1*Ptmp.theta()); // Uzhi 5.12.09
G4LorentzRotation toLab(toCms.inverse());
//-------------------------------------------------------------
//------- Ascribing of the involved nucleons Pt and Xminus ----
G4double Dcor = theParameters->GetDofNuclearDestruction()/
theNucleus->GetMassNumber();
G4double AveragePt2 = theParameters->GetPt2ofNuclearDestruction();
G4double maxPtSquare = theParameters->GetMaxPt2ofNuclearDestruction();
G4double M2target(0.);
G4double WminusTarget(0.);
G4double WplusProjectile(0.);
G4int NumberOfTries(0);
G4double ScaleFactor(1.);
G4bool OuterSuccess(true);
do // while (!OuterSuccess)
{
OuterSuccess=true;
do // while (SqrtS < Mprojectile + std::sqrt(M2target))
{ // while (DecayMomentum < 0.)
NumberOfTries++;
if(NumberOfTries == 100*(NumberOfTries/100)) // 100
{ // At large number of tries it would be better to reduce the values
ScaleFactor/=2.;
Dcor *=ScaleFactor;
AveragePt2 *=ScaleFactor;
}
G4ThreeVector PtSum(0.,0.,0.);
G4double XminusSum(0.);
G4double Xminus(0.);
G4bool InerSuccess=true;
do // while(!InerSuccess);
{
InerSuccess=true;
PtSum =G4ThreeVector(0.,0.,0.);
XminusSum=0.;
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
G4Nucleon * aNucleon = TheInvolvedNucleon[i];
G4ThreeVector tmpPt = GaussianPt(AveragePt2, maxPtSquare);
PtSum += tmpPt;
G4ThreeVector tmpX=GaussianPt(Dcor*Dcor, 1.);
Xminus=tmpX.x();
XminusSum+=Xminus;
G4LorentzVector tmp(tmpPt.x(),tmpPt.y(),Xminus,0.);
aNucleon->SetMomentum(tmp);
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
//---------------------------------------------------------------------------
G4double DeltaX(0.);
G4double DeltaY(0.);
G4double DeltaXminus(0.);
if(ResidualMassNumber == 0)
{
DeltaX = PtSum.x()/NumberOfInvolvedNucleon;
DeltaY = PtSum.y()/NumberOfInvolvedNucleon;
DeltaXminus = (XminusSum-1.)/NumberOfInvolvedNucleon;
}
else
{
DeltaXminus = -1./theNucleus->GetMassNumber();
}
XminusSum=1.;
M2target =0.;
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
G4Nucleon * aNucleon = TheInvolvedNucleon[i];
Xminus = aNucleon->Get4Momentum().pz() - DeltaXminus;
XminusSum-=Xminus;
if((Xminus <= 0.) || (Xminus > 1.) ||
(XminusSum <=0.) || (XminusSum > 1.)) {InerSuccess=false; break;}
G4double Px=aNucleon->Get4Momentum().px() - DeltaX;
G4double Py=aNucleon->Get4Momentum().py() - DeltaY;
M2target +=(aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass()*
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() +
Px*Px + Py*Py)/Xminus;
G4LorentzVector tmp(Px,Py,Xminus,0.);
aNucleon->SetMomentum(tmp);
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
if(InerSuccess && (ResidualMassNumber != 0))
{
M2target +=(ResidualMass*ResidualMass + PtSum.mag2())/XminusSum;
}
} while(!InerSuccess);
} while (SqrtS < Mprojectile + std::sqrt(M2target));
//-------------------------------------------------------------
G4double DecayMomentum2= S*S+M2projectile*M2projectile+M2target*M2target
-2.*S*M2projectile - 2.*S*M2target
-2.*M2projectile*M2target;
WminusTarget=(S-M2projectile+M2target+std::sqrt(DecayMomentum2))/2./SqrtS;
WplusProjectile=SqrtS - M2target/WminusTarget;
//-------------------------------------------------------------
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
G4Nucleon * aNucleon = TheInvolvedNucleon[i];
G4LorentzVector tmp=aNucleon->Get4Momentum();
G4double Mt2 = sqr(tmp.x())+sqr(tmp.y())+
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass()*
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass();
G4double Xminus=tmp.z();
G4double Pz=-WminusTarget*Xminus/2. + Mt2/(2.*WminusTarget*Xminus);
G4double E = WminusTarget*Xminus/2. + Mt2/(2.*WminusTarget*Xminus);
if( E+Pz > WplusProjectile ){OuterSuccess=false; break;}
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
} while(!OuterSuccess);
//-------------------------------------------------------------
G4double Pzprojectile=WplusProjectile/2. - M2projectile/2./WplusProjectile;
G4double Eprojectile =WplusProjectile/2. + M2projectile/2./WplusProjectile;
Pprojectile.setPz(Pzprojectile); Pprojectile.setE(Eprojectile);
Pprojectile.transform(toLab); // The work with the projectile
primary->Set4Momentum(Pprojectile); // is finished at the moment.
//-------------------------------------------------------------
G4ThreeVector Residual3Momentum(0.,0.,1.);
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
G4Nucleon * aNucleon = TheInvolvedNucleon[i];
G4LorentzVector tmp=aNucleon->Get4Momentum();
Residual3Momentum-=tmp.vect();
G4double Mt2 = sqr(tmp.x())+sqr(tmp.y())+
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass()*
aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass();
G4double Xminus=tmp.z();
G4double Pz=-WminusTarget*Xminus/2. + Mt2/(2.*WminusTarget*Xminus);
G4double E = WminusTarget*Xminus/2. + Mt2/(2.*WminusTarget*Xminus);
tmp.setPz(Pz);
tmp.setE(E);
tmp.transform(toLab);
aNucleon->SetMomentum(tmp);
G4VSplitableHadron * targetSplitable=aNucleon->GetSplitableHadron();
targetSplitable->Set4Momentum(tmp);
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
G4double Mt2Residual=sqr(ResidualMass) +
sqr(Residual3Momentum.x())+sqr(Residual3Momentum.y());
G4double PzResidual=-WminusTarget*Residual3Momentum.z()/2. +
Mt2Residual/(2.*WminusTarget*Residual3Momentum.z());
G4double EResidual = WminusTarget*Residual3Momentum.z()/2. +
Mt2Residual/(2.*WminusTarget*Residual3Momentum.z());
Residual4Momentum.setPx(Residual3Momentum.x());
Residual4Momentum.setPy(Residual3Momentum.y());
Residual4Momentum.setPz(PzResidual);
Residual4Momentum.setE(EResidual);
Residual4Momentum.transform(toLab);
//-------------------------------------------------------------
return true;
}
// ------------------------------------------------------------
G4bool G4FTFModel::ExciteParticipants()
{
/* // Uzhi 29.03.08 For elastic Scatt.
G4cout<<" In ExciteParticipants() "<<theParticipants.theInteractions.size()<<G4endl;
G4cout<<" test Params Tot "<<theParameters->GetTotalCrossSection()<<G4endl;
G4cout<<" test Params Ela "<<theParameters->GetElasticCrossSection()<<G4endl;
G4int counter=0;
*/ // Uzhi 29.03.08
G4bool Successfull(false);
// do { // } while (Successfull == false) // Closed 15.12.09
Successfull=false;
theParticipants.StartLoop();
while (theParticipants.Next())
{
const G4InteractionContent & collision=theParticipants.GetInteraction();
/*
counter++;
G4cout<<" Inter # "<<counter<<G4endl;
*/
G4VSplitableHadron * projectile=collision.GetProjectile();
G4VSplitableHadron * target=collision.GetTarget();
// // Uzhi 29.03.08
G4bool Successfull;
if(G4UniformRand()< theParameters->GetProbabilityOfElasticScatt())
{
//G4cout<<"Elastic"<<G4endl;
Successfull=theElastic->ElasticScattering(projectile, target, theParameters);
{ // Elastic scattering -------------------------
if(theElastic->ElasticScattering(projectile, target, theParameters))
{
Successfull = Successfull || true;
} else
{
Successfull = Successfull || false;
target->SetStatus(2);
}
}
else
{
//G4cout<<"Inelastic"<<G4endl;
Successfull=theExcitation->ExciteParticipants(projectile, target, theParameters);
{ // Inelastic scattering ----------------------
if(theExcitation->ExciteParticipants(projectile, target,
theParameters, theElastic))
{
Successfull = Successfull || true;
} else
{
Successfull = Successfull || false;
target->SetStatus(2);
}
}
// if(!Successfull)
// // Uzhi 29.03.08
// if ( ! theExcitation->ExciteParticipants(projectile, target) )
if(!Successfull)
{
// give up, clean up
std::vector<G4VSplitableHadron *> primaries;
std::vector<G4VSplitableHadron *> targets;
theParticipants.StartLoop(); // restart a loop
while ( theParticipants.Next() )
{
const G4InteractionContent & interaction=theParticipants.GetInteraction();
// do not allow for duplicates ...
if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
interaction.GetProjectile()) )
primaries.push_back(interaction.GetProjectile());
if ( targets.end() == std::find(targets.begin(), targets.end(),
interaction.GetTarget()) )
targets.push_back(interaction.GetTarget());
}
std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
primaries.clear();
std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron());
targets.clear();
return false;
} // End of the loop Uzhi
}
return true;
} // end of while (theParticipants.Next())
// } while (Successfull == false); // Closed 15.12.09
return Successfull;
}
// ------------------------------------------------------------
G4ExcitedStringVector * G4FTFModel::BuildStrings()
@@ -221,49 +618,91 @@ G4ExcitedStringVector * G4FTFModel::BuildStrings()
strings = new G4ExcitedStringVector();
std::vector<G4VSplitableHadron *> primaries;
std::vector<G4VSplitableHadron *> targets;
G4ExcitedString * FirstString(0); // If there will be a kink,
G4ExcitedString * SecondString(0); // two strings will be produced.
theParticipants.StartLoop(); // restart a loop
while ( theParticipants.Next() )
{
const G4InteractionContent & interaction=theParticipants.GetInteraction();
// do not allow for duplicates ...
if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
interaction.GetProjectile()) )
primaries.push_back(interaction.GetProjectile());
if ( targets.end() == std::find(targets.begin(), targets.end(),
interaction.GetTarget()) )
targets.push_back(interaction.GetTarget());
primaries.push_back(interaction.GetProjectile());
}
// G4cout << "BuildStrings prim/targ " << primaries.size() << " , " <<
// targets.size() << G4endl;
unsigned int ahadron;
// Only for hA-interactions Uzhi -------------------------------------
for ( ahadron=0; ahadron < primaries.size() ; ahadron++)
{
//G4ThreeVector aPosition=primaries[ahadron]->GetPosition();
//G4cout<<"Proj Build "<<aPosition<<" "<<primaries[ahadron]->GetTimeOfCreation()<<G4endl;
G4bool isProjectile=true;
strings->push_back(theExcitation->String(primaries[ahadron], isProjectile));
G4bool isProjectile(0);
if(primaries[ahadron]->GetStatus() == 1) {isProjectile=true; }
if(primaries[ahadron]->GetStatus() == 3) {isProjectile=false;}
FirstString=0; SecondString=0;
theExcitation->CreateStrings(primaries[ahadron], isProjectile,
FirstString, SecondString,
theParameters);
if(FirstString != 0) strings->push_back(FirstString);
if(SecondString != 0) strings->push_back(SecondString);
}
for ( ahadron=0; ahadron < targets.size() ; ahadron++)
for (G4int ahadron=0; ahadron < NumberOfInvolvedNucleon ; ahadron++)
{
//G4ThreeVector aPosition=targets[ahadron]->GetPosition();
//G4cout<<"Targ Build "<<aPosition<<" "<<targets[ahadron]->GetTimeOfCreation()<<G4endl;
G4bool isProjectile=false;
strings->push_back(theExcitation->String(targets[ahadron], isProjectile));
if(TheInvolvedNucleon[ahadron]->GetSplitableHadron()->GetStatus() !=0) //== 2)
{
G4bool isProjectile=false;
FirstString=0; SecondString=0;
theExcitation->CreateStrings(
TheInvolvedNucleon[ahadron]->GetSplitableHadron(),
isProjectile,
FirstString, SecondString,
theParameters);
if(FirstString != 0) strings->push_back(FirstString);
if(SecondString != 0) strings->push_back(SecondString);
}
}
std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
primaries.clear();
std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron());
targets.clear();
return strings;
}
// ------------------------------------------------------------
void G4FTFModel::GetResidualNucleus()
{ // This method is needed for the correct application of G4PrecompoundModelInterface
G4double DeltaExcitationE=ResidualExcitationEnergy/
(G4double) NumberOfInvolvedNucleon;
G4LorentzVector DeltaPResidualNucleus = Residual4Momentum/
(G4double) NumberOfInvolvedNucleon;
for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
{
G4Nucleon * aNucleon = TheInvolvedNucleon[i];
// G4LorentzVector tmp=aNucleon->Get4Momentum()-DeltaPResidualNucleus;
G4LorentzVector tmp=-DeltaPResidualNucleus;
aNucleon->SetMomentum(tmp);
aNucleon->SetBindingEnergy(DeltaExcitationE);
} // end of for(G4int i=0; i < NumberOfInvolvedNucleon; i++ )
}
// ------------------------------------------------------------
G4ThreeVector G4FTFModel::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
G4double Pt2(0.);
if(AveragePt2 <= 0.) {Pt2=0.;}
else
{
Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() *
(std::exp(-maxPtSquare/AveragePt2)-1.));
}
G4double Pt=std::sqrt(Pt2);
G4double phi=G4UniformRand() * twopi;
return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
}
@@ -24,12 +24,15 @@
// ********************************************************************
//
//
// $Id: G4FTFParameters.cc,v 1.4 2008/12/18 13:02:00 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4FTFParameters.cc,v 1.13 2009/12/16 17:51:15 gunter Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
#include "G4FTFParameters.hh"
#include "G4ios.hh"
#include <utility>
G4FTFParameters::G4FTFParameters()
{;}
@@ -42,17 +45,19 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
G4double theA,
G4double theZ,
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 ProjectileMass = particle->GetPDGMass();
G4double TargetMass = G4Proton::Proton()->GetPDGMass();
G4double Elab = (s - ProjectileMass*ProjectileMass - TargetMass*TargetMass)/
(2*TargetMass);
G4double Plab = std::sqrt(Elab * Elab - ProjectileMass*ProjectileMass);
G4double LogPlab = std::log( Plab );
G4double sqrLogPlab = LogPlab * LogPlab;
//G4cout<<"G4FTFParameters Plab "<<Plab<<G4endl;
G4int NumberOfTargetProtons = (G4int) theZ;
G4int NumberOfTargetNeutrons = (G4int) theA- (G4int) theZ;
G4int NumberOfTargetNucleons = NumberOfTargetProtons + NumberOfTargetNeutrons;
@@ -143,7 +148,7 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
Xelastic = ( NumberOfTargetProtons * XelKP +
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
}
else if( PDGcode == 311 ) //------Projectile is KaonZero ------
else if((PDGcode == 311) || (PDGcode == 130) || (PDGcode == 310))//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-
@@ -180,7 +185,7 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
SetElastisCrossSection(Xelastic);
SetInelasticCrossSection(Xtotal-Xelastic);
// // Interactions with elastic ans inelastic collisions
// // Interactions with elastic and inelastic collisions
SetProbabilityOfElasticScatt(Xtotal, Xelastic);
SetRadiusOfHNinteractions2(Xtotal/pi/10.);
//
@@ -189,13 +194,9 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
SetRadiusOfHNinteractions2((Xtotal-Xelastic)/pi/10.);
*/ //=======================================================
//G4cout<<" Rnn "<<Xtotal/pi/10.<<" "<<Xtotal/pi/10.*fermi*fermi<<G4endl;
//G4cout<<"G4FTFParameters Xt Xel MeV "<<Xtotal<<" "<<Xelastic<<" "<<GeV<<G4endl;
//-----------------------------------------------------------------------------------
SetSlope( Xtotal*Xtotal/16./pi/Xelastic/0.3894 ); // Slope parameter of elastic scattering
// (GeV/c)^(-2))
//G4cout<<"G4FTFParameters Slope "<<GetSlope()<<G4endl;
//-----------------------------------------------------------------------------------
SetGamma0( GetSlope()*Xtotal/10./2./pi );
@@ -207,36 +208,45 @@ G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
//----------- Parameters of excitations ---------------------------------------------
if( absPDGcode > 1000 ) //------Projectile is baryon --------
{
SetMagQuarkExchange(3.4); //3.8);
SetSlopeQuarkExchange(1.2);
SetDeltaProbAtQuarkExchange(0.1); //(0.1*4.);
SetProjMinDiffMass(1.1); // GeV
SetProjMinNonDiffMass(1.1); // GeV
SetProbabilityOfProjDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
SetProbabilityOfProjDiff(0.76*std::pow(s/GeV/GeV,-0.35));
SetTarMinDiffMass(1.1); // GeV
SetTarMinNonDiffMass(1.1); // GeV
SetProbabilityOfTarDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
SetProbabilityOfTarDiff(0.76*std::pow(s/GeV/GeV,-0.35));
SetAveragePt2(0.3); // GeV^2
}
else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion -----------
{
SetMagQuarkExchange(120.); // 210.
SetSlopeQuarkExchange(2.0);
SetDeltaProbAtQuarkExchange(0.6);
SetProjMinDiffMass(0.5); // GeV
SetProjMinNonDiffMass(0.3); // GeV
SetProbabilityOfProjDiff(0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
SetProbabilityOfProjDiff(0.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
SetTarMinDiffMass(1.1); // GeV
SetTarMinNonDiffMass(1.1); // GeV
SetProbabilityOfTarDiff(0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
/*
SetProjMinDiffMass(0.5);
SetProjMinNonDiffMass(0.3); // Uzhi 12.06.08
SetProbabilityOfProjDiff(0.05);
SetProbabilityOfTarDiff(0.05);
*/
SetProbabilityOfTarDiff(2.*0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
SetAveragePt2(0.3); // GeV^2
}
else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon -----------
else if( (absPDGcode == 321) || (PDGcode == 311) ||
(PDGcode == 130) || (PDGcode == 310)) //Projectile is Kaon
{
// Must be corrected, taken from PiN
SetMagQuarkExchange(120.);
SetSlopeQuarkExchange(2.0);
SetDeltaProbAtQuarkExchange(0.6);
SetProjMinDiffMass(0.7); // GeV 1.1
SetProjMinNonDiffMass(0.7); // GeV
SetProbabilityOfProjDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
@@ -250,6 +260,10 @@ SetProbabilityOfTarDiff(0.05);
else //------Projectile is undefined,
//------Nucleon assumed
{
SetMagQuarkExchange(3.5);
SetSlopeQuarkExchange(1.0);
SetDeltaProbAtQuarkExchange(0.1);
SetProjMinDiffMass((particle->GetPDGMass()+160.*MeV)/GeV);
SetProjMinNonDiffMass((particle->GetPDGMass()+160.*MeV)/GeV);
SetProbabilityOfProjDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
@@ -259,10 +273,33 @@ SetProbabilityOfTarDiff(0.05);
SetProbabilityOfTarDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
SetAveragePt2(0.3); // GeV^2
};
}
// ---------- Set parameters of a string kink -------------------------------
SetPt2Kink(6.*GeV*GeV);
G4double Puubar(1./3.), Pddbar(1./3.), Pssbar(1./3.); // SU(3) symmetry
// G4double Puubar(0.41 ), Pddbar(0.41 ), Pssbar(0.18 ); // Broken SU(3) symmetry
SetQuarkProbabilitiesAtGluonSplitUp(Puubar, Pddbar, Pssbar);
//G4cout<<"G4FTFParameters Out"<<G4endl;
// --------- Set parameters of nuclear destruction--------------------
}
if( absPDGcode < 1000 )
{
SetCofNuclearDestruction(1.); //1.0); // for meson projectile
} else if( theA > 20. )
{
SetCofNuclearDestruction(0.2); //2); // for baryon projectile and heavy target
} else
{
SetCofNuclearDestruction(0.2); //1.0); // for baryon projectile and light target
}
SetR2ofNuclearDestruction(1.5*fermi*fermi);
SetExcitationEnergyPerWoundedNucleon(100*MeV);
SetDofNuclearDestruction(0.4);
SetPt2ofNuclearDestruction(0.17*GeV*GeV);
SetMaxPt2ofNuclearDestruction(1.0*GeV*GeV);
}
//**********************************************************************************************
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4FTFParticipants.cc,v 1.9 2008/06/13 12:49:23 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4FTFParticipants.cc,v 1.16 2009/11/25 09:14:03 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -71,7 +71,7 @@ G4FTFParticipants::~G4FTFParticipants()
//{}
void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary,
G4FTFParameters *theParameters) // Uzhi 29.03.08
G4FTFParameters *theParameters)
{
StartLoop(); // reset Loop over Interactions
@@ -86,7 +86,7 @@ void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary,
G4double xyradius;
xyradius =theNucleus->GetOuterRadius() + deltaxy; // Impact parameter sampling
// radius
G4bool nucleusNeedsShift = true;
// G4bool nucleusNeedsShift = true; // Uzhi 20 July 2009
while ( theInteractions.size() == 0 )
{
@@ -95,41 +95,39 @@ void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary,
G4double impactX = theImpactParameter.first;
G4double impactY = theImpactParameter.second;
G4ThreeVector thePosition(impactX, impactY, -DBL_MAX);
primarySplitable->SetPosition(thePosition);
theNucleus->StartLoop();
G4Nucleon * nucleon;
//G4int InterNumber=0; // Uzhi
//while ( (nucleon=theNucleus->GetNextNucleon())&& (InterNumber < 1) ) // Uzhi
while ( (nucleon=theNucleus->GetNextNucleon()) ) // Uzhi
while ( (nucleon=theNucleus->GetNextNucleon()) )
{
G4double impact2= sqr(impactX - nucleon->GetPosition().x()) +
sqr(impactY - nucleon->GetPosition().y());
// if ( theParameters->GetInelasticProbability(impact2/fermi/fermi) // Uzhi 29.03.08
if ( theParameters->GetProbabilityOfInteraction(impact2/fermi/fermi) // Uzhi 29.03.08
if ( theParameters->GetProbabilityOfInteraction(impact2/fermi/fermi)
> G4UniformRand() )
{
//InterNumber++;
if ( nucleusNeedsShift )
{ // on the first hit, shift nucleus
nucleusNeedsShift = false;
theNucleus->DoTranslation(G4ThreeVector(-1*impactX,-1*impactY,0.));
impactX=0;
impactY=0;
}
G4VSplitableHadron * targetSplitable;
if ( (targetSplitable=nucleon->GetSplitableHadron()) == NULL )
primarySplitable->SetStatus(1); // It takes part in the interaction
G4VSplitableHadron * targetSplitable=0;
if ( ! nucleon->AreYouHit() )
{
targetSplitable= new G4DiffractiveSplitableHadron(*nucleon);
nucleon->Hit(targetSplitable);
nucleon->SetBindingEnergy(3.*nucleon->GetBindingEnergy());
targetSplitable->SetStatus(1); // It takes part in the interaction
}
G4InteractionContent * aInteraction =
new G4InteractionContent(primarySplitable);
aInteraction->SetTarget(targetSplitable);
aInteraction->SetTargetNucleon(nucleon); // Uzhi 16.07.09
theInteractions.push_back(aInteraction);
}
}
// G4cout << "Number of Hit nucleons " << theInteractions.size() // entries()
// G4cout << "Number of Hit nucleons " << theInteractions.size()<<G4endl; // entries()
// << "\t" << impactX/fermi << "\t"<<impactY/fermi
// << "\t" << std::sqrt(sqr(impactX)+sqr(impactY))/fermi <<G4endl;