Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4EventGenerator.cc,v 1.4 2006/06/29 20:55:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4EventGenerator.cc,v 1.4 2006-06-29 20:55:37 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// G4EventGenerator
#include "G4EventGenerator.hh"
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4InteractionContent.cc,v 1.4 2006/06/29 20:55:39 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4InteractionContent.cc,v 1.4 2006-06-29 20:55:39 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -38,14 +38,18 @@
#include "G4InteractionContent.hh"
G4InteractionContent::G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant)
: theNumberOfHard(0), theNumberOfSoft(0)
: theNumberOfHard(0), theNumberOfSoft(0), theNumberOfDiffractive(0),
theInteractionTime(0.), curStatus(0)
{
theProjectile=aPrimaryParticipant;
}
G4InteractionContent::G4InteractionContent(const G4InteractionContent &)
: theNumberOfHard(0), theNumberOfSoft(0)
{}
: theNumberOfHard(0), theNumberOfSoft(0), theNumberOfDiffractive(0),
theInteractionTime(0.), curStatus(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4InteractionContent(): copy ctor not meant to be accessable");
}
G4InteractionContent::~G4InteractionContent()
@@ -61,11 +65,23 @@ 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;}
G4double G4InteractionContent::GetInteractionTime() const
{return theInteractionTime;}
void G4InteractionContent::SetStatus(G4int aValue)
{curStatus = aValue;}
G4int G4InteractionContent::GetStatus() const
{return curStatus;}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PomeronCrossSection.cc,v 1.6 2006/11/07 12:51:39 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4PomeronCrossSection.cc,v 1.6 2006-11-07 12:51:39 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#include "G4PomeronCrossSection.hh"
@@ -24,20 +24,14 @@
// ********************************************************************
//
//
// $Id: G4StringModel.cc,v 1.4 2006/06/29 20:55:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4StringModel.cc,v 1.4 2006-06-29 20:55:45 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// G4StringModel
#include "G4StringModel.hh"
G4StringModel::G4StringModel()
{
the3DNucleus=NULL;
theStringFragmentationModel=NULL;
theGenerator=NULL;
}
G4StringModel::G4StringModel(const G4StringModel &) : G4VHighEnergyGenerator()
G4StringModel::G4StringModel() : G4VHighEnergyGenerator(),
the3DNucleus(0), theStringFragmentationModel(0),theGenerator(0)
{
}
@@ -46,6 +40,11 @@ G4StringModel::~G4StringModel()
{
}
// private:
G4StringModel::G4StringModel(const G4StringModel &) : G4VHighEnergyGenerator(),
the3DNucleus(0), theStringFragmentationModel(0),theGenerator(0)
{
}
const G4StringModel & G4StringModel::operator=(const G4StringModel &)
{
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VParticipants.cc,v 1.3 2006/06/29 20:55:47 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VParticipants.cc,v 1.3 2006-06-29 20:55:47 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -35,24 +35,34 @@
// abstract class finding participants in a hadron Nucleus collision
// in Parton String Models.
// ------------------------------------------------------------
// 20110805 M. Kelsey -- Reduce external rebuilds: move #include, Init()
// and SetNucleus() here.
#include "G4VParticipants.hh"
#include "Randomize.hh"
#include "G4Fancy3DNucleus.hh"
G4VParticipants::G4VParticipants() : theNucleus(NULL)
{}
G4VParticipants::~G4VParticipants()
{
// G4cout << "G4VParticipants::~G4VParticipants()" << G4endl;
if ( theNucleus != NULL ) delete theNucleus;
if ( theNucleus != NULL ) delete theNucleus;
}
inline void G4VParticipants::Init(G4int theA, G4int theZ)
{
if ( theNucleus == NULL ) theNucleus = new G4Fancy3DNucleus();
theNucleus->Init(theA, theZ);
theNucleus->SortNucleonsIncZ();
}
inline void G4VParticipants::SetNucleus(G4V3DNucleus * aNucleus)
{
if (theNucleus != NULL) delete theNucleus;
theNucleus = aNucleus;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VPartonStringModel.cc,v 1.7 2009/12/06 11:29:33 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4VPartonStringModel.cc,v 1.8 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -43,15 +43,18 @@
#include "G4ShortLivedConstructor.hh"
G4VPartonStringModel::G4VPartonStringModel()
G4VPartonStringModel::G4VPartonStringModel() : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
{
// Make shure Shotrylived partyicles are constructed.
G4ShortLivedConstructor ShortLived;
ShortLived.ConstructParticle();
}
G4VPartonStringModel::G4VPartonStringModel(const G4VPartonStringModel &) : G4VHighEnergyGenerator()
G4VPartonStringModel::G4VPartonStringModel(const G4VPartonStringModel &) : G4VHighEnergyGenerator(),
stringFragmentationModel(0), theThis(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::copy ctor not accessible");
}
@@ -98,11 +101,12 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
{
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::Scatter(): fails to generate strings");
}
theThis->Init(theNucleus,thePrimary);
strings = GetStrings();
}
G4KineticTrackVector * theResult = 0;
G4double stringEnergy(0);
G4LorentzVector SumStringMom(0.,0.,0.,0.);
@@ -117,7 +121,8 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
G4double InvMass=SumStringMom.mag();
#ifdef debug_PartonStringModel
//#define debug_PartonStringModel
#ifdef debug_PartonStringModel
G4V3DNucleus * fancynucleus=theThis->GetWoundedNucleus();
// loop over wounded nucleus
@@ -132,12 +137,17 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
theCurrentNucleon = fancynucleus->GetNextNucleon();
}
G4cout << " strE, nucleons, inE "
G4cout << "G4VPSM: strE, nucleons,SumStringE, inE "
<< stringEnergy << " "
<< hits << " "
<< Ptmp.e() << " "
<< stringEnergy - 939.*hits - Ptmp.e()<< G4endl;
#endif
<< SumStringMom.e() << " "
<< Ptmp.e() + 939.*hits - stringEnergy << G4endl;
#endif
// Fragment strings
G4KineticTrackVector * theResult = 0;
G4double SumMass(0.);
attempts = 0;
maxAttempts=100;
@@ -147,18 +157,24 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
if(theResult != 0)
{
std::for_each(theResult->begin(), theResult->end(), DeleteKineticTrack());
theResult->clear();
delete theResult;
}
theResult = stringFragmentationModel->FragmentStrings(strings);
if(attempts > maxAttempts ) break;
//G4cout<<"G4endl<<"G4VPartonStringModel:: Final Result, Size "<<theResult->size()<<G4endl;
SumMass=0.;
//G4LorentzVector SumP(0.,0.,0.,0.);
for ( unsigned int i=0; i < theResult->size(); i++)
{
SumMass+=(*theResult)[i]->GetDefinition()->GetPDGMass();
//SumP+=(*theResult)[i]->Get4Momentum();
//G4cout<<i<<" : "<<(*theResult)[i]->GetDefinition()->GetParticleName();
//G4cout<<"p= " << (*theResult)[i]->Get4Momentum()<<" m= "<<(*theResult)[i]->Get4Momentum().mag()<<G4endl;
}
//G4cout<<"SumP "<<SumP<<G4endl;
} while(SumMass > InvMass);
std::for_each(strings->begin(), strings->end(), DeleteString() );
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSplitableHadron.cc,v 1.8 2010/11/30 16:07:35 vuzhinsk Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4VSplitableHadron.cc,v 1.9 2010-12-07 10:42:40 vuzhinsk Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// ------------------------------------------------------------
@@ -115,3 +115,4 @@ int G4VSplitableHadron::operator!=(const G4VSplitableHadron &right) const
void G4VSplitableHadron::SplitUp()
{
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VStringFragmentation.cc,v 1.4 2006/06/29 20:55:53 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VStringFragmentation.cc,v 1.4 2006-06-29 20:55:53 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// G4VStringFragmentation
#include "G4VStringFragmentation.hh"