Import Geant4 6.0.0 source tree
This commit is contained in:
+335
@@ -0,0 +1,335 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4DiffractiveExcitation.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
// ---------------- 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() << G4endl;
|
||||
|
||||
// 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!! " << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
toCms.rotateZ(-1*Ptmp.phi());
|
||||
toCms.rotateY(-1*Ptmp.theta());
|
||||
|
||||
// G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
|
||||
// G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
|
||||
|
||||
|
||||
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
|
||||
// G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl;
|
||||
// G4cout << "Ptarget aft boost : " << Ptarget << G4endl;
|
||||
// G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl;
|
||||
|
||||
// G4cout << " Projectile Xplus / Xminus : " <<
|
||||
// Pprojectile.plus() << " / " << Pprojectile.minus() << G4endl;
|
||||
// G4cout << " Target Xplus / Xminus : " <<
|
||||
// Ptarget.plus() << " / " << Ptarget.minus() << G4endl;
|
||||
|
||||
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 << G4endl;
|
||||
if (whilecount > 1000 )
|
||||
{
|
||||
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
|
||||
// G4cout << "G4DiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
|
||||
return false; // Ignore this interaction
|
||||
}
|
||||
Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
|
||||
|
||||
// G4cout << "generated Pt " << Qmomentum << G4endl;
|
||||
// G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl;
|
||||
// G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl;
|
||||
|
||||
// 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 << G4endl;
|
||||
// G4cout << " X-minus " << Xminus << G4endl;
|
||||
|
||||
G4double pt2=G4ThreeVector(Qmomentum.vect()).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<<G4endl;
|
||||
// G4cout << "pt2" << pt2 << G4endl;
|
||||
// G4cout << "Qmomentum " << Qmomentum << G4endl;
|
||||
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
|
||||
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
|
||||
|
||||
} while ( (Pprojectile+Qmomentum).mag2() <= Mprojectile2 ||
|
||||
(Ptarget-Qmomentum).mag2() <= Mtarget2 );
|
||||
|
||||
Pprojectile += Qmomentum;
|
||||
Ptarget -= Qmomentum;
|
||||
|
||||
// G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
|
||||
// G4cout << "Ptarget with Q : " << Ptarget << G4endl;
|
||||
|
||||
|
||||
|
||||
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
|
||||
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
|
||||
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
|
||||
// G4cout << "Target mass " << Ptarget.mag() << G4endl;
|
||||
|
||||
target->Set4Momentum(Ptarget);
|
||||
//
|
||||
|
||||
|
||||
// G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
G4ExcitedString * G4DiffractiveExcitation::
|
||||
String(G4VSplitableHadron * hadron, G4bool isProjectile) const
|
||||
{
|
||||
hadron->SplitUp();
|
||||
G4Parton *start= hadron->GetNextParton();
|
||||
if ( start==NULL)
|
||||
{ G4cout << " G4FTFModel::String() Error:No start parton found"<< G4endl;
|
||||
return NULL;
|
||||
}
|
||||
G4Parton *end = hadron->GetNextParton();
|
||||
if ( end==NULL)
|
||||
{ G4cout << " G4FTFModel::String() Error:No end parton found"<< G4endl;
|
||||
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( std::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 " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl;
|
||||
G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< G4endl;
|
||||
G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl;
|
||||
G4cout << " sum of ends " << Pstart+Pend << G4endl;
|
||||
G4cout << " Original " << hadron->Get4Momentum() << G4endl;
|
||||
#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 << G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation::ChooseX : Invalid arguments ");
|
||||
}
|
||||
|
||||
G4double x;
|
||||
do {
|
||||
x=Xmin + G4UniformRand() * range;
|
||||
} while ( Xmin/x < G4UniformRand() );
|
||||
|
||||
//debug-hpw cout << "DiffractiveX "<<x<<G4endl;
|
||||
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 &)
|
||||
:
|
||||
widthOfPtSquare(0) , minExtraMass(0),
|
||||
minmass(0)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation copy contructor not meant to be called");
|
||||
}
|
||||
|
||||
|
||||
G4DiffractiveExcitation::~G4DiffractiveExcitation()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4DiffractiveExcitation & G4DiffractiveExcitation::operator=(const G4DiffractiveExcitation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation = operator meant to be called");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4DiffractiveExcitation::operator==(const G4DiffractiveExcitation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation == operator meant to be called");
|
||||
return false;
|
||||
}
|
||||
|
||||
int G4DiffractiveExcitation::operator!=(const G4DiffractiveExcitation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4DiffractiveExcitation != operator meant to be called");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4EventGenerator.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// G4EventGenerator
|
||||
#include "G4EventGenerator.hh"
|
||||
|
||||
G4EventGenerator::G4EventGenerator()
|
||||
{
|
||||
SetMinEnergy (0 *GeV);
|
||||
SetMaxEnergy (0 *GeV);
|
||||
}
|
||||
|
||||
G4EventGenerator::G4EventGenerator(const G4EventGenerator &) : G4HadronicInteraction()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4EventGenerator::~G4EventGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4EventGenerator & G4EventGenerator::operator=(const G4EventGenerator &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4EventGenerator::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4EventGenerator::operator==(const G4EventGenerator &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4EventGenerator::operator!=(const G4EventGenerator &) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4InteractionContent.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ---------------- G4InteractionContent----------------
|
||||
// by Gunter Folger, June 1998.
|
||||
// class for a storing two colliding particles in PartonString Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4InteractionContent.hh"
|
||||
|
||||
G4InteractionContent::G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant)
|
||||
: theNumberOfHard(0), theNumberOfSoft(0)
|
||||
{
|
||||
theProjectile=aPrimaryParticipant;
|
||||
}
|
||||
|
||||
G4InteractionContent::G4InteractionContent(const G4InteractionContent &)
|
||||
: 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 &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4InteractionContent::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
+313
@@ -0,0 +1,313 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4PomeronCrossSection.cc,v 1.1 2003/10/07 11:26:00 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-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 * )
|
||||
{
|
||||
InitForNucleon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4Neutron * )
|
||||
{
|
||||
InitForNucleon();
|
||||
}
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionPlus * )
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionMinus * )
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4PionZero * )
|
||||
{
|
||||
InitForPion();
|
||||
}
|
||||
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonPlus * )
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonMinus * )
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZero * )
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZeroLong * )
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4KaonZeroShort * )
|
||||
{
|
||||
InitForKaon();
|
||||
}
|
||||
G4PomeronCrossSection::G4PomeronCrossSection(const G4Gamma * )
|
||||
{
|
||||
InitForGamma();
|
||||
}
|
||||
|
||||
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_S= 2.7*GeV*GeV;
|
||||
// pomeron_Gamma= 2.16/GeV/GeV;
|
||||
// pomeron_Gamma= 3.96/GeV/GeV;
|
||||
pomeron_Gamma= (2.6+3.96)/GeV/GeV;
|
||||
pomeron_C= 1.4;
|
||||
pomeron_Rsquare= 3.56/GeV/GeV;
|
||||
// pomeron_Alpha= 1.0808;
|
||||
pomeron_Alpha= 0.9808;
|
||||
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;
|
||||
}
|
||||
|
||||
void G4PomeronCrossSection::InitForGamma()
|
||||
{
|
||||
pomeron_S= 1.7*GeV*GeV;
|
||||
// pomeron_Gamma= 1.42/GeV/GeV;
|
||||
pomeron_Gamma= 2.07/GeV/GeV;
|
||||
pomeron_C= 1.7;
|
||||
pomeron_Rsquare= 2.16/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);
|
||||
}
|
||||
|
||||
//*************************************************************************************************
|
||||
+275
@@ -0,0 +1,275 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4SingleDiffractiveExcitation.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
// ---------------- 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() << G4endl;
|
||||
|
||||
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" << G4endl;
|
||||
Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
|
||||
} else {
|
||||
// cout << " Target fix" << G4endl;
|
||||
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!! " << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
toCms.rotateZ(-1*Ptmp.phi());
|
||||
toCms.rotateY(-1*Ptmp.theta());
|
||||
|
||||
// G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
|
||||
// G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
|
||||
|
||||
|
||||
|
||||
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 << G4endl;
|
||||
if (whilecount > 1000 )
|
||||
{
|
||||
Qmomentum=G4LorentzVector(0.,0.,0.,0.);
|
||||
// G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
|
||||
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.vect()).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<<G4endl;
|
||||
// G4cout << "pt2 " << pt2 << G4endl;
|
||||
// G4cout << "Qmomentum " << Qmomentum << G4endl;
|
||||
// G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
|
||||
// " / " << (Ptarget-Qmomentum).mag() << G4endl;
|
||||
|
||||
} 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() << G4endl;
|
||||
// G4cout << "Ptarget.e() : " << Ptarget.e() << G4endl;
|
||||
|
||||
// G4cout << "end event_______________________________________________"<<G4endl;
|
||||
//
|
||||
|
||||
|
||||
// G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
|
||||
// G4cout << "Ptarget with Q : " << Ptarget << G4endl;
|
||||
// G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
|
||||
// G4cout << "Target back: " << toLab * Ptarget << G4endl;
|
||||
|
||||
// Transform back and update SplitableHadron Participant.
|
||||
Pprojectile.transform(toLab);
|
||||
Ptarget.transform(toLab);
|
||||
|
||||
// G4cout << "Target mass " << Ptarget.mag() << G4endl;
|
||||
// G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
|
||||
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 << G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation::ChooseX : Invalid arguments ");
|
||||
}
|
||||
|
||||
G4double x;
|
||||
do {
|
||||
x=Xmin + G4UniformRand() * range;
|
||||
} while ( Xmin/x < G4UniformRand() );
|
||||
|
||||
// cout << "DiffractiveX "<<x<<G4endl;
|
||||
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 &)
|
||||
: G4DiffractiveExcitation(),
|
||||
widthOfPtSquare(0) , minExtraMass(0),
|
||||
minmass(0)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation copy contructor not meant to be called");
|
||||
}
|
||||
|
||||
|
||||
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4SingleDiffractiveExcitation & G4SingleDiffractiveExcitation::operator=(const G4SingleDiffractiveExcitation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation = operator meant to be called");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4SingleDiffractiveExcitation::operator==(const G4SingleDiffractiveExcitation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation == operator meant to be called");
|
||||
return false;
|
||||
}
|
||||
|
||||
int G4SingleDiffractiveExcitation::operator!=(const G4SingleDiffractiveExcitation &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4SingleDiffractiveExcitation != operator meant to be called");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: G4StringModel.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// G4StringModel
|
||||
#include "G4StringModel.hh"
|
||||
|
||||
G4StringModel::G4StringModel()
|
||||
{
|
||||
the3DNucleus=NULL;
|
||||
theStringFragmentationModel=NULL;
|
||||
theGenerator=NULL;
|
||||
}
|
||||
|
||||
G4StringModel::G4StringModel(const G4StringModel &) : G4VHighEnergyGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4StringModel::~G4StringModel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4StringModel & G4StringModel::operator=(const G4StringModel &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4StringModel::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4StringModel::operator==(const G4StringModel &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4StringModel::operator!=(const G4StringModel &) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VParticipants.cc,v 1.1 2003/10/07 11:26:00 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ---------------- G4VParticipants ----------------
|
||||
// by Gunter Folger, May 1998.
|
||||
// abstract class finding participants in a hadron Nucleus collision
|
||||
// in Parton String Models.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VParticipants.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
G4VParticipants::G4VParticipants() : theNucleus(NULL)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
G4VParticipants::~G4VParticipants()
|
||||
{
|
||||
// G4cout << "G4VParticipants::~G4VParticipants()" << G4endl;
|
||||
if ( theNucleus != NULL ) delete theNucleus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VPartonStringModel.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
//// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ---------------- G4VPartonStringModel ----------------
|
||||
// by Gunter Folger, May 1998.
|
||||
// abstract class for all Parton String Models
|
||||
// ------------------------------------------------------------
|
||||
|
||||
|
||||
#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 &) : G4VHighEnergyGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
G4VPartonStringModel::~G4VPartonStringModel()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4VPartonStringModel & G4VPartonStringModel::operator=(const G4VPartonStringModel &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4VPartonStringModel::operator==(const G4VPartonStringModel &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4VPartonStringModel::operator!=(const G4VPartonStringModel &) 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 )
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VPartonStringModel::Scatter(): fails to generate strings");
|
||||
}
|
||||
|
||||
theThis->Init(theNucleus,thePrimary);
|
||||
strings = GetStrings();
|
||||
}
|
||||
|
||||
G4KineticTrackVector * theResult = 0;
|
||||
G4double stringEnergy(0);
|
||||
for ( unsigned int astring=0; astring < strings->size(); astring++)
|
||||
{
|
||||
// rotate string to lab frame, models have it aligned to z
|
||||
stringEnergy += (*strings)[astring]->GetLeftParton()->Get4Momentum().t();
|
||||
stringEnergy += (*strings)[astring]->GetRightParton()->Get4Momentum().t();
|
||||
(*strings)[astring]->LorentzRotate(toLab);
|
||||
}
|
||||
// G4cout << "Total string energy = "<<stringEnergy<<G4endl;
|
||||
|
||||
theResult = stringFragmentationModel->FragmentStrings(strings);
|
||||
std::for_each(strings->begin(), strings->end(), DeleteString() );
|
||||
delete strings;
|
||||
|
||||
return theResult;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VSplitableHadron.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
//
|
||||
// ---------------- G4VSplitableHadron----------------
|
||||
// by Gunter Folger, June 1998.
|
||||
// class storing an interacting particle. Used by Parton String Models.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4VSplitableHadron.hh"
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4VKineticNucleon.hh"
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron()
|
||||
: theDefinition(NULL), theCollisionCount(0), isSplit(false)
|
||||
{
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4ReactionProduct & aPrimary)
|
||||
: theCollisionCount(0), isSplit(false)
|
||||
{
|
||||
theDefinition=aPrimary.GetDefinition();
|
||||
the4Momentum.setVect(aPrimary.GetMomentum());
|
||||
the4Momentum.setE(aPrimary.GetTotalEnergy());
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4Nucleon & aNucleon)
|
||||
{
|
||||
theCollisionCount=0;
|
||||
isSplit = false;
|
||||
theDefinition=aNucleon.GetParticleType();
|
||||
the4Momentum=aNucleon.GetMomentum();
|
||||
thePosition=aNucleon.GetPosition();
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4VKineticNucleon * aNucleon)
|
||||
{
|
||||
theCollisionCount=0;
|
||||
isSplit = false;
|
||||
theDefinition=aNucleon->GetDefinition();
|
||||
the4Momentum=aNucleon->Get4Momentum();
|
||||
thePosition=aNucleon->GetPosition();
|
||||
}
|
||||
|
||||
G4VSplitableHadron::G4VSplitableHadron(const G4VSplitableHadron &right)
|
||||
{
|
||||
theCollisionCount=0;
|
||||
isSplit = false;
|
||||
theDefinition= right.GetDefinition();
|
||||
the4Momentum= right.Get4Momentum();
|
||||
thePosition= right.GetPosition();
|
||||
}
|
||||
|
||||
|
||||
G4VSplitableHadron::~G4VSplitableHadron()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4VSplitableHadron & G4VSplitableHadron::operator=(const G4VSplitableHadron &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VSplitableHadron::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4VSplitableHadron::operator==(const G4VSplitableHadron &right) const
|
||||
{
|
||||
return this==&right;
|
||||
}
|
||||
|
||||
int G4VSplitableHadron::operator!=(const G4VSplitableHadron &right) const
|
||||
{
|
||||
return this!=&right;
|
||||
}
|
||||
|
||||
|
||||
void G4VSplitableHadron::SplitUp()
|
||||
{
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: G4VStringFragmentation.cc,v 1.2 2003/11/03 17:54:53 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
//
|
||||
// G4VStringFragmentation
|
||||
#include "G4VStringFragmentation.hh"
|
||||
|
||||
G4VStringFragmentation::G4VStringFragmentation()
|
||||
{
|
||||
}
|
||||
|
||||
G4VStringFragmentation::G4VStringFragmentation(const G4VStringFragmentation &)
|
||||
{
|
||||
}
|
||||
|
||||
G4VStringFragmentation::~G4VStringFragmentation()
|
||||
{
|
||||
}
|
||||
|
||||
const G4VStringFragmentation & G4VStringFragmentation::operator=(const G4VStringFragmentation &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VStringFragmentation::operator= meant to not be accessable");
|
||||
return *this;
|
||||
}
|
||||
|
||||
int G4VStringFragmentation::operator==(const G4VStringFragmentation &) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int G4VStringFragmentation::operator!=(const G4VStringFragmentation &) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user