Import Geant4 9.2.0 source tree
This commit is contained in:
+561
-288
File diff suppressed because it is too large
Load Diff
+8
-1
@@ -29,6 +29,7 @@
|
||||
#include "G4LundStringFragmentation.hh"
|
||||
#include "G4KineticTrack.hh"
|
||||
#include "G4DiffractiveSplitableHadron.hh"
|
||||
#include "G4FTFParameters.hh" // Uzhi 21.04.08
|
||||
|
||||
G4DiffractiveHHScatterer::G4DiffractiveHHScatterer()
|
||||
:
|
||||
@@ -36,6 +37,7 @@ G4DiffractiveHHScatterer::G4DiffractiveHHScatterer()
|
||||
theStringFragmentation(new G4LundStringFragmentation())
|
||||
{}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
G4KineticTrackVector * G4DiffractiveHHScatterer::
|
||||
Scatter(const G4KineticTrack & aTrack, const G4KineticTrack & bTrack)
|
||||
{
|
||||
@@ -43,7 +45,12 @@ Scatter(const G4KineticTrack & aTrack, const G4KineticTrack & bTrack)
|
||||
|
||||
G4DiffractiveSplitableHadron aHadron(& aTrack);
|
||||
G4DiffractiveSplitableHadron bHadron(& bTrack);
|
||||
if ( ! theExcitation->ExciteParticipants(& aHadron, & bHadron))
|
||||
theParameters = new G4FTFParameters(aHadron.GetDefinition(), // -------- Uzhi 21.04.08
|
||||
1.,1., 100.);
|
||||
//s);// ------------------------- Uzhi 21.04.08
|
||||
if ( ! theExcitation->ExciteParticipants(& aHadron,
|
||||
& bHadron,
|
||||
theParameters)) // -------- Uzhi 21.04.08
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DiffractiveSplitableHadron.cc,v 1.6 2006/06/29 20:54:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4DiffractiveSplitableHadron.cc,v 1.7 2008/03/31 15:34:01 vuzhinsk Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
+286
@@ -0,0 +1,286 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ElasticHNScattering.cc,v 1.3 2008/05/19 12:56:36 vuzhinsk Exp $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implemetation file
|
||||
//
|
||||
// ---------------- G4ElasticHNScattering --------------
|
||||
// by V. Uzhinsky, March 2008.
|
||||
// elastic scattering used by Fritiof model
|
||||
// Take a projectile and a target
|
||||
// scatter the projectile and target
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
#include "G4ElasticHNScattering.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VSplitableHadron.hh"
|
||||
#include "G4ExcitedString.hh"
|
||||
#include "G4FTFParameters.hh" // Uzhi 29.03.08
|
||||
//#include "G4ios.hh"
|
||||
|
||||
G4ElasticHNScattering::G4ElasticHNScattering()
|
||||
{
|
||||
}
|
||||
|
||||
G4bool G4ElasticHNScattering::
|
||||
ElasticScattering (G4VSplitableHadron *projectile,
|
||||
G4VSplitableHadron *target,
|
||||
G4FTFParameters *theParameters) const
|
||||
{
|
||||
//G4cout<<"G4ElasticHNScattering::ElasticScattering"<<G4endl;
|
||||
|
||||
G4LorentzVector Pprojectile=projectile->Get4Momentum();
|
||||
|
||||
// -------------------- Projectile parameters -----------------------------------
|
||||
G4bool PutOnMassShell=0;
|
||||
|
||||
G4double M0projectile = Pprojectile.mag();
|
||||
|
||||
if(M0projectile < projectile->GetDefinition()->GetPDGMass())
|
||||
{
|
||||
PutOnMassShell=1;
|
||||
M0projectile=projectile->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
|
||||
G4double Mprojectile2 = M0projectile * M0projectile;
|
||||
|
||||
// G4double AveragePt2=theParameters->GetSlope(); // Uzhi ???
|
||||
// AveragePt2 = AveragePt2 * GeV*GeV;
|
||||
|
||||
G4double AveragePt2=theParameters->GetAvaragePt2ofElasticScattering();
|
||||
|
||||
// -------------------- Target parameters ----------------------------------------------
|
||||
G4LorentzVector Ptarget=target->Get4Momentum();
|
||||
|
||||
G4double M0target = Ptarget.mag();
|
||||
//G4cout<<" Mp Mt Pt2 "<<M0projectile<<" "<<M0target<<" "<<AveragePt2/GeV/GeV<<G4endl;
|
||||
|
||||
if(M0target < target->GetDefinition()->GetPDGMass())
|
||||
{
|
||||
PutOnMassShell=1;
|
||||
M0target=target->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
|
||||
G4double Mtarget2 = M0target * M0target; //Ptarget.mag2();
|
||||
// for AA-inter.
|
||||
// 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. ) // Uzhi ???
|
||||
{
|
||||
// "String" moving backwards in CMS, abort collision !!
|
||||
//G4cout << " abort Collision!! " << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
toCms.rotateZ(-1*Ptmp.phi());
|
||||
toCms.rotateY(-1*Ptmp.theta());
|
||||
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
|
||||
Pprojectile.transform(toCms);
|
||||
Ptarget.transform(toCms);
|
||||
|
||||
// ---------------------- Sampling of transfered Pt ------------------------
|
||||
G4double Pt2;
|
||||
G4double ProjMassT2, ProjMassT;
|
||||
G4double TargMassT2, TargMassT;
|
||||
G4double PZcms2, PZcms;
|
||||
|
||||
G4double S=Psum.mag2();
|
||||
// G4double SqrtS=std::sqrt(S);
|
||||
|
||||
PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2-
|
||||
2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S;
|
||||
if(PZcms2 < 0)
|
||||
{return false;} // It can be in an interaction with off-shell nuclear nucleon
|
||||
|
||||
PZcms = std::sqrt(PZcms2);
|
||||
|
||||
if(PutOnMassShell)
|
||||
{
|
||||
if(Pprojectile.z() > 0.)
|
||||
{
|
||||
Pprojectile.setPz( PZcms);
|
||||
Ptarget.setPz( -PZcms);
|
||||
}
|
||||
else
|
||||
{
|
||||
Pprojectile.setPz(-PZcms);
|
||||
Ptarget.setPz( PZcms);
|
||||
};
|
||||
|
||||
Pprojectile.setE(std::sqrt(Mprojectile2+
|
||||
Pprojectile.x()*Pprojectile.x()+
|
||||
Pprojectile.y()*Pprojectile.y()+
|
||||
PZcms2));
|
||||
Ptarget.setE(std::sqrt( Mtarget2 +
|
||||
Ptarget.x()*Ptarget.x()+
|
||||
Ptarget.y()*Ptarget.y()+
|
||||
PZcms2));
|
||||
}
|
||||
|
||||
G4double maxPtSquare = PZcms2;
|
||||
G4LorentzVector Qmomentum;
|
||||
|
||||
Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0);
|
||||
|
||||
Pt2=G4ThreeVector(Qmomentum.vect()).mag2();
|
||||
//G4cout<<"Pt2 GeV^2 "<<(Pt2)/GeV/GeV<<G4endl;
|
||||
|
||||
ProjMassT2=Mprojectile2+Pt2;
|
||||
ProjMassT =std::sqrt(ProjMassT2);
|
||||
|
||||
TargMassT2=Mtarget2+Pt2;
|
||||
TargMassT =std::sqrt(TargMassT2);
|
||||
|
||||
PZcms2=(S*S+ProjMassT2*ProjMassT2+
|
||||
TargMassT2*TargMassT2-
|
||||
2.*S*ProjMassT2-2.*S*TargMassT2-
|
||||
2.*ProjMassT2*TargMassT2)/4./S;
|
||||
if(PZcms2 < 0 ) {PZcms2=0;};
|
||||
PZcms =std::sqrt(PZcms2);
|
||||
|
||||
Pprojectile.setPz( PZcms); // Uzhi Proj can move backward
|
||||
Ptarget.setPz( -PZcms); // Uzhi Proj can move backward
|
||||
|
||||
//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;
|
||||
|
||||
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 << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl;
|
||||
//G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl;
|
||||
|
||||
//G4cout << "Target mass " << Ptarget.mag() << G4endl;
|
||||
|
||||
//G4cout << "Projectile mass " << Pprojectile.mag() << G4endl;
|
||||
|
||||
G4double ZcoordinateOfCurrentInteraction = target->GetPosition().z();
|
||||
// It is assumed that nucleon z-coordinates are ordered on increasing -----------
|
||||
|
||||
G4double betta_z=projectile->Get4Momentum().pz()/projectile->Get4Momentum().e();
|
||||
|
||||
G4double ZcoordinateOfPreviousCollision=projectile->GetPosition().z();
|
||||
if(projectile->GetSoftCollisionCount()==0) {
|
||||
projectile->SetTimeOfCreation(0.);
|
||||
target->SetTimeOfCreation(0.);
|
||||
ZcoordinateOfPreviousCollision=ZcoordinateOfCurrentInteraction;
|
||||
}
|
||||
|
||||
G4ThreeVector thePosition(projectile->GetPosition().x(),
|
||||
projectile->GetPosition().y(),
|
||||
ZcoordinateOfCurrentInteraction);
|
||||
projectile->SetPosition(thePosition);
|
||||
|
||||
G4double TimeOfPreviousCollision=projectile->GetTimeOfCreation();
|
||||
G4double TimeOfCurrentCollision=TimeOfPreviousCollision+
|
||||
(ZcoordinateOfCurrentInteraction-ZcoordinateOfPreviousCollision)/betta_z;
|
||||
|
||||
projectile->SetTimeOfCreation(TimeOfCurrentCollision);
|
||||
target->SetTimeOfCreation(TimeOfCurrentCollision);
|
||||
|
||||
projectile->Set4Momentum(Pprojectile);
|
||||
target->Set4Momentum(Ptarget);
|
||||
|
||||
projectile->IncrementCollisionCount(1);
|
||||
target->IncrementCollisionCount(1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// --------- private methods ----------------------
|
||||
|
||||
G4ThreeVector G4ElasticHNScattering::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
|
||||
{ // @@ this method is used in FTFModel as well. Should go somewhere common!
|
||||
|
||||
G4double Pt2;
|
||||
Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() *
|
||||
(std::exp(-maxPtSquare/AveragePt2)-1.));
|
||||
|
||||
G4double Pt=std::sqrt(Pt2);
|
||||
G4double phi=G4UniformRand() * twopi;
|
||||
|
||||
return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.);
|
||||
}
|
||||
|
||||
G4ElasticHNScattering::G4ElasticHNScattering(const G4ElasticHNScattering &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ElasticHNScattering copy contructor not meant to be called");
|
||||
}
|
||||
|
||||
|
||||
G4ElasticHNScattering::~G4ElasticHNScattering()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
const G4ElasticHNScattering & G4ElasticHNScattering::operator=(const G4ElasticHNScattering &)
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ElasticHNScattering = operator meant to be called");
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int G4ElasticHNScattering::operator==(const G4ElasticHNScattering &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ElasticHNScattering == operator meant to be called");
|
||||
return false;
|
||||
}
|
||||
|
||||
int G4ElasticHNScattering::operator!=(const G4ElasticHNScattering &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4ElasticHNScattering != operator meant to be called");
|
||||
return true;
|
||||
}
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FTFModel.cc,v 1.7 2007/04/24 10:32:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4FTFModel.cc,v 1.13 2008/12/09 10:40:52 vuzhinsk Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
|
||||
// ------------------------------------------------------------
|
||||
@@ -37,20 +37,25 @@
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4FTFModel.hh"
|
||||
#include "G4FTFParameters.hh" // Uzhi 29.03.08
|
||||
#include "G4FTFParticipants.hh"
|
||||
#include "G4InteractionContent.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <utility> // Uzhi 29.03.08
|
||||
|
||||
// Class G4FTFModel
|
||||
|
||||
G4FTFModel::G4FTFModel():theExcitation(new G4DiffractiveExcitation()) // Uzhi
|
||||
G4FTFModel::G4FTFModel():theExcitation(new G4DiffractiveExcitation()),
|
||||
theElastic(new G4ElasticHNScattering()) // Uzhi 29.03.08
|
||||
{
|
||||
G4VPartonStringModel::SetThisPointer(this);
|
||||
theParameters=0; // Uzhi 9.12.08
|
||||
}
|
||||
|
||||
G4FTFModel::G4FTFModel(G4double a, G4double b, G4double c):theExcitation(new G4DiffractiveExcitation())
|
||||
/*
|
||||
G4FTFModel::G4FTFModel(G4double , G4double , G4double ):theExcitation(new // Uzhi 9.12.08 G4DiffractiveExcitation())
|
||||
{
|
||||
G4VPartonStringModel::SetThisPointer(this);
|
||||
}
|
||||
@@ -61,11 +66,18 @@ theExcitation(anExcitation)
|
||||
{
|
||||
G4VPartonStringModel::SetThisPointer(this);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
G4FTFModel::~G4FTFModel()
|
||||
{}
|
||||
{
|
||||
if( theParameters != 0 ) delete theParameters; // Uzhi 5.12.08
|
||||
// Because FTF model can be called for various particles
|
||||
// theParameters must be erased at the end of each call.
|
||||
// Thus the delete is olso in G4FTFModel::GetStrings() method
|
||||
if( theExcitation != 0 ) delete theExcitation; // Uzhi 5.12.08
|
||||
if( theElastic != 0 ) delete theElastic; // Uzhi 5.12.08
|
||||
}
|
||||
|
||||
|
||||
const G4FTFModel & G4FTFModel::operator=(const G4FTFModel &)
|
||||
@@ -85,29 +97,123 @@ int G4FTFModel::operator!=(const G4FTFModel &right) const
|
||||
return this!=&right;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
void G4FTFModel::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile)
|
||||
{
|
||||
theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ()); // Uzhi N-mass number Z-charge
|
||||
|
||||
theProjectile = aProjectile;
|
||||
//G4cout<<"G4FTFModel::Init "<<aNucleus.GetN()<<" "<<aNucleus.GetZ()<<G4endl;
|
||||
theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ());
|
||||
// Uzhi N-mass number Z-charge ------------------------- Uzhi 29.03.08
|
||||
|
||||
// --- cms energy
|
||||
|
||||
G4double s = sqr( theProjectile.GetMass() ) +
|
||||
sqr( G4Proton::Proton()->GetPDGMass() ) +
|
||||
2*theProjectile.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass();
|
||||
/*
|
||||
G4cout << " primary Total E (GeV): " << theProjectile.GetTotalEnergy()/GeV << G4endl;
|
||||
G4cout << " primary Mass (GeV): " << theProjectile.GetMass() /GeV << G4endl;
|
||||
G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl;
|
||||
*/
|
||||
|
||||
if( theParameters != 0 ) delete theParameters; // Uzhi 9.12.08
|
||||
theParameters = new G4FTFParameters(theProjectile.GetDefinition(),
|
||||
aNucleus.GetN(),aNucleus.GetZ(),
|
||||
s);// ------------------------- Uzhi 19.04.08
|
||||
//theParameters->SetProbabilityOfElasticScatt(0.); // To turn on/off (1/0) elastic scattering
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
G4ExcitedStringVector * G4FTFModel::GetStrings()
|
||||
{
|
||||
theParticipants.BuildInteractions(theProjectile);
|
||||
|
||||
//G4cout<<"theParticipants.GetList"<<G4endl;
|
||||
theParticipants.GetList(theProjectile,theParameters);
|
||||
//G4cout<<"ExciteParticipants()"<<G4endl;
|
||||
if (! ExciteParticipants()) return NULL;;
|
||||
|
||||
//G4cout<<"theStrings = BuildStrings()"<<G4endl;
|
||||
G4ExcitedStringVector * theStrings = BuildStrings();
|
||||
|
||||
//G4cout<<"Return to theStrings "<<G4endl;
|
||||
if( theParameters != 0 ) // Uzhi 9.12.08
|
||||
{ // Uzhi 9.12.08
|
||||
delete theParameters; // Uzhi 9.12.08
|
||||
theParameters=0; // Uzhi 9.12.08
|
||||
} // Uzhi 9.12.08
|
||||
return theStrings;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------
|
||||
struct DeleteVSplitableHadron { void operator()(G4VSplitableHadron * aH){delete aH;} };
|
||||
|
||||
// ------------------------------------------------------------
|
||||
G4bool G4FTFModel::ExciteParticipants()
|
||||
{
|
||||
/* // Uzhi 29.03.08 For elastic Scatt.
|
||||
G4cout<<" In ExciteParticipants() "<<theParticipants.theInteractions.size()<<G4endl;
|
||||
G4cout<<" test Params Tot "<<theParameters->GetTotalCrossSection()<<G4endl;
|
||||
G4cout<<" test Params Ela "<<theParameters->GetElasticCrossSection()<<G4endl;
|
||||
|
||||
G4int counter=0;
|
||||
*/ // Uzhi 29.03.08
|
||||
|
||||
|
||||
|
||||
while (theParticipants.Next())
|
||||
{
|
||||
const G4InteractionContent & collision=theParticipants.GetInteraction();
|
||||
/*
|
||||
counter++;
|
||||
G4cout<<" Inter # "<<counter<<G4endl;
|
||||
*/
|
||||
G4VSplitableHadron * projectile=collision.GetProjectile();
|
||||
G4VSplitableHadron * target=collision.GetTarget();
|
||||
|
||||
// // Uzhi 29.03.08
|
||||
G4bool Successfull;
|
||||
if(G4UniformRand()< theParameters->GetProbabilityOfElasticScatt())
|
||||
{
|
||||
//G4cout<<"Elastic"<<G4endl;
|
||||
Successfull=theElastic->ElasticScattering(projectile, target, theParameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
//G4cout<<"Inelastic"<<G4endl;
|
||||
Successfull=theExcitation->ExciteParticipants(projectile, target, theParameters);
|
||||
}
|
||||
// if(!Successfull)
|
||||
// // Uzhi 29.03.08
|
||||
|
||||
// if ( ! theExcitation->ExciteParticipants(projectile, target) )
|
||||
if(!Successfull)
|
||||
{
|
||||
// give up, clean up
|
||||
std::vector<G4VSplitableHadron *> primaries;
|
||||
std::vector<G4VSplitableHadron *> targets;
|
||||
theParticipants.StartLoop(); // restart a loop
|
||||
while ( theParticipants.Next() )
|
||||
{
|
||||
const G4InteractionContent & interaction=theParticipants.GetInteraction();
|
||||
// do not allow for duplicates ...
|
||||
if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
|
||||
interaction.GetProjectile()) )
|
||||
primaries.push_back(interaction.GetProjectile());
|
||||
|
||||
if ( targets.end() == std::find(targets.begin(), targets.end(),
|
||||
interaction.GetTarget()) )
|
||||
targets.push_back(interaction.GetTarget());
|
||||
}
|
||||
std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
|
||||
primaries.clear();
|
||||
std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron());
|
||||
targets.clear();
|
||||
|
||||
return false;
|
||||
} // End of the loop Uzhi
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// ------------------------------------------------------------
|
||||
G4ExcitedStringVector * G4FTFModel::BuildStrings()
|
||||
{
|
||||
|
||||
// Loop over all collisions; find all primaries, and all target ( targets may
|
||||
// be duplicate in the List ( to unique G4VSplitableHadrons)
|
||||
|
||||
@@ -122,26 +228,33 @@ G4ExcitedStringVector * G4FTFModel::BuildStrings()
|
||||
{
|
||||
const G4InteractionContent & interaction=theParticipants.GetInteraction();
|
||||
// do not allow for duplicates ...
|
||||
if ( primaries.end() == std::find(primaries.begin(), primaries.end(), interaction.GetProjectile()) )
|
||||
if ( primaries.end() == std::find(primaries.begin(), primaries.end(),
|
||||
interaction.GetProjectile()) )
|
||||
primaries.push_back(interaction.GetProjectile());
|
||||
|
||||
if ( targets.end() == std::find(targets.begin(), targets.end(),interaction.GetTarget()) )
|
||||
if ( targets.end() == std::find(targets.begin(), targets.end(),
|
||||
interaction.GetTarget()) )
|
||||
targets.push_back(interaction.GetTarget());
|
||||
}
|
||||
|
||||
|
||||
// G4cout << "BuildStrings prim/targ " << primaries.entries() << " , " <<
|
||||
// targets.entries() << G4endl;
|
||||
|
||||
// G4cout << "BuildStrings prim/targ " << primaries.size() << " , " <<
|
||||
// targets.size() << G4endl;
|
||||
|
||||
unsigned int ahadron;
|
||||
// Only for hA-interactions Uzhi -------------------------------------
|
||||
for ( ahadron=0; ahadron < primaries.size() ; ahadron++)
|
||||
{
|
||||
//G4ThreeVector aPosition=primaries[ahadron]->GetPosition();
|
||||
//G4cout<<"Proj Build "<<aPosition<<" "<<primaries[ahadron]->GetTimeOfCreation()<<G4endl;
|
||||
G4bool isProjectile=true;
|
||||
strings->push_back(theExcitation->String(primaries[ahadron], isProjectile));
|
||||
}
|
||||
|
||||
for ( ahadron=0; ahadron < targets.size() ; ahadron++)
|
||||
{
|
||||
//G4ThreeVector aPosition=targets[ahadron]->GetPosition();
|
||||
//G4cout<<"Targ Build "<<aPosition<<" "<<targets[ahadron]->GetTimeOfCreation()<<G4endl;
|
||||
G4bool isProjectile=false;
|
||||
strings->push_back(theExcitation->String(targets[ahadron], isProjectile));
|
||||
}
|
||||
@@ -153,42 +266,4 @@ G4ExcitedStringVector * G4FTFModel::BuildStrings()
|
||||
|
||||
return strings;
|
||||
}
|
||||
|
||||
G4bool G4FTFModel::ExciteParticipants()
|
||||
{
|
||||
|
||||
while (theParticipants.Next())
|
||||
{
|
||||
const G4InteractionContent & collision=theParticipants.GetInteraction();
|
||||
|
||||
//G4cout << " soft colls : " << collision.GetNumberOfSoftCollisions() << G4endl; // Uzhi no match
|
||||
G4VSplitableHadron * projectile=collision.GetProjectile();
|
||||
G4VSplitableHadron * target=collision.GetTarget();
|
||||
|
||||
if ( ! theExcitation->ExciteParticipants(projectile, target) )
|
||||
{
|
||||
// give up, clean up
|
||||
std::vector<G4VSplitableHadron *> primaries;
|
||||
std::vector<G4VSplitableHadron *> targets;
|
||||
theParticipants.StartLoop(); // restart a loop
|
||||
while ( theParticipants.Next() )
|
||||
{
|
||||
const G4InteractionContent & interaction=theParticipants.GetInteraction();
|
||||
// do not allow for duplicates ...
|
||||
if ( primaries.end() == std::find(primaries.begin(), primaries.end(), interaction.GetProjectile()) )
|
||||
primaries.push_back(interaction.GetProjectile());
|
||||
|
||||
if ( targets.end() == std::find(targets.begin(), targets.end(),interaction.GetTarget()) )
|
||||
targets.push_back(interaction.GetTarget());
|
||||
}
|
||||
std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron());
|
||||
primaries.clear();
|
||||
std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron());
|
||||
targets.clear();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * 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. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FTFParameters.cc,v 1.4 2008/12/18 13:02:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
|
||||
#include "G4FTFParameters.hh"
|
||||
|
||||
G4FTFParameters::G4FTFParameters()
|
||||
{;}
|
||||
|
||||
|
||||
G4FTFParameters::~G4FTFParameters()
|
||||
{;}
|
||||
//**********************************************************************************************
|
||||
|
||||
G4FTFParameters::G4FTFParameters(const G4ParticleDefinition * particle,
|
||||
G4double theA,
|
||||
G4double theZ,
|
||||
G4double s)
|
||||
{
|
||||
G4int PDGcode = particle->GetPDGEncoding();
|
||||
G4int absPDGcode = std::abs(PDGcode);
|
||||
G4double Elab = (s - 2*0.88*GeV*GeV)/(2*0.939*GeV)/GeV;
|
||||
G4double Plab = std::sqrt(Elab * Elab - 0.88);
|
||||
|
||||
G4double LogPlab = std::log( Plab );
|
||||
G4double sqrLogPlab = LogPlab * LogPlab;
|
||||
|
||||
//G4cout<<"G4FTFParameters Plab "<<Plab<<G4endl;
|
||||
|
||||
G4int NumberOfTargetProtons = (G4int) theZ;
|
||||
G4int NumberOfTargetNeutrons = (G4int) theA- (G4int) theZ;
|
||||
G4int NumberOfTargetNucleons = NumberOfTargetProtons + NumberOfTargetNeutrons;
|
||||
|
||||
G4double Xtotal, Xelastic;
|
||||
|
||||
if( absPDGcode > 1000 ) //------Projectile is baryon --------
|
||||
{
|
||||
G4double XtotPP = 48.0 + 0. *std::pow(Plab, 0. ) + 0.522*sqrLogPlab - 4.51*LogPlab;
|
||||
G4double XtotPN = 47.3 + 0. *std::pow(Plab, 0. ) + 0.513*sqrLogPlab - 4.27*LogPlab;
|
||||
|
||||
G4double XelPP = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
|
||||
G4double XelPN = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotPP +
|
||||
NumberOfTargetNeutrons * XtotPN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelPP +
|
||||
NumberOfTargetNeutrons * XelPN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else if( PDGcode == 211 ) //------Projectile is PionPlus -------
|
||||
{
|
||||
G4double XtotPiP = 16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab;
|
||||
G4double XtotPiN = 33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab;
|
||||
|
||||
G4double XelPiP = 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab;
|
||||
G4double XelPiN = 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotPiP +
|
||||
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelPiP +
|
||||
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else if( PDGcode == -211 ) //------Projectile is PionMinus -------
|
||||
{
|
||||
G4double XtotPiP = 33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab;
|
||||
G4double XtotPiN = 16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab;
|
||||
|
||||
G4double XelPiP = 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab;
|
||||
G4double XelPiN = 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotPiP +
|
||||
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelPiP +
|
||||
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
|
||||
else if( PDGcode == 111 ) //------Projectile is PionZero -------
|
||||
{
|
||||
G4double XtotPiP =(16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab + //Pi+
|
||||
33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab)/2; //Pi-
|
||||
|
||||
G4double XtotPiN =(33.0 + 14.0 *std::pow(Plab,-1.36) + 0.456*sqrLogPlab - 4.03*LogPlab + //Pi+
|
||||
16.4 + 19.3 *std::pow(Plab,-0.42) + 0.19 *sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
|
||||
|
||||
G4double XelPiP =( 0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab + //Pi+
|
||||
1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
|
||||
G4double XelPiN =( 1.76 + 11.2*std::pow(Plab,-0.64) + 0.043*sqrLogPlab - 0.0 *LogPlab + //Pi+
|
||||
0.0 + 11.4*std::pow(Plab,-0.40) + 0.079*sqrLogPlab - 0.0 *LogPlab)/2; //Pi-
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotPiP +
|
||||
NumberOfTargetNeutrons * XtotPiN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelPiP +
|
||||
NumberOfTargetNeutrons * XelPiN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else if( PDGcode == 321 ) //------Projectile is KaonPlus -------
|
||||
{
|
||||
G4double XtotKP = 18.1 + 0. *std::pow(Plab, 0. ) + 0.26 *sqrLogPlab - 1.0 *LogPlab;
|
||||
G4double XtotKN = 18.7 + 0. *std::pow(Plab, 0. ) + 0.21 *sqrLogPlab - 0.89*LogPlab;
|
||||
|
||||
G4double XelKP = 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab;
|
||||
G4double XelKN = 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotKP +
|
||||
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelKP +
|
||||
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else if( PDGcode ==-321 ) //------Projectile is KaonMinus ------
|
||||
{
|
||||
G4double XtotKP = 32.1 + 0. *std::pow(Plab, 0. ) + 0.66 *sqrLogPlab - 5.6 *LogPlab;
|
||||
G4double XtotKN = 25.2 + 0. *std::pow(Plab, 0. ) + 0.38 *sqrLogPlab - 2.9 *LogPlab;
|
||||
|
||||
G4double XelKP = 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab;
|
||||
G4double XelKN = 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotKP +
|
||||
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelKP +
|
||||
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else if( PDGcode == 311 ) //------Projectile is KaonZero ------
|
||||
{
|
||||
G4double XtotKP =( 18.1 + 0. *std::pow(Plab, 0. ) + 0.26 *sqrLogPlab - 1.0 *LogPlab + //K+
|
||||
32.1 + 0. *std::pow(Plab, 0. ) + 0.66 *sqrLogPlab - 5.6 *LogPlab)/2; //K-
|
||||
G4double XtotKN =( 18.7 + 0. *std::pow(Plab, 0. ) + 0.21 *sqrLogPlab - 0.89*LogPlab + //K+
|
||||
25.2 + 0. *std::pow(Plab, 0. ) + 0.38 *sqrLogPlab - 2.9 *LogPlab)/2; //K-
|
||||
|
||||
G4double XelKP =( 5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab + //K+
|
||||
7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab)/2; //K-
|
||||
G4double XelKN =( 7.3 + 0. *std::pow(Plab,-0. ) + 0.29 *sqrLogPlab - 2.4 *LogPlab + //K+
|
||||
5.0 + 8.1*std::pow(Plab,-1.8 ) + 0.16 *sqrLogPlab - 1.3 *LogPlab)/2; //K-
|
||||
Xtotal = ( NumberOfTargetProtons * XtotKP +
|
||||
NumberOfTargetNeutrons * XtotKN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelKP +
|
||||
NumberOfTargetNeutrons * XelKN ) / NumberOfTargetNucleons;
|
||||
}
|
||||
else //------Projectile is undefined, Nucleon assumed
|
||||
{
|
||||
G4double XtotPP = 48.0 + 0. *std::pow(Plab, 0. ) + 0.522*sqrLogPlab - 4.51*LogPlab;
|
||||
G4double XtotPN = 47.3 + 0. *std::pow(Plab, 0. ) + 0.513*sqrLogPlab - 4.27*LogPlab;
|
||||
|
||||
G4double XelPP = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
|
||||
G4double XelPN = 11.9 + 26.9*std::pow(Plab,-1.21) + 0.169*sqrLogPlab - 1.85*LogPlab;
|
||||
|
||||
Xtotal = ( NumberOfTargetProtons * XtotPP +
|
||||
NumberOfTargetNeutrons * XtotPN ) / NumberOfTargetNucleons;
|
||||
Xelastic = ( NumberOfTargetProtons * XelPP +
|
||||
NumberOfTargetNeutrons * XelPN ) / NumberOfTargetNucleons;
|
||||
};
|
||||
|
||||
// Xtotal and Xelastic in mb
|
||||
|
||||
//----------- Geometrical parameters ------------------------------------------------
|
||||
SetTotalCrossSection(Xtotal);
|
||||
SetElastisCrossSection(Xelastic);
|
||||
SetInelasticCrossSection(Xtotal-Xelastic);
|
||||
|
||||
// // Interactions with elastic ans inelastic collisions
|
||||
SetProbabilityOfElasticScatt(Xtotal, Xelastic);
|
||||
SetRadiusOfHNinteractions2(Xtotal/pi/10.);
|
||||
//
|
||||
/* //==== No elastic scattering ============================
|
||||
SetProbabilityOfElasticScatt(Xtotal, 0.);
|
||||
SetRadiusOfHNinteractions2((Xtotal-Xelastic)/pi/10.);
|
||||
*/ //=======================================================
|
||||
|
||||
//G4cout<<" Rnn "<<Xtotal/pi/10.<<" "<<Xtotal/pi/10.*fermi*fermi<<G4endl;
|
||||
//G4cout<<"G4FTFParameters Xt Xel MeV "<<Xtotal<<" "<<Xelastic<<" "<<GeV<<G4endl;
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
SetSlope( Xtotal*Xtotal/16./pi/Xelastic/0.3894 ); // Slope parameter of elastic scattering
|
||||
// (GeV/c)^(-2))
|
||||
//G4cout<<"G4FTFParameters Slope "<<GetSlope()<<G4endl;
|
||||
//-----------------------------------------------------------------------------------
|
||||
SetGamma0( GetSlope()*Xtotal/10./2./pi );
|
||||
|
||||
//----------- Parameters of elastic scattering --------------------------------------
|
||||
// Gaussian parametrization of
|
||||
// elastic scattering amplitude assumed
|
||||
SetAvaragePt2ofElasticScattering(1./(Xtotal*Xtotal/16./pi/Xelastic/0.3894)*GeV*GeV);
|
||||
|
||||
//----------- Parameters of excitations ---------------------------------------------
|
||||
if( absPDGcode > 1000 ) //------Projectile is baryon --------
|
||||
{
|
||||
SetProjMinDiffMass(1.1); // GeV
|
||||
SetProjMinNonDiffMass(1.1); // GeV
|
||||
SetProbabilityOfProjDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetTarMinDiffMass(1.1); // GeV
|
||||
SetTarMinNonDiffMass(1.1); // GeV
|
||||
SetProbabilityOfTarDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetAveragePt2(0.3); // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion -----------
|
||||
{
|
||||
SetProjMinDiffMass(0.5); // GeV
|
||||
SetProjMinNonDiffMass(0.3); // GeV
|
||||
SetProbabilityOfProjDiff(0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetTarMinDiffMass(1.1); // GeV
|
||||
SetTarMinNonDiffMass(1.1); // GeV
|
||||
SetProbabilityOfTarDiff(0.62*std::pow(s/GeV/GeV,-0.51)); // 40/32 X-dif/X-inel
|
||||
|
||||
/*
|
||||
SetProjMinDiffMass(0.5);
|
||||
SetProjMinNonDiffMass(0.3); // Uzhi 12.06.08
|
||||
SetProbabilityOfProjDiff(0.05);
|
||||
SetProbabilityOfTarDiff(0.05);
|
||||
*/
|
||||
SetAveragePt2(0.3); // GeV^2
|
||||
}
|
||||
else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon -----------
|
||||
{
|
||||
SetProjMinDiffMass(0.7); // GeV 1.1
|
||||
SetProjMinNonDiffMass(0.7); // GeV
|
||||
SetProbabilityOfProjDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetTarMinDiffMass(1.1); // GeV
|
||||
SetTarMinNonDiffMass(1.1); // GeV
|
||||
SetProbabilityOfTarDiff(0.85*std::pow(s/GeV/GeV,-0.5)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetAveragePt2(0.3); // GeV^2
|
||||
}
|
||||
else //------Projectile is undefined,
|
||||
//------Nucleon assumed
|
||||
{
|
||||
SetProjMinDiffMass((particle->GetPDGMass()+160.*MeV)/GeV);
|
||||
SetProjMinNonDiffMass((particle->GetPDGMass()+160.*MeV)/GeV);
|
||||
SetProbabilityOfProjDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetTarMinDiffMass(1.1); // GeV
|
||||
SetTarMinNonDiffMass(1.1); // GeV
|
||||
SetProbabilityOfTarDiff(0.95*std::pow(s/GeV/GeV,-0.35)); // 40/32 X-dif/X-inel
|
||||
|
||||
SetAveragePt2(0.3); // GeV^2
|
||||
};
|
||||
|
||||
|
||||
//G4cout<<"G4FTFParameters Out"<<G4endl;
|
||||
|
||||
}
|
||||
//**********************************************************************************************
|
||||
+20
-37
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4FTFParticipants.cc,v 1.7 2007/04/24 10:33:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4FTFParticipants.cc,v 1.9 2008/06/13 12:49:23 vuzhinsk Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -37,19 +37,15 @@
|
||||
// with original FRITIOF mode. November - December 2006.
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#include "G4FTFParameters.hh" // Uzhi 29.03.08
|
||||
#include "G4FTFParticipants.hh"
|
||||
#include "G4DiffractiveSplitableHadron.hh"
|
||||
#include "G4VSplitableHadron.hh"
|
||||
//#include "G4PomeronCrossSection.hh" // Uzhi
|
||||
#include "G4FTFCrossSection.hh" // Uzhi
|
||||
#include "Randomize.hh"
|
||||
#include <utility>
|
||||
|
||||
#include <utility> // Uzhi 29.03.08
|
||||
|
||||
// Class G4FTFParticipants
|
||||
|
||||
|
||||
|
||||
G4FTFParticipants::G4FTFParticipants()
|
||||
{
|
||||
}
|
||||
@@ -74,7 +70,8 @@ G4FTFParticipants::~G4FTFParticipants()
|
||||
//int G4FTFParticipants::operator!=(const G4FTFParticipants &right) const
|
||||
//{}
|
||||
|
||||
void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
||||
void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary,
|
||||
G4FTFParameters *theParameters) // Uzhi 29.03.08
|
||||
{
|
||||
|
||||
StartLoop(); // reset Loop over Interactions
|
||||
@@ -82,27 +79,13 @@ void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
||||
for(unsigned int i=0; i<theInteractions.size(); i++) delete theInteractions[i];
|
||||
theInteractions.clear();
|
||||
|
||||
// --- cms energy
|
||||
|
||||
G4double s = sqr( thePrimary.GetMass() ) +
|
||||
sqr( G4Proton::Proton()->GetPDGMass() ) +
|
||||
2*thePrimary.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass();
|
||||
|
||||
// G4cout << " primary Total E (GeV): " << thePrimary.GetTotalEnergy()/GeV << G4endl;
|
||||
// G4cout << " primary Mass (GeV): " << thePrimary.GetMass() /GeV << G4endl;
|
||||
// G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl;
|
||||
|
||||
// G4PomeronCrossSection theCrossSection(thePrimary.GetDefinition()); // Uzhi
|
||||
G4FTFCrossSection theCrossSection(thePrimary.GetDefinition(),s); // Uzhi
|
||||
|
||||
|
||||
G4double deltaxy=2 * fermi;
|
||||
G4double deltaxy=2 * fermi; // Extra nuclear radius
|
||||
|
||||
G4VSplitableHadron * primarySplitable=new G4DiffractiveSplitableHadron(thePrimary);
|
||||
|
||||
G4double xyradius;
|
||||
xyradius =theNucleus->GetOuterRadius() + deltaxy;
|
||||
|
||||
G4double xyradius;
|
||||
xyradius =theNucleus->GetOuterRadius() + deltaxy; // Impact parameter sampling
|
||||
// radius
|
||||
G4bool nucleusNeedsShift = true;
|
||||
|
||||
while ( theInteractions.size() == 0 )
|
||||
@@ -114,14 +97,18 @@ void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
||||
|
||||
theNucleus->StartLoop();
|
||||
G4Nucleon * nucleon;
|
||||
while ( (nucleon=theNucleus->GetNextNucleon()) )
|
||||
//G4int InterNumber=0; // Uzhi
|
||||
//while ( (nucleon=theNucleus->GetNextNucleon())&& (InterNumber < 1) ) // Uzhi
|
||||
while ( (nucleon=theNucleus->GetNextNucleon()) ) // Uzhi
|
||||
{
|
||||
G4double impact2= sqr(impactX - nucleon->GetPosition().x()) +
|
||||
sqr(impactY - nucleon->GetPosition().y());
|
||||
// if ( theCrossSection.GetInelasticProbability(s,impact2) // Uzhi
|
||||
if ( theCrossSection.GetInelasticProbability( impact2/fermi/fermi) // Uzhi
|
||||
sqr(impactY - nucleon->GetPosition().y());
|
||||
|
||||
// if ( theParameters->GetInelasticProbability(impact2/fermi/fermi) // Uzhi 29.03.08
|
||||
if ( theParameters->GetProbabilityOfInteraction(impact2/fermi/fermi) // Uzhi 29.03.08
|
||||
> G4UniformRand() )
|
||||
{
|
||||
//InterNumber++;
|
||||
if ( nucleusNeedsShift )
|
||||
{ // on the first hit, shift nucleus
|
||||
nucleusNeedsShift = false;
|
||||
@@ -135,7 +122,8 @@ void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
||||
targetSplitable= new G4DiffractiveSplitableHadron(*nucleon);
|
||||
nucleon->Hit(targetSplitable);
|
||||
}
|
||||
G4InteractionContent * aInteraction = new G4InteractionContent(primarySplitable);
|
||||
G4InteractionContent * aInteraction =
|
||||
new G4InteractionContent(primarySplitable);
|
||||
aInteraction->SetTarget(targetSplitable);
|
||||
theInteractions.push_back(aInteraction);
|
||||
}
|
||||
@@ -151,8 +139,3 @@ void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary)
|
||||
|
||||
|
||||
// Implementation (private) methods
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user