StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HIUserHooks.h
1 // HIUserHooks.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 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 HIUserHooks class and a
7 // set of other classes used inside Pythia8 to model collisions
8 // involving heavy ions.
9 // Nucleon: represents a proton or a neutron inside a necleus.
10 // SubCollision: a collision between a projectile and a target Nucleon.
11 // NucleusModel: models the Nucleon distribution in a nucleus.
12 // WoodsSaxonModel: NucleusModel implementing a simple Woods-Saxon.
13 // GLISSANDOModel: NucleusModel implementing the GLISSANDO prescription.
14 // ImpactParameterGenerator: distributes nuclei in impact parameter space.
15 // SubCollisionModel: Models the collision probabilities of nucleons.
16 // NaiveSubCollisionModel: A very simple SubCollisionModel.
17 // DoubleStrikman: A more advanced SubCollisionModel.
18 // EventInfo: stores full nucleon-nucleon events with corresponding Info.
19 // HIInfo: info about a Heavy Ion run and its produced events.
20 // HIUserHooks: User hooks for HeavyIons models.
21 
22 #ifndef Pythia8_HIUserHooks_H
23 #define Pythia8_HIUserHooks_H
24 
25 #include "Pythia8/Pythia.h"
26 #include <limits>
27 
28 namespace Pythia8 {
29 
30 class Pythia;
31 
33 class EventInfo;
34 
35 //==========================================================================
36 
37 // The HIUnits namespace defines the unitsystem used by the heavy ion
38 // machinery in Pythia8. In particular all lengths are in femtometer
39 // and cross sections are therefore in squared femtometer.
40 namespace HIUnits {
41 
42 // Lengths
43 const double femtometer = 1.0;
44 const double millimeter = 1.0e12;
45 
46 // Cross sections
47 const double femtometer2 = 1.0;
48 const double millibarn = 0.1;
49 const double nanobarn = 1.0e-7;
50 
51 }
52 
53 using namespace HIUnits;
54 
55 //==========================================================================
56 
61 
62 class Nucleon {
63 
64  friend class SubCollisionModel;
65 
66 public:
67 
69  enum Status {
70  UNWOUNDED = 0,
71  ELASTIC = 1,
72  DIFF = 2,
73  ABS = 3
74  };
75 
77  typedef vector<double> State;
78 
81  Nucleon(int idIn = 0, int indexIn = 0, const Vec4 & pos = Vec4())
82  : idSave(idIn), indexSave(indexIn), nPosSave(pos), bPosSave(pos),
83  statusSave(UNWOUNDED),eventp(0), isDone(0) {}
84 
86 
88  int id() const { return idSave; }
89 
91  int index() const { return indexSave; }
92 
94  const Vec4 & nPos() const { return nPosSave; }
95 
97  const Vec4 & bPos() const { return bPosSave; }
98 
100  const Vec4 & bShift(const Vec4 & bvec) { return bPosSave += bvec; }
101 
103  Status status() const { return statusSave; }
104 
106  bool done() const { return isDone; }
107 
109  EventInfo * event() const { return eventp; }
110 
112  const State & state() const { return stateSave; }
113 
115  const State & altState(int i = 0) {
116  static State nullstate;
117  return i < int(altStatesSave.size())? altStatesSave[i]: nullstate;
118  }
119 
121 
123  void status(Status s) { statusSave = s; }
124 
126  void state(State s) { stateSave = s; }
127 
129  void addAltState(State s) { altStatesSave.push_back(s); }
130 
132  void select(EventInfo & evp, Status s) {
133  eventp = &evp;
134  isDone = true;
135  status(s);
136  }
137 
139  void select() { isDone = true; }
140 
142  void debug();
143 
144 private:
145 
147  int idSave;
148 
150  int indexSave;
151 
153  Vec4 nPosSave;
154 
156  Vec4 bPosSave;
157 
159  Status statusSave;
160 
162  State stateSave;
163 
166  vector<State> altStatesSave;
167 
169  EventInfo * eventp;
170 
172  bool isDone;
173 
175  void reset() {
176  statusSave = UNWOUNDED;
177  altStatesSave.clear();
178  bPosSave = nPosSave;
179  isDone = false;
180  eventp = 0;
181  }
182 
183 };
184 
185 //==========================================================================
186 
189 
190 class SubCollision {
191 
192 public:
193 
195  enum Type {
196  NONE,
197  ELASTIC,
198  SDEP,
199  SDET,
200  DDE,
201  CDE,
202  ABS
203  };
204 
205  SubCollision(Nucleon & projIn, Nucleon & targIn,
206  double bIn, double bpIn, Type typeIn)
207  : proj(&projIn), targ(&targIn), b(bIn), bp(bpIn), type(typeIn) {}
208 
209  SubCollision()
210  : proj(0), targ(0), b(0.0), bp(0.0), type(NONE) {}
211 
212  // Used to order sub-collisions in a set.
213  bool operator< (const SubCollision & s) const { return b < s.b; }
214 
215  // Return 0 if neither proj or target are neutrons, 1 if target is
216  // neutron, 2 if projectile is neutron, and 3 if both are neutrons.
217  int nucleons() const {
218  return ( abs(targ->id()) == 2112? 1: 0 ) +
219  ( abs(proj->id()) == 2112? 2: 0 );
220  }
221 
222  // The projectile nucleon.
223  Nucleon * proj;
224 
226  Nucleon * targ;
227 
229  double b;
230 
233  double bp;
234 
236  mutable Type type;
237 
238 };
239 
240 //==========================================================================
241 
244 
245 class NucleusModel {
246 
247 public:
248 
252  : idSave(0), ISave(0), ASave(0), ZSave(0), LSave(0), RSave(0.0),
253  settingsPtr(0), particleDataPtr(0), rndPtr(0) {}
254 
256  virtual ~NucleusModel() {}
257 
259  void initPtr(int idIn, Settings & settingsIn,
260  ParticleData & particleDataIn, Rndm & rndIn);
261  virtual bool init();
262 
263  virtual Particle produceIon(bool istarg);
264 
267  virtual vector<Nucleon> generate() const = 0;
268 
270  int id() const { return idSave; }
271  int I() const { return ISave; }
272  int A() const { return ASave; }
273  int Z() const { return ZSave; }
274  int L() const { return LSave; }
275  double R() const { return RSave; }
276 
277 protected:
278 
280  int idSave;
281 
283  int ISave, ASave, ZSave, LSave;
284 
286  double RSave;
287 
289  Settings * settingsPtr;
290  ParticleData * particleDataPtr;
291  Rndm * rndPtr;
292 
293 };
294 
295 //==========================================================================
296 
298 
299 class WoodsSaxonModel: public NucleusModel {
300 
301 public:
302 
305  WoodsSaxonModel(): aSave(0.0), intlo(0.0),
306  inthi0(0.0), inthi1(0.0), inthi2(0.0) {}
307 
309  double a() const { return aSave; }
310 
311 protected:
312 
315  Vec4 generateNucleon() const;
316 
318  virtual ~WoodsSaxonModel() {}
319 
322  virtual bool init() {
323  intlo = R()*R()*R()/3.0;
324  inthi0 = a()*R()*R();
325  inthi1 = 2.0*a()*a()*R();
326  inthi2 = 2.0*a()*a()*a();
327  return NucleusModel::init();
328  }
329 
330 protected:
331 
334  double aSave;
335 
336 private:
337 
340  double intlo, inthi0, inthi1, inthi2;
341 
342 };
343 
344 
345 //==========================================================================
346 
350 
351 class GLISSANDOModel: public WoodsSaxonModel {
352 
353 public:
354 
356  GLISSANDOModel(): RhSave(0.0), gaussHardCore(false) {}
357 
359  virtual ~GLISSANDOModel() {}
360 
362  bool init();
363 
366  virtual vector<Nucleon> generate() const;
367 
369  double Rh() const { return RhSave; }
370 
371  double RhGauss() const { return RhSave*abs(rndPtr->gauss()); };
372 
373 private:
374 
376  double RhSave;
377 
379  bool gaussHardCore;
380 
381 };
382 
383 //==========================================================================
384 
386 class SubCollisionModel;
387 class NucleusModel;
388 
393 
394 class ImpactParameterGenerator {
395 
396 public:
397 
401  : widthSave(0.0), collPtr(0), projPtr(0), targPtr(0),
402  settingsPtr(0), rndPtr(0) {}
403 
406 
408  virtual bool init();
409  void initPtr(SubCollisionModel & collIn,
410  NucleusModel & projIn,
411  NucleusModel & targIn,
412  Settings & settingsIn,
413  Rndm & rndIn);
414 
417  virtual Vec4 generate(double & weight) const;
418 
420  void width(double widthIn) { widthSave = widthIn; }
421 
423  double width() const { return widthSave; }
424 
425 private:
426 
428  double widthSave;
429 
430 protected:
431 
433  SubCollisionModel * collPtr;
434  NucleusModel * projPtr;
435  NucleusModel * targPtr;
436  Settings * settingsPtr;
437  Rndm * rndPtr;
438 
439 };
440 
441 
442 //==========================================================================
443 
447 
448 class SubCollisionModel {
449 
450 public:
451 
453  struct SigEst {
455  vector<double> sig;
456 
458  vector<double> dsig2;
459 
461  vector<bool> fsig;
462 
465  double avNDb, davNDb2;
466 
468  SigEst(): sig(8, 0.0), dsig2(8, 0.0), fsig(8, false),
469  avNDb(0.0), davNDb2(0.0) {}
470 
471  };
472 
473 public:
474 
476  SubCollisionModel(): sigTarg(8, 0.0), sigErr(8, 0.05), NInt(100000),
477  NGen(20), NPop(20), sigFuzz(0.2), fitPrint(true), avNDb(1.0*femtometer),
478  projPtr(), targPtr(), sigTotPtr(), settingsPtr(), infoPtr(), rndPtr() {}
479 
481  virtual ~SubCollisionModel() {}
482 
484  virtual bool init();
485 
486  void initPtr(NucleusModel & projIn, NucleusModel & targIn,
487  SigmaTotal & sigTotIn, Settings & settingsIn,
488  Info & infoIn, Rndm & rndIn) {
489  projPtr = &projIn;
490  targPtr = &targIn;
491  sigTotPtr = &sigTotIn;
492  settingsPtr = &settingsIn;
493  infoPtr = &infoIn;
494  rndPtr = & rndIn;
495  }
496 
504  virtual multiset<SubCollision> getCollisions(vector<Nucleon> & proj,
505  vector<Nucleon> & targ,
506  const Vec4 & bvec,
507  double & T) = 0;
508 
511 
513  double sigTot() const {
514  return sigTarg[0];
515  }
516 
518  double sigEl() const { return sigTarg[6]; }
519 
521  double sigCDE() const { return sigTarg[5]; }
522 
524  double sigSDE() const { return sigTarg[3] + sigTarg[4]; }
525 
527  double sigSDEP() const { return sigTarg[3]; }
528 
530  double sigSDET() const { return sigTarg[4]; }
531 
533  double sigDDE() const { return sigTarg[2]; }
534 
536  double sigND() const { return sigTarg[1]; }
537 
539  double bSlope() const { return sigTarg[7]; }
540 
542  virtual SigEst getSig() const {
543  return SigEst();
544  }
545 
547  double avNDB() const {
548  return avNDb;
549  }
550 
552  double Chi2(const SigEst & sigs, int npar) const;
553 
555  virtual bool evolve();
556 
558  virtual void setParm(const vector<double> &) {}
559 
562  virtual vector<double> getParm() const {
563  return vector<double>();
564  }
565  virtual vector<double> minParm() const {
566  return vector<double>();
567  }
568  virtual vector<double> maxParm() const {
569  return vector<double>();
570  }
571 
572 private:
573 
576  vector<double> sigTarg, sigErr;
577 
578 protected:
579 
582  int NInt, NGen, NPop;
583  double sigFuzz;
584  bool fitPrint;
585 
588  double avNDb;
589 
591  NucleusModel * projPtr;
592  NucleusModel * targPtr;
593  SigmaTotal * sigTotPtr;
594  Settings * settingsPtr;
595  Info * infoPtr;
596  Rndm * rndPtr;
597 
598 };
599 
600 
601 //==========================================================================
602 
606 
608 
609 public:
610 
614 
617 
621  virtual multiset<SubCollision>
622  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
623  const Vec4 & bvec, double & T);
624 
625 };
626 
627 //==========================================================================
628 
632 
633 class NaiveSubCollisionModel: public SubCollisionModel {
634 
635 public:
636 
640 
643 
647  virtual multiset<SubCollision>
648  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
649  const Vec4 & bvec, double & T);
650 
651 };
652 
653 //==========================================================================
654 
657 
658 class DoubleStrikman: public SubCollisionModel {
659 
660 public:
661 
664  DoubleStrikman(int modein = 0)
665  : r0(0.0), k0(4.0), sigd(75.0), alpha(0.5), opacityMode(modein) {}
666 
668  virtual ~DoubleStrikman() {}
669 
673  virtual multiset<SubCollision>
674  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
675  const Vec4 & bvec, double & T);
676 
678  double gamma() const;
679 
681  double opacity(double sig) const {
682  // *** THINK *** maybe sig/sigd?
683  sig /= sigd;
684  if ( opacityMode == 1 ) sig = 1.0/sig;
685  return sig > std::numeric_limits<double>::epsilon()?
686  pow(-expm1(-1.0/sig), alpha): 1.0;
687  }
688 
691  double Tpt(const Nucleon::State & p,
692  const Nucleon::State & t, double b) const {
693  double sig = M_PI*pow2(p[0] + t[0]);
694  double grey = opacity(sig);
695  return sig/grey > b*b*2.0*M_PI? grey: 0.0;
696  }
697 
699  SigEst getSig() const;
700 
702  virtual void setParm(const vector<double> &);
703 
706  virtual vector<double> getParm() const;
707  virtual vector<double> minParm() const;
708  virtual vector<double> maxParm() const;
709 
710  // Helper functions
711  static void shuffle(double PND1, double PND2,
712  double & PW1, double & PW2);
713  static void shuffel(double & PEL11, double P11,
714  double P12, double P21, double P22);
715  static double PNW(double PWp, double PWt, double PND) {
716  return ( 1.0 - PWp <= 0.0 || 1.0 - PWt <= 0.0 )?
717  0.0: (1.0 - PWp)*(1.0 - PWt)/(1.0 - PND);
718  }
719 
720 protected:
721 
723  double r0;
724 
726  double k0;
727 
729  double sigd;
730 
732  double alpha;
733 
735  int opacityMode;
736 
737 };
738 
739 
740 //==========================================================================
741 
744 
745 class MultiRadial: public SubCollisionModel {
746 
747 public:
748 
751  MultiRadial(int NrIn = 0)
752  : Nr(max(1, NrIn)) {
753  dR = T0 = c = phi = vector<double>(Nr, 0.0);
754  }
755 
757  virtual ~MultiRadial() {}
758 
762  virtual multiset<SubCollision>
763  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
764  const Vec4 & bvec, double & T);
765 
768  double Tpt(const Nucleon::State & p,
769  const Nucleon::State & t, double b) const {
770  return b < p[0] + t[0]? p[1]*t[1]: 0.0;
771  }
772 
774  SigEst getSig() const;
775 
777  virtual void setParm(const vector<double> &);
778 
781  virtual vector<double> getParm() const;
782  virtual vector<double> minParm() const;
783  virtual vector<double> maxParm() const;
784 
785 protected:
786 
787  // Set the probabilities according to the angle parameters.
788  void setProbs();
789 
791  int choose() const;
792 
794  int Nr;
795 
796 
798  vector<double> c;
799 
801  vector<double> dR;
802 
804  vector<double> T0;
805 
807  vector<double> phi;
808 
809 };
810 
811 
812 //==========================================================================
813 
814 // Class for storing Events and Info objects.
815 
816 class EventInfo {
817 
818 public:
819 
821  EventInfo(): code(0), ordering(-1.0), coll(0), ok(false) {}
822 
824  Event event;
825 
826  // The corresponding Info object.
827  Info info;
828 
830  int code;
831 
833  double ordering;
834  bool operator<(const EventInfo & ei) const {
835  return ordering < ei.ordering;
836  }
837 
839  const SubCollision * coll;
840 
842  bool ok;
843 
846  map<Nucleon *, pair<int,int> > projs, targs;
847 
848 };
849 
850 //==========================================================================
851 
854 
855 class HIInfo {
856 
857 public:
858 
859  friend class HeavyIons;
860  friend class Angantyr;
861 
864  : idProjSave(0), idTargSave(0), bSave(0.0), NSave(0), NAccSave(0),
865  sigmaTotSave(0.0), sigmaNDSave(0.0), sigErr2TotSave(0.0),
866  sigErr2NDSave(0.0), weightSave(0.0), weightSumSave(0.0),
867  nCollSave(10, 0), nProjSave(10, 0), nTargSave(10, 0), nFailSave(0),
868  subColsPtr(NULL) {}
869 
871  double b() const {
872  return bSave;
873  }
874 
876  double sigmaTot() const {
877  return sigmaTotSave/millibarn;
878  }
879 
881  double sigmaTotErr() const {
882  return sqrt(sigErr2TotSave/max(1.0, double(NSave)))/millibarn;
883  }
884 
887  double sigmaND() const {
888  return sigmaNDSave/millibarn;
889  }
890 
892  double sigmaNDErr() const {
893  return sqrt(sigErr2NDSave/max(1.0, double(NSave)));
894  }
895 
897  long nAttempts() const {
898  return NSave;
899  }
900 
902  long nAccepted() const {
903  return NAccSave;
904  }
905 
907  int nCollTot() const { return nCollSave[0]; }
908 
911  int nCollND() const { return nCollSave[1]; }
912 
914  int nCollNDTot() const { return nProjSave[1] + nTargSave[1] - nCollSave[1]; }
915 
918  int nCollSDP() const { return nCollSave[2]; }
919 
922  int nCollSDT() const { return nCollSave[3]; }
923 
926  int nCollDD() const { return nCollSave[4]; }
927 
930  int nCollCD() const { return nCollSave[5]; }
931 
933  int nCollEL() const { return nCollSave[6]; }
934 
937  int nPartProj() const { return nProjSave[0]; }
938 
941  int nAbsProj() const { return nProjSave[1]; }
942 
945  int nDiffProj() const { return nProjSave[2]; }
946 
949  int nElProj() const { return nProjSave[3]; }
950 
953  int nPartTarg() const { return nTargSave[0]; }
954 
957  int nAbsTarg() const { return nTargSave[1]; }
958 
961  int nDiffTarg() const { return nTargSave[2]; }
962 
965  int nElTarg() const { return nTargSave[3]; }
966 
968  double weight() const { return weightSave; }
969 
971  double weightSum() const { return weightSumSave; }
972 
974  int nFail() const {
975  return nFailSave;
976  }
977 
980  ++nFailSave;
981  }
982 
984 private:
985 
988  void addAttempt(double T, double bin, double bweight);
989 
991  void reweight(double w) {
992  weightSave *= w;
993  }
994 
995  // Select the primary process.
996  void select(Info & in) {
997  primInfo = in;
998  primInfo.hiInfo = this;
999  }
1000 
1001  // Accept an event and update statistics in info.
1002  void accept();
1003 
1005  void reject() {}
1006 
1008  int addSubCollision(const SubCollision & c);
1009 
1011  int addProjectileNucleon(const Nucleon & n);
1012  int addTargetNucleon(const Nucleon & n);
1013 
1014 
1016  int idProjSave, idTargSave;
1017 
1019  double bSave;
1020 
1022  long NSave, NAccSave;
1023  double sigmaTotSave, sigmaNDSave, sigErr2TotSave, sigErr2NDSave;
1024  double weightSave, weightSumSave;
1025 
1028  vector<int> nCollSave, nProjSave, nTargSave;
1029 
1030  // Map of primary processes and the number of events and the sum of
1031  // weights.
1032  map<int,double> sumPrimW, sumPrimW2;
1033  map<int,int> NPrim;
1034  map<int,string> NamePrim;
1035 
1036  // The info object of the primary process.
1037  Info primInfo;
1038 
1039  // Number of failed nucleon excitations.
1040  int nFailSave;
1041 
1042 
1043 public:
1044  // Access to subcollision to be extracted by the user.
1045  multiset<SubCollision>* subCollisionsPtr() { return subColsPtr; }
1046 
1047  void subCollisionsPtr(multiset<SubCollision> * sPtrIn) {
1048  subColsPtr = sPtrIn; }
1049 
1050 private:
1051 
1052  // Full information about the Glauber calculation, consisting of
1053  // all subcollisions.
1054  multiset<SubCollision>* subColsPtr;
1055 
1056 };
1057 
1058 //==========================================================================
1059 
1064 
1065 class HIUserHooks {
1066 
1067 public:
1068 
1070  HIUserHooks(): idProjSave(0), idTargSave(0) {}
1071 
1073  virtual ~HIUserHooks() {}
1074 
1076  virtual void init(int idProjIn, int idTargIn) {
1077  idProjSave = idProjIn;
1078  idTargSave = idTargIn;
1079  }
1080 
1082  virtual bool hasImpactParameterGenerator() const { return false; }
1083  virtual ImpactParameterGenerator * impactParameterGenerator() const {
1084  return 0; }
1085 
1087  virtual bool hasProjectileModel() const { return false; }
1088  virtual NucleusModel * projectileModel() const { return 0; }
1089  virtual bool hasTargetModel() const { return false; }
1090  virtual NucleusModel * targetModel() const { return 0; }
1091 
1094  virtual bool hasSubCollisionModel() { return false; }
1095  virtual SubCollisionModel * subCollisionModel() { return 0; }
1096 
1098  virtual bool hasEventOrdering() const { return false; }
1099  virtual double eventOrdering(const Event &, const Info &) { return -1; }
1100 
1103  virtual bool canFixIsoSpin() const { return false; }
1104  virtual bool fixIsoSpin(EventInfo &) { return false; }
1105 
1107  virtual bool canShiftEvent() const { return false; }
1108  virtual EventInfo & shiftEvent(EventInfo & ei) const { return ei; }
1109 
1112  bool canAddNucleonExcitation() const { return false; }
1113  bool addNucleonExcitation(EventInfo &, EventInfo &, bool) const {
1114  return false; }
1115 
1117  virtual bool canForceHadronLevel() const { return false; }
1118  virtual bool forceHadronLevel(Pythia &) { return false; }
1119 
1123  virtual bool canFindRecoilers() const { return false; }
1124  virtual vector<int>
1125  findRecoilers(const Event &, bool /* tside */, int /* beam */, int /* end */,
1126  const Vec4 & /* pdiff */, const Vec4 & /* pbeam */) const {
1127  return vector<int>();
1128  }
1129 
1130 protected:
1131 
1134  int idProjSave, idTargSave;
1135 
1136 };
1137 
1138 //==========================================================================
1139 
1140 } // end namespace Pythia8
1141 
1142 #endif // Pythia8_HIUserHooks_H
int nCollCD() const
Definition: HIUserHooks.h:930
void status(Status s)
Manipulating functions:
Definition: HIUserHooks.h:123
virtual SigEst getSig() const
Calculate the cross sections for the given set of parameters.
Definition: HIUserHooks.h:542
virtual ~DoubleStrikman()
Virtual destructor,.
Definition: HIUserHooks.h:668
int nElProj() const
Definition: HIUserHooks.h:949
bool done() const
Check if nucleon has been assigned.
Definition: HIUserHooks.h:106
const Vec4 & bPos() const
The absolute position in impact parameter space.
Definition: HIUserHooks.h:97
double opacity(double sig) const
The opacity of the collision at a given sigma.
Definition: HIUserHooks.h:681
int id() const
Accessor functions:
Definition: HIUserHooks.h:88
int nCollTot() const
The total number of separate sub-collisions.
Definition: HIUserHooks.h:907
vector< double > State
The state of a nucleon is a general vector of doubles.
Definition: HIUserHooks.h:77
virtual vector< double > getParm() const
Definition: HIUserHooks.h:562
virtual bool hasProjectileModel() const
A suser-supplied NucleusModel for the projectile and target.
Definition: HIUserHooks.h:1087
int code
The code for the subprocess.
Definition: HIUserHooks.h:830
void select()
Select this nucleon to be assigned to an event.
Definition: HIUserHooks.h:139
EventInfo * event() const
The event this nucleon is assigned to.
Definition: HIUserHooks.h:109
virtual ~ImpactParameterGenerator()
Virtual destructor.
Definition: HIUserHooks.h:405
double bSlope() const
The elastic b-slope parameter.
Definition: HIUserHooks.h:539
int nPartTarg() const
Definition: HIUserHooks.h:953
void state(State s)
Set the physical state.
Definition: HIUserHooks.h:126
Type
This defines the type of a bunary nucleon collison.
Definition: HIUserHooks.h:195
DoubleStrikman(int modein=0)
Definition: HIUserHooks.h:664
double sigDDE() const
The double diffractive excitation cross section.
Definition: HIUserHooks.h:533
int nDiffTarg() const
Definition: HIUserHooks.h:961
double avNDB() const
Return the average non-diffractive impact parameter.
Definition: HIUserHooks.h:547
double sigmaNDErr() const
The estimated statistical error on sigmaND().
Definition: HIUserHooks.h:892
int nCollSDP() const
Definition: HIUserHooks.h:918
double ordering
The ordering variable of this event.
Definition: HIUserHooks.h:802
virtual bool canFixIsoSpin() const
Definition: HIUserHooks.h:1103
double width() const
Get the width.
Definition: HIUserHooks.h:423
virtual bool canFindRecoilers() const
Definition: HIUserHooks.h:1123
virtual bool hasImpactParameterGenerator() const
A user-supplied impact parameter generator.
Definition: HIUserHooks.h:1082
bool canAddNucleonExcitation() const
Definition: HIUserHooks.h:1112
double weightSum() const
The sum of weights of the produced events.
Definition: HIUserHooks.h:971
double sigND() const
The non-diffractive (absorptive) cross section.
Definition: HIUserHooks.h:536
void failedExcitation()
Register a failed nucleon excitation.
Definition: HIUserHooks.h:979
virtual bool canShiftEvent() const
A user-supplied method for shifting the event in impact parameter space.
Definition: HIUserHooks.h:1107
long nAccepted() const
The number of produced events.
Definition: HIUserHooks.h:902
int nCollND() const
Definition: HIUserHooks.h:911
int nFail() const
The number of failed nuclon excitations in the current event.
Definition: HIUserHooks.h:974
SigEst()
Constructor for zeros.
Definition: HIUserHooks.h:468
virtual ~BlackSubCollisionModel()
Virtual destructor,.
Definition: HIUserHooks.h:616
void width(double widthIn)
Set the width (in femtometers).
Definition: HIUserHooks.h:420
int nDiffProj() const
Definition: HIUserHooks.h:945
void select(EventInfo &evp, Status s)
Select an event for this nucleon.
Definition: HIUserHooks.h:132
const Vec4 & nPos() const
The position of this nucleon relative to the nucleus center.
Definition: HIUserHooks.h:94
double sigEl() const
The total cross section.
Definition: HIUserHooks.h:518
int nElTarg() const
Definition: HIUserHooks.h:965
SubCollisionModel()
The default constructor is empty.
Definition: HIUserHooks.h:476
double b() const
The impact-parameter distance in the current event.
Definition: HIUserHooks.h:871
double Rh() const
Accessor functions.
Definition: HIUserHooks.h:369
double sigSDEP() const
The single diffractive excitation cross section (excited projectile).
Definition: HIUserHooks.h:527
double sigmaND() const
Definition: HIUserHooks.h:887
void addAltState(State s)
Add an alternative state.
Definition: HIUserHooks.h:129
virtual bool hasEventOrdering() const
A user-supplied ordering of events in (inverse) hardness.
Definition: HIUserHooks.h:1098
virtual bool hasSubCollisionModel()
Definition: HIUserHooks.h:1094
virtual void setParm(const vector< double > &)
Set the parameters of this model.
Definition: HIUserHooks.h:558
GLISSANDOModel()
Default constructor.
Definition: HIUserHooks.h:356
double sigSDE() const
The single diffractive excitation cross section (both sides summed).
Definition: HIUserHooks.h:524
int nCollEL() const
The number of separate elastic sub collisions.
Definition: HIUserHooks.h:933
Internal class to report cross section estimates.
Definition: HIUserHooks.h:454
virtual void init(int idProjIn, int idTargIn)
Initialize this user hook.
Definition: HIUserHooks.h:1076
int nCollDD() const
Definition: HIUserHooks.h:926
virtual ~NucleusModel()
Virtual destructor.
Definition: HIUserHooks.h:256
virtual ~WoodsSaxonModel()
Virtual destructor.
Definition: HIUserHooks.h:318
HIUserHooks()
The default constructor is empty.
Definition: HIUserHooks.h:1070
int id() const
Accessor functions.
Definition: HIUserHooks.h:270
const State & altState(int i=0)
Return an alternative state.
Definition: HIUserHooks.h:115
const Vec4 & bShift(const Vec4 &bvec)
Shift the absolute position in impact parameter space.
Definition: HIUserHooks.h:100
double sigmaTot() const
The Monte Carlo integrated total cross section in the current run.
Definition: HIUserHooks.h:876
double Tpt(const Nucleon::State &p, const Nucleon::State &t, double b) const
Definition: HIUserHooks.h:691
long nAttempts() const
The number of attempted impact parameter points.
Definition: HIUserHooks.h:897
double a() const
Accessor functions:
Definition: HIUserHooks.h:309
Status status() const
The status.
Definition: HIUserHooks.h:103
HIInfo()
Constructor.
Definition: HIUserHooks.h:863
MultiRadial(int NrIn=0)
Definition: HIUserHooks.h:751
int index() const
The nucleon type.
Definition: HIUserHooks.h:91
EventInfo()
Empty constructor.
Definition: HIUserHooks.h:821
double sigSDET() const
The single diffractive excitation cross section (excited target).
Definition: HIUserHooks.h:530
int nAbsTarg() const
Definition: HIUserHooks.h:957
virtual ~NaiveSubCollisionModel()
Virtual destructor,.
Definition: HIUserHooks.h:642
int nCollNDTot() const
The total number of non-diffractive sub collisions in the current event.
Definition: HIUserHooks.h:914
virtual ~MultiRadial()
Virtual destructor,.
Definition: HIUserHooks.h:757
double sigmaTotErr() const
The estimated statistical error on sigmaTot().
Definition: HIUserHooks.h:881
virtual ~HIUserHooks()
Virtual destructor.
Definition: HIUserHooks.h:1073
Status
Enum for specifying the status of a nucleon.
Definition: HIUserHooks.h:69
int nCollSDT() const
Definition: HIUserHooks.h:922
double sigCDE() const
The central diffractive excitation cross section.
Definition: HIUserHooks.h:521
Definition: Nucleon.h:9
virtual ~SubCollisionModel()
Virtual destructor,.
Definition: HIUserHooks.h:481
virtual bool canForceHadronLevel() const
A user supplied wrapper around the Pythia::forceHadronLevel()
Definition: HIUserHooks.h:1117
double weight() const
The weight for this collision.
Definition: HIUserHooks.h:968
virtual ~GLISSANDOModel()
Virtual destructor.
Definition: HIUserHooks.h:359
double sigTot() const
The total cross section.
Definition: HIUserHooks.h:513
double Tpt(const Nucleon::State &p, const Nucleon::State &t, double b) const
Definition: HIUserHooks.h:768
int nAbsProj() const
Definition: HIUserHooks.h:941
const State & state() const
The physical state of the incoming nucleon.
Definition: HIUserHooks.h:112
int nPartProj() const
Definition: HIUserHooks.h:937