PYTHIA  8.311
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...
 

Public Member Functions

 SubCollisionModel (int nParm)
 The default constructor is empty.
 
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.
 
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 bSlope () const
 The target elastic b-slope parameter.
 
double avNDB () const
 Return the average non-diffractive impact parameter.
 
void updateSig ()
 Update internally stored cross sections. More...
 
double Chi2 (const SigEst &sigs, int npar) const
 Calculate the Chi2 for the given cross section estimates. More...
 
void setKinematics (double eCMIn)
 Set beam kinematics. More...
 
bool evolve (int nGenerations, double eCM)
 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 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 > parmSave
 Saved parameters.
 
int NInt
 
int NPop
 
double sigFuzz
 
double impactFudge
 
bool fitPrint
 
double avNDb
 
NucleusModelprojPtr
 Info from the controlling HeavyIons object.
 
NucleusModeltargPtr
 
SigmaTotalsigTotPtr
 
SettingssettingsPtr
 
InfoinfoPtr
 
RndmrndmPtr
 
LoggerloggerPtr
 
int idASave
 For variable energies.
 
int idBSave
 
bool doVarECM
 
double eMin {}
 
double eMax {}
 
int eCMPts
 
vector< LogInterpolatorsubCollParms
 

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.

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 corresponing state of the nucleons.

bool evolve ( int  nGenerations,
double  eCM 
)

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.

Output information.

Done.

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.

void 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 ( )

Update internally stored cross sections.

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.

int NInt
protected

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


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