PYTHIA  8.313
HiddenValleyFragmentation.h
1 // HiddenValleyFragmentation.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2025 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/FragmentationModel.h"
12 #include "Pythia8/MiniStringFragmentation.h"
13 #include "Pythia8/StringFragmentation.h"
14 
15 namespace Pythia8 {
16 
17 //==========================================================================
18 
19 // The HVStringFlav class is used to select HV-quark and HV-hadron flavours.
20 
21 class HVStringFlav : public StringFlav {
22 
23 public:
24 
25  // Constructor.
26  HVStringFlav() : separateFlav(), nFlav(), probFlav(), probDiquark(),
27  probVector(), probKeepEta1(), sumProbFlav(), probKeepLast(),
28  probVecEta1() {}
29 
30  // Destructor.
32 
33  // Initialize data members.
34  void init() override;
35 
36  // Pick a new flavour (including diquarks) given an incoming one.
37  FlavContainer pick(FlavContainer& flavOld, double, double, bool) override;
38 
39  // Combine two flavours (including diquarks) to produce a hadron.
40  int combine(FlavContainer& flav1, FlavContainer& flav2) override;
41 
42  // Lightest flavour-neutral meson.
43  int idLightestNeutralMeson() override { return 4900111; }
44 
45 private:
46 
47  // Initialization data, to be read from Settings.
48  bool separateFlav;
49  int nFlav;
50  vector<double> probFlav;
51  double probDiquark, probVector, probKeepEta1, sumProbFlav, probKeepLast,
52  probVecEta1;
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() : setabsigma(), rescalebsigma() {}
66 
67  // Destructor.
69 
70  // Feed in extra parameters for HV handling, not part of base class.
71  void preinit( int setabsigmaIn, double rescalebsigmaIn);
72 
73  // Initialize data members.
74  void init() override;
75 
76 private:
77 
78  // Initialization data fed in from HiddenValleyFragmentation::init().
79  int setabsigma;
80  double rescalebsigma;
81 
82 };
83 
84 //==========================================================================
85 
86 // The HVStringZ class is used to sample the HV fragmentation function f(z).
87 
88 class HVStringZ : public StringZ {
89 
90 public:
91 
92  // Constructor.
93  HVStringZ() : setabsigma(), rescalebsigma(), vecMassRatio(),
94  rFactBowler() {}
95 
96  // Destructor.
97  virtual ~HVStringZ() {}
98 
99  // Feed in extra parameters for HV handling, not part of base class.
100  void preinit( int setabsigmaIn, double rescalebsigmaIn,
101  double rescalestopMIn);
102 
103  // Initialize data members.
104  void init() override;
105 
106  // Fragmentation function: top-level to determine parameters.
107  double zFrag( int idOld, int idNew = 0, double mT2 = 1.) override;
108 
109  // Parameters for stopping in the middle; for now hardcoded.
110  virtual double stopMass() override {return stopM;}
111  virtual double stopNewFlav() override {return stopNF;}
112  virtual double stopSmear() override {return stopS;}
113 
114 private:
115 
116  // Initialization data, from preinit, Settings and ParticleData.
117  int setabsigma;
118  double rescalebsigma, vecMassRatio;
119  vector<double> rFactBowler;
120 
121 };
122 
123 //==========================================================================
124 
125 // The HiddenValleyFragmentation class contains the routines
126 // to fragment a Hidden Valley partonic system.
127 
129 
130 public:
131 
132  // Constructor.
133  HiddenValleyFragmentation() : doHVfrag(false), separateFlav(), nFlav(),
134  hvOldSize(), hvNewSize(), idEnd1(), idEnd2(), mhvMeson(), mhvMin(),
135  mHVvecMin(), mSys(), ihvParton() {}
136 
137  // Initialize and save pointers.
138  bool init(StringFlav* flavSelPtrIn = nullptr, StringPT* pTSelPtrIn = nullptr,
139  StringZ* zSelPtrIn = nullptr, FragModPtr fragModPtrIn = nullptr) override;
140 
141  // Fragment the event.
142  bool fragment(int iSub, ColConfig& colConfig, Event& event,
143  bool isDiff = false, bool systemRecoil = true) override;
144 
145 protected:
146 
147  virtual void onInitInfoPtr() override {
148  registerSubObject(hvStringFrag);
149  registerSubObject(hvMinistringFrag);
150  registerSubObject(hvFlavSel);
151  registerSubObject(hvPTSel);
152  registerSubObject(hvZSel);
153  }
154 
155 private:
156 
157  // Data mambers.
158  bool doHVfrag, separateFlav;
159  int nFlav, hvOldSize, hvNewSize, idEnd1, idEnd2;
160  double mhvMeson, mhvMin[9], mHVvecMin, mSys;
161  vector<int> ihvParton;
162 
163  // Configuration of colour-singlet systems.
164  ColConfig hvColConfig;
165 
166  // Temporary event record for the Hidden Valley system.
167  Event hvEvent;
168 
169  // The generator class for Hidden Valley string fragmentation.
170  StringFragmentation hvStringFrag;
171 
172  // The generator class for special low-mass HV string fragmentation.
173  MiniStringFragmentation hvMinistringFrag;
174 
175  // Pointers to classes for flavour, pT and z generation in HV sector.
176  HVStringFlav hvFlavSel;
177  HVStringPT hvPTSel;
178  HVStringZ hvZSel;
179 
180  // Extract HV-particles from event to hvEvent.
181  bool extractHVevent(Event& event);
182 
183  // Trace HV-colours of HV-partons.
184  bool traceHVcols();
185 
186  // Collapse of low-mass system to one HV-meson.
187  bool collapseToMeson();
188 
189  // Insert HV particles from hvEvent to event.
190  bool insertHVevent(Event& event);
191 
192 };
193 
194 //==========================================================================
195 
196 } // end namespace Pythia8
197 
198 #endif // Pythia8_HiddenValleyFragmentation_H
The HVStringFlav class is used to select HV-quark and HV-hadron flavours.
Definition: HiddenValleyFragmentation.h:21
HVStringZ()
Constructor.
Definition: HiddenValleyFragmentation.h:93
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:110
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:408
HVStringPT()
Constructor.
Definition: HiddenValleyFragmentation.h:65
The StringPT class is used to select select transverse momenta.
Definition: FragmentationFlavZpT.h:326
Definition: StringFragmentation.h:105
~HVStringPT()
Destructor.
Definition: HiddenValleyFragmentation.h:68
HVStringFlav()
Constructor.
Definition: HiddenValleyFragmentation.h:26
The StringZ class is used to sample the fragmentation function f(z).
Definition: FragmentationFlavZpT.h:265
int idLightestNeutralMeson() override
Lightest flavour-neutral meson.
Definition: HiddenValleyFragmentation.h:43
The HVStringZ class is used to sample the HV fragmentation function f(z).
Definition: HiddenValleyFragmentation.h:88
Definition: HiddenValleyFragmentation.h:128
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:147
The ColConfig class describes the colour configuration of the whole event.
Definition: FragmentationSystems.h:60
virtual ~HVStringZ()
Destructor.
Definition: HiddenValleyFragmentation.h:97
void init() override
Initialize data members.
Definition: HiddenValleyFragmentation.cc:21
The HVStringPT class is used to select select HV transverse momenta.
Definition: HiddenValleyFragmentation.h:60
Definition: FragmentationFlavZpT.h:41
FragmentationModel is the base class for handling fragmentation algorithms.
Definition: FragmentationModel.h:28
~HVStringFlav()
Destructor.
Definition: HiddenValleyFragmentation.h:31
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:22
HiddenValleyFragmentation()
Constructor.
Definition: HiddenValleyFragmentation.h:133