Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -15,6 +15,26 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
27-Sep-2012, G.Cosmo
- Explicitly use inclusion of headers for system of units and physical
constants, in plan to remove implicit inclusion from globals.hh.
- Corrected compilation warnings for order of initialization of data members
in G4PomeronCrossSection.
17-Jul-2012, G.Folger (had-partonstring-mgt-V09-05-03)
- fixes for coverity, G4InteractionContent and G4PomeronCrossSection
12-Jun-2012, G.Folger (had-partonstring-mgt-V09-05-02)
- G4PomeronCrossSection.cc: fix shadowing warnings
25-May-2012, G.Folger (had-partonstring-mgt-V09-05-01)
- G4VPartonStringModel:
- add ModelDescription() interface
- make copy ctor, =, ==, and != operators private, not implemented
12-Apr-2012, G.Folger (had-partonstring-mgt-V09-05-00)
- Changes in debugging information
5-Aug-2011, M. Kelsey (had-partonstring-mgt-V09-04-01)
G4VParticipants: Remove external dependences on G4Fancy3DNucleus by
moving #include, Init(), and SetNucleus() to .cc file.
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4EventGenerator.hh,v 1.3 2006-06-29 20:55:13 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4EventGenerator_h
#define G4EventGenerator_h 1
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4InteractionCode.hh,v 1.3 2006-06-29 20:55:15 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4InteractionCode_h
#define G4InteractionCode_h 1
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4InteractionContent.hh,v 1.5 2009-07-17 12:36:41 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4InteractionContent_h
@@ -42,17 +41,23 @@
#include "globals.hh"
#include "G4VSplitableHadron.hh"
#include "G4Nucleon.hh" // Uzhi 16.07.09
//#define debug_QGSM
#ifdef debug_QGSM
#include "../../qgsm/include/G4QGSMSplitableHadron.hh"
#include <deque>
#endif
class G4InteractionContent
{
public:
G4InteractionContent() {}
G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
~G4InteractionContent();
int operator==(const G4InteractionContent &right) const;
int operator!=(const G4InteractionContent &right) const;
G4bool operator<(const G4InteractionContent &right) const;
G4VSplitableHadron * GetProjectile() const ;
@@ -82,12 +87,11 @@ class G4InteractionContent
#endif
public:
G4InteractionContent(){}
const G4InteractionContent & operator=(const G4InteractionContent &right);
private:
G4InteractionContent & operator=(const G4InteractionContent &right);
G4InteractionContent(const G4InteractionContent &right);
int operator==(const G4InteractionContent &right) const;
int operator!=(const G4InteractionContent &right) const;
protected:
@@ -167,29 +171,74 @@ inline void G4InteractionContent::SplitHadrons()
{
if ( theProjectile != NULL ) theProjectile->SplitUp();
if ( theTarget != NULL ) theTarget->SplitUp();
#ifdef G4DEBUG
// Dump();
#endif
}
#ifdef G4DEBUG
inline void G4InteractionContent::Dump()
{
G4LorentzVector mom(0.,0.,0.,0.);
G4cout << " G4InteractionContent " << this << G4endl
<< "Hard/Soft/Diff "
<< theNumberOfHard<<" / "
<<theNumberOfSoft<<" / "
<<theNumberOfDiffractive << G4endl
<< "Projectile " ;
if ( theProjectile )
{ G4cout << theProjectile->GetDefinition()->GetPDGEncoding()
<< " " << theProjectile->Get4Momentum()<< G4endl;
<< "Hard/Soft/Diff "
<< theNumberOfHard<<" / "
<<theNumberOfSoft<<" / "
<<theNumberOfDiffractive << G4endl
<< "Projectile " ;
if ( theProjectile ) {
G4cout << theProjectile->GetDefinition()->GetPDGEncoding()
<< " " << theProjectile->Get4Momentum()<< G4endl;
mom+=theProjectile->Get4Momentum();
#ifdef debug_QGSM
G4QGSMSplitableHadron * at =(G4QGSMSplitableHadron*)theProjectile;
std::deque<G4Parton *>color=at->GetColorPartons();
std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
G4cout << " proj. color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
std::deque<G4Parton *>::iterator p_iter;
G4LorentzVector colmom(0.,0.,0.,0.);
for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
G4cout << "proj color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
colmom+=(*p_iter)->Get4Momentum();
}
G4LorentzVector anticolmom(0.,0.,0.,0.);
for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
G4cout << "proj antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
anticolmom+=(*p_iter)->Get4Momentum();
}
G4cout << " proj. color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
#endif
} else {
G4cout << " none " << G4endl;
G4cout << " none " << G4endl;
}
if ( theTarget )
{ G4cout << theTarget->GetDefinition()->GetPDGEncoding()
<< " " << theTarget->Get4Momentum()<< G4endl;
} else {
G4cout << " none " << G4endl;
if ( theTarget ) {
G4cout << "Target " << theTarget->GetDefinition()->GetPDGEncoding()
<< " " << theTarget->Get4Momentum()<< G4endl;
mom+=theTarget->Get4Momentum();
#ifdef debug_QGSM
G4QGSMSplitableHadron * at =(G4QGSMSplitableHadron*)theTarget;
std::deque<G4Parton *>color=at->GetColorPartons();
std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
G4cout << " target color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
std::deque<G4Parton *>::iterator p_iter;
G4LorentzVector colmom(0.,0.,0.,0.);
for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
G4cout << "target color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
colmom+=(*p_iter)->Get4Momentum();
}
G4LorentzVector anticolmom(0.,0.,0.,0.);
for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
G4cout << "target antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
anticolmom+=(*p_iter)->Get4Momentum();
}
G4cout << " target color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
#endif
} else {
G4cout << " none " << G4endl;
}
G4cout << "total 4-mom of interaction content " << mom << G4endl;
}
#endif
@@ -26,8 +26,7 @@
#ifndef G4PomeronCrossSection_h
#define G4PomeronCrossSection_h 1
//
// $Id: G4PomeronCrossSection.hh,v 1.3 2006-06-29 20:55:19 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#include "G4Proton.hh"
#include "G4Neutron.hh"
@@ -119,14 +118,14 @@ class G4PomeronCrossSection
inline G4double Lambda(const G4double s);
inline G4double Eikonal(const G4double s,const G4double impactsquare);
G4double pomeron_S;
G4double pomeron_Gamma;
G4double pomeron_C;
G4double pomeron_Rsquare;
G4double pomeron_Alpha;
G4double pomeron_Alphaprime;
G4double pomeron_Gamma_Hard;
G4double pomeron_Alpha_Hard;
G4double pomeron_Alphaprime;
G4double pomeron_C;
G4double pomeron_Gamma;
G4double pomeron_Gamma_Hard;
G4double pomeron_Rsquare;
G4double pomeron_S;
};
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StringModel.hh,v 1.3 2006-06-29 20:55:23 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4StringModel_h
#define G4StringModel_h 1
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VParticipants.hh,v 1.7 2010-09-08 16:58:04 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4VParticipants_h
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VPartonStringModel.hh,v 1.3 2006-06-29 20:55:27 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4VPartonStringModel_h
#define G4VPartonStringModel_h 1
@@ -53,7 +52,7 @@ class G4VPartonStringModel : public G4VHighEnergyGenerator
{
public:
G4VPartonStringModel();
G4VPartonStringModel(const G4String& modelName = "Parton String Model");
virtual ~G4VPartonStringModel();
private:
@@ -66,6 +65,8 @@ class G4VPartonStringModel : public G4VHighEnergyGenerator
void SetFragmentationModel(G4VStringFragmentation * aModel);
G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary);
virtual G4V3DNucleus * GetWoundedNucleus() const = 0;
virtual void ModelDescription(std::ostream& outFile) const;
protected:
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VSplitableHadron.hh,v 1.8 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4VSplitableHadron_h
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VStringFragmentation.hh,v 1.3 2006-06-29 20:55:31 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4VStringFragmentation_h
#define G4VStringFragmentation_h 1
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VertexCode.hh,v 1.3 2006-06-29 20:55:33 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#ifndef G4VertexCode_h
#define G4VertexCode_h 1
@@ -24,11 +24,12 @@
// ********************************************************************
//
//
// $Id: G4EventGenerator.cc,v 1.4 2006-06-29 20:55:37 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// G4EventGenerator
#include "G4EventGenerator.hh"
#include "G4SystemOfUnits.hh"
G4EventGenerator::G4EventGenerator()
{
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4InteractionContent.cc,v 1.4 2006-06-29 20:55:39 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -42,38 +41,18 @@ G4InteractionContent::G4InteractionContent(G4VSplitableHadron *aPrimaryParticipa
theInteractionTime(0.), curStatus(0)
{
theProjectile=aPrimaryParticipant;
theTarget=0;
theTargetNucleon=0;
}
G4InteractionContent::G4InteractionContent(const G4InteractionContent &)
: theNumberOfHard(0), theNumberOfSoft(0), theNumberOfDiffractive(0),
theInteractionTime(0.), curStatus(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4InteractionContent(): copy ctor not meant to be accessable");
}
G4InteractionContent::~G4InteractionContent()
{}
int G4InteractionContent::operator==(const G4InteractionContent &right) const
{
return this==&right;
}
int G4InteractionContent::operator!=(const G4InteractionContent &right) const
{
return this!=&right;
}
G4bool G4InteractionContent::operator<(const G4InteractionContent &right) const
{
return this->GetInteractionTime() < right.GetInteractionTime();
}
const G4InteractionContent & G4InteractionContent::operator=(const G4InteractionContent &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4InteractionContent::operator= meant to not be accessable");
return *this;
}
void G4InteractionContent::SetInteractionTime(G4double aValue)
{theInteractionTime = aValue;}
@@ -24,14 +24,19 @@
// ********************************************************************
//
//
// $Id: G4PomeronCrossSection.cc,v 1.6 2006-11-07 12:51:39 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
#include "G4PomeronCrossSection.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4Pow.hh" // factorial()
G4PomeronCrossSection::G4PomeronCrossSection()
{;}
G4PomeronCrossSection::G4PomeronCrossSection() :
pomeron_Alpha(0), pomeron_Alpha_Hard(0), pomeron_Alphaprime(0),
pomeron_C(0), pomeron_Gamma(0), pomeron_Gamma_Hard(0),
pomeron_Rsquare(0), pomeron_S(0)
{}
G4PomeronCrossSection::~G4PomeronCrossSection()
@@ -99,74 +104,71 @@ G4PomeronCrossSection::G4PomeronCrossSection(const G4Gamma * )
InitForGamma();
}
G4double G4PomeronCrossSection::GetTotalCrossSection(const G4double s)
G4double G4PomeronCrossSection::GetTotalCrossSection(const G4double S)
{
G4double FZ2= Expand(Z(s)/2);
return SigP(s) * FZ2;
G4double FZ2= Expand(Z(S)/2);
return SigP(S) * FZ2;
}
G4double G4PomeronCrossSection::GetElasticCrossSection(const G4double s)
G4double G4PomeronCrossSection::GetElasticCrossSection(const G4double S)
{
return SigP(s)/pomeron_C *(Expand(Z(s)/2) - Expand(Z(s)));
return SigP(S)/pomeron_C *(Expand(Z(S)/2) - Expand(Z(S)));
}
G4double G4PomeronCrossSection::GetDiffractiveCrossSection(const G4double s)
G4double G4PomeronCrossSection::GetDiffractiveCrossSection(const G4double S)
{
return ( pomeron_C -1) * GetElasticCrossSection(s);
return ( pomeron_C -1) * GetElasticCrossSection(S);
}
G4double G4PomeronCrossSection::GetInelasticCrossSection(const G4double s)
G4double G4PomeronCrossSection::GetInelasticCrossSection(const G4double S)
{
return GetTotalCrossSection(s) - GetElasticCrossSection(s);
return GetTotalCrossSection(S) - GetElasticCrossSection(S);
}
//-------------------------Probabilities ----------------------------
G4double G4PomeronCrossSection::GetTotalProbability(const G4double s,
G4double G4PomeronCrossSection::GetTotalProbability(const G4double S,
const G4double impactsquare)
{
return 2/pomeron_C*(1-std::exp(-1*Eikonal(s,impactsquare)));
return 2/pomeron_C*(1-std::exp(-1*Eikonal(S,impactsquare)));
}
G4double G4PomeronCrossSection::GetDiffractiveProbability(const G4double s,
G4double G4PomeronCrossSection::GetDiffractiveProbability(const G4double S,
const G4double impactsquare)
{
return (pomeron_C-1)/pomeron_C *
(GetTotalProbability(s,impactsquare) -
GetNondiffractiveProbability(s,impactsquare));
(GetTotalProbability(S,impactsquare) -
GetNondiffractiveProbability(S,impactsquare));
}
G4double G4PomeronCrossSection::GetNondiffractiveProbability(const G4double s,
G4double G4PomeronCrossSection::GetNondiffractiveProbability(const G4double S,
const G4double impactsquare)
{
return (1-std::exp(-2*Eikonal(s,impactsquare)))/pomeron_C;
return (1-std::exp(-2*Eikonal(S,impactsquare)))/pomeron_C;
}
G4double G4PomeronCrossSection::GetElasticProbability(const G4double s,
G4double G4PomeronCrossSection::GetElasticProbability(const G4double S,
const G4double impactsquare)
{
return (GetTotalProbability(s,impactsquare) -
GetInelasticProbability(s,impactsquare));
return (GetTotalProbability(S,impactsquare) -
GetInelasticProbability(S,impactsquare));
}
G4double G4PomeronCrossSection::GetInelasticProbability(const G4double s,
G4double G4PomeronCrossSection::GetInelasticProbability(const G4double S,
const G4double impactsquare)
{
return GetNondiffractiveProbability(s,impactsquare) +
GetDiffractiveProbability(s,impactsquare);
return GetNondiffractiveProbability(S,impactsquare) +
GetDiffractiveProbability(S,impactsquare);
}
G4double G4PomeronCrossSection::GetCutPomeronProbability(const G4double s,
G4double G4PomeronCrossSection::GetCutPomeronProbability(const G4double S,
const G4double impactsquare, const G4int nPomerons)
{
G4double factorial=1;
for (G4int i=2; i<= nPomerons ; i++)
{ factorial *= i;
}
G4double factorial=G4Pow::GetInstance()->factorial(nPomerons);
return std::exp(-2*Eikonal(s,impactsquare))/pomeron_C*
std::pow(2*Eikonal(s,impactsquare),nPomerons)/factorial;
return std::exp(-2*Eikonal(S,impactsquare))/pomeron_C*
std::pow(2*Eikonal(S,impactsquare),nPomerons)/factorial;
}
// ---------------Temporary --- GF
@@ -247,70 +249,70 @@ G4double G4PomeronCrossSection::Expand(G4double z)
return sum;
}
inline G4double G4PomeronCrossSection::Power(const G4double s)
inline G4double G4PomeronCrossSection::Power(const G4double S)
{
return pomeron_Gamma *std::pow(s/pomeron_S, pomeron_Alpha -1);
return pomeron_Gamma *std::pow(S/pomeron_S, pomeron_Alpha -1);
}
inline G4double G4PomeronCrossSection::Z(const G4double s)
inline G4double G4PomeronCrossSection::Z(const G4double S)
{
return 2*pomeron_C * Power(s) / Lambda(s);
return 2*pomeron_C * Power(S) / Lambda(S);
}
inline G4double G4PomeronCrossSection::Lambda(const G4double s)
inline G4double G4PomeronCrossSection::Lambda(const G4double S)
{
return pomeron_Rsquare+pomeron_Alphaprime*std::log(s/pomeron_S);
return pomeron_Rsquare+pomeron_Alphaprime*std::log(S/pomeron_S);
}
inline G4double G4PomeronCrossSection::SigP(const G4double s)
inline G4double G4PomeronCrossSection::SigP(const G4double S)
{
return 8 * pi * hbarc_squared * Power(s);
return 8 * pi * hbarc_squared * Power(S);
}
inline G4double G4PomeronCrossSection::Eikonal(const G4double s,
inline G4double G4PomeronCrossSection::Eikonal(const G4double S,
const G4double impactsquare)
{
return Z(s)/2 * std::exp(-impactsquare/(4*Lambda(s)*hbarc_squared));
return Z(S)/2 * std::exp(-impactsquare/(4*Lambda(S)*hbarc_squared));
}
//*************************************************************************************************
inline G4double G4PomeronCrossSection::PowerSoft(const G4double s)
inline G4double G4PomeronCrossSection::PowerSoft(const G4double S)
{
return pomeron_Gamma *std::pow(s/pomeron_S, pomeron_Alpha -1);
return pomeron_Gamma *std::pow(S/pomeron_S, pomeron_Alpha -1);
}
inline G4double G4PomeronCrossSection::PowerHard(const G4double s)
inline G4double G4PomeronCrossSection::PowerHard(const G4double S)
{
return pomeron_Gamma_Hard*std::pow(s/pomeron_S, pomeron_Alpha_Hard -1);
return pomeron_Gamma_Hard*std::pow(S/pomeron_S, pomeron_Alpha_Hard -1);
}
inline G4double G4PomeronCrossSection::LambdaSoft(const G4double s)
inline G4double G4PomeronCrossSection::LambdaSoft(const G4double S)
{
return pomeron_Rsquare+pomeron_Alphaprime*std::log(s/pomeron_S);
return pomeron_Rsquare+pomeron_Alphaprime*std::log(S/pomeron_S);
}
inline G4double G4PomeronCrossSection::LambdaHard(const G4double /*s*/)
inline G4double G4PomeronCrossSection::LambdaHard(const G4double /*S*/)
{
return pomeron_Rsquare; //+pomeron_Alphaprime*std::log(s/pomeron_S);
}
inline G4double G4PomeronCrossSection::Zsoft(const G4double s)
inline G4double G4PomeronCrossSection::Zsoft(const G4double S)
{
return 2*pomeron_C*PowerHard(s) / LambdaSoft(s);
return 2*pomeron_C*PowerHard(S) / LambdaSoft(S);
}
inline G4double G4PomeronCrossSection::Zhard(const G4double s)
inline G4double G4PomeronCrossSection::Zhard(const G4double S)
{
return 2*pomeron_C*PowerHard(s)/LambdaHard(s);
return 2*pomeron_C*PowerHard(S)/LambdaHard(S);
}
G4double G4PomeronCrossSection::SoftEikonal(G4double s, G4double impactsquare)
G4double G4PomeronCrossSection::SoftEikonal(G4double S, G4double impactsquare)
{
return Zsoft(s)/2*std::exp(-impactsquare/LambdaSoft(s)/hbarc_squared/4);
return Zsoft(S)/2*std::exp(-impactsquare/LambdaSoft(S)/hbarc_squared/4);
}
G4double G4PomeronCrossSection::HardEikonal(G4double s, G4double impactsquare)
G4double G4PomeronCrossSection::HardEikonal(G4double S, G4double impactsquare)
{
return Zhard(s)/2*std::exp(-impactsquare/LambdaHard(s)/hbarc_squared/4);
return Zhard(S)/2*std::exp(-impactsquare/LambdaHard(S)/hbarc_squared/4);
}
//*************************************************************************************************
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4StringModel.cc,v 1.4 2006-06-29 20:55:45 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// G4StringModel
#include "G4StringModel.hh"
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VParticipants.cc,v 1.3 2006-06-29 20:55:47 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VPartonStringModel.cc,v 1.8 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -42,44 +41,24 @@
#include "G4ios.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4ParticleTable.hh"
#include "G4IonTable.hh"
G4VPartonStringModel::G4VPartonStringModel() : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
G4VPartonStringModel::G4VPartonStringModel(const G4String& modelName)
: G4VHighEnergyGenerator(modelName),
stringFragmentationModel(0),
theThis(0)
{
// Make shure Shotrylived partyicles are constructed.
G4ShortLivedConstructor ShortLived;
ShortLived.ConstructParticle();
}
G4VPartonStringModel::G4VPartonStringModel(const G4VPartonStringModel &) : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::copy ctor not accessible");
}
G4VPartonStringModel::~G4VPartonStringModel()
{
}
const G4VPartonStringModel & G4VPartonStringModel::operator=(const G4VPartonStringModel &)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::operator= meant to not be accessable");
return *this;
}
int G4VPartonStringModel::operator==(const G4VPartonStringModel &) const
{
return 0;
}
int G4VPartonStringModel::operator!=(const G4VPartonStringModel &) const
{
return 1;
}
G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus,
const G4DynamicParticle &aPrimary)
{
@@ -122,28 +101,34 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
G4double InvMass=SumStringMom.mag();
//#define debug_PartonStringModel
#ifdef debug_PartonStringModel
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
#ifdef debug_PartonStringModel
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
// loop over wounded nucleus
G4int hits(0);
G4int hits(0), charged_hits(0);
G4ThreeVector hitNucleonMomentum(0.,0.,0.);
G4Nucleon * theCurrentNucleon = fancynucleus->StartLoop() ? fancynucleus->GetNextNucleon() : NULL;
while(theCurrentNucleon != NULL)
while( theCurrentNucleon )
{
if(theCurrentNucleon->AreYouHit())
{
hits++;
hitNucleonMomentum += theCurrentNucleon->Get4Momentum().vect();
if ( theCurrentNucleon->GetDefinition() == G4Proton::Proton() ) ++charged_hits;
}
theCurrentNucleon = fancynucleus->GetNextNucleon();
}
G4cout << "G4VPSM: strE, nucleons,SumStringE, inE "
<< stringEnergy << " "
<< hits << " "
<< Ptmp.e() << " "
<< SumStringMom.e() << " "
<< Ptmp.e() + 939.*hits - stringEnergy << G4endl;
#endif
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-charged_hits, initialA-hits);
G4cout << "G4VPSM: strE, hit nucleons, Primary, SumStringE, nucleus intial, nucleus final, excitation estimate "
<< stringEnergy << " " << hits << ", " << Ptmp.e() << ", "<< SumStringMom.e() << ", "
<< initial_mass<< ", " << final_mass<< ", " << Ptmp.e() + initial_mass - final_mass - stringEnergy << G4endl;
G4cout << "momentum balance " << thePrimary.GetMomentum() + hitNucleonMomentum - SumStringMom.vect()<< G4endl;
#endif
// Fragment strings
@@ -183,3 +168,7 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
return theResult;
}
void G4VPartonStringModel::ModelDescription(std::ostream& outFile) const
{
outFile << GetModelName() << " has no description yet.\n";
}
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VSplitableHadron.cc,v 1.9 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// ------------------------------------------------------------
@@ -24,8 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VStringFragmentation.cc,v 1.4 2006-06-29 20:55:53 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
// G4VStringFragmentation
#include "G4VStringFragmentation.hh"