Import Geant4 10.1.0 source tree
This commit is contained in:
+5
-2
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4InteractionContent.cc 67999 2013-03-13 11:14:32Z gcosmo $
|
||||
// $Id: G4InteractionContent.cc 83684 2014-09-09 12:37:39Z gcosmo $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -36,13 +36,16 @@
|
||||
|
||||
#include "G4InteractionContent.hh"
|
||||
|
||||
#include "G4PhysicalConstants.hh" // Uzhi 8.09.2014
|
||||
#include "G4SystemOfUnits.hh" // Uzhi 8.09.2014
|
||||
|
||||
G4InteractionContent::G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant)
|
||||
: theNumberOfHard(0), theNumberOfSoft(0), theNumberOfDiffractive(0),
|
||||
theInteractionTime(0.), curStatus(0)
|
||||
{
|
||||
theProjectile=aPrimaryParticipant;
|
||||
theTarget=0;
|
||||
theProjectileNucleon=0; // Uzhi Nov. 2012
|
||||
theProjectileNucleon=0;
|
||||
theTargetNucleon=0;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PomeronCrossSection.cc 67999 2013-03-13 11:14:32Z gcosmo $
|
||||
// $Id: G4PomeronCrossSection.cc 79761 2014-03-13 15:14:37Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4PomeronCrossSection.hh"
|
||||
@@ -249,58 +249,58 @@ G4double G4PomeronCrossSection::Expand(G4double z)
|
||||
return sum;
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Power(const G4double S)
|
||||
G4double G4PomeronCrossSection::Power(const G4double S)
|
||||
{
|
||||
return pomeron_Gamma *std::pow(S/pomeron_S, pomeron_Alpha -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Z(const G4double S)
|
||||
G4double G4PomeronCrossSection::Z(const G4double S)
|
||||
{
|
||||
return 2*pomeron_C * Power(S) / Lambda(S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Lambda(const G4double S)
|
||||
G4double G4PomeronCrossSection::Lambda(const G4double S)
|
||||
{
|
||||
return pomeron_Rsquare+pomeron_Alphaprime*std::log(S/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::SigP(const G4double S)
|
||||
G4double G4PomeronCrossSection::SigP(const G4double S)
|
||||
{
|
||||
return 8 * pi * hbarc_squared * Power(S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Eikonal(const G4double S,
|
||||
G4double G4PomeronCrossSection::Eikonal(const G4double S,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return Z(S)/2 * std::exp(-impactsquare/(4*Lambda(S)*hbarc_squared));
|
||||
}
|
||||
//*************************************************************************************************
|
||||
inline G4double G4PomeronCrossSection::PowerSoft(const G4double S)
|
||||
G4double G4PomeronCrossSection::PowerSoft(const G4double S)
|
||||
{
|
||||
return pomeron_Gamma *std::pow(S/pomeron_S, pomeron_Alpha -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::PowerHard(const G4double S)
|
||||
G4double G4PomeronCrossSection::PowerHard(const G4double S)
|
||||
{
|
||||
return pomeron_Gamma_Hard*std::pow(S/pomeron_S, pomeron_Alpha_Hard -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::LambdaSoft(const G4double S)
|
||||
G4double G4PomeronCrossSection::LambdaSoft(const G4double S)
|
||||
{
|
||||
return pomeron_Rsquare+pomeron_Alphaprime*std::log(S/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::LambdaHard(const G4double /*S*/)
|
||||
G4double G4PomeronCrossSection::LambdaHard(const G4double /*S*/)
|
||||
{
|
||||
return pomeron_Rsquare; //+pomeron_Alphaprime*std::log(s/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Zsoft(const G4double S)
|
||||
G4double G4PomeronCrossSection::Zsoft(const G4double S)
|
||||
{
|
||||
return 2*pomeron_C*PowerHard(S) / LambdaSoft(S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Zhard(const G4double S)
|
||||
G4double G4PomeronCrossSection::Zhard(const G4double S)
|
||||
{
|
||||
return 2*pomeron_C*PowerHard(S)/LambdaHard(S);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VParticipants.cc 67999 2013-03-13 11:14:32Z gcosmo $
|
||||
// $Id: G4VParticipants.cc 83684 2014-09-09 12:37:39Z gcosmo $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
G4VParticipants::G4VParticipants() : theNucleus(NULL),
|
||||
theProjectileNucleus(NULL) // Uzhi Nov. 2012
|
||||
theProjectileNucleus(NULL)
|
||||
{}
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@ G4VParticipants::~G4VParticipants()
|
||||
{
|
||||
// G4cout << "G4VParticipants::~G4VParticipants()" << G4endl;
|
||||
if ( theNucleus != NULL ) delete theNucleus;
|
||||
if ( theProjectileNucleus != NULL ) delete theProjectileNucleus; // Uzhi Nov. 2012
|
||||
if ( theProjectileNucleus != NULL ) delete theProjectileNucleus;
|
||||
}
|
||||
|
||||
|
||||
inline void G4VParticipants::Init(G4int theA, G4int theZ)
|
||||
void G4VParticipants::Init(G4int theA, G4int theZ)
|
||||
{
|
||||
if ( theNucleus == NULL ) theNucleus = new G4Fancy3DNucleus();
|
||||
theNucleus->Init(theA, theZ);
|
||||
@@ -62,13 +62,13 @@ inline void G4VParticipants::Init(G4int theA, G4int theZ)
|
||||
}
|
||||
|
||||
|
||||
inline void G4VParticipants::SetNucleus(G4V3DNucleus * aNucleus)
|
||||
void G4VParticipants::SetNucleus(G4V3DNucleus * aNucleus)
|
||||
{
|
||||
if (theNucleus != NULL) delete theNucleus;
|
||||
theNucleus = aNucleus;
|
||||
}
|
||||
|
||||
inline void G4VParticipants::InitProjectileNucleus(G4int theA, G4int theZ) // Uzhi Nov. 2012
|
||||
void G4VParticipants::InitProjectileNucleus(G4int theA, G4int theZ)
|
||||
{
|
||||
if ( theProjectileNucleus == NULL ) theProjectileNucleus = new G4Fancy3DNucleus();
|
||||
theProjectileNucleus->Init(theA, theZ);
|
||||
@@ -76,7 +76,7 @@ inline void G4VParticipants::InitProjectileNucleus(G4int theA, G4int theZ) // Uz
|
||||
}
|
||||
|
||||
|
||||
inline void G4VParticipants::SetProjectileNucleus(G4V3DNucleus * aNucleus)
|
||||
void G4VParticipants::SetProjectileNucleus(G4V3DNucleus * aNucleus)
|
||||
{
|
||||
if (theProjectileNucleus != NULL) delete theProjectileNucleus;
|
||||
theProjectileNucleus = aNucleus;
|
||||
|
||||
+84
-26
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPartonStringModel.cc 67999 2013-03-13 11:14:32Z gcosmo $
|
||||
// $Id: G4VPartonStringModel.cc 83684 2014-09-09 12:37:39Z gcosmo $
|
||||
//
|
||||
//// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -36,7 +36,6 @@
|
||||
// debug switch
|
||||
//#define debug_PartonStringModel
|
||||
|
||||
|
||||
#include "G4VPartonStringModel.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
@@ -44,8 +43,6 @@
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4IonTable.hh"
|
||||
|
||||
//#define debug_PartonStringModel
|
||||
|
||||
G4VPartonStringModel::G4VPartonStringModel(const G4String& modelName)
|
||||
: G4VHighEnergyGenerator(modelName),
|
||||
stringFragmentationModel(0),
|
||||
@@ -68,14 +65,15 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
|
||||
G4DynamicParticle thePrimary=aPrimary;
|
||||
|
||||
#ifdef debug_PartonStringModel
|
||||
G4cout<<"Parton-String model is runnung ------------"<<G4endl;
|
||||
G4cout<<G4endl;
|
||||
G4cout<<"-----------------------Parton-String model is runnung ------------"<<G4endl;
|
||||
G4cout<<"Projectile Name Mass "<<thePrimary.GetDefinition()->GetParticleName()<<" "
|
||||
<<thePrimary.GetMass()<<G4endl;
|
||||
<<thePrimary.GetMass()<<G4endl;
|
||||
G4cout<<" Momentum "<<thePrimary.Get4Momentum()<<G4endl;
|
||||
G4cout<<"Target nucleus A Z "<<theNucleus.GetA_asInt()<<" "
|
||||
<<theNucleus.GetZ_asInt()<<G4endl<<G4endl;
|
||||
#endif
|
||||
|
||||
|
||||
G4LorentzRotation toZ;
|
||||
G4LorentzVector Ptmp=thePrimary.Get4Momentum();
|
||||
toZ.rotateZ(-1*Ptmp.phi());
|
||||
@@ -106,22 +104,78 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
|
||||
for ( unsigned int astring=0; astring < strings->size(); astring++)
|
||||
{
|
||||
// rotate string to lab frame, models have it aligned to z
|
||||
stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
|
||||
stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
|
||||
(*strings)[astring]->LorentzRotate(toLab);
|
||||
SumStringMom+=(*strings)[astring]->Get4Momentum();
|
||||
if((*strings)[astring]->IsExcited())
|
||||
{
|
||||
stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
|
||||
stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
|
||||
(*strings)[astring]->LorentzRotate(toLab);
|
||||
SumStringMom+=(*strings)[astring]->Get4Momentum();
|
||||
#ifdef debug_PartonStringModel
|
||||
G4cout<<"String No "<<astring+1<<" "<<(*strings)[astring]->Get4Momentum()<<" "
|
||||
<<(*strings)[astring]->Get4Momentum().mag()<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
stringEnergy += (*strings)[astring]->GetKineticTrack()->Get4Momentum().t();
|
||||
(*strings)[astring]->LorentzRotate(toLab);
|
||||
SumStringMom+=(*strings)[astring]->GetKineticTrack()->Get4Momentum();
|
||||
#ifdef debug_PartonStringModel
|
||||
G4cout<<"A track No "<<astring+1<<" "
|
||||
<<(*strings)[astring]->GetKineticTrack()->Get4Momentum()<<" "
|
||||
<<(*strings)[astring]->GetKineticTrack()->Get4Momentum().mag()<<G4endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
G4double InvMass=SumStringMom.mag();
|
||||
G4V3DNucleus * ResNucleus=theThis->GetWoundedNucleus();
|
||||
|
||||
// loop over wounded nucleus
|
||||
G4Nucleon * theNuclNucleon = ResNucleus->StartLoop() ?
|
||||
ResNucleus->GetNextNucleon() : NULL;
|
||||
while( theNuclNucleon )
|
||||
{
|
||||
if(theNuclNucleon->AreYouHit())
|
||||
{
|
||||
G4LorentzVector tmp=toLab*theNuclNucleon->Get4Momentum();
|
||||
theNuclNucleon->SetMomentum(tmp);
|
||||
}
|
||||
theNuclNucleon = ResNucleus->GetNextNucleon();
|
||||
}
|
||||
|
||||
G4V3DNucleus * ProjResNucleus=theThis->GetProjectileNucleus();
|
||||
|
||||
#ifdef debug_PartonStringModel
|
||||
G4ThreeVector hitNucleonMomentum(0.,0.,0.);
|
||||
#endif
|
||||
|
||||
if(ProjResNucleus != 0)
|
||||
{
|
||||
theNuclNucleon = ProjResNucleus->StartLoop() ?
|
||||
ProjResNucleus->GetNextNucleon() : NULL;
|
||||
while( theNuclNucleon )
|
||||
{
|
||||
if(theNuclNucleon->AreYouHit())
|
||||
{
|
||||
G4LorentzVector tmp=toLab*theNuclNucleon->Get4Momentum();
|
||||
#ifdef debug_PartonStringModel
|
||||
hitNucleonMomentum += tmp.vect();
|
||||
#endif
|
||||
theNuclNucleon->SetMomentum(tmp);
|
||||
}
|
||||
theNuclNucleon = ProjResNucleus->GetNextNucleon();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef debug_PartonStringModel
|
||||
G4cout<<"Parton-String model: SumStringMom "<<SumStringMom<<G4endl;
|
||||
|
||||
|
||||
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
|
||||
|
||||
|
||||
// loop over wounded nucleus
|
||||
G4int hits(0), charged_hits(0);
|
||||
G4ThreeVector hitNucleonMomentum(0.,0.,0.);
|
||||
// G4ThreeVector hitNucleonMomentum(0.,0.,0.); // Uzhi Feb. 2014
|
||||
G4Nucleon * theCurrentNucleon = fancynucleus->StartLoop() ?
|
||||
fancynucleus->GetNextNucleon() : NULL;
|
||||
while( theCurrentNucleon )
|
||||
@@ -138,18 +192,19 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
|
||||
G4int initialZ=fancynucleus->GetCharge();
|
||||
G4int initialA=fancynucleus->GetMassNumber();
|
||||
G4double initial_mass=
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(initialZ,initialA);
|
||||
G4double final_mass =
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(initialZ,initialA);
|
||||
G4double final_mass(0.);
|
||||
if(initialA-hits != 0) final_mass =
|
||||
G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(
|
||||
initialZ-charged_hits, initialA-hits);
|
||||
G4cout << "G4VPSM: " <<G4endl
|
||||
<< "strE "<<stringEnergy <<G4endl
|
||||
<< "hit nucleons "<<hits <<G4endl
|
||||
<< "Primary "<<Ptmp.e() <<G4endl
|
||||
<< "SumStringE "<<SumStringMom.e() <<G4endl
|
||||
<< "Nucleus intial "<<initial_mass <<G4endl
|
||||
<< "Nucleus final "<<final_mass <<G4endl
|
||||
<< "Excitation estimate "
|
||||
G4cout << "G4VPSM: " <<G4endl
|
||||
<< "strE "<<stringEnergy <<G4endl
|
||||
<< "Hit targeet nucleons "<<hits <<G4endl
|
||||
<< "Primary "<<Ptmp.e() <<G4endl
|
||||
<< "SumStringE "<<SumStringMom.e() <<G4endl
|
||||
<< "Target nucleus intial "<<initial_mass <<G4endl
|
||||
<< "Target nucleus final "<<final_mass <<G4endl
|
||||
<< "Excitation estimate "
|
||||
<<Ptmp.e() + initial_mass - final_mass - stringEnergy << G4endl;
|
||||
G4cout << "momentum balance "
|
||||
<< thePrimary.GetMomentum() + hitNucleonMomentum -
|
||||
@@ -170,11 +225,13 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
|
||||
std::for_each(theResult->begin(), theResult->end(), DeleteKineticTrack());
|
||||
delete theResult;
|
||||
}
|
||||
|
||||
theResult = stringFragmentationModel->FragmentStrings(strings);
|
||||
|
||||
if(attempts > maxAttempts ) break;
|
||||
|
||||
#ifdef debug_PartonStringModel
|
||||
G4cout<<"Parton-String model: Number of produced particles "<<theResult->size()<<G4endl;
|
||||
G4cout<<"Parton-String model: Number of produced particles "<<theResult->size()<<G4endl;
|
||||
G4LorentzVector SumPsecondr(0.,0.,0.,0.);
|
||||
#endif
|
||||
|
||||
@@ -210,5 +267,6 @@ void G4VPartonStringModel::ModelDescription(std::ostream& outFile) const
|
||||
outFile << GetModelName() << " has no description yet.\n";
|
||||
}
|
||||
|
||||
G4V3DNucleus * G4VPartonStringModel::GetProjectileNucleus() const // Uzhi Jan. 2013
|
||||
G4V3DNucleus * G4VPartonStringModel::GetProjectileNucleus() const
|
||||
{ return 0;}
|
||||
|
||||
|
||||
+10
-10
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSplitableHadron.cc 67999 2013-03-13 11:14:32Z gcosmo $
|
||||
// $Id: G4VSplitableHadron.cc 83684 2014-09-09 12:37:39Z gcosmo $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
@@ -40,14 +40,14 @@
|
||||
#include "G4VKineticNucleon.hh"
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron()
|
||||
: theDefinition(NULL), TimeOfCreation(0.), theCollisionCount(0), // Uzhi 8.05.08
|
||||
curStatus(0), isSplit(false) // Uzhi 17.07.09
|
||||
: theDefinition(NULL), TimeOfCreation(0.), theCollisionCount(0),
|
||||
curStatus(0), isSplit(false)
|
||||
{
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4ReactionProduct & aPrimary)
|
||||
: TimeOfCreation(0.), theCollisionCount(0), // Uzhi 8.05.08
|
||||
curStatus(0), isSplit(false) // Uzhi 17.07.09
|
||||
: TimeOfCreation(0.), theCollisionCount(0),
|
||||
curStatus(0), isSplit(false)
|
||||
{
|
||||
theDefinition=aPrimary.GetDefinition();
|
||||
the4Momentum.setVect(aPrimary.GetMomentum());
|
||||
@@ -56,24 +56,24 @@ G4VSplitableHadron::G4VSplitableHadron(const G4ReactionProduct & aPrimary)
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4Nucleon & aNucleon)
|
||||
{
|
||||
TimeOfCreation = 0.; // Uzhi 8.05.08
|
||||
TimeOfCreation = 0.;
|
||||
theCollisionCount= 0;
|
||||
isSplit = false;
|
||||
theDefinition =aNucleon.GetParticleType();
|
||||
the4Momentum =aNucleon.GetMomentum();
|
||||
thePosition =aNucleon.GetPosition();
|
||||
curStatus = 0; // Uzhi 17.07.09
|
||||
curStatus = 0;
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4VKineticNucleon * aNucleon)
|
||||
{
|
||||
TimeOfCreation = 0.; // Uzhi 8.05.08
|
||||
TimeOfCreation = 0.;
|
||||
theCollisionCount= 0;
|
||||
isSplit = false;
|
||||
theDefinition =aNucleon->GetDefinition();
|
||||
the4Momentum =aNucleon->Get4Momentum();
|
||||
thePosition =aNucleon->GetPosition();
|
||||
curStatus = 0; // Uzhi 17.07.09
|
||||
curStatus = 0;
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4VSplitableHadron &right)
|
||||
@@ -84,7 +84,7 @@ G4VSplitableHadron::G4VSplitableHadron(const G4VSplitableHadron &right)
|
||||
theDefinition = right.GetDefinition();
|
||||
the4Momentum = right.Get4Momentum();
|
||||
thePosition = right.GetPosition();
|
||||
curStatus = 0; // Uzhi 17.07.09
|
||||
curStatus = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user