Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ExcitedString.hh,v 1.5.8.2 2001/06/28 20:20:01 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ExcitedString.hh,v 1.9 2001/10/06 08:17:01 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4ExcitedString_h
@@ -44,6 +44,7 @@
#include "G4Parton.hh"
#include "G4PartonVector.hh"
#include "G4KineticTrack.hh"
#include "g4std/algorithm"
class G4ExcitedString
{
@@ -137,7 +138,7 @@ inline
G4LorentzVector G4ExcitedString::Get4Momentum() const
{
G4LorentzVector momentum;
for ( G4int index=0; index < thePartons.entries() ; index++ )
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
momentum += thePartons[index]->Get4Momentum();
}
@@ -147,7 +148,7 @@ G4LorentzVector G4ExcitedString::Get4Momentum() const
inline
void G4ExcitedString::LorentzRotate(const G4LorentzRotation & rotation)
{
for ( G4int index=0; index < thePartons.entries() ; index++ )
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
thePartons[index]->Set4Momentum(rotation*thePartons[index]->Get4Momentum());
}
@@ -157,18 +158,18 @@ inline
void G4ExcitedString::InsertParton(G4Parton *aParton, const G4Parton * addafter)
{
G4int insert_index=1;
G4PartonVector::iterator insert_index;
if ( addafter != NULL )
{
insert_index=thePartons.index(addafter);
if (insert_index == G4std::string::npos) // No object addafter in thePartons
insert_index=G4std::find(thePartons.begin(), thePartons.end(), addafter);
if (insert_index == thePartons.end()) // No object addafter in thePartons
{
G4Exception("G4ExcitedString::InsertParton called with invalid second argument");
}
}
thePartons.insertAt(insert_index+1, aParton);
thePartons.insert(insert_index+1, aParton);
}
inline
@@ -177,7 +178,7 @@ G4LorentzRotation G4ExcitedString::TransformToCenterOfMass()
G4LorentzVector momentum=Get4Momentum();
G4LorentzRotation toCms(-1*momentum.boostVector());
for ( G4int index=0; index < thePartons.entries() ; index++ )
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
momentum=toCms * thePartons[index]->Get4Momentum();
thePartons[index]->Set4Momentum(momentum);
@@ -195,7 +196,7 @@ G4LorentzRotation G4ExcitedString::TransformToAlignedCms()
toAlignedCms.rotateZ(-1*momentum.phi());
toAlignedCms.rotateY(-1*momentum.theta());
for ( G4int index=0; index < thePartons.entries() ; index++ )
for ( unsigned int index=0; index < thePartons.size() ; index++ )
{
momentum=toAlignedCms * thePartons[index]->Get4Momentum();
thePartons[index]->Set4Momentum(momentum);
@@ -14,18 +14,18 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4ExcitedStringVector.hh,v 1.3.8.2 2001/06/28 20:20:01 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ExcitedStringVector.hh,v 1.6 2001/10/04 20:00:32 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4ExcitedStringVector_h
#define G4ExcitedStringPartonVector_h 1
#define G4ExcitedStringVector_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -35,8 +35,9 @@
// ------------------------------------------------------------
#include "G4ExcitedString.hh"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
typedef G4RWTPtrOrderedVector<G4ExcitedString> G4ExcitedStringVector;
typedef G4std::vector<G4ExcitedString *> G4ExcitedStringVector;
struct DeleteString { void operator()(G4ExcitedString* aS){delete aS;} };
#endif
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Fancy3DNucleus.hh,v 1.6.8.2 2001/06/28 20:20:01 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Fancy3DNucleus.hh,v 1.9 2001/10/04 20:00:32 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4Fancy3DNucleus_h
#define G4Fancy3DNucleus_h 1
@@ -41,7 +41,7 @@
#include "G4Nucleon.hh"
#include "G4VNuclearDensity.hh"
#include "G4FermiMomentum.hh"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
class G4Fancy3DNucleus : public G4V3DNucleus
{
@@ -68,7 +68,7 @@ class G4Fancy3DNucleus : public G4V3DNucleus
void Init(G4double theA, G4double theZ);
G4bool StartLoop();
G4Nucleon * GetNextNucleon();
const G4RWTPtrOrderedVector<G4Nucleon> & GetNucleons();
const G4std::vector<G4Nucleon *> & GetNucleons();
G4int GetMassNumber();
G4double GetMass();
G4int GetCharge();
@@ -87,7 +87,8 @@ class G4Fancy3DNucleus : public G4V3DNucleus
G4int myA;
G4int myZ;
G4Nucleon * theNucleons;
G4RWTPtrOrderedVector<G4Nucleon> theRWNucleons; // should not have two...
G4std::vector<G4Nucleon *> theRWNucleons; // should not have two...
struct DeleteNucleon{ void operator()(G4Nucleon *aN){delete aN;} };
G4int currentNucleon;
G4VNuclearDensity * theDensity;
G4FermiMomentum theFermi;
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4FermiMomentum.hh,v 1.3.2.1 2001/06/28 19:13:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4FermiMomentum.hh,v 1.5 2001/08/01 17:09:17 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4FermiMomentum_h
#define G4FermiMomentum_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Fragment.hh,v 1.8.2.1 2001/06/28 19:13:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Fragment.hh,v 1.11 2001/10/04 20:00:32 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -32,7 +32,7 @@
#include "G4ios.hh"
#include "g4std/iomanip"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
#include "globals.hh"
#include "G4LorentzVector.hh"
@@ -49,7 +49,6 @@
class G4ParticleDefinition;
class G4Fragment; // Forward deckaration
//typedef G4RWTPtrOrderedVector<G4Fragment> G4FragmentVector;
typedef G4std::vector<G4Fragment*> G4FragmentVector;
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4FragmentVector.hh,v 1.2.8.1 2001/06/28 19:13:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4FragmentVector.hh,v 1.4 2001/08/01 17:09:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// Hadronic Process: Nuclear De-excitations
// by V. Lara (May 1998)
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.3.8.2 2001/06/28 20:20:01 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GeneralPhaseSpaceDecay.hh,v 1.5 2001/08/01 17:09:18 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//$Id: G4GeneralPhaseSpaceDecay.hh,v 1.1 1997/05/21
// ----------------------------------------------------------------
@@ -14,15 +14,13 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4KineticTrack.hh,v 1.3.8.2 2001/06/28 20:20:01 gunter Exp $
// GEANT4 tag $Name: $
//
// $Id: G4KineticTrack.hh,v 1.0 1998/05/20
// -----------------------------------------------------------------------------
@@ -93,14 +91,14 @@ class G4KineticTrack : public G4VKineticNucleon
// LB move to public (before was private) LB
G4double* GetActualWidth() const;
G4double GetActualMass() const;
private:
G4int GetnChannels() const;
void SetnChannels(const G4int aChannel);
G4double GetActualMass() const;
void SetActualWidth(G4double* anActualWidth);
G4double EvaluateTotalActualWidth();
@@ -108,9 +106,9 @@ class G4KineticTrack : public G4VKineticNucleon
G4double EvaluateCMMomentum (const G4double mass,
const G4double* m_ij) const;
G4double IntegrateCMMomentum() const;
G4double IntegrateCMMomentum(const G4double lowerLimit) const;
G4double IntegrateCMMomentum(const G4double polemass) const;
G4double IntegrateCMMomentum(const G4double lowerLimit ,const G4double polemass) const;
G4double IntegrateCMMomentum2() const;
@@ -121,13 +119,15 @@ class G4KineticTrack : public G4VKineticNucleon
const G4double rmass,
const G4double mass) const;
friend G4double IntegrandFunction1 (G4double xmass);
private:
G4double IntegrandFunction1 (G4double xmass) const;
G4double IntegrandFunction2 (G4double xmass) const;
G4double IntegrandFunction3 (G4double xmass) const;
G4double IntegrandFunction4 (G4double xmass) const;
public:
// friend G4double IntegrandFunction3 (G4double xmass);
friend G4double IntegrandFunction2 (G4double xmass);
friend G4double IntegrandFunction3 (G4double xmass);
friend G4double IntegrandFunction4 (G4double xmass);
// friend G4double IntegrandFunction4 (G4double xmass);
// LB new variable created LB
G4int chosench;
@@ -227,7 +227,7 @@ inline G4double G4KineticTrack::GetActualMass() const
G4ThreeVector theMomentum = the4Momentum.vect();
G4double theMomentum2 = theMomentum.mag2();
G4double theTotalEnergy = the4Momentum.e();
G4double theMass = sqrt(theTotalEnergy * theTotalEnergy - theMomentum2);
G4double theMass = sqrt(abs(theTotalEnergy * theTotalEnergy - theMomentum2));
return theMass;
}
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4KineticTrackVector.hh,v 1.3.8.1 2001/06/28 19:13:47 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4KineticTrackVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
// Modified at 8-Oct-1998 by Maxim Komogorov. Methods BoostBeam,Boost,Shift
// were added.
@@ -32,9 +32,9 @@
#include "globals.hh"
#include "G4KineticTrack.hh"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
class G4KineticTrackVector : public G4RWTPtrOrderedVector<G4KineticTrack>
class G4KineticTrackVector : public G4std::vector<G4KineticTrack *>
{
public:
G4KineticTrackVector();
@@ -45,5 +45,7 @@ public:
void Shift(G4ThreeVector& Pos);
};
struct DeleteKineticTrack{void operator()(G4KineticTrack * aT){delete aT;}};
#endif
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4NuclearFermiDensity.hh,v 1.3.8.1 2001/06/28 19:13:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NuclearFermiDensity.hh,v 1.5 2001/08/01 17:09:19 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4NuclearFermiDensity_h
#define G4NuclearFermiDensity_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4NuclearShellModelDensity.hh,v 1.3.8.1 2001/06/28 19:13:48 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4NuclearShellModelDensity.hh,v 1.5 2001/08/01 17:09:19 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4NuclearShellModelDensity_h
#define G4NuclearShellModelDensity_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Nucleon.hh,v 1.3.8.2 2001/06/28 20:20:02 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Nucleon.hh,v 1.5 2001/08/01 17:09:20 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4Nucleon_h
#define G4Nucleon_h 1
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4Parton.hh,v 1.9.8.2 2001/06/28 20:20:02 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Parton.hh,v 1.13 2001/08/01 17:09:21 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4Parton_h
@@ -41,16 +41,20 @@
#include "G4LorentzVector.hh"
#include "g4std/iostream"
#include "G4ParticleTable.hh"
#include "Randomize.hh"
class G4Parton
{
public:
G4Parton()
{
PDGencoding=0;
theColour = 1;
theIsoSpinZ = 0.5;
theSpinZ = 0.5;
// CAUTION:
// this is a preliminary definition yielding u and d quarks only!
//
PDGencoding=(G4int)(2.*G4UniformRand());
theColour = (G4int)(3.*G4UniformRand())+1;
theIsoSpinZ = ((G4int)(G4UniformRand()))-0.5;
theSpinZ = ((G4int)(G4UniformRand()))-0.5;
}
G4Parton(G4int PDGencoding);
@@ -81,10 +85,10 @@ class G4Parton
void SetColour(G4int aColour) {theColour = aColour;}
G4int GetColour() {return theColour;}
void SetIsoSpinZ(G4int anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;}
void SetIsoSpinZ(G4double anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;}
G4double GetIsoSpinZ() {return theIsoSpinZ;}
void SetSpinZ(G4int anIsoSpinZ) {theIsoSpinZ = anIsoSpinZ;}
void SetSpinZ(G4double aSpinZ) {theSpinZ = aSpinZ;}
G4double GetSpinZ() {return theSpinZ;}
private:
@@ -14,15 +14,15 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4PartonVector.hh,v 1.3.8.2 2001/06/28 20:20:02 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4PartonVector.hh,v 1.6 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4PartonVector_h
#define G4PartonVector_h 1
@@ -35,8 +35,9 @@
// ------------------------------------------------------------
#include "G4Parton.hh"
#include "g4rw/tpordvec.h"
#include "g4std/vector"
typedef G4RWTPtrOrderedVector<G4Parton> G4PartonVector;
typedef G4std::vector<G4Parton *> G4PartonVector;
struct DeleteParton{ void operator()(G4Parton*aP){delete aP;} };
#endif
@@ -0,0 +1,84 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4SampleResonance.hh,v 1.4 2001/10/04 20:00:33 hpw Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4SampleResonance_h
#define G4SampleResonance_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4SampleResonance ----------------
// by Henning Weber, March 2001.
// helper class for sampling resonance masses
// ------------------------------------------------------------
#include "globals.hh"
#include "g4std/map"
#include "G4ParticleDefinition.hh"
class G4SampleResonance
{
public:
G4double GetMinimumMass(const G4ParticleDefinition* p) const;
G4double SampleMass(const G4double poleMass,
const G4double gamma,
const G4double minMass,
const G4double maxMass) const;
G4double SampleMass(const G4ParticleDefinition* p, const G4double maxMass) const;
private:
G4double BrWigInt0(const G4double x, const G4double gamma, const G4double m0) const
{ return 2.0*gamma*atan( 2.0 * (x-m0)/ gamma ); }
G4double BrWigInt1(const G4double x, const G4double gamma, const G4double m0) const
{ return 0.5*gamma*gamma*log( (x-m0)*(x-m0)+gamma*gamma/4.0 ) + m0*BrWigInt0(x,gamma,m0); }
G4double BrWigInv(const G4double x, const G4double gamma, const G4double m0) const
{ return 0.5*gamma*tan( 0.5*x/gamma )+m0; }
public:
typedef G4std::map<const G4ParticleDefinition*, G4double, G4std::less<const G4ParticleDefinition*> >::const_iterator minMassMapIterator;
typedef G4std::map<const G4ParticleDefinition*, G4double, G4std::less<const G4ParticleDefinition*> > minMassMapType;
private:
static minMassMapType minMassCache;
};
#endif