Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# $Id: GNUmakefile,v 1.1 1998/08/22 09:09:03 hpw Exp $
|
||||
# -----------------------------------------------------------
|
||||
# GNUmakefile for hadronic library. Gabriele Cosmo, 18/9/96.
|
||||
# -----------------------------------------------------------
|
||||
|
||||
name := G4hadronic_string_common
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../../../..
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
G4TMPDIR = $(G4TMP)/$(G4SYSTEM)/$(name)
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include/ \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4DiffractiveExcitation.hh,v 1.3 1998/12/09 07:30:23 gunter Exp $
|
||||
|
||||
#ifndef G4DiffractiveExcitation_h
|
||||
#define G4DiffractiveExcitation_h 1
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4DiffractiveExcitation --------------
|
||||
// by Gunter Folger, October 1998.
|
||||
// diffractive Excitation used by strings models
|
||||
// Take a projectile and a target
|
||||
// excite the projectile and target
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "globals.hh"
|
||||
class G4VSplitableHadron;
|
||||
class G4ExcitedString;
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
class G4DiffractiveExcitation
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4DiffractiveExcitation(G4double sigmaPt=0.6*GeV, G4double minExtraMass=250*MeV,G4double x0mass=250*MeV);
|
||||
~G4DiffractiveExcitation();
|
||||
|
||||
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
|
||||
G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4DiffractiveExcitation(const G4DiffractiveExcitation &right);
|
||||
|
||||
G4double ChooseX(G4double Xmin, G4double Xmax) const;
|
||||
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
|
||||
|
||||
const G4DiffractiveExcitation & operator=(const G4DiffractiveExcitation &right);
|
||||
int operator==(const G4DiffractiveExcitation &right) const;
|
||||
int operator!=(const G4DiffractiveExcitation &right) const;
|
||||
|
||||
private:
|
||||
// Model Parameters:
|
||||
const G4double widthOfPtSquare; // width^2 of pt for string excitation
|
||||
const G4double minExtraMass; // minimum excitation mass
|
||||
const G4double minmass; // mean pion transverse mass; used for Xmin
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4EventGenerator.hh,v 1.1 1998/08/22 08:57:14 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef G4EventGenerator_h
|
||||
#define G4EventGenerator_h 1
|
||||
|
||||
#include "G4HadronicInteraction.hh"
|
||||
#include "G4VertexCode.hh"
|
||||
#include "G4InteractionCode.hh"
|
||||
|
||||
class G4EventGenerator : public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4EventGenerator();
|
||||
~G4EventGenerator();
|
||||
|
||||
private:
|
||||
G4EventGenerator(const G4EventGenerator &right);
|
||||
const G4EventGenerator & operator=(const G4EventGenerator &right);
|
||||
int operator==(const G4EventGenerator &right) const;
|
||||
int operator!=(const G4EventGenerator &right) const;
|
||||
|
||||
public:
|
||||
virtual G4double GetWidth(G4VertexCode &theCode) = 0;
|
||||
virtual G4double GetCrossSection(G4InteractionCode &theCode) = 0;
|
||||
virtual G4ReactionProduct * GetFinalState(G4InteractionCode &theCode) = 0;
|
||||
// please also define ApplyYourself for scattering off Hydrogen
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4InteractionCode.hh,v 1.1 1998/08/22 08:57:15 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef G4InteractionCode_h
|
||||
#define G4InteractionCode_h 1
|
||||
|
||||
|
||||
class G4InteractionCode
|
||||
{
|
||||
|
||||
public:
|
||||
G4InteractionCode(G4String & aCode);
|
||||
|
||||
void SetCode(G4String & aCode);
|
||||
G4String GetCode();
|
||||
|
||||
private:
|
||||
|
||||
G4String theCode;
|
||||
};
|
||||
|
||||
inline void G4InteractionCode::SetCode(G4String & aCode)
|
||||
{
|
||||
theCode = aCode;
|
||||
}
|
||||
|
||||
inline G4String G4InteractionCode::GetCode()
|
||||
{
|
||||
return theCode;
|
||||
}
|
||||
|
||||
#endif
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4InteractionContent.hh,v 1.2 1998/10/16 07:35:52 maxim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#ifndef G4InteractionContent_h
|
||||
#define G4InteractionContent_h 1
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4InteractionContent----------------
|
||||
// by Gunter Folger, June 1998.
|
||||
// class for a storing colliding particles in PartonString Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include"G4VSplitableHadron.hh"
|
||||
|
||||
class G4InteractionContent
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
|
||||
|
||||
~G4InteractionContent();
|
||||
|
||||
int operator==(const G4InteractionContent &right) const;
|
||||
int operator!=(const G4InteractionContent &right) const;
|
||||
|
||||
G4VSplitableHadron * GetProjectile() const ;
|
||||
G4VSplitableHadron * GetTarget() const;
|
||||
|
||||
void SetTarget(G4VSplitableHadron *aTarget);
|
||||
|
||||
G4int GetNumberOfSoftCollisions();
|
||||
G4int GetNumberOfHardCollisions();
|
||||
void SetNumberOfSoftCollisions(int);
|
||||
void SetNumberOfHardCollisions(int);
|
||||
G4int GetNumberOfDiffractiveCollisions();
|
||||
void SetNumberOfDiffractiveCollisions(int);
|
||||
|
||||
void SplitHadrons();
|
||||
|
||||
private:
|
||||
G4InteractionContent();
|
||||
G4InteractionContent(const G4InteractionContent &right);
|
||||
const G4InteractionContent & operator=(const G4InteractionContent &right);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
G4VSplitableHadron * theTarget;
|
||||
G4VSplitableHadron * theProjectile;
|
||||
|
||||
G4int theNumberOfHard;
|
||||
G4int theNumberOfSoft;
|
||||
G4int theNumberOfDiffractive;
|
||||
};
|
||||
|
||||
// Class G4InteractionContent
|
||||
|
||||
inline G4VSplitableHadron * G4InteractionContent::GetProjectile() const
|
||||
{
|
||||
return theProjectile;
|
||||
}
|
||||
|
||||
inline G4VSplitableHadron * G4InteractionContent::GetTarget() const
|
||||
{
|
||||
return theTarget;
|
||||
}
|
||||
|
||||
inline void G4InteractionContent::SetTarget(G4VSplitableHadron *aTarget)
|
||||
{
|
||||
theTarget = aTarget;
|
||||
}
|
||||
|
||||
inline G4int G4InteractionContent::GetNumberOfSoftCollisions()
|
||||
{
|
||||
return theNumberOfSoft;
|
||||
}
|
||||
|
||||
inline G4int G4InteractionContent::GetNumberOfHardCollisions()
|
||||
{
|
||||
return theNumberOfHard;
|
||||
}
|
||||
|
||||
inline void G4InteractionContent::SetNumberOfSoftCollisions(int nCol)
|
||||
{
|
||||
theNumberOfSoft = nCol;
|
||||
}
|
||||
|
||||
inline void G4InteractionContent::SetNumberOfHardCollisions(int nCol)
|
||||
{
|
||||
theNumberOfHard = nCol;
|
||||
}
|
||||
|
||||
inline G4int G4InteractionContent::GetNumberOfDiffractiveCollisions()
|
||||
{
|
||||
return theNumberOfDiffractive;
|
||||
}
|
||||
|
||||
inline void G4InteractionContent::SetNumberOfDiffractiveCollisions(int nCol)
|
||||
{
|
||||
theNumberOfDiffractive = nCol;
|
||||
}
|
||||
|
||||
inline void G4InteractionContent::SplitHadrons()
|
||||
{
|
||||
if ( theProjectile != NULL ) theProjectile->SplitUp();
|
||||
if ( theTarget != NULL ) theTarget->SplitUp();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
#ifndef G4PomeronCrossSection_h
|
||||
#define G4PomeronCrossSection_h 1
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4PomeronCrossSection.hh,v 1.4 1998/12/12 19:13:51 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4PionZero.hh"
|
||||
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
#include "G4KaonZero.hh"
|
||||
#include "G4KaonZeroShort.hh"
|
||||
#include "G4KaonZeroLong.hh"
|
||||
|
||||
class G4PomeronCrossSection
|
||||
{
|
||||
|
||||
public:
|
||||
G4PomeronCrossSection(const G4ParticleDefinition * );
|
||||
G4PomeronCrossSection(const G4Proton * );
|
||||
G4PomeronCrossSection(const G4Neutron * );
|
||||
|
||||
G4PomeronCrossSection(const G4PionPlus * );
|
||||
G4PomeronCrossSection(const G4PionMinus * );
|
||||
G4PomeronCrossSection(const G4PionZero * );
|
||||
|
||||
G4PomeronCrossSection(const G4KaonPlus * );
|
||||
G4PomeronCrossSection(const G4KaonMinus * );
|
||||
G4PomeronCrossSection(const G4KaonZero * );
|
||||
G4PomeronCrossSection(const G4KaonZeroLong * );
|
||||
G4PomeronCrossSection(const G4KaonZeroShort * );
|
||||
|
||||
~G4PomeronCrossSection();
|
||||
// s = (center of mass energy)**2
|
||||
G4double GetTotalCrossSection(const G4double s);
|
||||
G4double GetDiffractiveCrossSection(const G4double s);
|
||||
G4double GetElasticCrossSection(const G4double s);
|
||||
G4double GetInelasticCrossSection(const G4double s);
|
||||
|
||||
G4double GetTotalProbability(const G4double s,
|
||||
const G4double impactsquare);
|
||||
G4double GetDiffractiveProbability(const G4double s,
|
||||
const G4double impactsquare);
|
||||
G4double GetNondiffractiveProbability(const G4double s,
|
||||
const G4double impactsquare);
|
||||
G4double GetElasticProbability(const G4double s,
|
||||
const G4double impactsquare);
|
||||
|
||||
G4double GetInelasticProbability(const G4double s,
|
||||
const G4double impactsquare);
|
||||
|
||||
G4double GetCutPomeronProbability(const G4double s,
|
||||
const G4double impactsquare, const G4int nPomerons);
|
||||
|
||||
void Setgamma(const G4double agam); // temporary only! GF.
|
||||
G4double SoftEikonal(G4double s, G4double impactsquare);
|
||||
G4double HardEikonal(G4double s, G4double impactsquare);
|
||||
|
||||
private:
|
||||
G4double PowerSoft(const G4double s);
|
||||
G4double PowerHard(const G4double s);
|
||||
G4double LambdaSoft(const G4double s);
|
||||
G4double LambdaHard(const G4double s);
|
||||
G4double Zsoft(const G4double s);
|
||||
G4double Zhard(const G4double s);
|
||||
|
||||
G4PomeronCrossSection();
|
||||
void InitForNucleon();
|
||||
void InitForPion();
|
||||
void InitForKaon();
|
||||
G4double Expand(G4double z);
|
||||
inline G4double Z(const G4double Scms);
|
||||
inline G4double SigP(const G4double Scms);
|
||||
inline G4double Power(const G4double Scms);
|
||||
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;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,80 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4StringModel.hh,v 1.1 1998/08/22 08:57:16 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef G4StringModel_h
|
||||
#define G4StringModel_h 1
|
||||
|
||||
#include "G4VHighEnergyGenerator.hh"
|
||||
#include "G4EventGenerator.hh"
|
||||
class G4V3DNucleus;
|
||||
class G4VStringFragmentation;
|
||||
|
||||
|
||||
class G4StringModel : public G4VHighEnergyGenerator
|
||||
|
||||
{
|
||||
public:
|
||||
G4StringModel();
|
||||
~G4StringModel();
|
||||
|
||||
private:
|
||||
G4StringModel(const G4StringModel &right);
|
||||
const G4StringModel & operator=(const G4StringModel &right);
|
||||
int operator==(const G4StringModel &right) const;
|
||||
int operator!=(const G4StringModel &right) const;
|
||||
|
||||
public:
|
||||
void Set3DNucleus(G4V3DNucleus *const value);
|
||||
void SetStringFragmentationModel(G4VStringFragmentation *const value);
|
||||
void SetGenerator(G4EventGenerator *const value);
|
||||
|
||||
private:
|
||||
const G4V3DNucleus * Get3DNucleus() const;
|
||||
const G4VStringFragmentation * GetStringFragmentationModel() const;
|
||||
const G4EventGenerator * GetGenerator() const;
|
||||
|
||||
private:
|
||||
G4V3DNucleus *the3DNucleus;
|
||||
G4VStringFragmentation *theStringFragmentationModel;
|
||||
G4EventGenerator *theGenerator;
|
||||
|
||||
};
|
||||
|
||||
inline const G4V3DNucleus * G4StringModel::Get3DNucleus() const
|
||||
{
|
||||
return the3DNucleus;
|
||||
}
|
||||
|
||||
inline void G4StringModel::Set3DNucleus(G4V3DNucleus *const value)
|
||||
{
|
||||
the3DNucleus = value;
|
||||
}
|
||||
|
||||
inline const G4VStringFragmentation * G4StringModel::GetStringFragmentationModel() const
|
||||
{
|
||||
return theStringFragmentationModel;
|
||||
}
|
||||
|
||||
inline void G4StringModel::SetStringFragmentationModel(G4VStringFragmentation *const value)
|
||||
{
|
||||
theStringFragmentationModel = value;
|
||||
}
|
||||
|
||||
inline const G4EventGenerator * G4StringModel::GetGenerator() const
|
||||
{
|
||||
return theGenerator;
|
||||
}
|
||||
|
||||
inline void G4StringModel::SetGenerator(G4EventGenerator *const value)
|
||||
{
|
||||
theGenerator = value;
|
||||
}
|
||||
|
||||
#endif
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4VPartonStringModel.hh,v 1.2 1998/10/09 13:33:29 maxim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef G4VPartonStringModel_h
|
||||
#define G4VPartonStringModel_h 1
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4VPartonStringModel ----------------
|
||||
// by Gunter Folger, May 1998.
|
||||
// abstract class for all Parton String Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// Modified at 8-Oct-1998 by Maxim Komogorov. Method EnergyAndMomentumCorrector was added.
|
||||
|
||||
#include "G4StringModel.hh"
|
||||
#include "G4VParticipants.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4ExcitedString.hh"
|
||||
#include "G4ExcitedStringVector.hh"
|
||||
#include "G4VStringFragmentation.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
|
||||
class G4VPartonStringModel : public G4VHighEnergyGenerator
|
||||
|
||||
{
|
||||
public:
|
||||
G4VPartonStringModel();
|
||||
virtual ~G4VPartonStringModel();
|
||||
|
||||
private:
|
||||
G4VPartonStringModel(const G4VPartonStringModel &right);
|
||||
const G4VPartonStringModel & operator=(const G4VPartonStringModel &right);
|
||||
int operator==(const G4VPartonStringModel &right) const;
|
||||
int operator!=(const G4VPartonStringModel &right) const;
|
||||
|
||||
public:
|
||||
void SetFragmentationModel(G4VStringFragmentation * aModel);
|
||||
G4KineticTrackVector * Scatter(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary);
|
||||
virtual G4V3DNucleus * GetWoundedNucleus() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void Init(const G4Nucleus &theNucleus, const G4DynamicParticle &thePrimary) = 0;
|
||||
virtual G4ExcitedStringVector * GetStrings() = 0;
|
||||
void SetThisPointer(G4VPartonStringModel * aPointer);
|
||||
|
||||
G4bool EnergyAndMomentumCorrector(G4KineticTrackVector* Output, G4LorentzVector& TotalCollisionMomentum);
|
||||
|
||||
private:
|
||||
|
||||
G4VStringFragmentation * stringFragmentationModel;
|
||||
G4VPartonStringModel * theThis;
|
||||
|
||||
};
|
||||
|
||||
inline void G4VPartonStringModel::SetFragmentationModel(G4VStringFragmentation * aModel)
|
||||
{
|
||||
stringFragmentationModel = aModel;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VPartonStringModel::SetThisPointer(G4VPartonStringModel * aPointer)
|
||||
{
|
||||
theThis=aPointer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4VertexCode.hh,v 1.1 1998/08/22 08:57:18 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#ifndef G4VertexCode_h
|
||||
#define G4VertexCode_h 1
|
||||
|
||||
|
||||
class G4VertexCode
|
||||
{
|
||||
|
||||
public:
|
||||
G4VertexCode(G4String & aCode);
|
||||
|
||||
void SetCode(G4String & aCode);
|
||||
G4String GetCode();
|
||||
private:
|
||||
|
||||
G4String theCode;
|
||||
};
|
||||
|
||||
inline void G4VertexCode::SetCode(G4String & aCode)
|
||||
{
|
||||
theCode = aCode;
|
||||
}
|
||||
|
||||
inline G4String G4VertexCode::GetCode()
|
||||
{
|
||||
return theCode;
|
||||
}
|
||||
|
||||
#endif
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4DiffractiveExcitation.cc,v 1.11 1998/12/17 01:11:48 gcosmo Exp $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4DiffractiveExcitation --------------
|
||||
// by Gunter Folger, October 1998.
|
||||
// diffractive Excitation used by strings models
|
||||
// Take a projectile and a target
|
||||
// excite the projectile and target
|
||||
// ------------------------------------------------------------
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4DiffractiveExcitation.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VSplitableHadron.hh"
|
||||
#include "G4ExcitedString.hh"
|
||||
//#include "G4ios.hh"
|
||||
|
||||
G4DiffractiveExcitation::G4DiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
|
||||
:
|
||||
widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
|
||||
minmass(x0mass)
|
||||
{
|
||||
}
|
||||
|
||||
G4bool G4DiffractiveExcitation::
|
||||
ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const
|
||||
{
|
||||
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
|
||||
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
|
||||
// G4cout << "E proj, target :" << Pprojectile.e() << ", " <<
|
||||
// Ptarget.e() << endl;
|
||||
|
||||
// Transform momenta to cms and then rotate parallel to z axis;
|
||||
|
||||
G4LorentzVector Psum;
|
||||
Psum=Pprojectile+Ptarget;
|
||||
|
||||
G4LorentzRotation toCms(-1*Psum.boostVector());
|
||||
|
||||
G4LorentzVector Ptmp=toCms*Pprojectile;
|
||||
|
||||
if ( Ptmp.pz() <= 0. )
|
||||
{
|
||||
// "String" moving backwards in CMS, abort collision !!
|
||||
// G4cout << " abort Collision!! " << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
toCms.rotateZ(-1*Ptmp.phi());
|
||||
toCms.rotateY(-1*Ptmp.theta());
|
||||
|
||||
// G4cout << "Pprojectile be4 boost " << Pprojectile << endl;
|
||||
// G4cout << "Ptarget be4 boost : " << Ptarget << endl;
|
||||
|
||||
|
||||
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
|
||||
// G4cout << "Pprojectile aft boost : " << Pprojectile << endl;
|
||||
// G4cout << "Ptarget aft boost : " << Ptarget << endl;
|
||||
// G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << endl;
|
||||
|
||||
// G4cout << " Projectile Xplus / Xminus : " <<
|
||||
// Pprojectile.plus() << " / " << Pprojectile.minus() << endl;
|
||||
// G4cout << " Target Xplus / Xminus : " <<
|
||||
// Ptarget.plus() << " / " << Ptarget.minus() << endl;
|
||||
|
||||
G4LorentzVector Qmomentum;
|
||||
G4int whilecount=0;
|
||||
do {
|
||||
// Generate pt
|
||||
|
||||
G4double maxPtSquare=sqr(Ptarget.pz());
|
||||
if (whilecount++ >= 500 && (whilecount%100)==0)
|
||||
// G4cout << "G4DiffractiveExcitation::ExciteParticipants possibly looping"
|
||||
// << ", loop count/ maxPtSquare : "
|
||||
// << whilecount << " / " << maxPtSquare << endl;
|
||||
if (whilecount > 1000 )
|
||||
{
|
||||
Qmomentum=0;
|
||||
// G4cout << "G4DiffractiveExcitation::ExciteParticipants: Aborting loop!" << endl;
|
||||
return false; // Ignore this interaction
|
||||
}
|
||||
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
|
||||
|
||||
// G4cout << "generated Pt " << Qmomentum << endl;
|
||||
// G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << endl;
|
||||
// G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << endl;
|
||||
|
||||
// Momentum transfer
|
||||
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
|
||||
G4double Xmax=1.;
|
||||
G4double Xplus =ChooseX(Xmin,Xmax);
|
||||
G4double Xminus=ChooseX(Xmin,Xmax);
|
||||
|
||||
// G4cout << " X-plus " << Xplus << endl;
|
||||
// G4cout << " X-minus " << Xminus << endl;
|
||||
|
||||
G4double pt2=G4ThreeVector(Qmomentum).mag2();
|
||||
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
|
||||
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
|
||||
|
||||
Qmomentum.setPz( (Qplus-Qminus)/2 );
|
||||
Qmomentum.setE( (Qplus+Qminus)/2 );
|
||||
|
||||
// G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<endl;
|
||||
// G4cout << "pt2" << pt2 << endl;
|
||||
// G4cout << "Qmomentum " << Qmomentum << endl;
|
||||
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
|
||||
// " / " << (Ptarget-Qmomentum).mag() << endl;
|
||||
|
||||
} while ( (Pprojectile+Qmomentum).mag2() <= Mprojectile2 ||
|
||||
(Ptarget-Qmomentum).mag2() <= Mtarget2 );
|
||||
|
||||
Pprojectile += Qmomentum;
|
||||
Ptarget -= Qmomentum;
|
||||
|
||||
// G4cout << "Pprojectile with Q : " << Pprojectile << endl;
|
||||
// G4cout << "Ptarget with Q : " << Ptarget << endl;
|
||||
|
||||
|
||||
|
||||
// G4cout << "Projectile back: " << toLab * Pprojectile << endl;
|
||||
// G4cout << "Target back: " << toLab * Ptarget << endl;
|
||||
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
|
||||
// G4cout << "Target mass " << Ptarget.mag() << endl;
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
//
|
||||
|
||||
|
||||
// G4cout << "Projectile mass " << Pprojectile.mag() << endl;
|
||||
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
G4ExcitedString * G4DiffractiveExcitation::
|
||||
String(G4VSplitableHadron * hadron, G4bool isProjectile) const
|
||||
{
|
||||
hadron->SplitUp();
|
||||
G4Parton *start= hadron->GetNextParton();
|
||||
if ( start==NULL)
|
||||
{ cout << " G4FTFModel::String() Error:No start parton found"<< endl;
|
||||
return NULL;
|
||||
}
|
||||
G4Parton *end = hadron->GetNextParton();
|
||||
if ( end==NULL)
|
||||
{ cout << " G4FTFModel::String() Error:No end parton found"<< endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
G4ExcitedString * string;
|
||||
if ( isProjectile )
|
||||
{
|
||||
string= new G4ExcitedString(end,start, +1);
|
||||
} else {
|
||||
string= new G4ExcitedString(start,end, -1);
|
||||
}
|
||||
|
||||
string->SetPosition(hadron->GetPosition());
|
||||
|
||||
// momenta of string ends
|
||||
G4double ptSquared= hadron->Get4Momentum().perp2();
|
||||
G4double transverseMassSquared= hadron->Get4Momentum().plus()
|
||||
* hadron->Get4Momentum().minus();
|
||||
|
||||
|
||||
G4double maxAvailMomentumSquared=
|
||||
sqr( sqrt(transverseMassSquared) - sqrt(ptSquared) );
|
||||
|
||||
G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared);
|
||||
|
||||
G4LorentzVector Pstart(G4LorentzVector(pt,0.));
|
||||
G4LorentzVector Pend;
|
||||
Pend.setPx(hadron->Get4Momentum().px() - pt.x());
|
||||
Pend.setPy(hadron->Get4Momentum().py() - pt.y());
|
||||
|
||||
G4double tm1=hadron->Get4Momentum().minus() +
|
||||
( Pend.perp2()-Pstart.perp2() ) / hadron->Get4Momentum().plus();
|
||||
|
||||
G4double tm2= sqrt( max(0., sqr(tm1) -
|
||||
4. * Pend.perp2() * hadron->Get4Momentum().minus()
|
||||
/ hadron->Get4Momentum().plus() ));
|
||||
|
||||
G4int Sign= isProjectile ? -1 : 1;
|
||||
|
||||
G4double endMinus = 0.5 * (tm1 + Sign*tm2);
|
||||
G4double startMinus= hadron->Get4Momentum().minus() - endMinus;
|
||||
|
||||
G4double startPlus= Pstart.perp2() / startMinus;
|
||||
G4double endPlus = hadron->Get4Momentum().plus() - startPlus;
|
||||
|
||||
Pstart.setPz(0.5*(startPlus - startMinus));
|
||||
Pstart.setE(0.5*(startPlus + startMinus));
|
||||
|
||||
Pend.setPz(0.5*(endPlus - endMinus));
|
||||
Pend.setE(0.5*(endPlus + endMinus));
|
||||
|
||||
start->Set4Momentum(Pstart);
|
||||
end->Set4Momentum(Pend);
|
||||
|
||||
#ifdef G4_FTFDEBUG
|
||||
G4cout << " generated string flavors " << stringStart << " / " << stringEnd << endl;
|
||||
G4cout << " generated string momenta: quark " << start->Get4Momentum() << endl;
|
||||
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << endl;
|
||||
G4cout << " sum of ends " << Pstart+Pend << endl;
|
||||
G4cout << " Original " << hadron->Get4Momentum() << endl;
|
||||
#endif
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
// --------- private methods ----------------------
|
||||
|
||||
G4double G4DiffractiveExcitation::ChooseX(G4double Xmin, G4double Xmax) const
|
||||
{
|
||||
// choose an x between Xmin and Xmax with P(x) ~ 1/x
|
||||
|
||||
// to be improved...
|
||||
|
||||
G4double range=Xmax-Xmin;
|
||||
|
||||
if ( Xmin <= 0. || range <=0. )
|
||||
{
|
||||
G4cout << " Xmin, range : " << Xmin << " , " << range << endl;
|
||||
G4Exception("G4DiffractiveExcitation::ChooseX : Invalid arguments ");
|
||||
}
|
||||
|
||||
G4double x;
|
||||
do {
|
||||
x=Xmin + G4UniformRand() * range;
|
||||
} while ( Xmin/x < G4UniformRand() );
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
G4ThreeVector G4DiffractiveExcitation::GaussianPt(G4double widthSquare, G4double maxPtSquare) const
|
||||
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
|
||||
|
||||
G4double pt2;
|
||||
|
||||
do {
|
||||
pt2=widthSquare * log( G4UniformRand() );
|
||||
} while ( pt2 > maxPtSquare);
|
||||
|
||||
pt2=sqrt(pt2);
|
||||
|
||||
G4double phi=G4UniformRand() * twopi;
|
||||
|
||||
return G4ThreeVector (pt2*cos(phi), pt2*sin(phi), 0.);
|
||||
}
|
||||
|
||||
G4DiffractiveExcitation::G4DiffractiveExcitation(const G4DiffractiveExcitation &right)
|
||||
:
|
||||
widthOfPtSquare(0) , minExtraMass(0),
|
||||
minmass(0)
|
||||
{
|
||||
G4Exception("G4DiffractiveExcitation copy contructor not meant to be called");
|
||||
}
|
||||
|
||||
|
||||
G4DiffractiveExcitation::~G4DiffractiveExcitation()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4DiffractiveExcitation & G4DiffractiveExcitation::operator=(const G4DiffractiveExcitation &right)
|
||||
{
|
||||
G4Exception("G4DiffractiveExcitation = operator meant to be called");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4DiffractiveExcitation::operator==(const G4DiffractiveExcitation &right) const
|
||||
{
|
||||
G4Exception("G4DiffractiveExcitation == operator meant to be called");
|
||||
return false;
|
||||
}
|
||||
|
||||
int G4DiffractiveExcitation::operator!=(const G4DiffractiveExcitation &right) const
|
||||
{
|
||||
G4Exception("G4DiffractiveExcitation != operator meant to be called");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4EventGenerator.cc,v 1.1 1998/08/22 08:57:24 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4EventGenerator
|
||||
#include "G4EventGenerator.hh"
|
||||
|
||||
G4EventGenerator::G4EventGenerator()
|
||||
{
|
||||
SetMinEnergy (0 *GeV);
|
||||
SetMaxEnergy (0 *GeV);
|
||||
}
|
||||
|
||||
G4EventGenerator::G4EventGenerator(const G4EventGenerator &right)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4EventGenerator::~G4EventGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4EventGenerator & G4EventGenerator::operator=(const G4EventGenerator &right)
|
||||
{
|
||||
G4Exception("G4EventGenerator::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4EventGenerator::operator==(const G4EventGenerator &right) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4EventGenerator::operator!=(const G4EventGenerator &right) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4InteractionContent.cc,v 1.2 1998/10/08 16:20:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4InteractionContent----------------
|
||||
// by Gunter Folger, June 1998.
|
||||
// class for a storing two colliding particles in PartonString Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4InteractionContent.hh"
|
||||
|
||||
G4InteractionContent::G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant)
|
||||
: theNumberOfHard(NULL), theNumberOfSoft(NULL)
|
||||
{
|
||||
theProjectile=aPrimaryParticipant;
|
||||
}
|
||||
|
||||
G4InteractionContent::G4InteractionContent(const G4InteractionContent &right)
|
||||
: theNumberOfHard(0), theNumberOfSoft(0)
|
||||
{}
|
||||
|
||||
|
||||
G4InteractionContent::~G4InteractionContent()
|
||||
{}
|
||||
|
||||
int G4InteractionContent::operator==(const G4InteractionContent &right) const
|
||||
{
|
||||
return this==&right;
|
||||
}
|
||||
|
||||
int G4InteractionContent::operator!=(const G4InteractionContent &right) const
|
||||
{
|
||||
return this!=&right;
|
||||
}
|
||||
|
||||
|
||||
const G4InteractionContent & G4InteractionContent::operator=(const G4InteractionContent &right)
|
||||
{
|
||||
G4Exception("G4InteractionContent::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
+277
@@ -0,0 +1,277 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4PomeronCrossSection.cc,v 1.7 1998/12/10 08:58:23 maxim Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
|
||||
#include "G4PomeronCrossSection.hh"
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection()
|
||||
{;}
|
||||
|
||||
|
||||
G4PomeronCrossSection::~G4PomeronCrossSection()
|
||||
{;}
|
||||
//**********************************************************************************************
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4ParticleDefinition * particle)
|
||||
{
|
||||
G4int Encoding = abs(particle->GetPDGEncoding());
|
||||
|
||||
if (abs(particle->GetBaryonNumber())!=0)
|
||||
InitForNucleon();
|
||||
else if (Encoding/100== 3 || Encoding/10 == 3)
|
||||
InitForKaon();
|
||||
else
|
||||
InitForPion();
|
||||
}
|
||||
|
||||
//**********************************************************************************************
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4Proton * particle)
|
||||
{
|
||||
InitForNucleon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4Neutron * particle)
|
||||
{
|
||||
InitForNucleon();
|
||||
}
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionPlus * particle)
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionMinus * particle)
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionZero * particle)
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonPlus * particle)
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonMinus * particle)
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZero * particle)
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZeroLong * particle)
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZeroShort * particle)
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetTotalCrossSection(const G4double s)
|
||||
{
|
||||
G4double FZ2= Expand(Z(s)/2);
|
||||
return SigP(s) * FZ2;
|
||||
}
|
||||
|
||||
|
||||
G4double G4PomeronCrossSection::GetElasticCrossSection(const G4double s)
|
||||
{
|
||||
return SigP(s)/pomeron_C *(Expand(Z(s)/2) - Expand(Z(s)));
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetDiffractiveCrossSection(const G4double s)
|
||||
{
|
||||
return ( pomeron_C -1) * GetElasticCrossSection(s);
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetInelasticCrossSection(const G4double s)
|
||||
{
|
||||
return GetTotalCrossSection(s) - GetElasticCrossSection(s);
|
||||
}
|
||||
|
||||
//-------------------------Probabilities ----------------------------
|
||||
|
||||
G4double G4PomeronCrossSection::GetTotalProbability(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return 2/pomeron_C*(1-exp(-1*Eikonal(s,impactsquare)));
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetDiffractiveProbability(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return (pomeron_C-1)/pomeron_C *
|
||||
(GetTotalProbability(s,impactsquare) -
|
||||
GetNondiffractiveProbability(s,impactsquare));
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetNondiffractiveProbability(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return (1-exp(-2*Eikonal(s,impactsquare)))/pomeron_C;
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetElasticProbability(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return (GetTotalProbability(s,impactsquare) -
|
||||
GetInelasticProbability(s,impactsquare));
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetInelasticProbability(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return GetNondiffractiveProbability(s,impactsquare) +
|
||||
GetDiffractiveProbability(s,impactsquare);
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::GetCutPomeronProbability(const G4double s,
|
||||
const G4double impactsquare, const G4int nPomerons)
|
||||
{
|
||||
G4double factorial=1;
|
||||
for (G4int i=2; i<= nPomerons ; i++)
|
||||
{ factorial *= i;
|
||||
}
|
||||
|
||||
return exp(-2*Eikonal(s,impactsquare))/pomeron_C*
|
||||
pow(2*Eikonal(s,impactsquare),nPomerons)/factorial;
|
||||
}
|
||||
|
||||
// ---------------Temporary --- GF
|
||||
void G4PomeronCrossSection::Setgamma(const G4double agam)
|
||||
{
|
||||
pomeron_Gamma=agam/GeV/GeV;
|
||||
}
|
||||
|
||||
|
||||
//----------------- private/Implementation methods
|
||||
|
||||
void G4PomeronCrossSection::InitForNucleon()
|
||||
{
|
||||
pomeron_S= 3.0*GeV*GeV;
|
||||
// pomeron_Gamma= 2.16/GeV/GeV;
|
||||
pomeron_Gamma= 3.96/GeV/GeV;
|
||||
pomeron_C= 1.4;
|
||||
pomeron_Rsquare= 3.56/GeV/GeV;
|
||||
pomeron_Alpha= 1.0808;
|
||||
pomeron_Alphaprime= 0.25/GeV/GeV;
|
||||
pomeron_Gamma_Hard = 0.0002/GeV/GeV; // Note! if pomeron_Gamma_Hard != 0 to fit total pp-crosscection
|
||||
// pomeron_Gamma_Soft shold be 2.35/GeV/GeV
|
||||
pomeron_Alpha_Hard = 1.47;
|
||||
}
|
||||
|
||||
void G4PomeronCrossSection::InitForPion()
|
||||
{
|
||||
pomeron_S= 1.5*GeV*GeV;
|
||||
// pomeron_Gamma= 1.46/GeV/GeV;
|
||||
pomeron_Gamma= 2.17/GeV/GeV;
|
||||
pomeron_C= 1.6;
|
||||
pomeron_Rsquare= 2.36/GeV/GeV;
|
||||
pomeron_Alpha= 1.0808;
|
||||
pomeron_Alphaprime= 0.25/GeV/GeV;
|
||||
pomeron_Gamma_Hard = 0.0002/GeV/GeV;
|
||||
pomeron_Alpha_Hard = 1.47;
|
||||
}
|
||||
|
||||
void G4PomeronCrossSection::InitForKaon()
|
||||
{
|
||||
pomeron_S= 2.3*GeV*GeV;
|
||||
// pomeron_Gamma= 1.31/GeV/GeV;
|
||||
pomeron_Gamma= 1.92/GeV/GeV;
|
||||
pomeron_C= 1.8;
|
||||
pomeron_Rsquare= 1.96/GeV/GeV;
|
||||
pomeron_Alpha= 1.0808;
|
||||
pomeron_Alphaprime= 0.25/GeV/GeV;
|
||||
pomeron_Gamma_Hard = 0.0002/GeV/GeV;
|
||||
pomeron_Alpha_Hard = 1.47;
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::Expand(G4double z)
|
||||
{
|
||||
|
||||
G4double sum=1.;
|
||||
G4double current=1.;
|
||||
for (G4int j=2; j<21; j++ )
|
||||
{
|
||||
current *= -z *(j-1)/sqr(j);
|
||||
sum+=current;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Power(const G4double s)
|
||||
{
|
||||
return pomeron_Gamma *pow(s/pomeron_S, pomeron_Alpha -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Z(const G4double s)
|
||||
{
|
||||
return 2*pomeron_C * Power(s) / Lambda(s);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Lambda(const G4double s)
|
||||
{
|
||||
return pomeron_Rsquare+pomeron_Alphaprime*log(s/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::SigP(const G4double s)
|
||||
{
|
||||
return 8 * pi * hbarc_squared * Power(s);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Eikonal(const G4double s,
|
||||
const G4double impactsquare)
|
||||
{
|
||||
return Z(s)/2 * exp(-impactsquare/(4*Lambda(s)*hbarc_squared));
|
||||
}
|
||||
//*************************************************************************************************
|
||||
inline G4double G4PomeronCrossSection::PowerSoft(const G4double s)
|
||||
{
|
||||
return pomeron_Gamma *pow(s/pomeron_S, pomeron_Alpha -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::PowerHard(const G4double s)
|
||||
{
|
||||
return pomeron_Gamma_Hard*pow(s/pomeron_S, pomeron_Alpha_Hard -1);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::LambdaSoft(const G4double s)
|
||||
{
|
||||
return pomeron_Rsquare+pomeron_Alphaprime*log(s/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::LambdaHard(const G4double s)
|
||||
{
|
||||
return pomeron_Rsquare; //+pomeron_Alphaprime*log(s/pomeron_S);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Zsoft(const G4double s)
|
||||
{
|
||||
return 2*pomeron_C*PowerHard(s) / LambdaSoft(s);
|
||||
}
|
||||
|
||||
inline G4double G4PomeronCrossSection::Zhard(const G4double s)
|
||||
{
|
||||
return 2*pomeron_C*PowerHard(s)/LambdaHard(s);
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::SoftEikonal(G4double s, G4double impactsquare)
|
||||
{
|
||||
return Zsoft(s)/2*exp(-impactsquare/LambdaSoft(s)/hbarc_squared/4);
|
||||
}
|
||||
|
||||
G4double G4PomeronCrossSection::HardEikonal(G4double s, G4double impactsquare)
|
||||
{
|
||||
return Zhard(s)/2*exp(-impactsquare/LambdaHard(s)/hbarc_squared/4);
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
@@ -0,0 +1,46 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4StringModel.cc,v 1.1 1998/08/22 08:57:25 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4StringModel
|
||||
#include "G4StringModel.hh"
|
||||
|
||||
G4StringModel::G4StringModel()
|
||||
{
|
||||
the3DNucleus=NULL;
|
||||
theStringFragmentationModel=NULL;
|
||||
theGenerator=NULL;
|
||||
}
|
||||
|
||||
G4StringModel::G4StringModel(const G4StringModel &right)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4StringModel::~G4StringModel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4StringModel & G4StringModel::operator=(const G4StringModel &right)
|
||||
{
|
||||
G4Exception("G4StringModel::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4StringModel::operator==(const G4StringModel &right) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4StringModel::operator!=(const G4StringModel &right) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 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: G4VPartonStringModel.cc,v 1.10 1998/12/16 14:59:13 gugu Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4VPartonStringModel ----------------
|
||||
// by Gunter Folger, May 1998.
|
||||
// abstract class for all Parton String Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
// Modified at 8-Oct-1998 by Maxim Komogorov. Method EnergyAndMomentumCorrector was added.
|
||||
|
||||
|
||||
#include "G4VPartonStringModel.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
|
||||
|
||||
G4VPartonStringModel::G4VPartonStringModel()
|
||||
{
|
||||
// Make shure Shotrylived partyicles are constructed.
|
||||
G4ShortLivedConstructor ShortLived;
|
||||
ShortLived.ConstructParticle();
|
||||
}
|
||||
|
||||
G4VPartonStringModel::G4VPartonStringModel(const G4VPartonStringModel &right)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4VPartonStringModel::~G4VPartonStringModel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4VPartonStringModel & G4VPartonStringModel::operator=(const G4VPartonStringModel &right)
|
||||
{
|
||||
G4Exception("G4VPartonStringModel::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4VPartonStringModel::operator==(const G4VPartonStringModel &right) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4VPartonStringModel::operator!=(const G4VPartonStringModel &right) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus,
|
||||
const G4DynamicParticle &aPrimary)
|
||||
{
|
||||
G4ExcitedStringVector * strings = NULL;
|
||||
|
||||
G4DynamicParticle thePrimary=aPrimary;
|
||||
|
||||
G4LorentzRotation toZ;
|
||||
G4LorentzVector Ptmp=thePrimary.Get4Momentum();
|
||||
toZ.rotateZ(-1*Ptmp.phi());
|
||||
toZ.rotateY(-1*Ptmp.theta());
|
||||
thePrimary.Set4Momentum(toZ*Ptmp);
|
||||
G4LorentzRotation toLab(toZ.inverse());
|
||||
|
||||
G4int attempts = 0, maxAttempts=20;
|
||||
while ( strings == NULL )
|
||||
{
|
||||
if (attempts++ > maxAttempts )
|
||||
{
|
||||
G4Exception("G4VPartonStringModel::Scatter(): fails to generate strings");
|
||||
}
|
||||
|
||||
theThis->Init(theNucleus,thePrimary);
|
||||
strings = GetStrings();
|
||||
}
|
||||
|
||||
// G4cout << "Number of strings " << strings->entries() << endl << endl;
|
||||
|
||||
G4KineticTrackVector * theResult = new G4KineticTrackVector;
|
||||
|
||||
G4LorentzVector KTsum;
|
||||
G4bool NeedEnergyCorrector=false;
|
||||
|
||||
for ( G4int astring=0; astring < strings->entries(); astring++)
|
||||
{
|
||||
strings->at(astring)->LorentzRotate(toLab);
|
||||
|
||||
KTsum+= strings->at(astring)->Get4Momentum();
|
||||
G4KineticTrackVector * generatedKineticTracks = NULL;
|
||||
|
||||
// G4cout << " strings["<<astring<<"] Momentum " << strings->at(astring)->Get4Momentum() << endl;
|
||||
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
|
||||
// G4cout << " strings["<<astring<<"] Position " << strings->at(astring)->GetPosition() << endl;
|
||||
|
||||
generatedKineticTracks=stringFragmentationModel->FragmentString(*strings->at(astring));
|
||||
|
||||
// G4cout <<" number of generated tracks : " << generatedKineticTracks->entries() << endl;
|
||||
|
||||
if (generatedKineticTracks == NULL)
|
||||
{
|
||||
G4cout << "No KineticTracks produced" << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
// if ( generatedKineticTracks->entries() == 1 )
|
||||
// {
|
||||
// G4cout << " Only one track created, mass "
|
||||
// << generatedKineticTracks->at(0)->Get4Momentum().mag() << endl;
|
||||
//
|
||||
// G4cout << " strings["<<astring<<"] Momentum " << strings->at(astring)->Get4Momentum() << endl;
|
||||
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
|
||||
//
|
||||
// }
|
||||
G4LorentzVector KTsum1;
|
||||
for ( G4int aTrack=0; aTrack<generatedKineticTracks->entries();aTrack++)
|
||||
{
|
||||
theResult->insert(generatedKineticTracks->at(aTrack));
|
||||
KTsum1+= (*generatedKineticTracks)[aTrack]->Get4Momentum();
|
||||
|
||||
// G4cout << " Momentum/ Mass " <<
|
||||
// (*generatedKineticTracks)[aTrack]->Get4Momentum() <<
|
||||
// " / " << (*generatedKineticTracks)[aTrack]->Get4Momentum().mag()
|
||||
// << endl;
|
||||
// G4cout << " Position " <<
|
||||
// (*generatedKineticTracks)[aTrack]->GetPosition()
|
||||
// << endl;
|
||||
|
||||
}
|
||||
|
||||
// G4cout << " KTsum Momentum " << KTsum << endl;
|
||||
// G4cout << " KTsum Mass " << KTsum.mag() << endl;
|
||||
|
||||
if ( abs( KTsum1.e() - strings->at(astring)->Get4Momentum().e() ) > 1. )
|
||||
{
|
||||
NeedEnergyCorrector=true;
|
||||
|
||||
// G4cout << " strings["<<astring<<"] Momentum " << strings->at(astring)->Get4Momentum() << endl;
|
||||
// G4cout << " strings["<<astring<<"] Mass " << strings->at(astring)->Get4Momentum().mag() << endl;
|
||||
// G4cout <<" number of generated tracks : " << generatedKineticTracks->entries() << endl;
|
||||
// for ( G4int bTrack=0; bTrack<generatedKineticTracks->entries();bTrack++)
|
||||
// {
|
||||
// G4cout << " Particle : " <<
|
||||
// (*generatedKineticTracks)[bTrack]->GetDefinition()->GetParticleName()
|
||||
// << endl;
|
||||
// G4cout << " Momentum " <<
|
||||
// (*generatedKineticTracks)[bTrack]->Get4Momentum()
|
||||
// << endl;
|
||||
// G4cout << " Mass " <<
|
||||
// (*generatedKineticTracks)[bTrack]->Get4Momentum().mag()
|
||||
// << endl;
|
||||
// }
|
||||
//
|
||||
}
|
||||
// clean up
|
||||
delete generatedKineticTracks;
|
||||
}
|
||||
|
||||
if ( NeedEnergyCorrector ) EnergyAndMomentumCorrector(theResult, KTsum);
|
||||
|
||||
strings->clearAndDestroy();
|
||||
delete strings;
|
||||
|
||||
return theResult;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
// This method was implemented by Maxim Komogorov
|
||||
// Maxim.Komogorov@cern.ch
|
||||
// This method was implemented by Maxim Komogorov
|
||||
// Maxim.Komogorov@cern.ch
|
||||
|
||||
G4bool G4VPartonStringModel::EnergyAndMomentumCorrector(G4KineticTrackVector* Output, G4LorentzVector& TotalCollisionMom)
|
||||
{
|
||||
const int nAttemptScale = 500;
|
||||
const double ErrLimit = 1.E-5;
|
||||
if (Output->isEmpty())
|
||||
return TRUE;
|
||||
G4LorentzVector SumMom;
|
||||
G4double SumMass = 0;
|
||||
G4double TotalCollisionMass = TotalCollisionMom.m();
|
||||
// Calculate sum hadron 4-momenta and summing hadron mass
|
||||
G4int cHadron;
|
||||
for(cHadron = 0; cHadron < Output->length(); cHadron++)
|
||||
{
|
||||
SumMom += Output->at(cHadron)->Get4Momentum();
|
||||
SumMass += Output->at(cHadron)->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
if (SumMass > TotalCollisionMass) return FALSE;
|
||||
SumMass = SumMom.m2();
|
||||
if (SumMass < 0) return FALSE;
|
||||
SumMass = sqrt(SumMass);
|
||||
|
||||
// Compute c.m.s. hadron velocity and boost KTV to hadron c.m.s.
|
||||
G4ThreeVector Beta = -SumMom.boostVector();
|
||||
Output->Boost(Beta);
|
||||
|
||||
// Scale total c.m.s. hadron energy (hadron system mass).
|
||||
// It should be equal interaction mass
|
||||
G4double Scale = 1;
|
||||
for(G4int cAttempt = 0; cAttempt < nAttemptScale; cAttempt++)
|
||||
{
|
||||
G4double Sum = 0;
|
||||
for(cHadron = 0; cHadron < Output->length(); cHadron++)
|
||||
{
|
||||
G4LorentzVector HadronMom = Output->at(cHadron)->Get4Momentum();
|
||||
HadronMom.setVect(Scale*HadronMom.vect());
|
||||
G4double E = sqrt(HadronMom.vect().mag2() + sqr(Output->at(cHadron)->GetDefinition()->GetPDGMass()));
|
||||
HadronMom.setE(E);
|
||||
Output->at(cHadron)->Set4Momentum(HadronMom);
|
||||
Sum += E;
|
||||
}
|
||||
Scale = TotalCollisionMass/Sum;
|
||||
if (Scale - 1 <= ErrLimit) goto LTRUE;
|
||||
}
|
||||
|
||||
cout << "G4VPartonStringModel::EnergyAndMomentumCorrector"<<endl;
|
||||
cout << " Increase number of attempts or increase ERRLIMIT"<<endl;
|
||||
|
||||
LTRUE:
|
||||
// Compute c.m.s. interaction velocity and KTV back boost
|
||||
Beta = TotalCollisionMom.boostVector();
|
||||
Output->Boost(Beta);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//***********************************************************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user