Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4QGSDiffractiveExcitation.hh 106980 2017-10-31 09:02:49Z gcosmo $
// $Id: G4QGSDiffractiveExcitation.hh 107867 2017-12-07 14:44:07Z gcosmo $
#ifndef G4QGSDiffractiveExcitation_h
#define G4QGSDiffractiveExcitation_h 1
@@ -50,40 +50,35 @@ class G4ExcitedString;
class G4QGSDiffractiveExcitation
{
public:
G4QGSDiffractiveExcitation();
virtual ~G4QGSDiffractiveExcitation();
public:
virtual G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
virtual G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
G4QGSDiffractiveExcitation();
virtual ~G4QGSDiffractiveExcitation();
//void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
//void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
//void SetMinimumMass(G4double aValue) { minmass = aValue; }
virtual G4bool ExciteParticipants (G4VSplitableHadron * aPartner,
G4VSplitableHadron * bPartner, // Uzhi Oct. 2016
G4bool ProjectileDiffraction=TRUE) const; // Uzhi Oct. 2016 , G4bool ProjectileDiffraction
virtual G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
private:
// void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
// void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
// void SetMinimumMass(G4double aValue) { minmass = aValue; }
G4QGSDiffractiveExcitation(const G4QGSDiffractiveExcitation &right);
//G4double ChooseX(G4double Xmin, G4double Xmax) const;
G4double ChooseP(G4double Pmin, G4double Pmax) const;
private:
//G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const; // Uzhi
G4QGSDiffractiveExcitation(const G4QGSDiffractiveExcitation &right);
const G4QGSDiffractiveExcitation & operator=(const G4QGSDiffractiveExcitation &right);
int operator==(const G4QGSDiffractiveExcitation &right) const;
int operator!=(const G4QGSDiffractiveExcitation &right) const;
G4double ChooseP(G4double Pmin, G4double Pmax) const;
private:
// Model Parameters:
/*
const G4double widthOfPtSquare; // width^2 of pt for string excitation
const G4double minExtraMass; // minimum excitation mass
const G4double minmass; // mean pion transverse mass; used for Xmin
*/
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const;
const G4QGSDiffractiveExcitation & operator=(const G4QGSDiffractiveExcitation &right);
int operator==(const G4QGSDiffractiveExcitation &right) const;
int operator!=(const G4QGSDiffractiveExcitation &right) const;
private:
};
#endif
@@ -40,77 +40,86 @@
class G4QGSMSplitableHadron : public G4VSplitableHadron
{
public:
G4QGSMSplitableHadron();
G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary);
G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary, G4bool Direction);
G4QGSMSplitableHadron(const G4Nucleon & aNucleon);
G4QGSMSplitableHadron(const G4Nucleon & aNucleon, G4bool Direction);
virtual ~G4QGSMSplitableHadron();
public:
G4QGSMSplitableHadron();
G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary);
G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary, G4bool Direction);
G4QGSMSplitableHadron(const G4Nucleon & aNucleon);
G4QGSMSplitableHadron(const G4Nucleon & aNucleon, G4bool Direction);
private:
const G4QGSMSplitableHadron & operator=(const G4QGSMSplitableHadron &right);
virtual ~G4QGSMSplitableHadron();
public:
virtual void SplitUp();
virtual void SetFirstParton(G4int PDGcode); // Uzhi 24.11.10
virtual void SetSecondParton(G4int PDGcode); // Uzhi 24.11.10
virtual G4Parton * GetNextParton();
virtual G4Parton * GetNextAntiParton();
private:
const G4QGSMSplitableHadron & operator=(const G4QGSMSplitableHadron &right);
private:
void InitParameters();
void DiffractiveSplitUp();
void SoftSplitUp();
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
void GetValenceQuarkFlavors(const G4ParticleDefinition * aPart,
G4Parton *& Parton1, G4Parton *& Parton2);
G4Parton * BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode, G4int nSeaPair);
G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta);
public:
virtual void SplitUp();
virtual void SetFirstParton(G4int PDGcode); // Uzhi 24.11.10
virtual void SetSecondParton(G4int PDGcode); // Uzhi 24.11.10
virtual G4Parton * GetNextParton();
virtual G4Parton * GetNextAntiParton();
private:
// aggregated data
G4bool Direction; // FALSE is target. - candidate for more detailed design. @@@@ HPW
private:
void InitParameters();
void DiffractiveSplitUp();
void SoftSplitUp();
std::deque<G4Parton *> Color;
std::deque<G4Parton *> AntiColor;
private:
// associated classes
G4MesonSplitter theMesonSplitter;
G4BaryonSplitter theBaryonSplitter;
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
void GetValenceQuarkFlavors(const G4ParticleDefinition * aPart,
G4Parton *& Parton1, G4Parton *& Parton2);
G4Parton * BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode, G4int nSeaPair);
G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta);
private:
// model parameters
G4double alpha;
G4double beta;
G4double theMinPz;
G4double StrangeSuppress;
G4double sigmaPt;
G4double widthOfPtSquare;
G4double minTransverseMass;
private:
// aggregated data
G4bool Direction; // FALSE is target. - candidate for more detailed design. @@@@ HPW
std::deque<G4Parton *> Color;
std::deque<G4Parton *> AntiColor;
//std::deque<G4Parton *>::iterator iP; // Uzhi
//std::deque<G4Parton *>::iterator iAP; // Uzhi
unsigned int iP; // Uzhi 5.06.2015
unsigned int iAP; // Uzhi 5.06.2015
private:
// associated classes
G4MesonSplitter theMesonSplitter;
G4BaryonSplitter theBaryonSplitter;
private:
// model parameters
G4double alpha;
G4double beta;
G4double theMinPz;
G4double StrangeSuppress;
G4double sigmaPt;
G4double widthOfPtSquare;
G4double minTransverseMass;
};
inline G4Parton* G4QGSMSplitableHadron::GetNextParton()
{
if(Color.size()==0) return 0;
G4Parton * result = Color.back();
Color.pop_back();
return result;
if(Color.size()==0) return 0;
G4Parton * result = Color.operator[](iP);
iP++; if(iP == Color.size()) iP=0;
return result;
}
inline G4Parton* G4QGSMSplitableHadron::GetNextAntiParton()
{
if(AntiColor.size() == 0) return 0;
G4Parton * result = AntiColor.front();
AntiColor.pop_front();
return result;
if(AntiColor.size() == 0) return 0;
G4Parton * result = AntiColor.operator[](iAP);
iAP++; if(iAP == AntiColor.size()) iAP=0;
return result;
}
inline void G4QGSMSplitableHadron::SetFirstParton(G4int PDGcode)
{PDGcode++;}
inline void G4QGSMSplitableHadron::SetSecondParton(G4int PDGcode)
{PDGcode++;}
#endif
@@ -37,7 +37,6 @@
#include "G4ExcitedStringVector.hh"
#include "G4KineticTrackVector.hh"
#include "G4PomeronCrossSection.hh"
#include "G4ParticleTable.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4VPartonStringModel.hh"
@@ -46,35 +45,38 @@
#include "G4SoftStringBuilder.hh"
#include "G4PartonPair.hh"
//***********************************************************************************************
//*****************************************************************************************
template<class ParticipantType>
class G4QGSModel : public G4VPartonStringModel
{
// Constructors
public:
{
// Constructors
public:
G4QGSModel();
virtual ~G4QGSModel();
G4QGSModel(const G4QGSModel &right);
G4QGSModel& operator=(const G4QGSModel &right);
// Method
public:
// Method
public:
virtual G4V3DNucleus* GetWoundedNucleus() const;
virtual G4V3DNucleus* GetProjectileNucleus() const; // Uzhi Nov. 2012
virtual void Init(const G4Nucleus& Nucleus, const G4DynamicParticle& Projectile);
virtual G4ExcitedStringVector * GetStrings();
virtual void ModelDescription(std::ostream& outFile) const;
private:
ParticipantType theParticipants;
G4DiffractiveStringBuilder theDiffractiveStringBuilder;
G4SoftStringBuilder theSoftStringBuilder;
private:
ParticipantType theParticipants;
G4DiffractiveStringBuilder theDiffractiveStringBuilder;
G4SoftStringBuilder theSoftStringBuilder;
};
//-------------------------------------------------------------------------------------------
private:
// cash theCurrentVelocity for lorentztrafo HPW
G4ThreeVector theCurrentVelocity;
};
//*****************************************************************************************
@@ -82,3 +84,4 @@ class G4QGSModel : public G4VPartonStringModel
#endif
@@ -25,109 +25,75 @@
//
//****************************************************************************************************************
template<class ParticipantType>
G4QGSModel<ParticipantType>::G4QGSModel()
{
G4VPartonStringModel::SetThisPointer(this);
SetEnergyMomentumCheckLevels(2*CLHEP::perCent, 150*CLHEP::MeV);
}
{
G4VPartonStringModel::SetThisPointer(this);
SetEnergyMomentumCheckLevels(2*CLHEP::perCent, 150*CLHEP::MeV);
}
template<class ParticipantType>
G4QGSModel<ParticipantType>::G4QGSModel(const G4QGSModel &right)
{
G4VPartonStringModel::SetThisPointer(this);
std::pair<G4double, G4double> levels=right.GetEnergyMomentumCheckLevels();
SetEnergyMomentumCheckLevels(levels.first, levels.second);
}
{
G4VPartonStringModel::SetThisPointer(this);
std::pair<G4double, G4double> levels=right.GetEnergyMomentumCheckLevels();
SetEnergyMomentumCheckLevels(levels.first, levels.second);
}
template<class ParticipantType>
G4QGSModel<ParticipantType>& G4QGSModel<ParticipantType>::operator=(const G4QGSModel &right)
{
if (this != &right )
{
G4VPartonStringModel::SetThisPointer(this);
std::pair<G4double, G4double> levels=right.GetEnergyMomentumCheckLevels();
SetEnergyMomentumCheckLevels(levels.first, levels.second);
}
}
{
if (this != &right )
{
G4VPartonStringModel::SetThisPointer(this);
std::pair<G4double, G4double> levels=right.GetEnergyMomentumCheckLevels();
SetEnergyMomentumCheckLevels(levels.first, levels.second);
}
}
template<class ParticipantType>
G4QGSModel<ParticipantType>::~G4QGSModel()
{
}
{
}
template<class ParticipantType>
void G4QGSModel<ParticipantType>::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile)
{
// clean-up and consistency with design, HPW Feb 1999
theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt());
theCurrentVelocity.setX(0);
theCurrentVelocity.setY(0);
// HPW Feb 1999
// this is an approximation, neglecting the motion of nucleons in the nucleus & p,n mass differences. @@@
//G4double vz_old = aProjectile.Get4Momentum().pz()/
// (aProjectile.Get4Momentum().e() + G4Proton::Proton()->GetPDGMass());
G4double nCons = 1;
if(std::abs(aProjectile.GetDefinition()->GetBaryonNumber()) !=0)
{
nCons = std::abs(aProjectile.GetDefinition()->GetBaryonNumber());
}
G4double pz_per_projectile = aProjectile.Get4Momentum().pz()/nCons;
//G4double e_per_projectile = aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect();
// e_per_projectile /=nCons*nCons;
// e_per_projectile += G4Proton::Proton()->GetPDGMass()*G4Proton::Proton()->GetPDGMass();
G4double e_per_projectile = aProjectile.Get4Momentum()*aProjectile.Get4Momentum();
e_per_projectile += aProjectile.Get4Momentum().vect()*aProjectile.Get4Momentum().vect();
e_per_projectile /=nCons*nCons;
e_per_projectile = std::sqrt(e_per_projectile);
e_per_projectile += G4Proton::Proton()->GetPDGMass();
G4double vz = pz_per_projectile/e_per_projectile;
//--DEBUG-- G4cout << "IncomingMomentum - vz "<<aProjectile.Get4Momentum()<< ", " << vz <<G4endl;
theCurrentVelocity.setZ(vz);
theParticipants.DoLorentzBoost(-theCurrentVelocity);
G4LorentzVector Mom = aProjectile.Get4Momentum();
Mom.boost(-theCurrentVelocity);
G4ReactionProduct theProjectile;
theProjectile.SetDefinition(aProjectile.GetDefinition());
theProjectile.SetTotalEnergy(Mom.e());
theProjectile.SetMomentum(Mom.vect());
//--DEBUG-- G4cout << "PreInteractionMomentum "<<Mom<<G4endl;
theParticipants.BuildInteractions(theProjectile);
theParticipants.GetWoundedNucleus()->DoLorentzBoost(theCurrentVelocity);
}
{
// It is assumed that target nucleus is at rest.
theParticipants.Init(aNucleus.GetA_asInt(),aNucleus.GetZ_asInt()); // Init of a target nucleus
G4LorentzVector Mom = aProjectile.Get4Momentum(); // Momentum of a projectile
G4ReactionProduct theProjectile;
theProjectile.SetDefinition(aProjectile.GetDefinition());
theProjectile.SetTotalEnergy(Mom.e());
theProjectile.SetMomentum(Mom.vect());
theParticipants.BuildInteractions(theProjectile); // Creation of strings and nuclear remnant
}
template<class ParticipantType>
G4ExcitedStringVector * G4QGSModel<ParticipantType>::GetStrings()
{
// clean-up and consistancy with design, HPW Feb 1999
// also fixing a memory leak, removing unnecessary caching, and
// streamlining of logic
{ // The strings are produced at theParticipants.BuildInteractions(theProjectile)
G4PartonPair* aPair;
G4ExcitedStringVector* theStrings = new G4ExcitedStringVector;
G4ExcitedString * aString;
while( (aPair = theParticipants.GetNextPartonPair()) ) /* Loop checking, 26.10.2015, A.Ribon */
while( (aPair = theParticipants.GetNextPartonPair()) ) /* Loop checking, 07.08.2015, A.Ribon */
{
if (aPair->GetCollisionType() == G4PartonPair::DIFFRACTIVE)
{
aString = theDiffractiveStringBuilder.BuildString(aPair);
// G4cout << "diffractive "<<aString->Get4Momentum()<<G4endl;
}
else
{
aString = theSoftStringBuilder.BuildString(aPair);
// G4cout << "soft "<<aString->Get4Momentum()<<G4endl;
}
//--DEBUG-- G4cout << " QGSModel.icc::GetStrings() theCurrentVelocity " << theCurrentVelocity << G4endl;
aString->Boost(theCurrentVelocity);
// aString->Boost(theCurrentVelocity);
theStrings->push_back(aString);
delete aPair;
}
//--DEBUG-- G4cout << G4endl;
// for(G4int i=0; i<theStrings->size(); i++)
// {
// G4cout << "String = "<<theStrings->operator[](i)->Get4Momentum()<<G4endl;
// }
return theStrings;
}
@@ -153,6 +119,5 @@ void G4QGSModel<ParticipantType>::ModelDescription(std::ostream& outFile) const
<< "into quarks and di-quarks, the formation and excitation of\n"
<< "quark-gluon strings, string hadronization and diffractive dissociation.\n";
}
//*********************************************************************************************************************
@@ -30,93 +30,269 @@
#include "G4VParticipants.hh"
#include "G4Nucleon.hh"
#include "G4InteractionContent.hh"
#include "G4PomeronCrossSection.hh"
#include "G4QGSDiffractiveExcitation.hh"
#include "G4SingleDiffractiveExcitation.hh"
#include "G4PartonPair.hh"
#include "G4QGSMSplitableHadron.hh"
#include "G4V3DNucleus.hh"
#include "G4VSplitableHadron.hh" // Uzhi
#include "G4Reggeons.hh"
#include "G4QuarkExchange.hh"
class G4QGSParticipants : public G4VParticipants
{
public:
G4QGSParticipants();
G4QGSParticipants(const G4QGSParticipants &right);
const G4QGSParticipants & operator=(const G4QGSParticipants &right);
virtual ~G4QGSParticipants();
public:
G4QGSParticipants();
G4QGSParticipants(const G4QGSParticipants &right);
const G4QGSParticipants & operator=(const G4QGSParticipants &right);
virtual ~G4QGSParticipants();
int operator==(const G4QGSParticipants &right) const;
int operator!=(const G4QGSParticipants &right) const;
int operator==(const G4QGSParticipants &right) const;
int operator!=(const G4QGSParticipants &right) const;
virtual void DoLorentzBoost(G4ThreeVector aBoost)
{
if(theNucleus) theNucleus->DoLorentzBoost(aBoost);
theBoost = aBoost;
}
virtual void DoLorentzBoost(G4ThreeVector aBoost)
{
theCurrentVelocity = -aBoost;
if(theNucleus) theNucleus->DoLorentzBoost(aBoost);
theBoost = aBoost;
}
G4PartonPair* GetNextPartonPair();
void BuildInteractions(const G4ReactionProduct &thePrimary);
void StartPartonPairLoop();
G4PartonPair* GetNextPartonPair();
void BuildInteractions(const G4ReactionProduct &thePrimary);
void StartPartonPairLoop();
protected:
virtual G4VSplitableHadron* SelectInteractions(const G4ReactionProduct &thePrimary);
void SplitHadrons();
void PerformSoftCollisions();
void PerformDiffractiveCollisions();
private:
G4V3DNucleus* GetTargetNucleus() const;
G4V3DNucleus* GetProjectileNucleus() const;
protected:
struct DeleteInteractionContent {void operator()(G4InteractionContent*aC){delete aC;}};
std::vector<G4InteractionContent*> theInteractions;
struct DeleteSplitableHadron{void operator()(G4VSplitableHadron*aS){delete aS;}};
std::vector<G4VSplitableHadron*> theTargets;
struct DeletePartonPair{void operator()(G4PartonPair*aP){delete aP;}};
std::vector<G4PartonPair*> thePartonPairs;
void PrepareInitialState( const G4ReactionProduct& thePrimary );
void GetList( const G4ReactionProduct& thePrimary );
G4SingleDiffractiveExcitation theSingleDiffExcitation;
G4QGSDiffractiveExcitation theDiffExcitaton;
G4int ModelMode;
G4bool IsSingleDiffractive();
void StoreInvolvedNucleon();
void ReggeonCascade();
G4bool PutOnMassShell();
void GetResiduals();
G4ThreeVector theBoost;
G4ThreeVector GaussianPt( G4double AveragePt2, G4double maxPtSquare ) const;
G4bool ComputeNucleusProperties( G4V3DNucleus* nucleus, G4LorentzVector& nucleusMomentum,
G4LorentzVector& residualMomentum, G4double& sumMasses,
G4double& residualExcitationEnergy, G4double& residualMass,
G4int& residualMassNumber, G4int& residualCharge );
// Utility methods used by PutOnMassShell.
G4bool GenerateDeltaIsobar( const G4double sqrtS, const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[], G4double& sumMasses );
G4bool SamplingNucleonKinematics( G4double averagePt2, const G4double maxPt2,
G4double dCor, G4V3DNucleus* nucleus,
const G4LorentzVector& pResidual,
const G4double residualMass, const G4int residualMassNumber,
const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[], G4double& mass2 );
G4bool CheckKinematics( const G4double sValue, const G4double sqrtS,
const G4double projectileMass2, const G4double targetMass2,
const G4double nucleusY, const G4bool isProjectileNucleus,
const G4int numberOfInvolvedNucleons, G4Nucleon* involvedNucleons[],
G4double& targetWminus, G4double& projectileWplus, G4bool& success );
G4bool FinalizeKinematics( const G4double w, const G4bool isProjectileNucleus,
const G4LorentzRotation& boostFromCmsToLab,
const G4double residualMass, const G4int residualMassNumber,
const G4int numberOfInvolvedNucleons,
G4Nucleon* involvedNucleons[],
G4LorentzVector& residual4Momentum );
void CreateStrings();
private:
// Set parameters of nuclear destruction
void SetCofNuclearDestruction( const G4double aValue );
void SetR2ofNuclearDestruction( const G4double aValue );
void SetExcitationEnergyPerWoundedNucleon( const G4double aValue );
void SetDofNuclearDestruction( const G4double aValue );
void SetPt2ofNuclearDestruction( const G4double aValue );
void SetMaxPt2ofNuclearDestruction( const G4double aValue );
// Get parameters of nuclear destruction
G4double GetCofNuclearDestruction();
G4double GetR2ofNuclearDestruction();
G4double GetExcitationEnergyPerWoundedNucleon();
G4double GetDofNuclearDestruction();
G4double GetPt2ofNuclearDestruction();
G4double GetMaxPt2ofNuclearDestruction();
protected:
virtual G4VSplitableHadron* SelectInteractions(const G4ReactionProduct &thePrimary);
void SplitHadrons();
void PerformSoftCollisions();
void PerformDiffractiveCollisions();
G4bool DeterminePartonMomenta();
protected:
struct DeleteInteractionContent {void operator()(G4InteractionContent*aC){delete aC;}};
std::vector<G4InteractionContent*> theInteractions;
struct DeleteSplitableHadron{void operator()(G4VSplitableHadron*aS){delete aS;}};
std::vector<G4VSplitableHadron*> theTargets;
struct DeletePartonPair{void operator()(G4PartonPair*aP){delete aP;}};
std::vector<G4PartonPair*> thePartonPairs;
G4QuarkExchange theQuarkExchange; // Uzhi 20 Oct. 2016
G4SingleDiffractiveExcitation theSingleDiffExcitation;
G4QGSDiffractiveExcitation theDiffExcitaton;
G4int ModelMode;
G4ThreeVector theBoost;
G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta);
protected:
// model parameters HPW
enum { SOFT, DIFFRACTIVE };
enum { ALL, WITHOUT_R, NON_DIFF }; // Interaction modes
enum { PrD, TrD, DD, NonD, Qexc }; // Interaction types
const G4int nCutMax;
const G4double ThresholdParameter;
const G4double QGSMThreshold;
const G4double theNucleonRadius;
G4ThreeVector theCurrentVelocity; // Uzhi 17 Apr. 2015 Is it needed?
G4QGSMSplitableHadron* theProjectileSplitable;
private:
G4ReactionProduct theProjectile;
G4Reggeons* Regge; // Uzhi 18 Oct. 2016
G4int InteractionMode;
G4double alpha;
G4double beta;
G4double sigmaPt;
G4Nucleon* TheInvolvedNucleonsOfTarget[250];
G4int NumberOfInvolvedNucleonsOfTarget;
G4Nucleon* TheInvolvedNucleonsOfProjectile[250];
G4int NumberOfInvolvedNucleonsOfProjectile;
G4LorentzVector ProjectileResidual4Momentum;
G4int ProjectileResidualMassNumber;
G4int ProjectileResidualCharge;
G4double ProjectileResidualExcitationEnergy;
G4LorentzVector TargetResidual4Momentum;
G4int TargetResidualMassNumber;
G4int TargetResidualCharge;
G4double TargetResidualExcitationEnergy;
private:
// Parameters of nuclear destruction
G4double CofNuclearDestruction; // Cnd of nuclear destruction
G4double R2ofNuclearDestruction; // R2nd
G4double ExcitationEnergyPerWoundedNucleon;
G4double DofNuclearDestruction; // D for momentum sampling
G4double Pt2ofNuclearDestruction; // Pt2
G4double MaxPt2ofNuclearDestruction; // Max Pt2
protected:
// model parameters HPW
enum { SOFT, DIFFRACTIVE };
const G4int nCutMax;
const G4double ThresholdParameter;
const G4double QGSMThreshold;
const G4double theNucleonRadius;
};
inline G4bool G4QGSParticipants::IsSingleDiffractive()
{
G4bool result=false;
if(G4UniformRand()<1.) result = true;
return result;
}
inline void G4QGSParticipants::StartPartonPairLoop()
{
}
inline G4PartonPair* G4QGSParticipants::GetNextPartonPair()
{
if (thePartonPairs.empty()) return 0;
G4PartonPair * result = thePartonPairs.back();
thePartonPairs.pop_back();
return result;
if (thePartonPairs.empty()) return 0;
G4PartonPair * result = thePartonPairs.back();
thePartonPairs.pop_back();
return result;
}
inline void G4QGSParticipants::SplitHadrons()
{
unsigned int i;
for(i = 0; i < theInteractions.size(); i++)
{
theInteractions[i]->SplitHadrons();
}
unsigned int i;
for(i = 0; i < theInteractions.size(); i++)
{
theInteractions[i]->SplitHadrons();
}
}
//--------------------------------------
//Uzhi Copy from FTF Model.hh
/*
inline G4V3DNucleus* G4QGSParticipants::GetWoundedNucleus() const {
return theNucleus;
}
*/
inline G4V3DNucleus* G4QGSParticipants::GetTargetNucleus() const {
return theNucleus;
}
inline G4V3DNucleus* G4QGSParticipants::GetProjectileNucleus() const {
return 0;
}
// Uzhi Start copy from FTFparameters
// Set parameters of nuclear destruction
inline void G4QGSParticipants::SetCofNuclearDestruction( const G4double aValue ) {
CofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetR2ofNuclearDestruction( const G4double aValue ) {
R2ofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetExcitationEnergyPerWoundedNucleon( const G4double aValue ) {
ExcitationEnergyPerWoundedNucleon = aValue;
}
inline void G4QGSParticipants::SetDofNuclearDestruction( const G4double aValue ) {
DofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetPt2ofNuclearDestruction( const G4double aValue ) {
Pt2ofNuclearDestruction = aValue;
}
inline void G4QGSParticipants::SetMaxPt2ofNuclearDestruction( const G4double aValue ) {
MaxPt2ofNuclearDestruction = aValue;
}
// Get parameters of nuclear destruction
inline G4double G4QGSParticipants::GetCofNuclearDestruction() {
return CofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetR2ofNuclearDestruction() {
return R2ofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetExcitationEnergyPerWoundedNucleon() {
return ExcitationEnergyPerWoundedNucleon;
}
inline G4double G4QGSParticipants::GetDofNuclearDestruction() {
return DofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetPt2ofNuclearDestruction() {
return Pt2ofNuclearDestruction;
}
inline G4double G4QGSParticipants::GetMaxPt2ofNuclearDestruction() {
return MaxPt2ofNuclearDestruction;
}
//Uzhi End copy from FTFparameters
#endif
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * 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: G4QuarkExchange.hh 66241 2012-12-13 18:34:42Z gunter $
#ifndef G4QuarkExchange_h
#define G4QuarkExchange_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4QuarkExchange --------------
// by V. Uzhinsky, October 2016.
// QuarkExchange is used by strings models.
// Take a projectile and a target.
//Simulate Q exchange with excitation of projectile or target.
// ------------------------------------------------------------
//#include "G4SystemOfUnits.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
//#include "G4QGSDiffractiveExcitation.hh"
class G4VSplitableHadron;
class G4ExcitedString;
class G4QuarkExchange
{
public:
G4QuarkExchange();
~G4QuarkExchange();
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
private:
G4QuarkExchange(const G4QuarkExchange &right);
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
const G4QuarkExchange & operator=(const G4QuarkExchange &right);
int operator==(const G4QuarkExchange &right) const;
int operator!=(const G4QuarkExchange &right) const;
};
#endif
@@ -0,0 +1,109 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#ifndef G4Reggeons_h
#define G4Reggeons_h 1
//
// $Id: G4Reggeons.hh 96940 2016-05-18 09:44:20Z ribon $
//
#include "G4Proton.hh"
#include "G4Neutron.hh"
#include "G4PionPlus.hh"
#include "G4PionMinus.hh"
#include "G4PionZero.hh"
#include "G4KaonPlus.hh"
#include "G4KaonMinus.hh"
#include "G4KaonZero.hh"
#include "G4KaonZeroShort.hh"
#include "G4KaonZeroLong.hh"
#include "G4Gamma.hh"
#include "Randomize.hh"
class G4Reggeons
{
public:
G4Reggeons(const G4ParticleDefinition * );
G4double Get_Cprojectile();
G4double Get_Ctarget();
~G4Reggeons();
void SetS(G4double S);
void CalculateXs();
G4double Chi_pomeron(G4double Mult, G4double B);
G4double Chi_reggeon(G4double Mult, G4double B);
G4double GetTotalX();
G4double GetTotalXp();
G4double GetTotalXr();
G4double GetElasticX();
G4double GetPrDiffX();
G4double GetTrDiffX();
G4double GetDDiffX();
G4double GetInelX();
G4double GetND_X();
G4double GetNDp_X();
G4double GetNDr_X();
void GetProbabilities(G4double B, G4int Mode,
G4double & Pint,
G4double & Pprd, G4double & Ptrd, G4double & Pdd,
G4double & Pnd, G4double & Pnvr);
G4int ncPomerons();
private:
enum { ALL, WITHOUT_R, NON_DIFF };
G4ParticleDefinition * Target=G4Proton::Proton();
G4double Alpha_pomeron, Alphaprime_pomeron, Gamma_pomeron, Rsquare_pomeron, S0_pomeron;
G4double Alpha_pomeronHard, Gamma_pomeronHard;
G4double Freggeon_Alpha, Freggeon_Alphaprime, Freggeon_Gamma, Freggeon_Rsquare, Freggeon_C, FParity;
G4double Wreggeon_Alpha, Wreggeon_Alphaprime, Wreggeon_Gamma, Wreggeon_Rsquare, Wreggeon_C, WParity;
G4double C_pomeron; // = pomeron_Cpr * pomeron_Ctr // Uzhi Oct. 2016
G4double Cpr_pomeron; // shower enhancement in projectile vertex // Uzhi Oct. 2016
G4double Ctr_pomeron; // shower enhancement in target vertex // Uzhi Oct. 2016
G4double Sint=0.;
G4double chiPin; // Pomeron inelastic phase needed for NcutPomeron
// calculations.
G4double Xtotal , XtotalP, XtotalR;
G4double Xelastic, Xpr_Diff, Xtr_Diff, XDDiff;
G4double Xinel , Xnd, XndP, XndR;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4SingleDiffractiveExcitation.hh 106980 2017-10-31 09:02:49Z gcosmo $
// $Id: G4SingleDiffractiveExcitation.hh 107867 2017-12-07 14:44:07Z gcosmo $
#ifndef G4SingleDiffractiveExcitation_h
#define G4SingleDiffractiveExcitation_h 1
@@ -38,8 +38,7 @@
// excite the projectile and target
// ------------------------------------------------------------
#include <CLHEP/Units/SystemOfUnits.h>
//#include "G4SystemOfUnits.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4QGSDiffractiveExcitation.hh"
@@ -49,36 +48,25 @@ class G4ExcitedString;
class G4SingleDiffractiveExcitation : public G4QGSDiffractiveExcitation
{
public:
G4SingleDiffractiveExcitation(G4double sigmaPt=0.6*CLHEP::GeV,
G4double minExtraMass=250*CLHEP::MeV,
G4double x0mass=250*CLHEP::MeV);
~G4SingleDiffractiveExcitation();
public:
G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
G4SingleDiffractiveExcitation();
~G4SingleDiffractiveExcitation();
//void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
//void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
//void SetMinimumMass(G4double aValue) { minmass = aValue; }
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner, G4bool ProjectileDiffraction) const;
private:
private:
G4SingleDiffractiveExcitation(const G4SingleDiffractiveExcitation &right);
G4SingleDiffractiveExcitation(const G4SingleDiffractiveExcitation &right);
G4double ChooseX(G4double Xmin, G4double Xmax) const;
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
G4double ChooseX(G4double Xmin, G4double Xmax) const;
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
const G4SingleDiffractiveExcitation & operator=(const G4SingleDiffractiveExcitation &right);
int operator==(const G4SingleDiffractiveExcitation &right) const;
int operator!=(const G4SingleDiffractiveExcitation &right) const;
const G4SingleDiffractiveExcitation & operator=(const G4SingleDiffractiveExcitation &right);
int operator==(const G4SingleDiffractiveExcitation &right) const;
int operator!=(const G4SingleDiffractiveExcitation &right) const;
private:
// Model Parameters:
const G4double widthOfPtSquare; // width^2 of pt for string excitation
const G4double minExtraMass; // minimum excitation mass
const G4double minmass; // mean pion transverse mass; used for Xmin
};
#endif