PYTHIA  8.313
HISubCollisionModel.h
1 // HISubCollisionModel.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2025 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // This file contains the definition of the ImpactParmeterGenerator,
7 // SubCollision, and SubCollisionModel classes, as well as a set of
8 // subclasses of SubCollisionModel.
9 //
10 // ImpactParameterGenerator: distributes nuclei in impact parameter space.
11 // SubCollision: a collision between a projectile and a target Nucleon.
12 // SubCollisionModel: Models the collision probabilities of nucleons.
13 // BlackSubCollisionModel: A very simple SubCollisionModel.
14 // NaiveSubCollisionModel: A very simple SubCollisionModel.
15 // DoubleStrikmanSubCollisionModel: A more advanced SubCollisionModel.
16 
17 #ifndef Pythia8_HISubCollisionModel_H
18 #define Pythia8_HISubCollisionModel_H
19 
20 #include "Pythia8/Pythia.h"
21 #include "Pythia8/HINucleusModel.h"
22 
23 namespace Pythia8 {
24 
25 //==========================================================================
26 
27 // SubCollision represents a possible collision between a projectile
28 // and a target nucleon.
29 
30 class SubCollision {
31 
32 public:
33 
34  // This defines the type of a binary nucleon collison.
36  NONE, // This is not a collision.
37  ELASTIC, // This is an elastic scattering
38  SDEP, // The projectile is diffractively excited.
39  SDET, // The target is diffractively excited.
40  DDE, // Both projectile and target are diffractively excited.
41  CDE, // Both excited but with central diffraction.
42  ABS // This is an absorptive (non-diffractive) collision.
43  };
44 
45  // Constructor with configuration.
46  SubCollision(Nucleon & projIn, Nucleon & targIn,
47  double bIn, double bpIn, CollisionType typeIn)
48  : proj(&projIn), targ(&targIn), b(bIn), bp(bpIn), type(typeIn),
49  failed(false) {}
50 
51  // Default constructor.
53  : proj(0), targ(0), b(0.0), bp(0.0), type(NONE) {}
54 
55  // Used to order sub-collisions in a set.
56  bool operator< (const SubCollision& s) const { return b < s.b; }
57 
58  // Return 0 if neither proj or target are neutrons, 1 if target is
59  // neutron, 2 if projectile is neutron, and 3 if both are neutrons.
60  int nucleons() const {return ( abs(targ->id()) == 2112? 1: 0 ) +
61  ( abs(proj->id()) == 2112? 2: 0 );}
62 
63  // The projectile nucleon.
65 
66  // The target nucleon.
68 
69  // The impact parameter distance between the nucleons in femtometer.
70  double b;
71 
72  // The impact parameter distance between the nucleons scaled like
73  // in Pythia to have unit average for non-diffractive collisions.
74  double bp;
75 
76  // The type of collision.
78 
79  // Whether the subcollision failed, i.e. has a failed excitation.
80  mutable bool failed;
81 
82 };
83 
84 //==========================================================================
85 
86 // The SubCollisionSet gives a set of subcollisions between two nuclei.
87 
89 
90 public:
91 
92  // Default constructor.
93  SubCollisionSet() = default;
94 
95  // Constructor with subcollisions.
96  SubCollisionSet(multiset<SubCollision> subCollisionsIn, double TIn,
97  double T12In = 0.0, double T21In = 0.0, double T22In = 0.0)
98  : subCollisionsSave(subCollisionsIn), TSave({TIn, T12In, T21In, T22In}) {}
99 
100  // Reset the subcollisions.
101  bool empty() const { return subCollisionsSave.empty(); }
102 
103  // The full elastic amplitude, optionally returning altenate states
104  // to gauge fluctuations.
105  double T(unsigned i = 0) const { return TSave[i]; }
106 
107  // Iterators over the subcollisions.
108  multiset<SubCollision>::const_iterator begin() const {
109  return subCollisionsSave.begin(); }
110  multiset<SubCollision>::const_iterator end() const {
111  return subCollisionsSave.end(); }
112 
113 private:
114 
115  // Saved subcollisions.
116  multiset<SubCollision> subCollisionsSave;
117 
118  // The full elastic amplitude together with alternate states gauging
119  // fluctuations.
120  vector<double> TSave = {};
121 
122 };
123 
124 //==========================================================================
125 
126 // The SubCollisionModel is is able to model the collision between two
127 // nucleons to tell which type of collision has occurred. The model
128 // may manipulate the corresponding state of the nucleons.
129 
131 
132 public:
133 
134  // Internal class to report cross section estimates.
135  struct SigEst {
136  // The cross sections (tot, nd, dd, sdp, sdt, cd, el, bslope).
137  vector<double> sig;
138 
139  // The estimated error (squared)
140  vector<double> dsig2;
141 
142  // Which cross sections were actually fitted
143  vector<bool> fsig;
144 
145  // The estimate of the average (and squared error) impact
146  // parameter for inelastic non-diffractive collisions.
147  double avNDb, davNDb2;
148 
149  // Constructor for zeros.
150  SigEst(): sig(8, 0.0), dsig2(8, 0.0), fsig(8, false),
151  avNDb(0.0), davNDb2(0.0) {}
152 
153  };
154 
155  // The default constructor is empty.
156  // The avNDb has units femtometer.
157  SubCollisionModel(int nParm): sigTarg(8, 0.0), sigErr(8, 0.05),
158  parmSave(nParm),
159  NInt(100000), NPop(20), sigFuzz(0.2), impactFudge(1),
160  fitPrint(true), avNDb(1.0),
161  projPtr(), targPtr(), sigTotPtr(), settingsPtr(), infoPtr(), rndmPtr() {}
162 
163  // Virtual destructor.
164  virtual ~SubCollisionModel() {}
165 
166  // Create a new SubCollisionModel of the given model.
167  static shared_ptr<SubCollisionModel> create(int model);
168 
169  // Virtual init method.
170  virtual bool init(int idAIn, int idBIn, double eCMIn);
171 
172  // Initialize the pointers.
173  void initPtr(NucleusModel & projIn, NucleusModel & targIn,
174  SigmaTotal & sigTotIn, Settings & settingsIn,
175  Info & infoIn, Rndm & rndmIn) {
176  projPtr = &projIn;
177  targPtr = &targIn;
178  sigTotPtr = &sigTotIn;
179  settingsPtr = &settingsIn;
180  infoPtr = &infoIn;
181  rndmPtr = &rndmIn;
182  loggerPtr = infoIn.loggerPtr;
183  }
184 
185  // Access the nucleon-nucleon cross sections assumed
186  // for this model.
187 
188  // The target total nucleon-nucleon cross section.
189  double sigTot() const { return sigTarg[0]; }
190 
191  // The target elastic cross section.
192  double sigEl() const { return sigTarg[6]; }
193 
194  // The target central diffractive excitation cross section.
195  double sigCDE() const { return sigTarg[5]; }
196 
197  // The target single diffractive excitation cross section (both sides).
198  double sigSDE() const { return sigTarg[3] + sigTarg[4]; }
199 
200  // The target single diffractive excitation cross section (projectile).
201  double sigSDEP() const { return sigTarg[3]; }
202 
203  // The target single diffractive excitation cross section (target).
204  double sigSDET() const { return sigTarg[4]; }
205 
206  // The target double diffractive excitation cross section.
207  double sigDDE() const { return sigTarg[2]; }
208 
209  // The target non-diffractive (absorptive) cross section.
210  double sigND() const { return sigTarg[1]; }
211 
212  // The target elastic b-slope parameter.
213  double bSlope() const { return sigTarg[7]; }
214 
215  // Return the average non-diffractive impact parameter.
216  double avNDB() const { return avNDb; }
217 
218  // Update internally stored cross sections.
219  void updateSig();
220 
221  // Calculate the Chi2 for the given cross section estimates.
222  double Chi2(const SigEst & sigs, int npar) const;
223 
224  // Set beam kinematics.
225  void setKinematics(double eCMIn);
226 
227  // Set projectile particle.
228  void setIDA(int idA);
229 
230  // Use a genetic algorithm to fit the parameters.
231  bool evolve(int nGenerations, double eCM, int idANow);
232 
233  // Get the number of free parameters for the model.
234  int nParms() const { return parmSave.size(); }
235 
236  // Set the parameters of this model.
237  void setParm(const vector<double>& parmIn) {
238  for (size_t i = 0; i < parmSave.size(); ++i)
239  parmSave[i] = parmIn[i];
240  }
241 
242  // Get the current parameters of this model.
243  vector<double> getParm() const { return parmSave; }
244 
245  // Get the minimum allowed parameter values for this model.
246  virtual vector<double> minParm() const = 0;
247 
248  // Get the default parameter values for this model.
249  virtual vector<double> defParm() const = 0;
250 
251  // Get the maximum allowed parameter values for this model.
252  virtual vector<double> maxParm() const = 0;
253 
254  // Take two nuclei and produce the corresponding subcollisions. The states
255  // of the nucleons may be changed if fluctuations are allowed by the model.
256  virtual SubCollisionSet getCollisions(Nucleus& proj, Nucleus& targ) = 0;
257 
258  // Calculate the cross sections for the given set of parameters.
259  virtual SigEst getSig() const = 0;
260 
261 private:
262 
263  // The nucleon-nucleon cross sections targets for this model
264  // (tot, nd, dd, sdp, sdt, cd, el, bslope) and the required precision.
265  vector<double> sigTarg, sigErr;
266 
267  // Generate parameters based on run settings and the evolutionary algorithm.
268  bool genParms();
269 
270  // Save/load parameter configuration to/from settings/disk.
271  bool saveParms(string fileName) const;
272  bool loadParms(string fileName);
273 
274 protected:
275 
276  // Saved parameters.
277  vector<double> parmSave;
278 
279  // The parameters stearing the fitting of internal parameters to
280  // the different nucleon-nucleon cross sections.
281  int NInt, NPop;
282  double sigFuzz;
283  double impactFudge;
284  bool fitPrint;
285 
286  // The estimated average impact parameter distance (in femtometer)
287  // for absorptive collisions.
288  double avNDb;
289 
290  // Info from the controlling HeavyIons object.
292  NucleusModel* targPtr;
293  SigmaTotal* sigTotPtr;
294  Settings* settingsPtr;
295  Info* infoPtr;
296  Rndm* rndmPtr;
297  Logger* loggerPtr;
298 
299  // For variable energies.
300  int idASave, idBSave;
301  bool doVarECM, doVarBeams;
302  double eMin, eMax, eSave;
303  int eCMPts;
304 
305  // The list of particles that have been fitted.
306  vector<int> idAList;
307 
308  // A vector of interpolators for the current particle. Each entry
309  // corresponds to one parameter, each interpolator is over the energy range.
310  vector<LogInterpolator> *subCollParms;
311 
312  // Mapping id -> interpolator, one entry for each particle.
313  map<int, vector<LogInterpolator>> subCollParmsMap;
314 
315 };
316 
317 //==========================================================================
318 
319 // The most naive sub-collision model, assuming static nucleons and
320 // an absorptive cross section equal to the total inelastic. No
321 // fluctuations, meaning no diffraction.
322 
324 
325 public:
326 
327  // The default constructor simply lists the nucleon-nucleon cross sections.
329 
330  // Virtual destructor.
331  virtual ~BlackSubCollisionModel() override {}
332 
333  // Get the minimum and maximum allowed parameter values for this model.
334  vector<double> minParm() const override { return vector<double>(); }
335  vector<double> defParm() const override { return vector<double>(); }
336  vector<double> maxParm() const override { return vector<double>(); }
337 
338  // Get cross sections used by this model.
339  virtual SigEst getSig() const override {
340  SigEst s;
341  s.sig[0] = 56.52;//sigTot();
342  s.sig[1] = sigND();
343  s.sig[6] = s.sig[0] - s.sig[1];
344  s.sig[7] = bSlope();
345  return s;
346  }
347 
348  // Take two nuclei and return the corresponding sub-collisions.
349  virtual SubCollisionSet getCollisions(Nucleus& proj, Nucleus& targ) override;
350 
351 };
352 
353 //==========================================================================
354 
355 // A very simple sub-collision model, assuming static nucleons and
356 // just assuring that the individual nucleon-nucleon cross sections
357 // are preserved.
358 
360 
361 public:
362 
363  // The default constructor simply lists the nucleon-nucleon cross sections.
365 
366  // Virtual destructor.
367  virtual ~NaiveSubCollisionModel() override {}
368 
369  // Get the minimum and maximum allowed parameter values for this model.
370  vector<double> minParm() const override { return vector<double>(); }
371  vector<double> defParm() const override { return vector<double>(); }
372  vector<double> maxParm() const override { return vector<double>(); }
373 
374  // Get cross sections used by this model.
375  virtual SigEst getSig() const override {
376  SigEst s;
377  s.sig[0] = sigTot();
378  s.sig[1] = sigND();
379  s.sig[3] = sigSDEP();
380  s.sig[4] = sigSDET();
381  s.sig[2] = sigDDE();
382  s.sig[6] = sigEl();
383  s.sig[7] = bSlope();
384  return s;
385  }
386 
387  // Take two nuclei and return the corresponding sub-collisions.
388  virtual SubCollisionSet getCollisions(Nucleus& proj, Nucleus& targ) override;
389 
390 };
391 
392 //==========================================================================
393 
394 // A base class for sub-collision models where each nucleon has a
395 // fluctuating "radius". The base model has two parameters, sigd and alpha,
396 // which are used for opacity calculations. Subclasses may have additional
397 // parameters to describe the radius distributions of that specific model.
398 
400 
401 public:
402 
403  // The default constructor simply lists the nucleon-nucleon cross sections.
404  FluctuatingSubCollisionModel(int nParmIn, int modein)
405  : SubCollisionModel(nParmIn + 2), opacityMode(modein),
406  sigd(parmSave[nParmIn]), alpha(parmSave[nParmIn + 1]) {}
407 
408 
409  // Virtual destructor.
410  virtual ~FluctuatingSubCollisionModel() override {}
411 
412  // Take two nuclei and pick specific states for each nucleon,
413  // then get the corresponding sub-collisions.
414  virtual SubCollisionSet getCollisions(Nucleus& proj, Nucleus& targ) override;
415 
416  // Calculate the cross sections for the given set of parameters.
417  virtual SigEst getSig() const override;
418 
419 protected:
420 
421  // Pick a radius for the nucleon, depending on the specific model.
422  virtual double pickRadiusProj() const = 0;
423  virtual double pickRadiusTarg() const = 0;
424 
425  // Optional mode for opacity.
427 
428 private:
429 
430  // Saturation scale of the nucleus.
431  double& sigd;
432 
433  // Power of the saturation scale
434  double& alpha;
435 
436  // The opacity of the collision at a given sigma.
437  double opacity(double sig) const {
438  sig /= sigd;
439  if ( opacityMode == 1 ) sig = 1.0/sig;
440  return sig > numeric_limits<double>::epsilon() ?
441  pow(-expm1(-1.0/sig), alpha) : 1.0;
442  }
443 
444  // Return the elastic amplitude for a projectile and target state
445  // and the impact parameter between the corresponding nucleons.
446  double Tpt(const Nucleon::State & p,
447  const Nucleon::State & t, double b) const {
448  double sig = M_PI*pow2(p[0] + t[0]);
449  double grey = opacity(sig);
450  return sig/grey > b*b*2.0*M_PI? grey: 0.0;
451  }
452 
453 };
454 
455 //==========================================================================
456 
457 // A sub-collision model where each nucleon has a fluctuating
458 // "radius" according to a Strikman-inspired distribution.
459 
461 
462 public:
463 
464  // The default constructor simply lists the nucleon-nucleon cross sections.
466  : FluctuatingSubCollisionModel(1, modeIn), k0(parmSave[0]) {}
467 
468  // Virtual destructor.
469  virtual ~DoubleStrikmanSubCollisionModel() override {}
470 
471  // Get the minimum and maximum allowed parameter values for this model.
472  vector<double> minParm() const override { return { 0.01, 1.0, 0.0 }; }
473  vector<double> defParm() const override { return { 2.15, 17.24, 0.33 }; }
474  vector<double> maxParm() const override {
475  return { 60.00, 60.0, (opacityMode == 0? 20.0: 2.0 ) }; }
476 
477 protected:
478 
479  double pickRadiusProj() const override { return rndmPtr->gamma(k0, r0()); }
480  double pickRadiusTarg() const override { return rndmPtr->gamma(k0, r0()); }
481 
482 private:
483 
484  // The power in the Gamma distribution.
485  double& k0;
486 
487  // Return the average radius deduced from other parameters and
488  // the total cross section.
489  double r0() const {
490  return sqrt(sigTot() / (M_PI * (2.0 * k0 + 4.0 * k0 * k0)));
491  }
492 
493 };
494 
495 //==========================================================================
496 
497 // ImpactParameterGenerator is able to generate a specific impact
498 // parameter together with a weight such that aweighted average over
499 // any quantity X(b) corresponds to the infinite integral over d^2b
500 // X(b). This base class gives a Gaussian profile, d^2b exp(-b^2/2w^2).
501 
503 
504 public:
505 
506  // The default constructor takes a general width (in femtometers) as
507  // argument.
508  ImpactParameterGenerator() = default;
509 
510  // Virtual destructor.
512 
513  // Virtual init method.
514  virtual bool init();
515  void initPtr(Info & infoIn, SubCollisionModel & collIn,
516  NucleusModel & projIn, NucleusModel & targIn);
517 
518  // Return a new impact parameter and set the corresponding weight provided.
519  virtual Vec4 generate(double & weight) const;
520 
521  // Return the scaling of the cross section used together with the
522  // weight in genrate() to obtain the cross section. This is by
523  // default 1 unless forceUnitWeight is specified.
524  virtual double xSecScale() const {
525  return forceUnitWeight? M_PI*pow2(width()*cut): 2.0*M_PI *pow2(width());
526  }
527 
528  // Set the width (in femtometers).
529  void width(double widthIn) { widthSave = widthIn; }
530 
531  // Get the width.
532  double width() const { return widthSave; }
533 
534  // Update width based on the associated subcollision and nucleus models.
535  void updateWidth();
536 
537 private:
538 
539  // The width of a distribution.
540  double widthSave = 0.0;
541 
542  // The the cut multiplied with widthSave to give the maximum allowed
543  // impact parameter.
544  double cut = 3.0;
545 
546  // Sample flat instead of with a Gaussian.
547  bool forceUnitWeight = false;
548 
549 protected:
550 
551  // Pointers from the controlling HeavyIons object.
552  Info* infoPtr{};
553  SubCollisionModel* collPtr{};
554  NucleusModel* projPtr{};
555  NucleusModel* targPtr{};
556  Settings* settingsPtr{};
557  Rndm* rndmPtr{};
558  Logger* loggerPtr{};
559 
560 };
561 
562 //==========================================================================
563 
564 // A sub-collision model where each nucleon fluctuates independently
565 // according to a log-normal distribution. Nucleons in the projectile and
566 // target may fluctuate according to different parameters, which is relevant
567 // e.g. for hadron-ion collisions with generic hadron species.
568 
570 
571 public:
572 
573  // The default constructor simply lists the nucleon-nucleon cross sections.
575  : FluctuatingSubCollisionModel(4, modeIn),
576  kProj(parmSave[0]), kTarg(parmSave[1]),
577  rProj(parmSave[2]), rTarg(parmSave[3]) {}
578 
579  // Virtual destructor.
581 
582  //virtual SigEst getSig() const override;
583 
584  // Get the minimum and maximum allowed parameter values for this model.
585  vector<double> minParm() const override {
586  return { 0.01, 0.01, 0.10, 0.10, 1.00, 0.00 }; }
587  vector<double> defParm() const override {
588  return { 1.00, 1.00, 0.54, 0.54, 17.24, 0.33 }; }
589  vector<double> maxParm() const override {
590  return { 2.00, 2.00, 4.00, 4.00, 20.00, 2.00 }; }
591 
592 protected:
593 
594  double pickRadiusProj() const override { return pickRadius(kProj, rProj); }
595  double pickRadiusTarg() const override { return pickRadius(kTarg, rTarg); }
596 
597 private:
598 
599  // The standard deviation of each log-normal distribution.
600  double& kProj;
601  double& kTarg;
602 
603  // The mean radius of each nucleon.
604  double& rProj;
605  double& rTarg;
606 
607  double pickRadius(double k0, double r0) const {
608  double logSig = log(M_PI * pow2(r0)) + k0 * rndmPtr->gauss();
609  return sqrt(exp(logSig) / M_PI);
610  }
611 };
612 
613 //==========================================================================
614 
615 } // end namespace Pythia8
616 
617 #endif // Pythia8_HISubCollisionModel_H
vector< int > idAList
The list of particles that have been fitted.
Definition: HISubCollisionModel.h:306
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
CollisionType type
The type of collision.
Definition: HISubCollisionModel.h:77
bool failed
Whether the subcollision failed, i.e. has a failed excitation.
Definition: HISubCollisionModel.h:80
vector< double > defParm() const override
Get the default parameter values for this model.
Definition: HISubCollisionModel.h:335
Definition: HISubCollisionModel.h:460
vector< double > maxParm() const override
Get the maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:474
int nParms() const
Get the number of free parameters for the model.
Definition: HISubCollisionModel.h:234
vector< double > defParm() const override
Get the default parameter values for this model.
Definition: HISubCollisionModel.h:587
double T(unsigned i=0) const
Definition: HISubCollisionModel.h:105
FluctuatingSubCollisionModel(int nParmIn, int modein)
The default constructor simply lists the nucleon-nucleon cross sections.
Definition: HISubCollisionModel.h:404
virtual ~FluctuatingSubCollisionModel() override
Virtual destructor.
Definition: HISubCollisionModel.h:410
Definition: Info.h:45
double sigSDE() const
The target single diffractive excitation cross section (both sides).
Definition: HISubCollisionModel.h:198
SigEst()
Constructor for zeros.
Definition: HISubCollisionModel.h:150
Nucleon * targ
The target nucleon.
Definition: HISubCollisionModel.h:67
Definition: HINucleusModel.h:152
Logger * loggerPtr
Pointer to the logger.
Definition: Info.h:86
Definition: HISubCollisionModel.h:359
double avNDb
Definition: HISubCollisionModel.h:288
virtual ~BlackSubCollisionModel() override
Virtual destructor.
Definition: HISubCollisionModel.h:331
vector< double > getParm() const
Get the current parameters of this model.
Definition: HISubCollisionModel.h:243
double bSlope() const
The target elastic b-slope parameter.
Definition: HISubCollisionModel.h:213
Definition: SigmaTotal.h:141
void initPtr(NucleusModel &projIn, NucleusModel &targIn, SigmaTotal &sigTotIn, Settings &settingsIn, Info &infoIn, Rndm &rndmIn)
Initialize the pointers.
Definition: HISubCollisionModel.h:173
vector< double > maxParm() const override
Get the maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:336
void width(double widthIn)
Set the width (in femtometers).
Definition: HISubCollisionModel.h:529
Both excited but with central diffraction.
Definition: HISubCollisionModel.h:42
LogNormalSubCollisionModel(int modeIn=0)
The default constructor simply lists the nucleon-nucleon cross sections.
Definition: HISubCollisionModel.h:574
int NInt
Definition: HISubCollisionModel.h:281
double bp
Definition: HISubCollisionModel.h:74
vector< double > State
The state of a nucleon is a general vector of doubles.
Definition: HINucleusModel.h:41
map< int, vector< LogInterpolator > > subCollParmsMap
Mapping id -> interpolator, one entry for each particle.
Definition: HISubCollisionModel.h:313
double sigND() const
The target non-diffractive (absorptive) cross section.
Definition: HISubCollisionModel.h:210
BlackSubCollisionModel()
The default constructor simply lists the nucleon-nucleon cross sections.
Definition: HISubCollisionModel.h:328
virtual SigEst getSig() const override
Get cross sections used by this model.
Definition: HISubCollisionModel.h:339
vector< double > parmSave
Saved parameters.
Definition: HISubCollisionModel.h:277
vector< double > maxParm() const override
Get the maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:589
double avNDb
Definition: HISubCollisionModel.h:147
double sigCDE() const
The target central diffractive excitation cross section.
Definition: HISubCollisionModel.h:195
Definition: HINucleusModel.h:28
Definition: HINucleusModel.h:187
virtual double xSecScale() const
Definition: HISubCollisionModel.h:524
Definition: HISubCollisionModel.h:502
Definition: Logger.h:23
multiset< SubCollision >::const_iterator begin() const
Iterators over the subcollisions.
Definition: HISubCollisionModel.h:108
double avNDB() const
Return the average non-diffractive impact parameter.
Definition: HISubCollisionModel.h:216
The SubCollisionSet gives a set of subcollisions between two nuclei.
Definition: HISubCollisionModel.h:88
NucleusModel * projPtr
Info from the controlling HeavyIons object.
Definition: HISubCollisionModel.h:291
The target is diffractively excited.
Definition: HISubCollisionModel.h:40
vector< bool > fsig
Which cross sections were actually fitted.
Definition: HISubCollisionModel.h:143
Definition: Basics.h:388
double width() const
Get the width.
Definition: HISubCollisionModel.h:532
vector< double > defParm() const override
Get the default parameter values for this model.
Definition: HISubCollisionModel.h:371
vector< double > dsig2
The estimated error (squared)
Definition: HISubCollisionModel.h:140
Definition: HISubCollisionModel.h:323
virtual ~ImpactParameterGenerator()
Virtual destructor.
Definition: HISubCollisionModel.h:511
bool empty() const
Reset the subcollisions.
Definition: HISubCollisionModel.h:101
Definition: HISubCollisionModel.h:130
double sigDDE() const
The target double diffractive excitation cross section.
Definition: HISubCollisionModel.h:207
virtual ~DoubleStrikmanSubCollisionModel() override
Virtual destructor.
Definition: HISubCollisionModel.h:469
virtual SigEst getSig() const override
Get cross sections used by this model.
Definition: HISubCollisionModel.h:375
SubCollision()
Default constructor.
Definition: HISubCollisionModel.h:52
SubCollision(Nucleon &projIn, Nucleon &targIn, double bIn, double bpIn, CollisionType typeIn)
Constructor with configuration.
Definition: HISubCollisionModel.h:46
vector< LogInterpolator > * subCollParms
Definition: HISubCollisionModel.h:310
This is an elastic scattering.
Definition: HISubCollisionModel.h:38
void setParm(const vector< double > &parmIn)
Set the parameters of this model.
Definition: HISubCollisionModel.h:237
virtual ~NaiveSubCollisionModel() override
Virtual destructor.
Definition: HISubCollisionModel.h:367
Definition: HISubCollisionModel.h:30
Internal class to report cross section estimates.
Definition: HISubCollisionModel.h:135
int id() const
Accessor functions:
Definition: HINucleusModel.h:52
DoubleStrikmanSubCollisionModel(int modeIn=0)
The default constructor simply lists the nucleon-nucleon cross sections.
Definition: HISubCollisionModel.h:465
int nucleons() const
Definition: HISubCollisionModel.h:60
Both projectile and target are diffractively excited.
Definition: HISubCollisionModel.h:41
virtual ~SubCollisionModel()
Virtual destructor.
Definition: HISubCollisionModel.h:164
vector< double > defParm() const override
Get the default parameter values for this model.
Definition: HISubCollisionModel.h:473
double sigEl() const
The target elastic cross section.
Definition: HISubCollisionModel.h:192
SubCollisionSet(multiset< SubCollision > subCollisionsIn, double TIn, double T12In=0.0, double T21In=0.0, double T22In=0.0)
Constructor with subcollisions.
Definition: HISubCollisionModel.h:96
Definition: HISubCollisionModel.h:569
CollisionType
This defines the type of a binary nucleon collison.
Definition: HISubCollisionModel.h:35
double pickRadiusProj() const override
Pick a radius for the nucleon, depending on the specific model.
Definition: HISubCollisionModel.h:594
vector< double > minParm() const override
Get the minimum and maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:370
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double sigSDET() const
The target single diffractive excitation cross section (target).
Definition: HISubCollisionModel.h:204
Definition: HISubCollisionModel.h:399
virtual ~LogNormalSubCollisionModel()
Virtual destructor.
Definition: HISubCollisionModel.h:580
SubCollisionModel(int nParm)
Definition: HISubCollisionModel.h:157
double sigTot() const
The target total nucleon-nucleon cross section.
Definition: HISubCollisionModel.h:189
bool operator<(const SubCollision &s) const
Used to order sub-collisions in a set.
Definition: HISubCollisionModel.h:56
int idASave
For variable energies.
Definition: HISubCollisionModel.h:300
double sigSDEP() const
The target single diffractive excitation cross section (projectile).
Definition: HISubCollisionModel.h:201
Nucleon * proj
The projectile nucleon.
Definition: HISubCollisionModel.h:64
This is not a collision.
Definition: HISubCollisionModel.h:37
vector< double > minParm() const override
virtual SigEst getSig() const override;
Definition: HISubCollisionModel.h:585
vector< double > maxParm() const override
Get the maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:372
vector< double > minParm() const override
Get the minimum and maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:334
vector< double > sig
The cross sections (tot, nd, dd, sdp, sdt, cd, el, bslope).
Definition: HISubCollisionModel.h:137
double pickRadiusProj() const override
Pick a radius for the nucleon, depending on the specific model.
Definition: HISubCollisionModel.h:479
Definition: Basics.h:32
vector< double > minParm() const override
Get the minimum and maximum allowed parameter values for this model.
Definition: HISubCollisionModel.h:472
Definition: Settings.h:196
double b
The impact parameter distance between the nucleons in femtometer.
Definition: HISubCollisionModel.h:70
NaiveSubCollisionModel()
The default constructor simply lists the nucleon-nucleon cross sections.
Definition: HISubCollisionModel.h:364
The projectile is diffractively excited.
Definition: HISubCollisionModel.h:39
int opacityMode
Optional mode for opacity.
Definition: HISubCollisionModel.h:426