PYTHIA  8.312
HiddenValleyFragmentation.h
1 // HiddenValleyFragmentation.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 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() : separateFlav(), nFlav(), probFlav(), probDiquark(),
34  probVector(), probKeepEta1(), sumProbFlav(), probKeepLast(),
35  probVecEta1() {}
36 
37  // Destructor.
39 
40  // Initialize data members.
41  void init() override;
42 
43  // Pick a new flavour (including diquarks) given an incoming one.
44  FlavContainer pick(FlavContainer& flavOld, double, double, bool) override;
45 
46  // Combine two flavours (including diquarks) to produce a hadron.
47  int combine(FlavContainer& flav1, FlavContainer& flav2) override;
48 
49  // Lightest flavour-neutral meson.
50  int idLightestNeutralMeson() override { return 4900111; }
51 
52 private:
53 
54  // Initialization data, to be read from Settings.
55  bool separateFlav;
56  int nFlav;
57  vector<double> probFlav;
58  double probDiquark, probVector, probKeepEta1, sumProbFlav, probKeepLast,
59  probVecEta1;
60 
61 };
62 
63 //==========================================================================
64 
65 // The HVStringPT class is used to select select HV transverse momenta.
66 
67 class HVStringPT : public StringPT {
68 
69 public:
70 
71  // Constructor.
73 
74  // Destructor.
76 
77  // Initialize data members.
78  void init() override;
79 
80 };
81 
82 //==========================================================================
83 
84 // The HVStringZ class is used to sample the HV fragmentation function f(z).
85 
86 class HVStringZ : public StringZ {
87 
88 public:
89 
90  // Constructor.
91  HVStringZ() : mqv2(), bmqv2(), rFactqv(), mhvMeson() {}
92 
93  // Destructor.
94  virtual ~HVStringZ() {}
95 
96  // Initialize data members.
97  void init() override;
98 
99  // Fragmentation function: top-level to determine parameters.
100  double zFrag( int idOld, int idNew = 0, double mT2 = 1.) override;
101 
102  // Parameters for stopping in the middle; for now hardcoded.
103  virtual double stopMass() override {return 1.5 * mhvMeson;}
104  virtual double stopNewFlav() override {return 2.0;}
105  virtual double stopSmear() override {return 0.2;}
106 
107 private:
108 
109  // Initialization data, to be read from Settings and ParticleData.
110  double mqv2, bmqv2, rFactqv, mhvMeson;
111 
112 };
113 
114 //==========================================================================
115 
116 // The HiddenValleyFragmentation class contains the routines
117 // to fragment a Hidden Valley partonic system.
118 
120 
121 public:
122 
123  // Constructor.
124  HiddenValleyFragmentation() : doHVfrag(false), separateFlav(), nFlav(),
125  hvOldSize(), hvNewSize(), idEnd1(), idEnd2(), mhvMeson(), mSys() {}
126 
127  // Initialize and save pointers.
128  bool init();
129 
130  // Do the fragmentation: driver routine.
131  bool fragment(Event& event);
132 
133 protected:
134 
135  virtual void onInitInfoPtr() override {
136  registerSubObject(hvStringFrag);
137  registerSubObject(hvMinistringFrag);
138  registerSubObject(hvFlavSel);
139  registerSubObject(hvPTSel);
140  registerSubObject(hvZSel);
141  }
142 
143 private:
144 
145  // Data mambers.
146  bool doHVfrag, separateFlav;
147  int nFlav, hvOldSize, hvNewSize, idEnd1, idEnd2;
148  double mhvMeson, mhvMin[9], mSys;
149  vector<int> ihvParton;
150 
151  // Configuration of colour-singlet systems.
152  ColConfig hvColConfig;
153 
154  // Temporary event record for the Hidden Valley system.
155  Event hvEvent;
156 
157  // The generator class for Hidden Valley string fragmentation.
158  StringFragmentation hvStringFrag;
159 
160  // The generator class for special low-mass HV string fragmentation.
161  MiniStringFragmentation hvMinistringFrag;
162 
163  // Pointers to classes for flavour, pT and z generation in HV sector.
164  HVStringFlav hvFlavSel;
165  HVStringPT hvPTSel;
166  HVStringZ hvZSel;
167 
168  // Extract HV-particles from event to hvEvent.
169  bool extractHVevent(Event& event);
170 
171  // Trace HV-colours of HV-partons.
172  bool traceHVcols();
173 
174  // Collapse of low-mass system to one HV-meson.
175  bool collapseToMeson();
176 
177  // Insert HV particles from hvEvent to event.
178  bool insertHVevent(Event& event);
179 
180 };
181 
182 //==========================================================================
183 
184 } // end namespace Pythia8
185 
186 #endif // Pythia8_HiddenValleyFragmentation_H
The HVStringFlav class is used to select HV-quark and HV-hadron flavours.
Definition: HiddenValleyFragmentation.h:28
HVStringZ()
Constructor.
Definition: HiddenValleyFragmentation.h:91
FlavContainer pick(FlavContainer &flavOld, double, double, bool) override
Pick a new flavour (including diquarks) given an incoming one.
Definition: HiddenValleyFragmentation.cc:70
virtual double stopMass() override
Parameters for stopping in the middle; for now hardcoded.
Definition: HiddenValleyFragmentation.h:103
Definition: PhysicsBase.h:27
void registerSubObject(PhysicsBase &pb)
Register a sub object that should have its information in sync with this.
Definition: PhysicsBase.cc:56
The Event class holds all info on the generated event.
Definition: Event.h:453
HVStringPT()
Constructor.
Definition: HiddenValleyFragmentation.h:72
The StringPT class is used to select select transverse momenta.
Definition: FragmentationFlavZpT.h:322
Definition: StringFragmentation.h:119
~HVStringPT()
Destructor.
Definition: HiddenValleyFragmentation.h:75
HVStringFlav()
Constructor.
Definition: HiddenValleyFragmentation.h:33
The StringZ class is used to sample the fragmentation function f(z).
Definition: FragmentationFlavZpT.h:264
int idLightestNeutralMeson() override
Lightest flavour-neutral meson.
Definition: HiddenValleyFragmentation.h:50
The HVStringZ class is used to sample the HV fragmentation function f(z).
Definition: HiddenValleyFragmentation.h:86
Definition: HiddenValleyFragmentation.h:119
int combine(FlavContainer &flav1, FlavContainer &flav2) override
Combine two flavours (including diquarks) to produce a hadron.
Definition: HiddenValleyFragmentation.cc:108
virtual void onInitInfoPtr() override
Definition: HiddenValleyFragmentation.h:135
The ColConfig class describes the colour configuration of the whole event.
Definition: FragmentationSystems.h:60
virtual ~HVStringZ()
Destructor.
Definition: HiddenValleyFragmentation.h:94
void init() override
Initialize data members.
Definition: HiddenValleyFragmentation.cc:21
The HVStringPT class is used to select select HV transverse momenta.
Definition: HiddenValleyFragmentation.h:67
Definition: FragmentationFlavZpT.h:41
~HVStringFlav()
Destructor.
Definition: HiddenValleyFragmentation.h:38
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The StringFlav class is used to select quark and hadron flavours.
Definition: FragmentationFlavZpT.h:84
Definition: MiniStringFragmentation.h:30
HiddenValleyFragmentation()
Constructor.
Definition: HiddenValleyFragmentation.h:124