PYTHIA  8.317
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SubCollisionModel Class Referenceabstract

#include <HISubCollisionModel.h>

Inheritance diagram for SubCollisionModel:
BlackSubCollisionModel FluctuatingSubCollisionModel NaiveSubCollisionModel DoubleStrikmanSubCollisionModel LogNormalSubCollisionModel

Classes

struct  SigEst
 Internal class to report cross section estimates. More...
 
struct  SigmaCache
 Helper class to cache cross sections at low energy. More...
 

Public Member Functions

 SubCollisionModel (int nParm)
 
virtual ~SubCollisionModel ()
 Virtual destructor.
 
virtual bool init (int idAIn, int idBIn, double eCMIn)
 Virtual init method. More...
 
void initPtr (NucleusModel &projIn, NucleusModel &targIn, SigmaTotal &sigTotIn, Settings &settingsIn, Info &infoIn, Rndm &rndmIn)
 Initialize the pointers.
 
void initLowEnergy (SigmaCombined *sigmaCombPtrIn)
 Initialize low energy treatment.
 
bool hasXSec () const
 
double sigTot () const
 The target total nucleon-nucleon cross section. More...
 
double sigEl () const
 The target elastic cross section.
 
double sigCDE () const
 The target central diffractive excitation cross section.
 
double sigSDE () const
 The target single diffractive excitation cross section (both sides).
 
double sigSDEP () const
 The target single diffractive excitation cross section (projectile).
 
double sigSDET () const
 The target single diffractive excitation cross section (target).
 
double sigDDE () const
 The target double diffractive excitation cross section.
 
double sigND () const
 The target non-diffractive (absorptive) cross section.
 
double sigLow () const
 The Low-energy cross sections.
 
double sigLExc () const
 The Low-energy excitation cross section (code 157).
 
double sigLAnn () const
 The Low-energy annihilation cross section (code 158).
 
double sigLRes () const
 The Low-energy resonant cross section (code 159).
 
double bSlope () const
 The target elastic b-slope parameter.
 
double avNDB () const
 Return the average non-diffractive impact parameter.
 
void updateSig (int idAIn, int idBIn, double eCMIn)
 Update internally stored cross sections. More...
 
double Chi2 (const SigEst &sigs, int npar) const
 Calculate the Chi2 for the given cross section estimates. More...
 
bool setKinematics (double eCMIn)
 Set beam kinematics. More...
 
bool setIDA (int idA)
 Set projectile particle.
 
bool evolve (int nGenerations, double eCM, int idANow)
 Use a genetic algorithm to fit the parameters. More...
 
int nParms () const
 Get the number of free parameters for the model.
 
void setParm (const vector< double > &parmIn)
 Set the parameters of this model.
 
vector< double > getParm () const
 Get the current parameters of this model.
 
virtual vector< double > minParm () const =0
 Get the minimum allowed parameter values for this model.
 
virtual vector< double > defParm () const =0
 Get the default parameter values for this model.
 
virtual vector< double > maxParm () const =0
 Get the maximum allowed parameter values for this model.
 
virtual void generateNucleonStates (Nucleus &, Nucleus &)
 
virtual SubCollisionSet getCollisions (Nucleus &proj, Nucleus &targ)=0
 
virtual SigEst getSig () const =0
 Calculate the cross sections for the given set of parameters.
 

Static Public Member Functions

static shared_ptr< SubCollisionModelcreate (int model)
 Create a new SubCollisionModel of the given model. More...
 

Protected Attributes

vector< double > sigTarg
 
vector< double > sigErr
 
vector< vector< double > > sigTargNN
 
vector< double > parmSave
 Saved parameters.
 
int NInt
 
int NPop
 
double sigFuzz
 
double impactFudge
 
bool fitPrint
 
double eCMlow
 
double avNDb
 
double avNDolap
 
NucleusModelprojPtr = {}
 Info from the controlling HeavyIons object.
 
NucleusModeltargPtr = {}
 
SigmaTotalsigTotPtr = {}
 
SigmaCombinedsigCmbPtr = {}
 
SettingssettingsPtr = {}
 
InfoinfoPtr = {}
 
RndmrndmPtr = {}
 
LoggerloggerPtr = {}
 
ParticleDataparticleDataPtr = {}
 
int idASave
 For variable energies.
 
int idBSave
 
bool doVarECM
 
bool doVarBeams
 
double eMin
 
double eMax
 
double eSave
 
int eCMPts
 
vector< int > idAList
 The list of particles that have been fitted.
 
