StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BeamRemnants.h
1 // BeamRemnants.h 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 // Header file for beam-remnants handling.
7 // BeamRemnants: matches the remnants between the two beams.
8 
9 #ifndef Pythia8_BeamRemnants_H
10 #define Pythia8_BeamRemnants_H
11 
12 #include "Basics.h"
13 #include "BeamParticle.h"
14 #include "Event.h"
15 #include "FragmentationFlavZpT.h"
16 #include "Info.h"
17 #include "ParticleData.h"
18 #include "PartonDistributions.h"
19 #include "PartonSystems.h"
20 #include "PythiaStdlib.h"
21 #include "Settings.h"
22 
23 namespace Pythia8 {
24 
25 //==========================================================================
26 
27 // This class matches the kinematics of the hard-scattering subsystems
28 // (with primordial kT added) to that of the two beam remnants.
29 
30 class BeamRemnants {
31 
32 public:
33 
34  // Constructor.
35  BeamRemnants() { }
36 
37  // Initialization.
38  bool init( Info* infoPtrIn, Settings& settings, Rndm* rndmPtrIn,
39  BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
40  PartonSystems* partonSystemsPtrIn);
41 
42  // New beams possible for handling of hard diffraction.
43  void reassignBeamPtrs( BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn)
44  {beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;}
45 
46  // Select the flavours/kinematics/colours of the two beam remnants.
47  bool add( Event& event);
48 
49 private:
50 
51  // Constants: could only be changed in the code itself.
52  static const bool ALLOWCOLOURTWICE, CORRECTMISMATCH;
53  static const int NTRYCOLMATCH, NTRYKINMATCH;
54 
55  // Initialization data, read from Settings.
56  bool doPrimordialKT, allowRescatter, doRescatterRestoreY, doReconnect;
57  double primordialKTsoft, primordialKThard, primordialKTremnant,
58  halfScaleForKT, halfMassForKT, reconnectRange,
59  pT0Ref, ecmRef, ecmPow;
60 
61  // Information set for events.
62  int nSys, oldSize;
63  double eCM, sCM, pT0, pT20Rec;
64 
65  // Colour collapses (when one colour is mapped onto another).
66  vector<int> colFrom, colTo;
67 
68  // Pointer to various information on the generation.
69  Info* infoPtr;
70 
71  // Pointer to the random number generator.
72  Rndm* rndmPtr;
73 
74  // Pointers to the two incoming beams.
75  BeamParticle* beamAPtr;
76  BeamParticle* beamBPtr;
77 
78  // Pointer to information on subcollision parton locations.
79  PartonSystems* partonSystemsPtr;
80 
81  // Do the kinematics of the collision subsystems and two beam remnants.
82  bool setKinematics( Event& event);
83 
84  // Allow colour reconnections.
85  bool reconnectColours( Event& event);
86 
87  // Check that colours are consistent.
88  bool checkColours( Event& event);
89 
90 };
91 
92 //==========================================================================
93 
94 } // end namespace Pythia8
95 
96 #endif // Pythia8_BeamRemnants_H