Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * 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 *
// * 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: G4ExcitedStringDecay.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef G4ExcitedStringDecay_h
#define G4ExcitedStringDecay_h 1
#include "globals.hh"
#include "G4VStringFragmentation.hh"
#include "G4ExcitedStringVector.hh"
#include "G4KineticTrackVector.hh"
#include "G4LundStringFragmentation.hh"
class G4ExcitedStringDecay: public G4VStringFragmentation
{
public:
G4ExcitedStringDecay();
G4ExcitedStringDecay(G4VLongitudinalStringDecay * aStringDecay);
~G4ExcitedStringDecay();
private:
G4ExcitedStringDecay(const G4ExcitedStringDecay &right);
const G4ExcitedStringDecay & operator=(const G4ExcitedStringDecay &right);
int operator==(const G4ExcitedStringDecay &right) const;
int operator!=(const G4ExcitedStringDecay &right) const;
public:
virtual G4KineticTrackVector * FragmentStrings(const G4ExcitedStringVector * theStrings);
private:
G4KineticTrackVector * FragmentString(const G4ExcitedString &theString);
G4bool EnergyAndMomentumCorrector(G4KineticTrackVector* Output, G4LorentzVector& TotalCollisionMom);
G4VLongitudinalStringDecay * theStringDecay;
};
inline
G4KineticTrackVector *G4ExcitedStringDecay::
FragmentString(const G4ExcitedString &theString)
{
if ( theStringDecay == NULL )
theStringDecay=new G4LundStringFragmentation();
return theStringDecay->FragmentString(theString);
}
inline
G4KineticTrackVector *G4ExcitedStringDecay::
FragmentStrings(const G4ExcitedStringVector * theStrings)
{
G4KineticTrackVector * theResult = new G4KineticTrackVector;
G4LorentzVector KTsum;
G4bool NeedEnergyCorrector=false;
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
{
KTsum+= theStrings->operator[](astring)->Get4Momentum();
G4KineticTrackVector * generatedKineticTracks = NULL;
if ( theStrings->operator[](astring)->IsExcited() )
{
generatedKineticTracks=FragmentString(*theStrings->operator[](astring));
} else {
generatedKineticTracks = new G4KineticTrackVector;
generatedKineticTracks->push_back(theStrings->operator[](astring)->GetKineticTrack());
}
if (generatedKineticTracks == NULL)
{
G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl;
continue;
}
G4LorentzVector KTsum1;
for ( unsigned int aTrack=0; aTrack<generatedKineticTracks->size();aTrack++)
{
theResult->push_back(generatedKineticTracks->operator[](aTrack));
KTsum1+= (*generatedKineticTracks)[aTrack]->Get4Momentum();
}
if ( abs((KTsum1.e()-theStrings->operator[](astring)->Get4Momentum().e()) / KTsum1.e()) > perMillion )
{
NeedEnergyCorrector=true;
}
// clean up
delete generatedKineticTracks;
}
// G4cout << "String total energy and 4 momentum" <<KTsum.t()<<" "<< KTsum << endl;
if ( NeedEnergyCorrector ) EnergyAndMomentumCorrector(theResult, KTsum);
return theResult;
}
#endif
@@ -0,0 +1,147 @@
//
// ********************************************************************
// * 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 *
// * 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: G4FragmentingString.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
#ifndef G4FragmentingString_h
#define G4FragmentingString_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// ---------------- G4FragmentingString ----------------
// by Gunter Folger, September 2001.
// class for an excited string used in Fragmention
// ------------------------------------------------------------
#include "G4ios.hh"
#include "globals.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4ParticleDefinition.hh"
class G4ExcitedString;
class G4FragmentingString
{
public:
G4FragmentingString(const G4FragmentingString &right);
G4FragmentingString(const G4ExcitedString &excited);
G4FragmentingString(const G4FragmentingString &old,
G4ParticleDefinition * newdecay,
const G4LorentzVector *momentum);
~G4FragmentingString();
int operator==(const G4FragmentingString &right) const;
int operator!=(const G4FragmentingString &right) const;
G4LorentzVector Get4Momentum() const;
G4ThreeVector StablePt();
G4ThreeVector DecayPt();
G4double LightConePlus();
G4double LightConeMinus();
G4double LightConeDecay();
G4double Mass() const;
G4double Mass2() const;
G4ParticleDefinition* GetLeftParton(void) const;
G4ParticleDefinition* GetRightParton(void) const;
G4ParticleDefinition* GetStableParton() const; // stable at the moment
G4ParticleDefinition* GetDecayParton() const; // currently involved in fragmentation
void SetLeftPartonStable();
void SetRightPartonStable();
G4int GetDecayDirection() const;
G4bool DecayIsQuark();
G4bool StableIsQuark();
G4bool FourQuarkString(void) const;
private:
G4ParticleDefinition *LeftParton, *RightParton;
G4ThreeVector Ptleft,Ptright; // Pt (px,py) for partons (pz ignored!)
G4double Pplus, Pminus; // p-, p+ of string, Plus ass. to Left!
G4ParticleDefinition * theStableParton, * theDecayParton;
enum DecaySide { None, Left, Right };
DecaySide decaying;
};
inline
int G4FragmentingString::operator==(const G4FragmentingString &right) const
{
return this == &right;
}
inline
int G4FragmentingString::operator!=(const G4FragmentingString &right) const
{
return this != &right;
}
inline
G4ParticleDefinition * G4FragmentingString::GetStableParton() const
{
return theStableParton;
}
inline
G4ParticleDefinition * G4FragmentingString::GetDecayParton() const
{
return theDecayParton;
}
inline
G4ParticleDefinition* G4FragmentingString::GetLeftParton(void) const
{
return LeftParton;
}
inline
G4ParticleDefinition* G4FragmentingString::GetRightParton(void) const
{
return RightParton;
}
#endif
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * 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 *
// * 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: G4HadronBuilder.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
//
// History:
// Gunter Folger, August/September 2001
// Create class;
// -----------------------------------------------------------------------------
//
#ifndef G4HadronBuilder_h
#define G4HadronBuilder_h 1
#include "globals.hh"
#include <vector>
#include "G4ParticleDefinition.hh"
#include "G4ParticleDefinition.hh"
class G4HadronBuilder
{
public:
G4ParticleDefinition * Build(G4ParticleDefinition * black, G4ParticleDefinition * white);
G4ParticleDefinition * BuildLowSpin(G4ParticleDefinition * black, G4ParticleDefinition * white);
G4ParticleDefinition * BuildHighSpin(G4ParticleDefinition * black, G4ParticleDefinition * white);
// ctor
G4HadronBuilder(G4double mesonMix, G4double barionMix,
std::vector<double> scalarMesonMix,
std::vector<double> vectorMesonMix);
private:
G4HadronBuilder(); // no default ctor
enum Spin { SpinZero=1, SpinHalf=2, SpinOne=3, SpinThreeHalf=4 };
G4ParticleDefinition * Meson(G4ParticleDefinition * black, G4ParticleDefinition * white, Spin spin);
G4ParticleDefinition * Barion(G4ParticleDefinition * black, G4ParticleDefinition * white, Spin spin);
G4double mesonSpinMix;
G4double barionSpinMix;
std::vector<double> scalarMesonMixings;
std::vector<double> vectorMesonMixings;
};
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * 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 *
// * 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: G4LundStringFragmentation.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $ Maxim Komogorov
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, Maxim Komogorov, 10-Jul-1998
// -----------------------------------------------------------------------------
#ifndef G4LundStringFragmentation_h
#define G4LundStringFragmentation_h 1
#include "G4VLongitudinalStringDecay.hh"
//**************************************************************************************************************
class G4LundStringFragmentation: public G4VLongitudinalStringDecay
{
public:
G4LundStringFragmentation();
// G4LundStringFragmentation(G4double sigmaPt);
G4LundStringFragmentation(const G4LundStringFragmentation &right);
virtual ~G4LundStringFragmentation();
public:
const G4LundStringFragmentation & operator=(const G4LundStringFragmentation &right);
int operator==(const G4LundStringFragmentation &right) const;
int operator!=(const G4LundStringFragmentation &right) const;
private:
virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py);
};
//**************************************************************************************************************
// Class G4LundStringFragmentation
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * 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 *
// * 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: G4QGSMFragmentation.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, Maxim Komogorov, 10-Jul-1998
// -----------------------------------------------------------------------------
#ifndef G4QGSMFragmentation_h
#define G4QGSMFragmentation_h 1
#include "G4VLongitudinalStringDecay.hh"
//******************************************************************************
class G4QGSMFragmentation:public G4VLongitudinalStringDecay
{
public:
G4QGSMFragmentation();
~G4QGSMFragmentation();
const G4QGSMFragmentation & operator=(const G4QGSMFragmentation &right);
int operator==(const G4QGSMFragmentation &right) const;
int operator!=(const G4QGSMFragmentation &right) const;
private:
virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py);
G4QGSMFragmentation(const G4QGSMFragmentation &right);
private:
// model parameters
const G4double arho;
const G4double aphi;
const G4double an;
const G4double ala;
const G4double aksi;
const G4double alft;
};
// Class G4QGSMFragmentation
#endif
@@ -0,0 +1,69 @@
//
// ********************************************************************
// * 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 *
// * 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: G4VKinkyStringDecay.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, Maxim Komogorov, 10-Oct-1998
// -----------------------------------------------------------------------------
#ifndef G4VKinkyStringDecay_h
#define G4VKinkyStringDecay_h 1
#include "G4VLongitudinalStringDecay.hh"
//***********************************************************************************************
class G4VKinkyStringDecay
{
// Constructors
public:
G4VKinkyStringDecay(G4VLongitudinalStringDecay* theModal);
virtual ~G4VKinkyStringDecay() {};
//
public:
G4KineticTrackVector* FragmentString(const G4ExcitedString& String);
virtual G4double GetLightConeGluonZ(G4double zmin, G4double zmax);
void SetLongitudinalStringDecay(G4VLongitudinalStringDecay*);
private:
G4VLongitudinalStringDecay* theLongitudinalStringDecay;
};
//*****************************************************************************************
inline void G4VKinkyStringDecay::SetLongitudinalStringDecay(G4VLongitudinalStringDecay* theModal)
{
theLongitudinalStringDecay = theModal;
}
//*****************************************************************************************************
#endif
@@ -0,0 +1,149 @@
//
// ********************************************************************
// * 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 *
// * 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: G4VLongitudinalStringDecay.hh,v 1.1 2003/10/07 11:25:40 hpw Exp $
// GEANT4 tag $Name: geant4-06-00 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
//
// History: first implementation, Maxim Komogorov, 1-Jul-1998
// -----------------------------------------------------------------------------
#ifndef G4VLongitudinalStringDecay_h
#define G4VLongitudinalStringDecay_h 1
#include "G4VStringFragmentation.hh"
#include "G4DynamicParticle.hh"
#include "G4KineticTrack.hh"
#include "G4KineticTrackVector.hh"
#include "G4HadronBuilder.hh"
class G4FragmentingString;
//**********************************************************************************************
class G4VLongitudinalStringDecay
{
public:
G4VLongitudinalStringDecay();
virtual ~G4VLongitudinalStringDecay();
private:
// G4VLongitudinalStringDecay(const G4VLongitudinalStringDecay &right);
// const G4VLongitudinalStringDecay & operator=(const G4VLongitudinalStringDecay &right);
int operator==(const G4VLongitudinalStringDecay &right) const;
int operator!=(const G4VLongitudinalStringDecay &right) const;
public:
G4KineticTrackVector* FragmentString(const G4ExcitedString& theString);
G4KineticTrackVector* DecayResonans (G4KineticTrackVector* aHadrons);
void SetSigmaTransverseMomentum(G4double aQT);
void SetStrangenessSuppression(G4double aValue);
void SetDiquarkSuppression(G4double aValue);
void SetDiquarkBreakProbability(G4double aValue);
void SetVectorMesonProbability(G4double aValue);
void SetSpinThreeHalfBarionProbability(G4double aValue);
void SetScalarMesonMixings( std::vector<G4double> aVector);
void SetVectorMesonMixings( std::vector<G4double> aVector);
// used by G4VKinkyStringDecy..
G4int SampleQuarkFlavor(void);
G4ThreeVector SampleQuarkPt();
private:
G4double GetDiquarkSuppress() {return DiquarkSuppress;};
G4double GetDiquarkBreakProb() {return DiquarkBreakProb;};
G4double GetStrangeSuppress() {return StrangeSuppress;};
G4double GetClusterMass() {return ClusterMass;};
G4int GetClusterLoopInterrupt() {return ClusterLoopInterrupt;};
G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, G4bool theGivenSpin, G4int theSpin);
void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass);
protected:
// Additional protected declarations
virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py) = 0;
private:
G4double MassCut;
G4double ClusterMass;
G4double SigmaQT; // sigma_q_t is quark transverse momentum distribution parameter
G4double DiquarkSuppress; // is Diquark suppression parameter
G4double DiquarkBreakProb; // is Diquark breaking probability
G4double SmoothParam; // model parameter
G4double StrangeSuppress ;
G4int StringLoopInterrupt;
G4int ClusterLoopInterrupt;
G4int SideOfDecay;
G4HadronBuilder *hadronizer;
void ConstructParticle();
G4double pspin_meson;
G4double pspin_barion;
std::vector<G4double> vectorMesonMix;
std::vector<G4double> scalarMesonMix;
G4bool PastInitPhase;
G4KineticTrackVector * LightFragmentationTest(const G4ExcitedString * const theString);
G4bool StopFragmenting(const G4FragmentingString * const string);
G4bool IsFragmentable(const G4FragmentingString * const string);
// G4double MinFragmentationMass(G4ExcitedString * theString,
// G4ParticleDefinition*& Hadron1,
// G4ParticleDefinition*& Hadron2);
typedef std::pair<G4ParticleDefinition*, G4ParticleDefinition*> pDefPair;
typedef G4ParticleDefinition * (G4HadronBuilder::*Pcreate)
(G4ParticleDefinition*, G4ParticleDefinition*);
G4double FragmentationMass(
const G4FragmentingString * const string,
Pcreate build=0,
pDefPair * pdefs=0);
G4KineticTrack * Splitup(G4FragmentingString *string, G4FragmentingString *&newString);
G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, G4FragmentingString * string);
G4bool SplitLast(G4FragmentingString * string,
G4KineticTrackVector * LeftVector,
G4KineticTrackVector * RightVector);
void CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector *);
G4ExcitedString *CPExcited(const G4ExcitedString& string);
G4ParticleDefinition* FindParticle(G4int Encoding);
// Additional Implementation Declarations
G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition* decay,
G4ParticleDefinition *&created);
G4ParticleDefinition * DiQuarkSplitup(G4ParticleDefinition* decay,
G4ParticleDefinition *&created);
pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true);
};
//**********************************************************************************************
// Class G4VLongitudinalStringDecay
#endif