Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4InelasticSplitableHadron.hh,v 1.2 1999/12/15 14:52:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4InelasticSplitableHadron_h
@@ -1,6 +1,12 @@
#ifndef G4QGSModel_h
#define G4QGSModel_h 1
// Class Description
// Model for hadron (p,n,pi,K) nuclear reactions in geant4. IT implements
// A. Kaydalov's quark gluon string model.
// To be used in your physics list, in case you need this kind of physics.
// Class Description - End
#include "G4ExcitedStringVector.hh"
#include "G4KineticTrackVector.hh"
#include "G4PomeronCrossSection.hh"
@@ -29,7 +35,7 @@ public:
public:
virtual G4V3DNucleus* GetWoundedNucleus() const;
protected:
public:
virtual void Init(const G4Nucleus& Nucleus, const G4DynamicParticle& Projectile);
virtual G4ExcitedStringVector * GetStrings();
@@ -53,6 +53,11 @@ class G4SPBaryon
G4SPBaryon(G4ParticleDefinition * aDefinition);
~G4SPBaryon()
{
for(G4int i=0;i<thePartonInfo.size(); i++) delete thePartonInfo[i];
}
G4bool operator == ( const G4SPBaryon & aBaryon) const
{return this == &aBaryon; }
@@ -7,6 +7,7 @@
class G4SPBaryonTable
{
public:
~G4SPBaryonTable() {theBaryons.clearAndDestroy();}
void insert(G4SPBaryon * aBaryon) { theBaryons.insert(aBaryon);}
G4double length() {return theBaryons.length();}
@@ -15,7 +15,5 @@ G4PartonPair::G4PartonPair(const G4PartonPair &right)
G4PartonPair::~G4PartonPair()
{
delete Parton1;
delete Parton2;
}
@@ -22,16 +22,19 @@
void G4QGSMSplitableHadron::InitParameters()
{
// changing rapidity distribution for all
alpha = -0.5; // Note that this number is still assumed in the algorithm
// needs to be generalized.
// changing rapidity distribution for projectile like
beta = 2.5;// Note that this number is still assumed in the algorithm
// needs to be generalized.
// theMinPz = 0.5*G4PionMinus::PionMinus()->GetPDGMass();
theMinPz = 0.1*G4PionMinus::PionMinus()->GetPDGMass();
theMinPz = 0.8*G4PionMinus::PionMinus()->GetPDGMass();
// theMinPz = 0.1*G4PionMinus::PionMinus()->GetPDGMass();
// theMinPz = G4PionMinus::PionMinus()->GetPDGMass();
// as low as possible, otherwise, we have unphysical boundary conditions in the sampling.
StrangeSuppress = 0.48;
sigmaPt = 0.*GeV; // widens eta slightly, if increased to 1.7,
// but Maxim's original algorithm breaks energy conservation
// but Maxim's algorithm breaks energy conservation
// to be revised.
widthOfPtSquare = 0.01*GeV*GeV;
Direction = FALSE;
@@ -268,7 +271,7 @@ G4ThreeVector G4QGSMSplitableHadron::GaussianPt(G4double widthSquare, G4double m
G4Parton * G4QGSMSplitableHadron::
BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode, G4int nSeaPair)
{
if (isAntiQuark) aPDGCode*=-1.;
if (isAntiQuark) aPDGCode*=-1;
G4Parton* result = new G4Parton(aPDGCode);
result->SetPosition(GetPosition());
G4ThreeVector aPtVector = GaussianPt(sigmaPt, DBL_MAX);
@@ -51,18 +51,21 @@ G4ExcitedStringVector * G4QGSModel::GetStrings()
if (aPair->GetCollisionType() == G4PartonPair::DIFFRACTIVE)
{
aString = theDiffractiveStringBuilder.BuildString(aPair);
// G4cout << "diffractive "<<aString->Get4Momentum()<<endl;
}
else
{
aString = theSoftStringBuilder.BuildString(aPair);
// G4cout << "soft "<<aString->Get4Momentum()<<endl;
}
aString->Boost(theCurrentVelocity);
theStrings->insert(aString);
delete aPair;
}
//--DEBUG-- cout << G4endl;
for(G4int i=0; i<theStrings->length(); i++)
{
//--DEBUG-- cout << "String = "<<theStrings->at(i)->Get4Momentum()<<G4endl;
// cout << "String = "<<theStrings->at(i)->Get4Momentum()<<G4endl;
}
return theStrings;
}
@@ -1,6 +1,7 @@
#include "globals.hh"
#include "G4QGSParticipants.hh"
#include "G4LorentzVector.hh"
#include "G4Pair.hh"
// Class G4QGSParticipants
@@ -53,15 +54,11 @@ void G4QGSParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
while(theInteractions.entries() == 0)
{
// choose random impact parameter HPW
G4double x,y;
do
{
x = 2*G4UniformRand() - 1;
y = 2*G4UniformRand() - 1;
}
while(x*x + y*y > 1);
G4double impactX = x*(outerRadius+theNucleonRadius); // add nucleon radius, otherwise too small HPW
G4double impactY = y*(outerRadius+theNucleonRadius);
G4Pair<G4double, G4double> theImpactParameter;
theImpactParameter = theNucleus->ChooseImpactXandY(outerRadius+theNucleonRadius);
G4double impactX = theImpactParameter.first;
G4double impactY = theImpactParameter.second;
// loop over nuclei to find collissions HPW
theNucleus->StartLoop();
G4int nucleonCount = 0; // debug
@@ -146,6 +143,7 @@ void G4QGSParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
// clean-up, if necessary
theInteractions.clearAndDestroy();
theTargets.clearAndDestroy();
delete aProjectile;
}
void G4QGSParticipants::PerformDiffractiveCollisions()