StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Event.cc
1 // Event.cc is a part of the PYTHIA event generator.
2 // Copyright (C) 2012 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Function definitions (not found in the header) for the
7 // Particle and Event classes, and some related global functions.
8 
9 #include "Event.h"
10 
11 namespace Pythia8 {
12 
13 //==========================================================================
14 
15 // Particle class.
16 // This class holds info on a particle in general.
17 
18 //--------------------------------------------------------------------------
19 
20 // Constants: could be changed here if desired, but normally should not.
21 // These are of technical nature, as described for each.
22 
23 // Small number to avoid division by zero.
24 const double Particle::TINY = 1e-20;
25 
26 //--------------------------------------------------------------------------
27 
28 // Functions for rapidity and pseudorapidity.
29 
30 double Particle::y() const {
31  double temp = log( ( pSave.e() + abs(pSave.pz()) ) / max( TINY, mT() ) );
32  return (pSave.pz() > 0) ? temp : -temp;
33 }
34 
35 double Particle::eta() const {
36  double temp = log( ( pSave.pAbs() + abs(pSave.pz()) ) / max( TINY, pT() ) );
37  return (pSave.pz() > 0) ? temp : -temp;
38 }
39 
40 //--------------------------------------------------------------------------
41 
42 // Particle name, with status but imposed maximum length -> may truncate.
43 
44 string Particle::nameWithStatus(int maxLen) const {
45 
46  if (pdePtr == 0) return " ";
47  string temp = (statusSave > 0) ? pdePtr->name(idSave)
48  : "(" + pdePtr->name(idSave) + ")";
49  while (int(temp.length()) > maxLen) {
50  // Remove from end, excluding closing bracket and charge.
51  int iRem = temp.find_last_not_of(")+-0");
52  temp.erase(iRem, 1);
53  }
54  return temp;
55 }
56 
57 //--------------------------------------------------------------------------
58 
59 // Add offsets to mother and daughter pointers (must be non-negative).
60 
61 void Particle::offsetHistory( int minMother, int addMother, int minDaughter,
62  int addDaughter) {
63 
64  if (addMother < 0 || addDaughter < 0) return;
65  if ( mother1Save > minMother ) mother1Save += addMother;
66  if ( mother2Save > minMother ) mother2Save += addMother;
67  if (daughter1Save > minDaughter) daughter1Save += addDaughter;
68  if (daughter2Save > minDaughter) daughter2Save += addDaughter;
69 
70 }
71 
72 //--------------------------------------------------------------------------
73 
74 // Add offsets to colour and anticolour (must be positive).
75 
76 void Particle::offsetCol( int addCol) {
77 
78  if (addCol < 0) return;
79  if ( colSave > 0) colSave += addCol;
80  if (acolSave > 0) acolSave += addCol;
81 
82 }
83 
84 //--------------------------------------------------------------------------
85 
86 // Invariant mass of a pair and its square.
87 // (Not part of class proper, but tightly linked.)
88 
89 double m(const Particle& pp1, const Particle& pp2) {
90  double m2 = pow2(pp1.e() + pp2.e()) - pow2(pp1.px() + pp2.px())
91  - pow2(pp1.py() + pp2.py()) - pow2(pp1.pz() + pp2.pz());
92  return (m2 > 0. ? sqrt(m2) : 0.);
93 }
94 
95 double m2(const Particle& pp1, const Particle& pp2) {
96  double m2 = pow2(pp1.e() + pp2.e()) - pow2(pp1.px() + pp2.px())
97  - pow2(pp1.py() + pp2.py()) - pow2(pp1.pz() + pp2.pz());
98  return m2;
99 }
100 
101 //==========================================================================
102 
103 // Event class.
104 // This class holds info on the complete event record.
105 
106 //--------------------------------------------------------------------------
107 
108 // Constants: could be changed here if desired, but normally should not.
109 // These are of technical nature, as described for each.
110 
111 // Maxmimum number of mothers or daughter indices per line in listing.
112 const int Event::IPERLINE = 20;
113 
114 //--------------------------------------------------------------------------
115 
116 // Copy all information from one event record to another.
117 
118 Event& Event::operator=( const Event& oldEvent) {
119 
120  // Do not copy if same.
121  if (this != &oldEvent) {
122 
123  // Reset all current info in the event.
124  clear();
125 
126  // Copy all the particles one by one.
127  for (int i = 0; i < oldEvent.size(); ++i) append( oldEvent[i] );
128 
129  // Copy all the junctions one by one.
130  for (int i = 0; i < oldEvent.sizeJunction(); ++i)
131  appendJunction( oldEvent.getJunction(i) );
132 
133  // Copy all other values.
134  startColTag = oldEvent.startColTag;
135  maxColTag = oldEvent.maxColTag;
136  savedSize = oldEvent.savedSize;
137  savedJunctionSize = oldEvent.savedJunctionSize;
138  scaleSave = oldEvent.scaleSave;
139  scaleSecondSave = oldEvent.scaleSecondSave;
140  headerList = oldEvent.headerList;
141  particleDataPtr = oldEvent.particleDataPtr;
142 
143  // Done.
144  }
145  return *this;
146 
147 }
148 
149 //--------------------------------------------------------------------------
150 
151 // Add a copy of an existing particle at the end of the event record;
152 // return index. Three cases, depending on sign of new status code:
153 // Positive: copy is viewed as daughter, status of original is negated.
154 // Negative: copy is viewed as mother, status of original is unchanged.
155 // Zero: the new is a perfect carbon copy (maybe to be changed later).
156 
157 int Event::copy(int iCopy, int newStatus) {
158 
159  // Protect against attempt to copy negative entries (e.g., junction codes)
160  // or entries beyond end of record.
161  if (iCopy < 0 || iCopy >= size()) return -1;
162 
163  // Simple carbon copy.
164  entry.push_back(entry[iCopy]);
165  int iNew = entry.size() - 1;
166 
167  // Set up to make new daughter of old.
168  if (newStatus > 0) {
169  entry[iCopy].daughters(iNew,iNew);
170  entry[iCopy].statusNeg();
171  entry[iNew].mothers(iCopy, iCopy);
172  entry[iNew].status(newStatus);
173 
174  // Set up to make new mother of old.
175  } else if (newStatus < 0) {
176  entry[iCopy].mothers(iNew,iNew);
177  entry[iNew].daughters(iCopy, iCopy);
178  entry[iNew].status(newStatus);
179  }
180 
181  // Done.
182  return iNew;
183 
184 }
185 
186 //--------------------------------------------------------------------------
187 
188 // Print an event - special cases that rely on the general method.
189 // Not inline to make them directly callable in (some) debuggers.
190 
191 void Event::list() const {
192  list(false, false, cout);
193 }
194 
195 void Event::list(ostream& os) const {
196  list(false, false, os);
197 }
198 
199 void Event::list(bool showScaleAndVertex, bool showMothersAndDaughters)
200  const {
201  list(showScaleAndVertex, showMothersAndDaughters, cout);
202 }
203 
204 //--------------------------------------------------------------------------
205 
206 // Print an event.
207 
208 void Event::list(bool showScaleAndVertex, bool showMothersAndDaughters,
209  ostream& os) const {
210 
211  // Header.
212  os << "\n -------- PYTHIA Event Listing " << headerList << "----------"
213  << "-------------------------------------------------\n \n no "
214  << " id name status mothers daughters colou"
215  << "rs p_x p_y p_z e m \n";
216  if (showScaleAndVertex)
217  os << " scale pol "
218  << " xProd yProd zProd tProd "
219  << " tau\n";
220 
221  // At high energy switch to scientific format for momenta.
222  bool useFixed = (entry[0].e() < 1e5);
223 
224  // Listing of complete event.
225  Vec4 pSum;
226  double chargeSum = 0.;
227  for (int i = 0; i < int(entry.size()); ++i) {
228  const Particle& pt = entry[i];
229 
230  // Basic line for a particle, always printed.
231  os << setw(6) << i << setw(10) << pt.id() << " " << left
232  << setw(18) << pt.nameWithStatus(18) << right << setw(4)
233  << pt.status() << setw(6) << pt.mother1() << setw(6)
234  << pt.mother2() << setw(6) << pt.daughter1() << setw(6)
235  << pt.daughter2() << setw(6) << pt.col() << setw(6) << pt.acol()
236  << ( (useFixed) ? fixed : scientific ) << setprecision(3)
237  << setw(11) << pt.px() << setw(11) << pt.py() << setw(11)
238  << pt.pz() << setw(11) << pt.e() << setw(11) << pt.m() << "\n";
239 
240  // Optional extra line for scale value, polarization and production vertex.
241  if (showScaleAndVertex)
242  os << " " << setw(11) << pt.scale()
243  << " " << fixed << setprecision(3) << setw(11) << pt.pol()
244  << " " << scientific << setprecision(3)
245  << setw(11) << pt.xProd() << setw(11) << pt.yProd()
246  << setw(11) << pt.zProd() << setw(11) << pt.tProd()
247  << setw(11) << pt.tau() << "\n";
248 
249  // Optional extra line, giving a complete list of mothers and daughters.
250  if (showMothersAndDaughters) {
251  int linefill = 2;
252  os << " mothers:";
253  vector<int> allMothers = motherList(i);
254  for (int j = 0; j < int(allMothers.size()); ++j) {
255  os << " " << allMothers[j];
256  if (++linefill == IPERLINE) {os << "\n "; linefill = 0;}
257  }
258  os << "; daughters:";
259  vector<int> allDaughters = daughterList(i);
260  for (int j = 0; j < int(allDaughters.size()); ++j) {
261  os << " " << allDaughters[j];
262  if (++linefill == IPERLINE) {os << "\n "; linefill = 0;}
263  }
264  if (linefill !=0) os << "\n";
265  }
266 
267  // Extra blank separation line when each particle spans more than one line.
268  if (showScaleAndVertex || showMothersAndDaughters) os << "\n";
269 
270  // Statistics on momentum and charge.
271  if (entry[i].status() > 0) {
272  pSum += entry[i].p();
273  chargeSum += entry[i].charge();
274  }
275  }
276 
277  // Line with sum charge, momentum, energy and invariant mass.
278  os << fixed << setprecision(3) << " "
279  << "Charge sum:" << setw(7) << chargeSum << " Momentum sum:"
280  << ( (useFixed) ? fixed : scientific ) << setprecision(3)
281  << setw(11) << pSum.px() << setw(11) << pSum.py() << setw(11)
282  << pSum.pz() << setw(11) << pSum.e() << setw(11) << pSum.mCalc()
283  << "\n";
284 
285  // Listing finished.
286  os << "\n -------- End PYTHIA Event Listing ----------------------------"
287  << "-------------------------------------------------------------------"
288  << endl;
289 }
290 
291 //--------------------------------------------------------------------------
292 
293 // Find complete list of mothers.
294 
295 vector<int> Event::motherList(int i) const {
296 
297  // Vector of all the mothers; created empty.
298  vector<int> mothers;
299 
300  // Read out the two official mother indices and status code.
301  int mother1 = entry[i].mother1();
302  int mother2 = entry[i].mother2();
303  int statusAbs = entry[i].statusAbs();
304 
305  // Special cases in the beginning, where the meaning of zero is unclear.
306  if (statusAbs == 11 || statusAbs == 12) ;
307  else if (mother1 == 0 && mother2 == 0) mothers.push_back(0);
308 
309  // One mother or a carbon copy
310  else if (mother2 == 0 || mother2 == mother1) mothers.push_back(mother1);
311 
312  // A range of mothers from string fragmentation.
313  else if ( statusAbs > 80 && statusAbs < 90)
314  for (int iRange = mother1; iRange <= mother2; ++iRange)
315  mothers.push_back(iRange);
316 
317  // Two separate mothers.
318  else {
319  mothers.push_back( min(mother1, mother2) );
320  mothers.push_back( max(mother1, mother2) );
321  }
322 
323  // Done.
324  return mothers;
325 
326 }
327 
328 //--------------------------------------------------------------------------
329 
330 // Find complete list of daughters.
331 
332 vector<int> Event::daughterList(int i) const {
333 
334  // Vector of all the daughters; created empty.
335  vector<int> daughters;
336 
337  // Read out the two official daughter indices.
338  int daughter1 = entry[i].daughter1();
339  int daughter2 = entry[i].daughter2();
340 
341  // Simple cases: no or one daughter.
342  if (daughter1 == 0 && daughter2 == 0) ;
343  else if (daughter2 == 0 || daughter2 == daughter1)
344  daughters.push_back(daughter1);
345 
346  // A range of daughters.
347  else if (daughter2 > daughter1)
348  for (int iRange = daughter1; iRange <= daughter2; ++iRange)
349  daughters.push_back(iRange);
350 
351  // Two separated daughters.
352  else {
353  daughters.push_back(daughter2);
354  daughters.push_back(daughter1);
355  }
356 
357  // Special case for two incoming beams: attach further
358  // initiators and remnants that have beam as mother.
359  if (entry[i].statusAbs() == 12 || entry[i].statusAbs() == 13)
360  for (int iDau = 3; iDau < size(); ++iDau)
361  if (entry[iDau].mother1() == i) {
362  bool isIn = false;
363  for (int iIn = 0; iIn < int(daughters.size()); ++iIn)
364  if (iDau == daughters[iIn]) isIn = true;
365  if (!isIn) daughters.push_back(iDau);
366  }
367 
368  // Done.
369  return daughters;
370 
371 }
372 
373 //--------------------------------------------------------------------------
374 
375 // Convert internal Pythia status codes to the HepMC status conventions.
376 
377 int Event::statusHepMC(int i) const {
378 
379  // Positive codes are final particles. Status -12 are beam particles.
380  int statusNow = entry[i].status();
381  if (statusNow > 0) return 1;
382  if (statusNow == -12) return 4;
383 
384  // Hadrons, muons, taus that decay normally are status 2.
385  int idNow = entry[i].id();
386  if (entry[i].isHadron() || abs(idNow) == 13 || abs(idNow) == 15) {
387  int iDau = entry[i].daughter1();
388  // Particle should not decay into itself (e.g. Bose-Einstein).
389  if ( entry[iDau].id() != idNow) {
390  int statusDau = entry[ iDau ].statusAbs();
391  if (statusDau > 90 && statusDau < 95) return 2;
392  }
393  }
394 
395  // Other acceptable negative codes as their positive counterpart.
396  if (statusNow <= -11 && statusNow >= -200) return -statusNow;
397 
398  // Unacceptable codes as 0.
399  return 0;
400 
401 }
402 
403 //--------------------------------------------------------------------------
404 
405 // Trace the first and last copy of one and the same particle.
406 
407 int Event::iTopCopy( int i) const {
408 
409  int iUp = i;
410  while ( iUp > 0 && entry[iUp].mother2() == entry[iUp].mother1()
411  && entry[iUp].mother1() > 0) iUp = entry[iUp].mother1();
412  return iUp;
413 
414 }
415 
416 int Event::iBotCopy( int i) const {
417 
418  int iDn = i;
419  while ( iDn > 0 && entry[iDn].daughter2() == entry[iDn].daughter1()
420  && entry[iDn].daughter1() > 0) iDn = entry[iDn].daughter1();
421  return iDn;
422 
423 }
424 
425 //--------------------------------------------------------------------------
426 
427 // Trace the first and last copy of one and the same particle,
428 // also through shower branchings, making use of flavour matches.
429 // Stops tracing when this gives ambiguities.
430 
431 int Event::iTopCopyId( int i) const {
432 
433  int id = entry[i].id();
434  int iUp = i;
435  for ( ; ; ) {
436  int mother1 = entry[iUp].mother1();
437  int id1 = (mother1 > 0) ? entry[mother1].id() : 0;
438  int mother2 = entry[iUp].mother2();
439  int id2 = (mother2 > 0) ? entry[mother2].id() : 0;
440  if (mother2 != mother1 && id2 == id1) break;
441  if (id1 == id) {
442  iUp = mother1;
443  continue;
444  }
445  if (id2 == id) {
446  iUp = mother2;
447  continue;
448  }
449  break;
450  }
451  return iUp;
452 
453 }
454 
455 int Event::iBotCopyId( int i) const {
456 
457  int id = entry[i].id();
458  int iDn = i;
459  for ( ; ; ) {
460  int daughter1 = entry[iDn].daughter1();
461  int id1 = (daughter1 > 0) ? entry[daughter1].id() : 0;
462  int daughter2 = entry[iDn].daughter2();
463  int id2 = (daughter2 > 0) ? entry[daughter2].id() : 0;
464  if (daughter2 != daughter1 && id2 == id1) break;
465  if (id1 == id) {
466  iDn = daughter1;
467  continue;
468  }
469  if (id2 == id) {
470  iDn = daughter2;
471  continue;
472  }
473  break;
474  }
475  return iDn;
476 
477 }
478 
479 //--------------------------------------------------------------------------
480 
481 // Find complete list of sisters.
482 
483 vector<int> Event::sisterList(int i) const {
484 
485  // Vector of all the sisters; created empty.
486  vector<int> sisters;
487  if (entry[i].statusAbs() == 11) return sisters;
488 
489  // Find mother and all its daughters.
490  int iMother = entry[i].mother1();
491  vector<int> daughters = daughterList(iMother);
492 
493  // Copy all daughters, excepting the input particle itself.
494  for (int j = 0; j < int(daughters.size()); ++j)
495  if (daughters[j] != i) sisters.push_back( daughters[j] );
496 
497  // Done.
498  return sisters;
499 
500 }
501 
502 //--------------------------------------------------------------------------
503 
504 // Find complete list of sisters. Traces up with iTopCopy and
505 // down with iBotCopy to give sisters at same level of evolution.
506 // Should this not give any final particles, the search is widened.
507 
508 vector<int> Event::sisterListTopBot(int i, bool widenSearch) const {
509 
510  // Vector of all the sisters; created empty.
511  vector<int> sisters;
512  if (entry[i].statusAbs() == 11) return sisters;
513 
514  // Trace up to first copy of current particle.
515  int iUp = iTopCopy(i);
516 
517  // Find mother and all its daughters.
518  int iMother = entry[iUp].mother1();
519  vector<int> daughters = daughterList(iMother);
520 
521  // Trace all daughters down, excepting the input particle itself.
522  for (int jD = 0; jD < int(daughters.size()); ++jD)
523  if (daughters[jD] != iUp)
524  sisters.push_back( iBotCopy( daughters[jD] ) );
525 
526  // Prune any non-final particles from list.
527  int jP = 0;
528  while (jP < int(sisters.size())) {
529  if (entry[sisters[jP]].status() > 0) ++jP;
530  else {
531  sisters[jP] = sisters.back();
532  sisters.pop_back();
533  }
534  }
535 
536  // If empty list then restore immediate daughters.
537  if (sisters.size() == 0 && widenSearch) {
538  for (int jR = 0; jR < int(daughters.size()); ++jR)
539  if (daughters[jR] != iUp)
540  sisters.push_back( iBotCopy( daughters[jR] ) );
541 
542  // Then trace all daughters, not only bottom copy.
543  for (int jT = 0; jT < int(sisters.size()); ++jT) {
544  daughters = daughterList( sisters[jT] );
545  for (int k = 0; k < int(daughters.size()); ++k)
546  sisters.push_back( daughters[k] );
547  }
548 
549  // And then prune any non-final particles from list.
550  int jN = 0;
551  while (jN < int(sisters.size())) {
552  if (entry[sisters[jN]].status() > 0) ++jN;
553  else {
554  sisters[jN] = sisters.back();
555  sisters.pop_back();
556  }
557  }
558  }
559 
560  // Done.
561  return sisters;
562 
563 }
564 
565 //--------------------------------------------------------------------------
566 
567 // Check whether a given particle is an arbitrarily-steps-removed
568 // mother to another. For the parton -> hadron transition, only
569 // first-rank hadrons are associated with the respective end quark.
570 
571 bool Event::isAncestor(int i, int iAncestor) const {
572 
573  // Begin loop to trace upwards from the daughter.
574  int iUp = i;
575  for ( ; ; ) {
576 
577  // If positive match then done.
578  if (iUp == iAncestor) return true;
579 
580  // If out of range then failed to find match.
581  if (iUp <= 0 || iUp > size()) return false;
582 
583  // If unique mother then keep on moving up the chain.
584  int mother1 = entry[iUp].mother1();
585  int mother2 = entry[iUp].mother2();
586  if (mother2 == mother1 || mother2 == 0) {iUp = mother1; continue;}
587 
588  // If many mothers, except hadronization, then fail tracing.
589  int status = entry[iUp].statusAbs();
590  if (status < 81 || status > 86) return false;
591 
592  // For hadronization step, fail if not first rank, else move up.
593  if (status == 82) {
594  iUp = (iUp + 1 < size() && entry[iUp + 1].mother1() == mother1)
595  ? mother1 : mother2; continue;
596  }
597  if (status == 83) {
598  if (entry[iUp - 1].mother1() == mother1) return false;
599  iUp = mother1; continue;
600  }
601  if (status == 84) {
602  if (iUp + 1 < size() && entry[iUp + 1].mother1() == mother1)
603  return false;
604  iUp = mother1; continue;
605  }
606 
607  // Fail for ministring -> one hadron and for junctions.
608  return false;
609 
610  }
611  // End of loop. Should never reach beyond here.
612  return false;
613 
614 }
615 
616 //--------------------------------------------------------------------------
617 
618 // Erase junction stored in specified slot and move up the ones under.
619 
620 void Event::eraseJunction(int i) {
621 
622  for (int j = i; j < int(junction.size()) - 1; ++j)
623  junction[j] = junction[j + 1];
624  junction.pop_back();
625 
626 }
627 
628 //--------------------------------------------------------------------------
629 
630 // Print the junctions in an event.
631 
632 void Event::listJunctions(ostream& os) const {
633 
634  // Header.
635  os << "\n -------- PYTHIA Junction Listing "
636  << headerList.substr(0,30) << "\n \n no kind col0 col1 col2 "
637  << "endc0 endc1 endc2 stat0 stat1 stat2\n";
638 
639  // Loop through junctions in event and list them.
640  for (int i = 0; i < sizeJunction(); ++i)
641  os << setw(6) << i << setw(6) << kindJunction(i) << setw(6)
642  << colJunction(i, 0) << setw(6) << colJunction(i, 1) << setw(6)
643  << colJunction(i, 2) << setw(6) << endColJunction(i, 0) << setw(6)
644  << endColJunction(i, 1) << setw(6) << endColJunction(i, 2) << setw(6)
645  << statusJunction(i, 0) << setw(6) << statusJunction(i, 1) << setw(6)
646  << statusJunction(i, 2) << "\n";
647 
648  // Alternative if no junctions. Listing finished.
649  if (sizeJunction() == 0) os << " no junctions present \n";
650  os << "\n -------- End PYTHIA Junction Listing --------------------"
651  << "------" << endl;
652 }
653 
654 //--------------------------------------------------------------------------
655 
656 // Operator overloading allows to append one event to an existing one.
657 
658 Event& Event::operator+=( const Event& addEvent) {
659 
660  // Find offsets. One less since won't copy line 0.
661  int offsetIdx = entry.size() - 1;
662  int offsetCol = maxColTag;
663 
664  // Add energy to zeroth line and calculate new invariant mass.
665  entry[0].p( entry[0].p() + addEvent[0].p() );
666  entry[0].m( entry[0].mCalc() );
667 
668  // Read out particles from line 1 (not 0) onwards.
669  Particle temp;
670  for (int i = 1; i < addEvent.size(); ++i) {
671  temp = addEvent[i];
672 
673  // Add offset to nonzero mother, daughter and colour indices.
674  if (temp.mother1() > 0) temp.mother1( temp.mother1() + offsetIdx );
675  if (temp.mother2() > 0) temp.mother2( temp.mother2() + offsetIdx );
676  if (temp.daughter1() > 0) temp.daughter1( temp.daughter1() + offsetIdx );
677  if (temp.daughter2() > 0) temp.daughter2( temp.daughter2() + offsetIdx );
678  if (temp.col() > 0) temp.col( temp.col() + offsetCol );
679  if (temp.acol() > 0) temp.acol( temp.acol() + offsetCol );
680 
681  // Append particle to summed event.
682  append( temp );
683  }
684 
685  // Read out junctions one by one.
686  Junction tempJ;
687  int begCol, endCol;
688  for (int i = 0; i < addEvent.sizeJunction(); ++i) {
689  tempJ = addEvent.getJunction(i);
690 
691  // Add colour offsets to all three legs.
692  for (int j = 0; j < 3; ++j) {
693  begCol = tempJ.col(j);
694  endCol = tempJ.endCol(j);
695  if (begCol > 0) begCol += offsetCol;
696  if (endCol > 0) endCol += offsetCol;
697  tempJ.cols( j, begCol, endCol);
698  }
699 
700  // Append junction to summed event.
701  appendJunction( tempJ );
702  }
703 
704  // Set header that indicates character as sum of events.
705  headerList = "(combination of several events) -------";
706 
707  // Done.
708  return *this;
709 
710 }
711 
712 //==========================================================================
713 
714 } // end namespace Pythia8
Definition: AgUStep.h:26