vector< LogInterpolator > * subCollParmsPtr
 
map< int, vector< LogInterpolator > > subCollParmsMap
 Mapping id -> interpolator, one entry for each particle.
 
int elasticMode
 
double elasticFudge
 
SigmaCache lowEnergyCache
 

Detailed Description

The SubCollisionModel is is able to model the collision between two nucleons to tell which type of collision has occurred. The model may manipulate the corresponding state of the nucleons.

Constructor & Destructor Documentation

SubCollisionModel ( int  nParm)
inline

The default constructor is empty. The avNDb has units femtometer.

Member Function Documentation

double Chi2 ( const SigEst se,
int  npar 
) const

Calculate the Chi2 for the given cross section estimates.

Calculate the Chi^2 for the cross section that model in a subclass tries to model.

shared_ptr< SubCollisionModel > create ( int  model)
static

Create a new SubCollisionModel of the given model.

The SubCollisionModel base class for modeling the collision between two nucleons to tell which type of collision has occurred. The model may manipulate the corresponding state of the nucleons.

bool evolve ( int  nGenerations,
double  eCM,
int  idANow 
)

Use a genetic algorithm to fit the parameters.

A simple genetic algorithm for fitting the parameters in a subclass to reproduce desired cross sections.

We're going to use a home-made genetic algorithm. We start by creating a population of random parameter points.

Population of parameter sets. The most accurate sets will propagate to the next generation.

Now we evolve our population for a number of generations.

Calculate Chi2 for each parameter set and order them.

Keep the best one, and move the other closer to a better one or kill them if they are too bad.

Kill this individual and create a new one.

Pick one of the better parameter sets and move this closer.

Update resulting parameter set.

If the user has deemed the Chi2 too high, continue fitting.

Output information.

Done.

virtual void generateNucleonStates ( Nucleus ,
Nucleus  
)
inlinevirtual

Generate possible states for the nucleons in the projectile and target nuclei.

Reimplemented in FluctuatingSubCollisionModel.

virtual SubCollisionSet getCollisions ( Nucleus proj,
Nucleus targ 
)
pure virtual

Take two nuclei and produce the corresponding subcollisions. The states of the nucleons may be changed if fluctuations are allowed by the model.

Implemented in FluctuatingSubCollisionModel, NaiveSubCollisionModel, and BlackSubCollisionModel.

bool init ( int  idAIn,
int  idBIn,
double  eCMIn 
)
virtual

Virtual init method.

Initialize the base class. Subclasses should consider calling this in overriding functions.

Store input.

Read basic settings.

If there are parameters, no further initialization is necessary.

First try to load configuration from file, if requested.

If parameters were not loaded, generate from scratch.

Set parameters at the correct kinematics.

Set initial avNDb

Save parameters to disk, if requested.

Done.

Reimplemented in FluctuatingSubCollisionModel.

bool setKinematics ( double  eCMIn)

Set beam kinematics.

Update the parameters to the interpolated value at the given eCM.

double sigTot ( ) const
inline

The target total nucleon-nucleon cross section.

Access the nucleon-nucleon cross sections assumed for this model.

void updateSig ( int  idAIn,
int  idBIn,
double  eCMIn 
)

Update internally stored cross sections.

Update internally stored cross sections, which in Angantyr should have units of femtometer^2.

Loop over both protons and neutrons.

Total.

Non-diffractive.

Doubly diffractive.

Diffractive (and wounded) projectile.

Diffractive (and wounded) target.

Central diffractive.

Elastic.

b-slope not used for low energy.

Low energy excitation.

Low energy annihilation.

Low energy resonance.

preliminarily set average ND impact parameter as if black disk.

Member Data Documentation

double avNDb
protected

The estimated average impact parameter distance (in femtometer) for absorptive collisions.

double elasticFudge
protected

Add in elastic NN scatterings to get the generated inelastic AA cross section better described.

int elasticMode
protected

Generation of elastic NN scatterings is turned on by default, even if the cross section comes out wrong.

int NInt
protected

The parameters steering the fitting of internal parameters to the different nucleon-nucleon cross sections.

vector<double> sigTarg
protected

The nucleon-nucleon cross sections targets for this model (tot, nd, dd, sdp, sdt, cd, el, bslope) and the required precision.

vector<LogInterpolator>* subCollParmsPtr
protected

A vector of interpolators for the current particle. Each entry corresponds to one parameter, each interpolator is over the energy range.


The documentation for this class was generated from the following files: