PYTHIA  8.315
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(), mVecRatio(),
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, double mVecRatioIn);
101 
102  // Initialize data members.
103  bool init() override;
104 
105  // Fragmentation function: top-level to determine parameters.
106  double zFrag( int idOld, int idNew = 0, double mT2 = 1.) override;
107 
108  // Parameters for stopping in the middle; for now hardcoded.
109  virtual double stopMass() override {return stopM;}
110  virtual double stopNewFlav() override {return stopNF;}
111  virtual double stopSmear() override {return stopS;}
112 
113 private:
114 
115  // Initialization data, from preinit, Settings and ParticleData.
116  int setabsigma;
117  double rescalebsigma, mVecRatio;
118  vector<double> rFactBowler;
119 
120 };
121 
122 //==========================================================================
123 
124 // The HiddenValleyFragmentation class contains the routines
125 // to fragment a Hidden Valley partonic system.
126 
128 
129 public:
130 
131  // Constructor.
132  HiddenValleyFragmentation() : doHVfrag(false), separateFlav(), nFlav(),
133  hvOldSize(), hvNewSize(), idEnd1(), idEnd2(), mhvMeson(), mhvMin(),
134  mHVvecMin(), mSys(), ihvParton() {}
135 
136  // Initialize and save pointers.
137  bool init(StringFlav* flavSelPtrIn = nullptr, StringPT* pTSelPtrIn = nullptr,
138  StringZ* zSelPtrIn = nullptr, FragModPtr fragModPtrIn = nullptr) override;
139 
140  // Fragment the event.
141  bool fragment(int iSub, ColConfig& colConfig, Event& event,
142  bool isDiff = false, bool systemRecoil = true) override;
143 
144 protected:
145 
146  virtual void onInitInfoPtr() override {
147  registerSubObject(hvStringFrag);
148  registerSubObject(hvMinistringFrag);
149  registerSubObject(hvFlavSel);
150  registerSubObject(hvPTSel);
151  registerSubObject(hvZSel);
152  }
153 
154 private:
155 
156  // Data mambers.
157  bool doHVfrag, separateFlav;
158  int nFlav, hvOldSize, hvNewSize, idEnd1, idEnd2;
159  double mhvMeson, mhvMin[9], mHVvecMin, mSys;
160  vector<int> ihvParton;
161 
162  // Configuration of colour-singlet systems.
163  ColConfig hvColConfig;
164 
165  // Temporary event record for the Hidden Valley system.
166  Event hvEvent;
167 
168  // The generator class for Hidden Valley string fragmentation.
169  StringFragmentation hvStringFrag;
170 
171  // The generator class for special low-mass HV string fragmentation.
172  MiniStringFragmentation hvMinistringFrag;
173 
174  // Pointers to classes for flavour, pT and z generation in HV sector.
175  HVStringFlav hvFlavSel;
176  HVStringPT hvPTSel;
177  HVStringZ hvZSel;
178 
179  // Extract HV-particles from event to hvEvent.
180  bool extractHVevent(Event& event);
181 
182  // Trace HV-colours of HV-partons.
183  bool traceHVcols();
184 
185  // Collapse of low-mass system to one HV-meson.
186  bool collapseToMeson();
187 
188  // Insert HV particles from hvEvent to event.
189  bool insertHVevent(Event& event);
190 
191 };
192 
193 //==========================================================================
194 
195 } // end namespace Pythia8
196 
197 #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:109
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:333
Definition: StringFragmentation.h:106
~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:268
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:127
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:146
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:33
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:76
Definition: MiniStringFragmentation.h:22
HiddenValleyFragmentation()
Constructor.
Definition: HiddenValleyFragmentation.h:132