StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Merging.h
1 // Merging.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 is written by Stefan Prestel.
7 // Merging: Wpapper class to interface matrix element merging schemes with
8 // Pythia
9 
10 #ifndef Pythia8_Merging_H
11 #define Pythia8_Merging_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/Event.h"
16 #include "Pythia8/History.h"
17 #include "Pythia8/Info.h"
18 #include "Pythia8/MergingHooks.h"
19 #include "Pythia8/ParticleData.h"
20 #include "Pythia8/PartonLevel.h"
21 #include "Pythia8/PythiaStdlib.h"
22 #include "Pythia8/Settings.h"
23 #include "Pythia8/StandardModel.h"
24 
25 namespace Pythia8 {
26 
27 //==========================================================================
28 
29 // Merging is a wrapper class for the interface of matrix element merging and
30 // Pythia8.
31 
32 class Merging {
33 
34 public:
35 
36  // Destructor.
37  virtual ~Merging(){}
38 
39  // Initialisation function for internal use inside Pythia source code
40  void initPtr( Settings* settingsPtrIn, Info* infoPtrIn,
41  ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
42  BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
43  MergingHooks* mergingHooksPtrIn, PartonLevel* trialPartonLevelPtrIn,
44  CoupSM* coupSMPtrIn) { settingsPtr = settingsPtrIn; infoPtr = infoPtrIn;
45  particleDataPtr = particleDataPtrIn; rndmPtr = rndmPtrIn;
46  beamAPtr = beamAPtrIn; beamBPtr = beamBPtrIn;
47  trialPartonLevelPtr = trialPartonLevelPtrIn;
48  mergingHooksPtr = mergingHooksPtrIn; coupSMPtr = coupSMPtrIn;
49  }
50 
51  // Initialisation function for internal use inside Pythia source code
52  virtual void init();
53 
54  // Function to print statistics.
55  virtual void statistics();
56 
57  // Function to steer different merging prescriptions.
58  virtual int mergeProcess( Event& process);
59 
60 protected:
61 
62  //----------------------------------------------------------------------//
63  // The members
64  //----------------------------------------------------------------------//
65 
66  // Constructor.
67  Merging() { settingsPtr = 0; infoPtr = 0; particleDataPtr = 0;
68  rndmPtr = 0; beamAPtr = 0; beamBPtr = 0; trialPartonLevelPtr = 0;
69  mergingHooksPtr = 0; }
70 
71  // Make Pythia class friend
72  friend class Pythia;
73 
74  // Settings: databases of flags/modes/parms/words to control run.
75  Settings* settingsPtr;
76 
77  // Pointer to various information on the generation.
78  Info* infoPtr;
79 
80  // Pointer to the particle data table.
81  ParticleData* particleDataPtr;
82 
83  // Pointer to random number generator.
84  Rndm* rndmPtr;
85 
86  // Pointer to trial PartonLevel object
87  PartonLevel* trialPartonLevelPtr;
88 
89  // Pointer to trial MergingHooks object
90  MergingHooks* mergingHooksPtr;
91 
92  // Pointers to beam particles.
93  BeamParticle* beamAPtr;
94  BeamParticle* beamBPtr;
95 
96  // Pointer to standard model couplings.
97  CoupSM* coupSMPtr;
98 
99  // Minimal value found for the merging scale in events.
100  double tmsNowMin;
101  static const double TMSMISMATCH;
102 
103  // Function to perform CKKW-L merging on the event.
104  int mergeProcessCKKWL( Event& process);
105 
106  // Function to perform UMEPS merging on the event.
107  int mergeProcessUMEPS( Event& process);
108 
109  // Function to perform NL3 NLO merging on the event.
110  int mergeProcessNL3( Event& process);
111 
112  // Function to perform UNLOPS merging on the event.
113  int mergeProcessUNLOPS( Event& process);
114 
115  // Function to apply the merging scale cut on an input event.
116  bool cutOnProcess( Event& process);
117 
118 };
119 
120 //==========================================================================
121 
122 } // end namespace Pythia8
123 
124 #endif // Pythia8_Merging_H
Definition: AgUStep.h:26