1 // BeamRemnants.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2010 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.
6 // Header file for beam-remnants handling.
7 // BeamRemnants: matches the remnants between the two beams.
9 #ifndef Pythia8_BeamRemnants_H
10 #define Pythia8_BeamRemnants_H
13 #include "BeamParticle.h"
15 #include "FragmentationFlavZpT.h"
17 #include "ParticleData.h"
18 #include "PartonDistributions.h"
19 #include "PartonSystems.h"
20 #include "PythiaStdlib.h"
25 //==========================================================================
27 // This class matches the kinematics of the hard-scattering subsystems
28 // (with primordial kT added) to that of the two beam remnants.
38 bool init( Info* infoPtrIn, Settings& settings, Rndm* rndmPtrIn,
39 BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
40 PartonSystems* partonSystemsPtrIn);
42 // New beams possible for handling of hard diffraction.
43 void reassignBeamPtrs( BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn)
44 {beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;}
46 // Select the flavours/kinematics/colours of the two beam remnants.
47 bool add( Event& event);
51 // Constants: could only be changed in the code itself.
52 static const bool ALLOWCOLOURTWICE, CORRECTMISMATCH;
53 static const int NTRYCOLMATCH, NTRYKINMATCH;
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;
61 // Information set for events.
63 double eCM, sCM, pT0, pT20Rec;
65 // Colour collapses (when one colour is mapped onto another).
66 vector<int> colFrom, colTo;
68 // Pointer to various information on the generation.
71 // Pointer to the random number generator.
74 // Pointers to the two incoming beams.
75 BeamParticle* beamAPtr;
76 BeamParticle* beamBPtr;
78 // Pointer to information on subcollision parton locations.
79 PartonSystems* partonSystemsPtr;
81 // Do the kinematics of the collision subsystems and two beam remnants.
82 bool setKinematics( Event& event);
84 // Allow colour reconnections.
85 bool reconnectColours( Event& event);
87 // Check that colours are consistent.
88 bool checkColours( Event& event);
92 //==========================================================================
94 } // end namespace Pythia8
96 #endif // Pythia8_BeamRemnants_H