StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HiddenValleyFragmentation.h
1 // HiddenValleyFragmentation.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 classes for Hidden-Valley fragmentation.
7 
8 #ifndef Pythia8_HiddenValleyFragmentation_H
9 #define Pythia8_HiddenValleyFragmentation_H
10 
11 #include "Pythia8/Basics.h"
12 #include "Pythia8/Event.h"
13 #include "Pythia8/FragmentationFlavZpT.h"
14 #include "Pythia8/FragmentationSystems.h"
15 #include "Pythia8/Info.h"
16 #include "Pythia8/MiniStringFragmentation.h"
17 #include "Pythia8/ParticleData.h"
18 #include "Pythia8/PythiaStdlib.h"
19 #include "Pythia8/Settings.h"
20 #include "Pythia8/StringFragmentation.h"
21 
22 namespace Pythia8 {
23 
24 //==========================================================================
25 
26 // The HVStringFlav class is used to select HV-quark and HV-hadron flavours.
27 
28 class HVStringFlav : public StringFlav {
29 
30 public:
31 
32  // Constructor.
33  HVStringFlav() {}
34 
35  // Destructor.
36  ~HVStringFlav() {}
37 
38  // Initialize data members.
39  void init(Settings& settings, ParticleData* particleDataPtrIn,
40  Rndm* rndmPtrIn, Info* infoPtrIn);
41 
42  // Pick a new flavour (including diquarks) given an incoming one.
43  FlavContainer pick(FlavContainer& flavOld, double, double);
44 
45  // Combine two flavours (including diquarks) to produce a hadron.
46  int combine(FlavContainer& flav1, FlavContainer& flav2);
47 
48 private:
49 
50  // Initialization data, to be read from Settings.
51  int nFlav;
52  double probVector;
53 
54 };
55 
56 //==========================================================================
57 
58 // The HVStringPT class is used to select select HV transverse momenta.
59 
60 class HVStringPT : public StringPT {
61 
62 public:
63 
64  // Constructor.
65  HVStringPT() {}
66 
67  // Destructor.
68  ~HVStringPT() {}
69 
70  // Initialize data members.
71  void init(Settings& settings, ParticleData* particleDataPtrIn,
72  Rndm* rndmPtrIn, Info* infoPtrIn);
73 
74 };
75 
76 //==========================================================================
77 
78 // The HVStringZ class is used to sample the HV fragmentation function f(z).
79 
80 class HVStringZ : public StringZ {
81 
82 public:
83 
84  // Constructor.
85  HVStringZ() {}
86 
87  // Destructor.
88  ~HVStringZ() {}
89 
90  // Initialize data members.
91  void init(Settings& settings, ParticleData& particleData,
92  Rndm* rndmPtrIn, Info* infoPtrIn);
93 
94  // Fragmentation function: top-level to determine parameters.
95  double zFrag( int idOld, int idNew = 0, double mT2 = 1.);
96 
97  // Parameters for stopping in the middle; for now hardcoded.
98  virtual double stopMass() {return 1.5 * mhvMeson;}
99  virtual double stopNewFlav() {return 2.0;}
100  virtual double stopSmear() {return 0.2;}
101 
102 private:
103 
104  // Initialization data, to be read from Settings and ParticleData.
105  double mqv2, bmqv2, rFactqv, mhvMeson;
106 
107 };
108 
109 //==========================================================================
110 
111 // The HiddenValleyFragmentation class contains the routines
112 // to fragment a Hidden Valley partonic system.
113 
114 class HiddenValleyFragmentation {
115 
116 public:
117 
118  // Constructor.
119  HiddenValleyFragmentation() : doHVfrag(false), hvFlavSelPtr(NULL),
120  hvPTSelPtr(NULL), hvZSelPtr(NULL) {}
121 
122  // Destructor.
123  ~HiddenValleyFragmentation() { if (doHVfrag) {
124  if (hvZSelPtr) delete hvZSelPtr;
125  if (hvPTSelPtr) delete hvPTSelPtr;
126  if (hvFlavSelPtr) delete hvFlavSelPtr;} }
127 
128  // Initialize and save pointers.
129  bool init(Info* infoPtrIn, Settings& settings,
130  ParticleData* particleDataPtrIn, Rndm* rndmPtrIn);
131 
132  // Do the fragmentation: driver routine.
133  bool fragment(Event& event);
134 
135 private:
136 
137  // Pointer to various information on the generation.
138  Info* infoPtr;
139 
140  // Pointer to the particle data table.
141  ParticleData* particleDataPtr;
142 
143  // Pointer to the random number generator.
144  Rndm* rndmPtr;
145 
146  // Data mambers.
147  bool doHVfrag;
148  int nFlav, hvOldSize, hvNewSize;
149  double mhvMeson, mSys;
150  vector<int> ihvParton;
151 
152  // Configuration of colour-singlet systems.
153  ColConfig hvColConfig;
154 
155  // Temporary event record for the Hidden Valley system.
156  Event hvEvent;
157 
158  // The generator class for Hidden Valley string fragmentation.
159  StringFragmentation hvStringFrag;
160 
161  // The generator class for special low-mass HV string fragmentation.
162  MiniStringFragmentation hvMinistringFrag;
163 
164  // Pointers to classes for flavour, pT and z generation in HV sector.
165  StringFlav* hvFlavSelPtr;
166  StringPT* hvPTSelPtr;
167  StringZ* hvZSelPtr;
168 
169  // Extract HV-particles from event to hvEvent. Assign HV-colours.
170  bool extractHVevent(Event& event);
171 
172  // Collapse of low-mass system to one HV-meson.
173  bool collapseToMeson();
174 
175  // Insert HV particles from hvEvent to event.
176  bool insertHVevent(Event& event);
177 
178 };
179 
180 //==========================================================================
181 
182 } // end namespace Pythia8
183 
184 #endif // Pythia8_HiddenValleyFragmentation_H
Definition: AgUStep.h:26