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) 2018 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 
191 
192 public:
193 
195  enum Type {
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 
227 
229  double b;
230 
233  double bp;
234 
236  mutable Type type;
237 
238 };
239 
240 //==========================================================================
241 
244 
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 
290  ParticleData * particleDataPtr;
291  Rndm * rndPtr;
292 
293 };
294 
295 //==========================================================================
296 
298 
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
323 bool init() {
324  intlo = R()*R()*R()/3.0;
325  inthi0 = a()*R()*R();
326  inthi1 = 2.0*a()*a()*R();
327  inthi2 = 2.0*a()*a()*a();
328  return NucleusModel::init();
329  }
330 
331 protected:
332 
335  double aSave;
336 
337 private:
338 
341  double intlo, inthi0, inthi1, inthi2;
342 
343 };
344 
345 
346 //==========================================================================
347 
351 
353 
354 public:
355 
357  GLISSANDOModel(): RhSave(0.0), gaussHardCore(false) {}
358 
360  virtual ~GLISSANDOModel() {}
361 
363  bool init();
364 
367  virtual vector<Nucleon> generate() const;
368 
370  double Rh() const { return RhSave; }
371 
372  double RhGauss() const { return RhSave*abs(rndPtr->gauss()); };
373 
374 private:
375 
377  double RhSave;
378 
380  bool gaussHardCore;
381 
382 };
383 
384 //==========================================================================
385 
387 class SubCollisionModel;
388 class NucleusModel;
389 
394 
396 
397 public:
398 
402  : widthSave(0.0), collPtr(0), projPtr(0), targPtr(0),
403  settingsPtr(0), rndPtr(0) {}
404 
407 
409  virtual bool init();
410  void initPtr(SubCollisionModel & collIn,
411  NucleusModel & projIn,
412  NucleusModel & targIn,
413  Settings & settingsIn,
414  Rndm & rndIn);
415 
418  virtual Vec4 generate(double & weight) const;
419 
421  void width(double widthIn) { widthSave = widthIn; }
422 
424  double width() const { return widthSave; }
425 
426 private:
427 
429  double widthSave;
430 
431 protected:
432 
435  NucleusModel * projPtr;
436  NucleusModel * targPtr;
437  Settings * settingsPtr;
438  Rndm * rndPtr;
439 
440 };
441 
442 
443 //==========================================================================
444 
448 
450 
451 public:
452 
454  struct SigEst {
456  vector<double> sig;
457 
459  vector<double> dsig2;
460 
462  vector<bool> fsig;
463 
466  double avNDb, davNDb2;
467 
469  SigEst(): sig(8, 0.0), dsig2(8, 0.0), fsig(8, false),
470  avNDb(0.0), davNDb2(0.0) {}
471 
472  };
473 
474 public:
475 
477  SubCollisionModel(): sigTarg(8, 0.0), sigErr(8, 0.05), NInt(100000),
478  NGen(20), NPop(20), sigFuzz(0.2),
479  fitPrint(true), avNDb(1.0*femtometer) {}
480 
482  virtual ~SubCollisionModel() {}
483 
485  virtual bool init();
486 
487  void initPtr(NucleusModel & projIn, NucleusModel & targIn,
488  SigmaTotal & sigTotIn, Settings & settingsIn,
489  Info & infoIn, Rndm & rndIn) {
490  projPtr = &projIn;
491  targPtr = &targIn;
492  sigTotPtr = &sigTotIn;
493  settingsPtr = &settingsIn;
494  infoPtr = &infoIn;
495  rndPtr = & rndIn;
496  }
497 
505  virtual multiset<SubCollision> getCollisions(vector<Nucleon> & proj,
506  vector<Nucleon> & targ,
507  const Vec4 & bvec,
508  double & T) = 0;
509 
512 
514  double sigTot() const {
515  return sigTarg[0];
516  }
517 
519  double sigEl() const { return sigTarg[6]; }
520 
522  double sigCDE() const { return sigTarg[5]; }
523 
525  double sigSDE() const { return sigTarg[3] + sigTarg[4]; }
526 
528  double sigSDEP() const { return sigTarg[3]; }
529 
531  double sigSDET() const { return sigTarg[4]; }
532 
534  double sigDDE() const { return sigTarg[2]; }
535 
537  double sigND() const { return sigTarg[1]; }
538 
540  double bSlope() const { return sigTarg[7]; }
541 
543  virtual SigEst getSig() const {
544  return SigEst();
545  }
546 
548  double avNDB() const {
549  return avNDb;
550  }
551 
553  double Chi2(const SigEst & sigs, int npar) const;
554 
556  virtual bool evolve();
557 
559  virtual void setParm(const vector<double> &) {}
560 
563  virtual vector<double> getParm() const {
564  return vector<double>();
565  }
566  virtual vector<double> minParm() const {
567  return vector<double>();
568  }
569  virtual vector<double> maxParm() const {
570  return vector<double>();
571  }
572 
573 private:
574 
577  vector<double> sigTarg, sigErr;
578 
579 protected:
580 
583  int NInt, NGen, NPop;
584  double sigFuzz;
585  bool fitPrint;
586 
589  double avNDb;
590 
593  NucleusModel * targPtr;
594  SigmaTotal * sigTotPtr;
595  Settings * settingsPtr;
596  Info * infoPtr;
597  Rndm * rndPtr;
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 
631 
633 
634 public:
635 
638  DoubleStrikman(int modein = 0)
639  : r0(0.0), k0(4.0), sigd(75.0), alpha(0.5), opacityMode(modein) {}
640 
642  virtual ~DoubleStrikman() {}
643 
647  virtual multiset<SubCollision>
648  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
649  const Vec4 & bvec, double & T);
650 
652  double gamma() const;
653 
655  double opacity(double sig) const {
656  // *** THINK *** maybe sig/sigd?
657  sig /= sigd;
658  if ( opacityMode == 1 ) sig = 1.0/sig;
659  return sig > std::numeric_limits<double>::epsilon()?
660  pow(-expm1(-1.0/sig), alpha): 1.0;
661  }
662 
665  double Tpt(const Nucleon::State & p,
666  const Nucleon::State & t, double b) const {
667  double sig = M_PI*pow2(p[0] + t[0]);
668  double grey = opacity(sig);
669  return sig/grey > b*b*2.0*M_PI? grey: 0.0;
670  }
671 
673  SigEst getSig() const;
674 
676  virtual void setParm(const vector<double> &);
677 
680  virtual vector<double> getParm() const;
681  virtual vector<double> minParm() const;
682  virtual vector<double> maxParm() const;
683 
684  // Helper functions
685  static void shuffle(double PND1, double PND2,
686  double & PW1, double & PW2);
687  static void shuffel(double & PEL11, double P11,
688  double P12, double P21, double P22);
689  static double PNW(double PWp, double PWt, double PND) {
690  return ( 1.0 - PWp <= 0.0 || 1.0 - PWt <= 0.0 )?
691  0.0: (1.0 - PWp)*(1.0 - PWt)/(1.0 - PND);
692  }
693 
694 protected:
695 
697  double r0;
698 
700  double k0;
701 
703  double sigd;
704 
706  double alpha;
707 
710 
711 };
712 
713 
714 //==========================================================================
715 
718 
720 
721 public:
722 
725  MultiRadial(int NrIn = 0)
726  : Nr(max(1, NrIn)) {
727  dR = T0 = c = phi = vector<double>(Nr, 0.0);
728  }
729 
731  virtual ~MultiRadial() {}
732 
736  virtual multiset<SubCollision>
737  getCollisions(vector<Nucleon> & proj, vector<Nucleon> & targ,
738  const Vec4 & bvec, double & T);
739 
742  double Tpt(const Nucleon::State & p,
743  const Nucleon::State & t, double b) const {
744  return b < p[0] + t[0]? p[1]*t[1]: 0.0;
745  }
746 
748  SigEst getSig() const;
749 
751  virtual void setParm(const vector<double> &);
752 
755  virtual vector<double> getParm() const;
756  virtual vector<double> minParm() const;
757  virtual vector<double> maxParm() const;
758 
759 protected:
760 
761  // Set the probabilities according to the angle parameters.
762  void setProbs();
763 
765  int choose() const;
766 
768  int Nr;
769 
770 
772  vector<double> c;
773 
775  vector<double> dR;
776 
778  vector<double> T0;
779 
781  vector<double> phi;
782 
783 };
784 
785 
786 //==========================================================================
787 
788 // Class for storing Events and Info objects.
789 
790 class EventInfo {
791 
792 public:
793 
795  EventInfo(): ordering(-1.0), coll(0), ok(false) {}
796 
799  Info info;
800 
802  double ordering;
803  bool operator<(const EventInfo & ei) const {
804  return ordering < ei.ordering;
805  }
806 
809 
811  bool ok;
812 
815  map<Nucleon *, pair<int,int> > projs, targs;
816 
817 };
818 
819 //==========================================================================
820 
823 
824 class HIInfo {
825 
826 public:
827 
828  friend class HeavyIons;
829  friend class Angantyr;
830 
833  : idProjSave(0), idTargSave(0), bSave(0.0), NSave(0), NAccSave(0),
834  sigmaTotSave(0.0), sigmaNDSave(0.0), sigErr2TotSave(0.0),
835  sigErr2NDSave(0.0), weightSave(0.0), weightSumSave(0.0),
836  nCollSave(10, 0), nProjSave(10, 0), nTargSave(10, 0), nFailSave(0),
837  subColsPtr(NULL) {}
838 
840  double b() const {
841  return bSave;
842  }
843 
845  double sigmaTot() const {
846  return sigmaTotSave/millibarn;
847  }
848 
850  double sigmaTotErr() const {
851  return sqrt(sigErr2TotSave/max(1.0, double(NSave)))/millibarn;
852  }
853 
856  double sigmaND() const {
857  return sigmaNDSave/millibarn;
858  }
859 
861  double sigmaNDErr() const {
862  return sqrt(sigErr2NDSave/max(1.0, double(NSave)));
863  }
864 
866  long nAttempts() const {
867  return NSave;
868  }
869 
871  long nAccepted() const {
872  return NAccSave;
873  }
874 
876  int nCollTot() const { return nCollSave[0]; }
877 
880  int nCollND() const { return nCollSave[1]; }
881 
883  int nCollNDTot() const { return nProjSave[1] + nTargSave[1] - nCollSave[1]; }
884 
887  int nCollSDP() const { return nCollSave[2]; }
888 
891  int nCollSDT() const { return nCollSave[3]; }
892 
895  int nCollDD() const { return nCollSave[4]; }
896 
899  int nCollCD() const { return nCollSave[5]; }
900 
902  int nCollEL() const { return nCollSave[6]; }
903 
906  int nPartProj() const { return nProjSave[0]; }
907 
910  int nAbsProj() const { return nProjSave[1]; }
911 
914  int nDiffProj() const { return nProjSave[2]; }
915 
918  int nElProj() const { return nProjSave[3]; }
919 
922  int nPartTarg() const { return nTargSave[0]; }
923 
926  int nAbsTarg() const { return nTargSave[1]; }
927 
930  int nDiffTarg() const { return nTargSave[2]; }
931 
934  int nElTarg() const { return nTargSave[3]; }
935 
937  double weight() const { return weightSave; }
938 
940  double weightSum() const { return weightSumSave; }
941 
943  int nFail() const {
944  return nFailSave;
945  }
946 
949  ++nFailSave;
950  }
951 
953 private:
954 
957  void addAttempt(double T, double bin, double bweight);
958 
960  void reweight(double w) {
961  weightSave *= w;
962  }
963 
964  // Select the primary process.
965  void select(Info & in) {
966  primInfo = in;
967  primInfo.hiinfo = this;
968  }
969 
970  // Accept an event and update statistics in info.
971  void accept();
972 
974  void reject() {}
975 
977  int addSubCollision(const SubCollision & c);
978 
980  int addProjectileNucleon(const Nucleon & n);
981  int addTargetNucleon(const Nucleon & n);
982 
983 
985  int idProjSave, idTargSave;
986 
988  double bSave;
989 
991  long NSave, NAccSave;
992  double sigmaTotSave, sigmaNDSave, sigErr2TotSave, sigErr2NDSave;
993  double weightSave, weightSumSave;
994 
997  vector<int> nCollSave, nProjSave, nTargSave;
998 
999  // Map of primary processes and the number of events and the sum of
1000  // weights.
1001  map<int,double> sumPrimW, sumPrimW2;
1002  map<int,int> NPrim;
1003  map<int,string> NamePrim;
1004 
1005  // The info object of the primary process.
1006  Info primInfo;
1007 
1008  // Number of failed nucleon excitations.
1009  int nFailSave;
1010 
1011 
1012 public:
1013  // Access to subcollision to be extracted by the user.
1014  multiset<SubCollision>* subCollisionsPtr() { return subColsPtr; }
1015 
1016  void subCollisionsPtr(multiset<SubCollision> * sPtrIn) {
1017  subColsPtr = sPtrIn; }
1018 
1019 private:
1020 
1021  // Full information about the Glauber calculation, consisting of
1022  // all subcollisions.
1023  multiset<SubCollision>* subColsPtr;
1024 
1025 };
1026 
1027 //==========================================================================
1028 
1033 
1035 
1036 public:
1037 
1039  HIUserHooks(): idProjSave(0), idTargSave(0) {}
1040 
1042  virtual ~HIUserHooks() {}
1043 
1045  virtual void init(int idProjIn, int idTargIn) {
1046  idProjSave = idProjIn;
1047  idTargSave = idTargIn;
1048  }
1049 
1051  virtual bool hasImpactParameterGenerator() const { return false; }
1052  virtual ImpactParameterGenerator * impactParameterGenerator() const {
1053  return 0; }
1054 
1056  virtual bool hasProjectileModel() const { return false; }
1057  virtual NucleusModel * projectileModel() const { return 0; }
1058  virtual bool hasTargetModel() const { return false; }
1059  virtual NucleusModel * targetModel() const { return 0; }
1060 
1063  virtual bool hasSubCollisionModel() { return false; }
1064  virtual SubCollisionModel * subCollisionModel() { return 0; }
1065 
1067  virtual bool hasEventOrdering() const { return false; }
1068  virtual double eventOrdering(const Event &, const Info &) { return -1; }
1069 
1072  virtual bool canFixIsoSpin() const { return false; }
1073  virtual bool fixIsoSpin(EventInfo &) { return false; }
1074 
1076  virtual bool canShiftEvent() const { return false; }
1077  virtual EventInfo & shiftEvent(EventInfo & ei) const { return ei; }
1078 
1081  bool canAddNucleonExcitation() const { return false; }
1082  bool addNucleonExcitation(EventInfo &, EventInfo &, bool) const {
1083  return false; }
1084 
1086  virtual bool canForceHadronLevel() const { return false; }
1087  virtual bool forceHadronLevel(Pythia &) { return false; }
1088 
1092  virtual bool canFindRecoilers() const { return false; }
1093  virtual vector<int>
1094  findRecoilers(const Event &, bool /* tside */, int /* beam */, int /* end */,
1095  const Vec4 & /* pdiff */, const Vec4 & /* pbeam */) const {
1096  return vector<int>();
1097  }
1098 
1099 protected:
1100 
1103  int idProjSave, idTargSave;
1104 
1105 };
1106 
1107 //==========================================================================
1108 
1109 } // end namespace Pythia8
1110 
1111 #endif // Pythia8_HIUserHooks_H
int nCollCD() const
Definition: HIUserHooks.h:899
Both excited but with central diffraction.
Definition: HIUserHooks.h:201
double sigd
Saturation scale of the nucleus.
Definition: HIUserHooks.h:703
double r0
The average radius of the nucleon.
Definition: HIUserHooks.h:697
void status(Status s)
Manipulating functions:
Definition: HIUserHooks.h:123
Settings * settingsPtr
Pointers to useful objects.
Definition: HIUserHooks.h:289
virtual SigEst getSig() const
Calculate the cross sections for the given set of parameters.
Definition: HIUserHooks.h:543
virtual ~DoubleStrikman()
Virtual destructor,.
Definition: HIUserHooks.h:642
int nElProj() const
Definition: HIUserHooks.h:918
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
vector< double > c
The probability distribution.
Definition: HIUserHooks.h:772
double opacity(double sig) const
The opacity of the collision at a given sigma.
Definition: HIUserHooks.h:655
int id() const
Accessor functions:
Definition: HIUserHooks.h:88
int Nr
The number of radii.
Definition: HIUserHooks.h:768
A general Woods-Saxon distributed nucleus.
Definition: HIUserHooks.h:299
Both projectile and target are diffractively excited.
Definition: HIUserHooks.h:200
int nCollTot() const
The total number of separate sub-collisions.
Definition: HIUserHooks.h:876
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:563
virtual bool hasProjectileModel() const
A suser-supplied NucleusModel for the projectile and target.
Definition: HIUserHooks.h:1056
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:406
double bSlope() const
The elastic b-slope parameter.
Definition: HIUserHooks.h:540
vector< bool > fsig
Which cross sections were actually fitted.
Definition: HIUserHooks.h:462
int nPartTarg() const
Definition: HIUserHooks.h:922
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:638
double sigDDE() const
The double diffractive excitation cross section.
Definition: HIUserHooks.h:534
vector< double > dsig2
The extimated error (squared)
Definition: HIUserHooks.h:459
int nDiffTarg() const
Definition: HIUserHooks.h:930
int idSave
The nucleus.
Definition: HIUserHooks.h:280
double avNDB() const
Return the average non-diffractive impact parameter.
Definition: HIUserHooks.h:548
double sigmaNDErr() const
The estimated statistical error on sigmaND().
Definition: HIUserHooks.h:861
vector< double > T0
The opacity for different radii.
Definition: HIUserHooks.h:778
int nCollSDP() const
Definition: HIUserHooks.h:887
double ordering
The ordering variable of this event.
Definition: HIUserHooks.h:802
virtual bool canFixIsoSpin() const
Definition: HIUserHooks.h:1072
double width() const
Get the width.
Definition: HIUserHooks.h:424
map< Nucleon *, pair< int, int > > projs
Definition: HIUserHooks.h:815
virtual bool canFindRecoilers() const
Definition: HIUserHooks.h:1092
virtual bool hasImpactParameterGenerator() const
A user-supplied impact parameter generator.
Definition: HIUserHooks.h:1051
bool canAddNucleonExcitation() const
Definition: HIUserHooks.h:1081
double weightSum() const
The sum of weights of the produced events.
Definition: HIUserHooks.h:940
Event event
The Event and info objects.
Definition: HIUserHooks.h:798
double sigND() const
The non-diffractive (absorptive) cross section.
Definition: HIUserHooks.h:537
void failedExcitation()
Register a failed nucleon excitation.
Definition: HIUserHooks.h:948
virtual bool canShiftEvent() const
A user-supplied method for shifting the event in impact parameter space.
Definition: HIUserHooks.h:1076
long nAccepted() const
The number of produced events.
Definition: HIUserHooks.h:871
int nCollND() const
Definition: HIUserHooks.h:880
NucleusModel * projPtr
Info from the controlling HeavyIons object.
Definition: HIUserHooks.h:592
int nFail() const
The number of failed nuclon excitations in the current event.
Definition: HIUserHooks.h:943
This is not a collision.
Definition: HIUserHooks.h:196
SigEst()
Constructor for zeros.
Definition: HIUserHooks.h:469
void width(double widthIn)
Set the width (in femtometers).
Definition: HIUserHooks.h:421
int nDiffProj() const
Definition: HIUserHooks.h:914
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:519
Nucleon * targ
The target nucleon.
Definition: HIUserHooks.h:226
int nElTarg() const
Definition: HIUserHooks.h:934
SubCollisionModel()
The default constructor is empty.
Definition: HIUserHooks.h:477
double b() const
The impact-parameter distance in the current event.
Definition: HIUserHooks.h:840
This is an elastic scattering.
Definition: HIUserHooks.h:197
The projectile is diffractively excited.
Definition: HIUserHooks.h:198
double Rh() const
Accessor functions.
Definition: HIUserHooks.h:370
double sigSDEP() const
The single diffractive excitation cross section (excited projectile).
Definition: HIUserHooks.h:528
int ISave
Cache information about the nucleus.
Definition: HIUserHooks.h:283
double k0
The power in the Gamma distribution.
Definition: HIUserHooks.h:700
double sigmaND() const
Definition: HIUserHooks.h:856
void addAltState(State s)
Add an alternative state.
Definition: HIUserHooks.h:129
double RSave
The estimate of the nucleus radius.
Definition: HIUserHooks.h:286
virtual bool hasEventOrdering() const
A user-supplied ordering of events in (inverse) hardness.
Definition: HIUserHooks.h:1067
virtual bool hasSubCollisionModel()
Definition: HIUserHooks.h:1063
virtual void setParm(const vector< double > &)
Set the parameters of this model.
Definition: HIUserHooks.h:559
vector< double > phi
The angles defining the probability distribution for the radii.
Definition: HIUserHooks.h:781
GLISSANDOModel()
Default constructor.
Definition: HIUserHooks.h:357
double sigSDE() const
The single diffractive excitation cross section (both sides summed).
Definition: HIUserHooks.h:525
int nCollEL() const
The number of separate elastic sub collisions.
Definition: HIUserHooks.h:902
Internal class to report cross section estimates.
Definition: HIUserHooks.h:454
SubCollisionModel * collPtr
Info from the controlling HeavyIons object.
Definition: HIUserHooks.h:434
virtual void init(int idProjIn, int idTargIn)
Initialize this user hook.
Definition: HIUserHooks.h:1045
bool ok
Is the event properly generated?
Definition: HIUserHooks.h:811
int nCollDD() const
Definition: HIUserHooks.h:895
The target is diffractively excited.
Definition: HIUserHooks.h:199
virtual ~NucleusModel()
Virtual destructor.
Definition: HIUserHooks.h:256
const SubCollision * coll
The associated SubCollision object.
Definition: HIUserHooks.h:808
virtual ~WoodsSaxonModel()
Virtual destructor.
Definition: HIUserHooks.h:318
HIUserHooks()
The default constructor is empty.
Definition: HIUserHooks.h:1039
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:845
double Tpt(const Nucleon::State &p, const Nucleon::State &t, double b) const
Definition: HIUserHooks.h:665
double b
The impact parameter distance between the nucleons in femtometer.
Definition: HIUserHooks.h:229
long nAttempts() const
The number of attempted impact parameter points.
Definition: HIUserHooks.h:866
int opacityMode
Optional mode for opacity.
Definition: HIUserHooks.h:709
double a() const
Accessor functions:
Definition: HIUserHooks.h:309
Status status() const
The status.
Definition: HIUserHooks.h:103
HIInfo()
Constructor.
Definition: HIUserHooks.h:832
MultiRadial(int NrIn=0)
Definition: HIUserHooks.h:725
int index() const
The nucleon type.
Definition: HIUserHooks.h:91
EventInfo()
Empty constructor.
Definition: HIUserHooks.h:795
double sigSDET() const
The single diffractive excitation cross section (excited target).
Definition: HIUserHooks.h:531
int nAbsTarg() const
Definition: HIUserHooks.h:926
virtual ~NaiveSubCollisionModel()
Virtual destructor,.
Definition: HIUserHooks.h:616
int nCollNDTot() const
The total number of non-diffractive sub collisions in the current event.
Definition: HIUserHooks.h:883
virtual ~MultiRadial()
Virtual destructor,.
Definition: HIUserHooks.h:731
double sigmaTotErr() const
The estimated statistical error on sigmaTot().
Definition: HIUserHooks.h:850
virtual ~HIUserHooks()
Virtual destructor.
Definition: HIUserHooks.h:1042
vector< double > sig
The cross sections (tot, nd, dd, sdp, sdt, cd, el, bslope).
Definition: HIUserHooks.h:456
Status
Enum for specifying the status of a nucleon.
Definition: HIUserHooks.h:69
int nCollSDT() const
Definition: HIUserHooks.h:891
double sigCDE() const
The central diffractive excitation cross section.
Definition: HIUserHooks.h:522
Definition: Nucleon.h:9
virtual ~SubCollisionModel()
Virtual destructor,.
Definition: HIUserHooks.h:482
virtual bool canForceHadronLevel() const
A user supplied wrapper around the Pythia::forceHadronLevel()
Definition: HIUserHooks.h:1086
double alpha
Power of the saturation scale.
Definition: HIUserHooks.h:706
double weight() const
The weight for this collision.
Definition: HIUserHooks.h:937
virtual ~GLISSANDOModel()
Virtual destructor.
Definition: HIUserHooks.h:360
double sigTot() const
The total cross section.
Definition: HIUserHooks.h:514
The default HeavyIon model in Pythia.
Definition: HeavyIons.h:133
Type type
The type of collison.
Definition: HIUserHooks.h:236
double Tpt(const Nucleon::State &p, const Nucleon::State &t, double b) const
Definition: HIUserHooks.h:742
int nAbsProj() const
Definition: HIUserHooks.h:910
const State & state() const
The physical state of the incoming nucleon.
Definition: HIUserHooks.h:112
int nPartProj() const
Definition: HIUserHooks.h:906
vector< double > dR
The difference between radii.
Definition: HIUserHooks.h:775