Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
@@ -1,11 +1,11 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4DiffractiveExcitation.hh,v 1.2 1999/04/12 15:45:54 hpw Exp $
// $Id: G4DiffractiveExcitation.hh,v 1.3.4.1 1999/12/07 20:51:51 gunter Exp $
#ifndef G4DiffractiveExcitation_h
#define G4DiffractiveExcitation_h 1
@@ -32,10 +32,10 @@ class G4DiffractiveExcitation
public:
G4DiffractiveExcitation(G4double sigmaPt=0.6*GeV, G4double minExtraMass=250*MeV,G4double x0mass=250*MeV);
~G4DiffractiveExcitation();
virtual ~G4DiffractiveExcitation();
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
virtual G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
virtual G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const;
// void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
// void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4EventGenerator.hh,v 1.1 1999/01/07 16:12:13 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EventGenerator.hh,v 1.1.10.1 1999/12/07 20:51:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4EventGenerator_h
#define G4EventGenerator_h 1
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4InteractionCode.hh,v 1.1 1999/01/07 16:12:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4InteractionCode.hh,v 1.1.10.1 1999/12/07 20:51:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4InteractionCode_h
#define G4InteractionCode_h 1
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4InteractionContent.hh,v 1.1 1999/01/07 16:12:14 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4InteractionContent.hh,v 1.1.10.1 1999/12/07 20:51:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4InteractionContent_h
@@ -1,14 +1,14 @@
#ifndef G4PomeronCrossSection_h
#define G4PomeronCrossSection_h 1
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PomeronCrossSection.hh,v 1.2 1999/04/12 15:45:54 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PomeronCrossSection.hh,v 1.2.8.1 1999/12/07 20:51:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4Proton.hh"
#include "G4Neutron.hh"
@@ -0,0 +1,63 @@
// 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: G4SingleDiffractiveExcitation.hh,v 1.1.4.1 1999/12/07 20:51:51 gunter Exp $
#ifndef G4SingleDiffractiveExcitation_h
#define G4SingleDiffractiveExcitation_h 1
// ------------------------------------------------------------
// GEANT 4 class header file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// ---------------- G4SingleDiffractiveExcitation --------------
// 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"
#include "G4DiffractiveExcitation.hh"
class G4SingleDiffractiveExcitation : public G4DiffractiveExcitation
{
public:
G4SingleDiffractiveExcitation(G4double sigmaPt=0.6*GeV, G4double minExtraMass=250*MeV,G4double x0mass=250*MeV);
~G4SingleDiffractiveExcitation();
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const;
// void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }
// void SetExtraMass(G4double aValue) { minExtraMass = aValue; }
// void SetMinimumMass(G4double aValue) { minmass = aValue; }
private:
G4SingleDiffractiveExcitation(const G4SingleDiffractiveExcitation &right);
G4double ChooseX(G4double Xmin, G4double Xmax) const;
G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
const G4SingleDiffractiveExcitation & operator=(const G4SingleDiffractiveExcitation &right);
int operator==(const G4SingleDiffractiveExcitation &right) const;
int operator!=(const G4SingleDiffractiveExcitation &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
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4StringModel.hh,v 1.2 1999/04/15 12:10:15 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4StringModel.hh,v 1.2.8.1 1999/12/07 20:51:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4StringModel_h
#define G4StringModel_h 1
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VParticipants.hh,v 1.1 1999/04/15 09:33:55 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VParticipants.hh,v 1.1.8.1 1999/12/07 20:51:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VParticipants_h
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VPartonStringModel.hh,v 1.2 1999/04/15 12:10:15 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VPartonStringModel.hh,v 1.2.8.1 1999/12/07 20:51:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VPartonStringModel_h
#define G4VPartonStringModel_h 1
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VSplitableHadron.hh,v 1.1 1999/05/06 13:52:59 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VSplitableHadron.hh,v 1.1.6.1.2.1 1999/12/07 20:51:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VSplitableHadron_h
@@ -31,7 +31,7 @@ class G4Nucleon;
class G4Parton;
class G4VKineticNucleon;
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4VSplitableHadron
{
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VStringFragmentation.hh,v 1.1 1999/05/06 13:53:00 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VStringFragmentation.hh,v 1.1.8.1 1999/12/07 20:51:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VStringFragmentation_h
#define G4VStringFragmentation_h 1
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VertexCode.hh,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VertexCode.hh,v 1.1.10.1 1999/12/07 20:51:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VertexCode_h
#define G4VertexCode_h 1
@@ -1,11 +1,11 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4DiffractiveExcitation.cc,v 1.4 1999/04/15 15:35:55 hpw Exp $
// $Id: G4DiffractiveExcitation.cc,v 1.5.4.1 1999/12/07 20:51:53 gunter Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
@@ -230,9 +230,9 @@ G4ExcitedString * G4DiffractiveExcitation::
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 << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << endl;
G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< endl;
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< endl;
G4cout << " sum of ends " << Pstart+Pend << endl;
G4cout << " Original " << hadron->Get4Momentum() << endl;
#endif
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4EventGenerator.cc,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4EventGenerator.cc,v 1.1.10.1 1999/12/07 20:51:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// G4EventGenerator
#include "G4EventGenerator.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4InteractionContent.cc,v 1.1 1999/01/07 16:12:15 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4InteractionContent.cc,v 1.1.10.1 1999/12/07 20:51:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4PomeronCrossSection.cc,v 1.2 1999/04/12 15:45:57 hpw Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PomeronCrossSection.cc,v 1.2.8.1 1999/12/07 20:51:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4PomeronCrossSection.hh"
@@ -0,0 +1,261 @@
// 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: G4SingleDiffractiveExcitation.cc,v 1.3.4.1 1999/12/07 20:51:54 gunter Exp $
// ------------------------------------------------------------
// GEANT 4 class implemetation file
//
// For information related to this code contact:
// CERN, CN Division, ASD group
// ---------------- G4SingleDiffractiveExcitation --------------
// 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 "G4SingleDiffractiveExcitation.hh"
#include "G4LorentzRotation.hh"
#include "G4ThreeVector.hh"
#include "G4ParticleDefinition.hh"
#include "G4VSplitableHadron.hh"
#include "G4ExcitedString.hh"
//#include "G4ios.hh"
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(G4double sigmaPt, G4double minextraMass,G4double x0mass)
:
widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
minmass(x0mass)
{
}
G4bool G4SingleDiffractiveExcitation::
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;
G4bool KeepProjectile= G4UniformRand() > 0.5;
// reset the min.mass of the non diffractive particle to its value, ( minus a bit for rounding...)
if ( KeepProjectile )
{
// cout << " Projectile fix" << endl;
Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
} else {
// cout << " Target fix" << endl;
Mtarget2=sqr(target->GetDefinition()->GetPDGMass() * (1-perCent) );
}
// 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);
G4LorentzVector Qmomentum;
G4int whilecount=0;
do {
// Generate pt
G4double maxPtSquare=sqr(Ptarget.pz());
if (whilecount++ >= 500 && (whilecount%100)==0)
// G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants possibly looping"
// << ", loop count/ maxPtSquare : "
// << whilecount << " / " << maxPtSquare << endl;
if (whilecount > 1000 )
{
Qmomentum=0;
// G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants: Aborting loop!" << endl;
return false; // Ignore this interaction
}
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
// Momentum transfer
G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
G4double Xmax=1.;
G4double Xplus =ChooseX(Xmin,Xmax);
G4double Xminus=ChooseX(Xmin,Xmax);
G4double pt2=G4ThreeVector(Qmomentum).mag2();
G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
G4double Qminus= pt2 / Xplus /Pprojectile.plus();
if ( KeepProjectile )
{
Qminus = (sqr(projectile->GetDefinition()->GetPDGMass()) + pt2 )
/ (Pprojectile.plus() + Qplus )
- Pprojectile.minus();
} else
{
Qplus = Ptarget.plus()
- (sqr(target->GetDefinition()->GetPDGMass()) + pt2 )
/ (Ptarget.minus() - Qminus );
}
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 ( (Ptarget-Qmomentum).mag2() <= Mtarget2
|| (Pprojectile+Qmomentum).mag2() <= Mprojectile2
|| (Ptarget-Qmomentum).e() < 0.
|| (Pprojectile+Qmomentum).e() < 0. );
G4double Ecms=Pprojectile.e() + Ptarget.e();
Pprojectile += Qmomentum;
Ptarget -= Qmomentum;
// G4cout << "Pprojectile.e() : " << Pprojectile.e() << endl;
// G4cout << "Ptarget.e() : " << Ptarget.e() << endl;
// G4cout << "end event_______________________________________________"<<endl;
//
// 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;
// G4cout << "Projectile mass " << Pprojectile.mag() << endl;
target->Set4Momentum(Ptarget);
projectile->Set4Momentum(Pprojectile);
return true;
}
// --------- private methods ----------------------
G4double G4SingleDiffractiveExcitation::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("G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
}
G4double x;
do {
x=Xmin + G4UniformRand() * range;
} while ( Xmin/x < G4UniformRand() );
// cout << "DiffractiveX "<<x<<endl;
return x;
}
G4ThreeVector G4SingleDiffractiveExcitation::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.);
}
G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation(const G4SingleDiffractiveExcitation &right)
:
widthOfPtSquare(0) , minExtraMass(0),
minmass(0)
{
G4Exception("G4SingleDiffractiveExcitation copy contructor not meant to be called");
}
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
{
}
const G4SingleDiffractiveExcitation & G4SingleDiffractiveExcitation::operator=(const G4SingleDiffractiveExcitation &right)
{
G4Exception("G4SingleDiffractiveExcitation = operator meant to be called");
return *this;
}
int G4SingleDiffractiveExcitation::operator==(const G4SingleDiffractiveExcitation &right) const
{
G4Exception("G4SingleDiffractiveExcitation == operator meant to be called");
return false;
}
int G4SingleDiffractiveExcitation::operator!=(const G4SingleDiffractiveExcitation &right) const
{
G4Exception("G4SingleDiffractiveExcitation != operator meant to be called");
return true;
}
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4StringModel.cc,v 1.1 1999/01/07 16:12:16 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4StringModel.cc,v 1.1.10.1 1999/12/07 20:51:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// G4StringModel
#include "G4StringModel.hh"
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VParticipants.cc,v 1.1 1999/04/15 09:33:38 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VParticipants.cc,v 1.1.8.1 1999/12/07 20:51:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VPartonStringModel.cc,v 1.2 1999/04/15 09:32:43 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VPartonStringModel.cc,v 1.4.4.1 1999/12/07 20:51:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -95,6 +95,7 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
for ( G4int astring=0; astring < strings->entries(); astring++)
{
// rotate string to lab frame, models have it aligned to z
strings->at(astring)->LorentzRotate(toLab);
KTsum+= strings->at(astring)->Get4Momentum();
@@ -108,7 +109,13 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
// G4cout << "Parton Right " << strings->at(astring)->GetRightParton()->Get4Momentum() << endl;
// G4cout << " code " << strings->at(astring)->GetRightParton()->GetPDGcode()<< endl;
generatedKineticTracks=stringFragmentationModel->FragmentString(*strings->at(astring));
if ( strings->at(astring)->IsExcited() )
{
generatedKineticTracks=stringFragmentationModel->FragmentString(*strings->at(astring));
} else {
generatedKineticTracks = new G4KineticTrackVector;
generatedKineticTracks->insert(strings->at(astring)->GetKineticTrack());
}
// G4cout <<" number of generated tracks : " << generatedKineticTracks->entries() << endl;
@@ -146,7 +153,7 @@ G4KineticTrackVector * G4VPartonStringModel::Scatter(const G4Nucleus &theNucleus
// G4cout << " KTsum Momentum " << KTsum << endl;
// G4cout << " KTsum Mass " << KTsum.mag() << endl;
if ( abs( KTsum1.e() - strings->at(astring)->Get4Momentum().e() ) > 1. * MeV )
if ( abs((KTsum1.e()-strings->at(astring)->Get4Momentum().e()) / KTsum1.e()) > perMillion )
{
NeedEnergyCorrector=true;
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VSplitableHadron.cc,v 1.1 1999/05/06 13:53:00 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VSplitableHadron.cc,v 1.1.8.1 1999/12/07 20:51:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// ------------------------------------------------------------
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// 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: G4VStringFragmentation.cc,v 1.1 1999/05/06 13:53:01 stesting Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VStringFragmentation.cc,v 1.1.8.1 1999/12/07 20:51:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// G4VStringFragmentation
#include "G4VStringFragmentation.hh"