StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DireSplittingLibrary.cc
1 // DireSplitingLibrary.cc is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Stefan Prestel, 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 // Function definitions (not found in the header) for the Dire
7 // splitting library.
8 
9 #include "Pythia8/DireSplittingLibrary.h"
10 
11 namespace Pythia8 {
12 
13 //==========================================================================
14 
15 // class SplittingLibrary
16 
17 //--------------------------------------------------------------------------
18 
19 // Clean up
20 void DireSplittingLibrary::clear() {
21  for ( std::unordered_map<string,DireSplitting*>::iterator
22  it = splittings.begin();
23  it != splittings.end(); ++it ) if (it->second) delete it->second;
24  splittings.clear();
25 }
26 
27 //--------------------------------------------------------------------------
28 
29 // Initialisation.
30 void DireSplittingLibrary::init( Info* infoPtrIn, BeamParticle* beamA,
31  BeamParticle* beamB, DireInfo* direInfo, DireHooks* hooks) {
32 
33  // Store infrastructure pointers.
34  infoPtr = infoPtrIn;
35  settingsPtr = infoPtr->settingsPtr;
36  particleDataPtr = infoPtr->particleDataPtr;
37  rndmPtr = infoPtr->rndmPtr;
38  beamAPtr = beamA;
39  beamBPtr = beamB;
40  coupSMPtr = infoPtr->coupSMPtr;
41  direInfoPtr = direInfo;
42 
43  if (!hooksPtr) hooksPtr = hooks;
44  if (hooksPtr) hasExternalHook = true;
45 
46  // Initialise splitting names.
47  clear();
48  initISR();
49  initFSR();
50 
51  fsrQCD_1_to_1_and_21 = shash("Dire_fsr_qcd_1->1&21");
52  fsrQCD_1_to_21_and_1 = shash("Dire_fsr_qcd_1->21&1");
53  fsrQCD_21_to_21_and_21a = shash("Dire_fsr_qcd_21->21&21a");
54  fsrQCD_21_to_21_and_21b = shash("Dire_fsr_qcd_21->21&21b");
55  fsrQCD_21_to_1_and_1a = shash("Dire_fsr_qcd_21->1&1a");
56  fsrQCD_21_to_1_and_1b = shash("Dire_fsr_qcd_21->1&1b");
57  fsrQCD_1_to_2_and_1_and_2 = shash("Dire_fsr_qcd_1->2&1&2");
58  fsrQCD_1_to_1_and_1_and_1 = shash("Dire_fsr_qcd_1->1&1&1");
59  fsrQCD_1_to_1_and_21_notPartial = shash("Dire_fsr_qcd_1->1&21_notPartial");
60  fsrQCD_21_to_21_and_21_notPartial =
61  shash("Dire_fsr_qcd_21->21&21_notPartial");
62  fsrQCD_21_to_1_and_1_notPartial = shash("Dire_fsr_qcd_21->1&1_notPartial");
63  fsrQCD_1_to_1_and_21_and_21 = shash("Dire_fsr_qcd_1->1&21&21");
64  fsrQCD_1_to_1_and_1_and_1a = shash("Dire_fsr_qcd_1->1&d&dbar");
65  fsrQCD_1_to_1_and_1_and_1b = shash("Dire_fsr_qcd_1->1&dbar&d");
66  fsrQCD_1_to_1_and_2_and_2a = shash("Dire_fsr_qcd_1->1&u&ubar");
67  fsrQCD_1_to_1_and_2_and_2b = shash("Dire_fsr_qcd_1->1&ubar&u");
68  fsrQCD_1_to_1_and_3_and_3a = shash("Dire_fsr_qcd_1->1&s&sbar");
69  fsrQCD_1_to_1_and_3_and_3b = shash("Dire_fsr_qcd_1->1&sbar&s");
70  fsrQCD_1_to_1_and_4_and_4a = shash("Dire_fsr_qcd_1->1&c&cbar");
71  fsrQCD_1_to_1_and_4_and_4b = shash("Dire_fsr_qcd_1->1&cbar&c");
72  fsrQCD_1_to_1_and_5_and_5a = shash("Dire_fsr_qcd_1->1&b&bbar");
73  fsrQCD_1_to_1_and_5_and_5b = shash("Dire_fsr_qcd_1->1&bbar&b");
74  fsrQCD_21_to_21_and_21_and_21 = shash("Dire_fsr_qcd_21->21&21&21");
75  fsrQCD_21_to_21_and_1_and_1a = shash("Dire_fsr_qcd_21->21&d&dbar");
76  fsrQCD_21_to_21_and_1_and_1b = shash("Dire_fsr_qcd_21->21&dbar&d");
77  fsrQCD_21_to_21_and_2_and_2a = shash("Dire_fsr_qcd_21->21&u&ubar");
78  fsrQCD_21_to_21_and_2_and_2b = shash("Dire_fsr_qcd_21->21&ubar&u");
79  fsrQCD_21_to_21_and_3_and_3a = shash("Dire_fsr_qcd_21->21&s&sbar");
80  fsrQCD_21_to_21_and_3_and_3b = shash("Dire_fsr_qcd_21->21&sbar&s");
81  fsrQCD_21_to_21_and_4_and_4a = shash("Dire_fsr_qcd_21->21&c&cbar");
82  fsrQCD_21_to_21_and_4_and_4b = shash("Dire_fsr_qcd_21->21&cbar&c");
83  fsrQCD_21_to_21_and_5_and_5a = shash("Dire_fsr_qcd_21->21&b&bbar");
84  fsrQCD_21_to_21_and_5_and_5b = shash("Dire_fsr_qcd_21->21&bbar&b");
85 
86  fsrQED_1_to_1_and_22 = shash("Dire_fsr_qed_1->1&22");
87  fsrQED_1_to_22_and_1 = shash("Dire_fsr_qed_1->22&1");
88  fsrQED_11_to_11_and_22 = shash("Dire_fsr_qed_11->11&22");
89  fsrQED_11_to_22_and_11 = shash("Dire_fsr_qed_11->22&11");
90  fsrQED_22_to_1_and_1a = shash("Dire_fsr_qed_22->1&1a");
91  fsrQED_22_to_1_and_1b = shash("Dire_fsr_qed_22->1&1b");
92  fsrQED_22_to_2_and_2a = shash("Dire_fsr_qed_22->2&2a");
93  fsrQED_22_to_2_and_2b = shash("Dire_fsr_qed_22->2&2b");
94  fsrQED_22_to_3_and_3a = shash("Dire_fsr_qed_22->3&3a");
95  fsrQED_22_to_3_and_3b = shash("Dire_fsr_qed_22->3&3b");
96  fsrQED_22_to_4_and_4a = shash("Dire_fsr_qed_22->4&4a");
97  fsrQED_22_to_4_and_4b = shash("Dire_fsr_qed_22->4&4b");
98  fsrQED_22_to_5_and_5a = shash("Dire_fsr_qed_22->5&5a");
99  fsrQED_22_to_5_and_5b = shash("Dire_fsr_qed_22->5&5b");
100  fsrQED_22_to_11_and_11a = shash("Dire_fsr_qed_22->11&11a");
101  fsrQED_22_to_11_and_11b = shash("Dire_fsr_qed_22->11&11b");
102  fsrQED_22_to_13_and_13a = shash("Dire_fsr_qed_22->13&13a");
103  fsrQED_22_to_13_and_13b = shash("Dire_fsr_qed_22->13&13b");
104  fsrQED_22_to_15_and_15a = shash("Dire_fsr_qed_22->15&15a");
105  fsrQED_22_to_15_and_15b = shash("Dire_fsr_qed_22->15&15b");
106  fsrQED_1_to_1_and_22_notPartial = shash("Dire_fsr_qed_1->1&22_notPartial");
107  fsrQED_11_to_11_and_22_notPartial =
108  shash("Dire_fsr_qed_11->11&22_notPartial");
109 
110  fsrEWK_1_to_1_and_23 = shash("Dire_fsr_ew_1->1&23");
111  fsrEWK_1_to_23_and_1 = shash("Dire_fsr_ew_1->23&1");
112  fsrEWK_23_to_1_and_1a = shash("Dire_fsr_ew_23->1&1a");
113  fsrEWK_23_to_1_and_1b = shash("Dire_fsr_ew_23->1&1b");
114  fsrEWK_24_to_1_and_1a = shash("Dire_fsr_ew_24->1&1a");
115  fsrEWK_24_to_1_and_1b = shash("Dire_fsr_ew_24->1&1b");
116  fsrEWK_25_to_24_and_24 = shash("Dire_fsr_ew_25->24&24");
117  fsrEWK_25_to_22_and_22 = shash("Dire_fsr_ew_25->22&22");
118  fsrEWK_25_to_21_and_21 = shash("Dire_fsr_ew_25->21&21");
119  fsrEWK_24_to_24_and_22 = shash("Dire_fsr_ew_24->24&22");
120 
121  isrQCD_1_to_1_and_21 = shash("Dire_isr_qcd_1->1&21");
122  isrQCD_21_to_1_and_1 = shash("Dire_isr_qcd_21->1&1");
123  isrQCD_21_to_21_and_21a = shash("Dire_isr_qcd_21->21&21a");
124  isrQCD_21_to_21_and_21b = shash("Dire_isr_qcd_21->21&21b");
125  isrQCD_1_to_21_and_1 = shash("Dire_isr_qcd_1->21&1");
126  isrQCD_1_to_2_and_1_and_2 = shash("Dire_isr_qcd_1->2&1&2");
127  isrQCD_1_to_1_and_1_and_1 = shash("Dire_isr_qcd_1->1&1&1");
128 
129  isrQED_1_to_1_and_22 = shash("Dire_isr_qed_1->1&22");
130  isrQED_11_to_11_and_22 = shash("Dire_isr_qed_11->11&22");
131  isrQED_1_to_22_and_1 = shash("Dire_isr_qed_1->22&1");
132  isrQED_11_to_22_and_11 = shash("Dire_isr_qed_11->22&11");
133  isrQED_22_to_1_and_1 = shash("Dire_isr_qed_22->1&1");
134  isrQED_22_to_11_and_11 = shash("Dire_isr_qed_22->11&11");
135 
136  isrEWK_1_to_1_and_23 = shash("Dire_isr_ew_1->1&23");
137 
138  fsrU1N_1_to_1_and_22 = shash("Dire_fsr_u1new_1->1&22");
139  fsrU1N_1_to_22_and_1 = shash("Dire_fsr_u1new_1->22&1");
140  fsrU1N_11_to_11_and_22 = shash("Dire_fsr_u1new_11->11&22");
141  fsrU1N_11_to_22_and_11 = shash("Dire_fsr_u1new_11->22&11");
142  fsrU1N_22_to_1_and_1a = shash("Dire_fsr_u1new_22->1&1a");
143  fsrU1N_22_to_1_and_1b = shash("Dire_fsr_u1new_22->1&1b");
144  fsrU1N_22_to_2_and_2a = shash("Dire_fsr_u1new_22->2&2a");
145  fsrU1N_22_to_2_and_2b = shash("Dire_fsr_u1new_22->2&2b");
146  fsrU1N_22_to_3_and_3a = shash("Dire_fsr_u1new_22->3&3a");
147  fsrU1N_22_to_3_and_3b = shash("Dire_fsr_u1new_22->3&3b");
148  fsrU1N_22_to_4_and_4a = shash("Dire_fsr_u1new_22->4&4a");
149  fsrU1N_22_to_4_and_4b = shash("Dire_fsr_u1new_22->4&4b");
150  fsrU1N_22_to_5_and_5a = shash("Dire_fsr_u1new_22->5&5a");
151  fsrU1N_22_to_5_and_5b = shash("Dire_fsr_u1new_22->5&5b");
152  fsrU1N_22_to_11_and_11a = shash("Dire_fsr_u1new_22->11&11a");
153  fsrU1N_22_to_11_and_11b = shash("Dire_fsr_u1new_22->11&11b");
154  fsrU1N_22_to_13_and_13a = shash("Dire_fsr_u1new_22->13&13a");
155  fsrU1N_22_to_13_and_13b = shash("Dire_fsr_u1new_22->13&13b");
156  fsrU1N_22_to_15_and_15a = shash("Dire_fsr_u1new_22->15&15a");
157  fsrU1N_22_to_15_and_15b = shash("Dire_fsr_u1new_22->15&15b");
158  fsrU1N_22_to_211_and_211a = shash("Dire_fsr_u1new_22->211&211a");
159  fsrU1N_22_to_211_and_211b = shash("Dire_fsr_u1new_22->211&211b");
160 
161  isrU1N_1_to_1_and_22 = shash("Dire_isr_u1new_1->1&22");
162  isrU1N_1_to_22_and_1 = shash("Dire_isr_u1new_1->22&1");
163  isrU1N_22_to_1_and_1 = shash("Dire_isr_u1new_22->1&1");
164  isrU1N_11_to_11_and_22 = shash("Dire_isr_u1new_11->11&22");
165  isrU1N_11_to_22_and_11 = shash("Dire_isr_u1new_11->22&11");
166  isrU1N_22_to_11_and_11 = shash("Dire_isr_u1new_22->11&11");
167 
168  // Done.
169 }
170 
171 //--------------------------------------------------------------------------
172 
173 void DireSplittingLibrary::initFSR() {
174 
175  // Add corrections to the LO splitting kernel.
176  // order = 0 -> A1, B1
177  // order = 1 -> A1, A2, B1
178  // order = 2 -> A1, A2, A3, B1
179  // order = 3 -> A1, A2, A3, B1, B2
180  int order = settingsPtr->mode("DireTimes:kernelOrder");
181  string name = "";
182 
183  // QCD splittings.
184  if (settingsPtr->flag("TimeShower:QCDshower")) {
185  // Q -> Q G, soft part + collinear
186  name = "Dire_fsr_qcd_1->1&21";
187  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2QG( name, order,
188  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
189  infoPtr, direInfoPtr)) );
190  // Q -> G Q, soft part + collinear
191  // At leading order, this can be trivially combined with Q->QG because of
192  // symmetry under z --> 1 -z .
193  // Since this is no longer possible at NLO, we keep the kernels separately.
194  name = "Dire_fsr_qcd_1->21&1";
195  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2GQ( name, order,
196  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
197  infoPtr, direInfoPtr)) );
198  // G -> G G, soft part + collinear
199  name = "Dire_fsr_qcd_21->21&21a";
200  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2GG1( name, order,
201  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
202  infoPtr, direInfoPtr)) );
203  // G -> G G, soft part + collinear
204  name = "Dire_fsr_qcd_21->21&21b";
205  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2GG2( name, order,
206  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
207  infoPtr, direInfoPtr)) );
208  // G -> Q Q (regular DGLAP kernel)
209  name = "Dire_fsr_qcd_21->1&1a";
210  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2QQ1( name, order,
211  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
212  infoPtr, direInfoPtr)) );
213  // G -> Q Q (regular DGLAP kernel)
214  name = "Dire_fsr_qcd_21->1&1b";
215  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2QQ2( name, order,
216  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
217  infoPtr, direInfoPtr)) );
218  // Q -> Q' Q Q'bar (pure NLO kernel)
219  name = "Dire_fsr_qcd_1->2&1&2";
220  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2qQqbarDist( name,
221  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
222  coupSMPtr, infoPtr, direInfoPtr)) );
223  // Q -> Qbar Q Q (pure NLO kernel)
224  name = "Dire_fsr_qcd_1->1&1&1";
225  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2QbarQQId( name,
226  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
227  coupSMPtr, infoPtr, direInfoPtr)) );
228  // Full DGLAP kernels for shower w/o color-connected recoiler.
229  name = "Dire_fsr_qcd_1->1&21_notPartial";
230  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2QG_notPartial( name,
231  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
232  coupSMPtr, infoPtr, direInfoPtr)) );
233  name = "Dire_fsr_qcd_21->21&21_notPartial";
234  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2GG_notPartial( name,
235  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
236  coupSMPtr, infoPtr, direInfoPtr)) );
237  name = "Dire_fsr_qcd_21->1&1_notPartial";
238  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2QQ_notPartial( name,
239  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
240  coupSMPtr, infoPtr, direInfoPtr)) );
241  // Q -> Q G G
242  name = "Dire_fsr_qcd_1->1&21&21";
243  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2QGG( name,
244  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
245  coupSMPtr, infoPtr, direInfoPtr)) );
246  // Q -> Q d dbar
247  name = "Dire_fsr_qcd_1->1&d&dbar";
248  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar( 1, name,
249  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
250  coupSMPtr, infoPtr, direInfoPtr)) );
251  // Q -> Q dbar d
252  name = "Dire_fsr_qcd_1->1&dbar&d";
253  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar(-1, name,
254  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
255  coupSMPtr, infoPtr, direInfoPtr)) );
256  // Q -> Q u ubar
257  name = "Dire_fsr_qcd_1->1&u&ubar";
258  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar( 2, name,
259  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
260  coupSMPtr, infoPtr, direInfoPtr)) );
261  // Q -> Q ubar u
262  name = "Dire_fsr_qcd_1->1&ubar&u";
263  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar(-2, name,
264  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
265  coupSMPtr, infoPtr, direInfoPtr)) );
266  // Q -> Q s sbar
267  name = "Dire_fsr_qcd_1->1&s&sbar";
268  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar( 3, name,
269  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
270  coupSMPtr, infoPtr, direInfoPtr)) );
271  // Q -> Q sbar s
272  name = "Dire_fsr_qcd_1->1&sbar&s";
273  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar(-3, name,
274  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
275  coupSMPtr, infoPtr, direInfoPtr)) );
276  // Q -> Q c cbar
277  name = "Dire_fsr_qcd_1->1&c&cbar";
278  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar( 4, name,
279  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
280  coupSMPtr, infoPtr, direInfoPtr)) );
281  // Q -> Q cbar c
282  name = "Dire_fsr_qcd_1->1&cbar&c";
283  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar(-4, name,
284  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
285  coupSMPtr, infoPtr, direInfoPtr)) );
286  // Q -> Q b bbar
287  name = "Dire_fsr_qcd_1->1&b&bbar";
288  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar( 5, name,
289  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
290  coupSMPtr, infoPtr, direInfoPtr)) );
291  // Q -> Q bbar b
292  name = "Dire_fsr_qcd_1->1&bbar&b";
293  splittings.insert( make_pair( name, new Dire_fsr_qcd_Q2Qqqbar(-5, name,
294  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
295  coupSMPtr, infoPtr, direInfoPtr)) );
296  // G -> G G G
297  name = "Dire_fsr_qcd_21->21&21&21";
298  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2GGG( name,
299  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
300  coupSMPtr, infoPtr, direInfoPtr)) );
301  // G -> G d dbar
302  name = "Dire_fsr_qcd_21->21&d&dbar";
303  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar( 1, name,
304  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
305  coupSMPtr, infoPtr, direInfoPtr)) );
306  // G -> G dbar d
307  name = "Dire_fsr_qcd_21->21&dbar&d";
308  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar(-1, name,
309  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
310  coupSMPtr, infoPtr, direInfoPtr)) );
311  // G -> G u ubar
312  name = "Dire_fsr_qcd_21->21&u&ubar";
313  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar( 2, name,
314  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
315  coupSMPtr, infoPtr, direInfoPtr)) );
316  // G -> G ubar u
317  name = "Dire_fsr_qcd_21->21&ubar&u";
318  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar(-2, name,
319  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
320  coupSMPtr, infoPtr, direInfoPtr)) );
321  // G -> G s sbar
322  name = "Dire_fsr_qcd_21->21&s&sbar";
323  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar( 3, name,
324  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
325  coupSMPtr, infoPtr, direInfoPtr)) );
326  // G -> G sbar s
327  name = "Dire_fsr_qcd_21->21&sbar&s";
328  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar(-3, name,
329  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
330  coupSMPtr, infoPtr, direInfoPtr)) );
331  // G -> G c cbar
332  name = "Dire_fsr_qcd_21->21&c&cbar";
333  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar( 4, name,
334  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
335  coupSMPtr, infoPtr, direInfoPtr)) );
336  // G -> G cbar c
337  name = "Dire_fsr_qcd_21->21&cbar&c";
338  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar(-4, name,
339  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
340  coupSMPtr, infoPtr, direInfoPtr)) );
341  // G -> G b bbar
342  name = "Dire_fsr_qcd_21->21&b&bbar";
343  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar( 5, name,
344  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
345  coupSMPtr, infoPtr, direInfoPtr)) );
346  // G -> G bbar b
347  name = "Dire_fsr_qcd_21->21&bbar&b";
348  splittings.insert( make_pair( name, new Dire_fsr_qcd_G2Gqqbar(-5, name,
349  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
350  coupSMPtr, infoPtr, direInfoPtr)) );
351  }
352 
353  // QED splittings
354  if (settingsPtr->flag("TimeShower:QEDshowerByQ")) {
355  name = "Dire_fsr_qed_1->1&22";
356  splittings.insert( make_pair( name, new Dire_fsr_qed_Q2QA( name,
357  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
358  coupSMPtr, infoPtr, direInfoPtr)) );
359  name = "Dire_fsr_qed_1->22&1";
360  splittings.insert( make_pair( name, new Dire_fsr_qed_Q2AQ( name,
361  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
362  coupSMPtr, infoPtr, direInfoPtr)) );
363  name = "Dire_fsr_qed_22->1&1a";
364  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 1, name, order,
365  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
366  infoPtr, direInfoPtr)) );
367  name = "Dire_fsr_qed_22->1&1b";
368  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-1, name, order,
369  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
370  infoPtr, direInfoPtr)) );
371  name = "Dire_fsr_qed_22->2&2a";
372  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 2, name, order,
373  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
374  infoPtr, direInfoPtr)) );
375  name = "Dire_fsr_qed_22->2&2b";
376  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-2, name, order,
377  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
378  infoPtr, direInfoPtr)) );
379  name = "Dire_fsr_qed_22->3&3a";
380  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 3, name, order,
381  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
382  infoPtr, direInfoPtr)) );
383  name = "Dire_fsr_qed_22->3&3b";
384  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-3, name, order,
385  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
386  infoPtr, direInfoPtr)) );
387  name = "Dire_fsr_qed_22->4&4a";
388  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 4, name, order,
389  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
390  infoPtr, direInfoPtr)) );
391  name = "Dire_fsr_qed_22->4&4b";
392  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-4, name, order,
393  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
394  infoPtr, direInfoPtr)) );
395  name = "Dire_fsr_qed_22->5&5a";
396  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 5, name, order,
397  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
398  infoPtr, direInfoPtr)) );
399  name = "Dire_fsr_qed_22->5&5b";
400  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-5, name, order,
401  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
402  infoPtr, direInfoPtr)) );
403  // Complete DGLAG kernel for photon emission off charge, as e.g. needed
404  // after charged hadron decay.
405  name = "Dire_fsr_qed_1->1&22_notPartial";
406  splittings.insert( make_pair( name, new Dire_fsr_qed_Q2QA_notPartial( name,
407  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
408  coupSMPtr, infoPtr, direInfoPtr)) );
409  }
410 
411  if (settingsPtr->flag("TimeShower:QEDshowerByL")) {
412  name = "Dire_fsr_qed_11->11&22";
413  splittings.insert( make_pair( name, new Dire_fsr_qed_L2LA( name,
414  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
415  coupSMPtr, infoPtr, direInfoPtr)) );
416  name = "Dire_fsr_qed_11->22&11";
417  splittings.insert( make_pair( name, new Dire_fsr_qed_L2AL( name,
418  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
419  coupSMPtr, infoPtr, direInfoPtr)) );
420  name = "Dire_fsr_qed_22->11&11a";
421  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 11, name, order,
422  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
423  infoPtr, direInfoPtr)) );
424  name = "Dire_fsr_qed_22->11&11b";
425  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-11, name, order,
426  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
427  infoPtr, direInfoPtr)) );
428  name = "Dire_fsr_qed_22->13&13a";
429  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 13, name, order,
430  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
431  infoPtr, direInfoPtr)) );
432  name = "Dire_fsr_qed_22->13&13b";
433  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-13, name, order,
434  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
435  infoPtr, direInfoPtr)) );
436  name = "Dire_fsr_qed_22->15&15a";
437  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF( 15, name, order,
438  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
439  infoPtr, direInfoPtr)) );
440  name = "Dire_fsr_qed_22->15&15b";
441  splittings.insert( make_pair( name, new Dire_fsr_qed_A2FF(-15, name, order,
442  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
443  infoPtr, direInfoPtr)) );
444  // Complete DGLAG kernel for photon emission off charge, as e.g. needed
445  // after charged hadron decay.
446  name = "Dire_fsr_qed_11->11&22_notPartial";
447  splittings.insert( make_pair( name, new Dire_fsr_qed_L2LA_notPartial( name,
448  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
449  coupSMPtr, infoPtr, direInfoPtr)) );
450  }
451 
452  // H -> A A
453  name = "Dire_fsr_ew_25->22&22";
454  splittings.insert( make_pair( name, new Dire_fsr_ew_H2AA( name, order,
455  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
456  infoPtr, direInfoPtr)) );
457 
458  name = "Dire_fsr_ew_25->21&21";
459  splittings.insert( make_pair( name, new Dire_fsr_ew_H2GG( name, order,
460  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
461  infoPtr, direInfoPtr)) );
462 
463  name = "Dire_fsr_ew_24->24&22";
464  splittings.insert( make_pair( name, new Dire_fsr_ew_W2WA( name, order,
465  settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr, coupSMPtr,
466  infoPtr, direInfoPtr)) );
467 
468  // New U(1) splittings
469  if (settingsPtr->flag("TimeShower:U1newShowerByQ")) {
470  name = "Dire_fsr_u1new_22->211&211a";
471  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2SS(211, name,
472  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
473  coupSMPtr, infoPtr, direInfoPtr)) );
474  name = "Dire_fsr_u1new_22->211&211b";
475  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2SS(-211, name,
476  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
477  coupSMPtr, infoPtr, direInfoPtr)) );
478  }
479 
480  if (settingsPtr->flag("TimeShower:U1newShowerByL")) {
481  name = "Dire_fsr_u1new_11->11&22";
482  splittings.insert( make_pair( name, new Dire_fsr_u1new_L2LA( name,
483  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
484  coupSMPtr, infoPtr, direInfoPtr)) );
485  name = "Dire_fsr_u1new_11->22&11";
486  splittings.insert( make_pair( name, new Dire_fsr_u1new_L2AL( name,
487  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
488  coupSMPtr, infoPtr, direInfoPtr)) );
489  name = "Dire_fsr_u1new_22->11&11a";
490  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2FF( 11, name,
491  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
492  coupSMPtr, infoPtr, direInfoPtr)) );
493  name = "Dire_fsr_u1new_22->11&11b";
494  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2FF(-11, name,
495  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
496  coupSMPtr, infoPtr, direInfoPtr)) );
497  name = "Dire_fsr_u1new_22->13&13a";
498  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2FF( 13, name,
499  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
500  coupSMPtr, infoPtr, direInfoPtr)) );
501  name = "Dire_fsr_u1new_22->13&13b";
502  splittings.insert( make_pair( name, new Dire_fsr_u1new_A2FF(-13, name,
503  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
504  coupSMPtr, infoPtr, direInfoPtr)) );
505  }
506 
507  // Read more kernels.
508  if (hasExternalHook && hooksPtr->canLoadFSRKernels())
509  hooksPtr->doLoadFSRKernels(splittings);
510 
511  // Done.
512 }
513 
514 //--------------------------------------------------------------------------
515 
516 void DireSplittingLibrary::initISR() {
517 
518  // Add corrections to the LO splitting kernel.
519  // order = 0 -> A1, B1
520  // order = 1 -> A1, A2, B1
521  // order = 2 -> A1, A2, A3, B1
522  // order = 3 -> A1, A2, A3, B1, B2
523  int order = settingsPtr->mode("DireSpace:kernelOrder");
524  string name = "";
525 
526  // QCD splittings.
527  if (settingsPtr->flag("SpaceShower:QCDshower")) {
528  // Q -> Q G, soft and collinear part.
529  name = "Dire_isr_qcd_1->1&21";
530  splittings.insert( make_pair( name, new Dire_isr_qcd_Q2QG( name,
531  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
532  coupSMPtr, infoPtr, direInfoPtr)) );
533  // G -> Q Q~ (regular DGLAP kernel)
534  name = "Dire_isr_qcd_21->1&1";
535  splittings.insert( make_pair( name, new Dire_isr_qcd_G2QQ( name,
536  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
537  coupSMPtr, infoPtr, direInfoPtr)) );
538  // G -> G G, soft part.
539  name = "Dire_isr_qcd_21->21&21a";
540  splittings.insert( make_pair( name, new Dire_isr_qcd_G2GG1( name,
541  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
542  coupSMPtr, infoPtr, direInfoPtr)) );
543  name = "Dire_isr_qcd_21->21&21b";
544  splittings.insert( make_pair( name, new Dire_isr_qcd_G2GG2( name,
545  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
546  coupSMPtr, infoPtr, direInfoPtr)) );
547  // Q -> G Q (regular DGLAP kernel)
548  name = "Dire_isr_qcd_1->21&1";
549  splittings.insert( make_pair( name, new Dire_isr_qcd_Q2GQ( name,
550  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
551  coupSMPtr, infoPtr, direInfoPtr)) );
552  // Q -> Q' Q Q'bar (pure NLO kernel)
553  name = "Dire_isr_qcd_1->2&1&2";
554  splittings.insert( make_pair( name, new Dire_isr_qcd_Q2qQqbarDist( name,
555  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
556  coupSMPtr, infoPtr, direInfoPtr)) );
557  // Q -> Qbar Q Q (pure NLO kernel)
558  name = "Dire_isr_qcd_1->1&1&1";
559  splittings.insert( make_pair( name, new Dire_isr_qcd_Q2QbarQQId( name,
560  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
561  coupSMPtr, infoPtr, direInfoPtr)) );
562  }
563 
564  // QED splittings
565  if (settingsPtr->flag("SpaceShower:QEDshowerByQ")) {
566  // Q -> Q A, soft and collinear part.
567  name = "Dire_isr_qed_1->1&22";
568  splittings.insert( make_pair( name, new Dire_isr_qed_Q2QA( name,
569  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
570  coupSMPtr, infoPtr, direInfoPtr)) );
571  }
572 
573  if (settingsPtr->flag("SpaceShower:QEDshowerByL")) {
574  // L -> L A, soft and collinear part.
575  name = "Dire_isr_qed_11->11&22";
576  splittings.insert( make_pair( name, new Dire_isr_qed_L2LA( name,
577  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
578  coupSMPtr, infoPtr, direInfoPtr)) );
579  }
580 
581  // New U(1) splittings
582  if (settingsPtr->flag("SpaceShower:U1newShowerByL")) {
583  name = "Dire_isr_u1new_11->11&22";
584  splittings.insert( make_pair( name, new Dire_isr_u1new_L2LA( name,
585  order, settingsPtr, particleDataPtr, rndmPtr, beamAPtr, beamBPtr,
586  coupSMPtr, infoPtr, direInfoPtr)) );
587  }
588 
589  // Read more kernels.
590  if (hasExternalHook && hooksPtr->canLoadISRKernels())
591  hooksPtr->doLoadISRKernels(splittings);
592 
593  // Done.
594 }
595 
596 //--------------------------------------------------------------------------
597 
598 // Overload index operator to access element of splitting vector.
599 
600 DireSplitting* DireSplittingLibrary::operator[](string id) {
601  if (splittings.find(id) != splittings.end()) return splittings[id];
602  return NULL;
603 }
604 
605 const DireSplitting* DireSplittingLibrary::operator[](string id) const {
606  if (splittings.find(id) != splittings.end()) return splittings.at(id);
607  return NULL;
608 }
609 
610 //--------------------------------------------------------------------------
611 
612 // Generate identifier of radiator before the splitting
613 
614 vector<int> DireSplittingLibrary::getSplittingRadBefID(const Event& event,
615  int rad, int emt) { return getSplittingRadBefID_new(event, rad, emt); }
616 
617 //--------------------------------------------------------------------------
618 
619 vector<int> DireSplittingLibrary::getSplittingRadBefID_new(const Event& event,
620  int rad, int emt) {
621 
622  vector<int>radBefIDs;
623  for ( std::unordered_map<string,DireSplitting*>::iterator it =
624  splittings.begin();
625  it != splittings.end(); ++it ) {
626  int idNow = it->second->radBefID(event[rad].id(), event[emt].id());
627  if (idNow != 0) radBefIDs.push_back(idNow);
628  }
629 
630  return radBefIDs;
631 
632 }
633 
634 //--------------------------------------------------------------------------
635 
636 // Generate name for a splitting
637 
638 vector<string> DireSplittingLibrary::getSplittingName_new(const Event& event,
639  int rad, int emt) {
640 
641  vector<string> names;
642  for ( std::unordered_map<string,DireSplitting*>::iterator it =
643  splittings.begin();
644  it != splittings.end(); ++it ) {
645 
646  int type = event[rad].isFinal() ? 1 :-1;
647  if (type < 0 && it->first.find("isr") == string::npos) continue;
648  if (type > 0 && it->first.find("fsr") == string::npos) continue;
649 
650  // Find radiator before emission.
651  int idNow = it->second->radBefID(event[rad].id(), event[emt].id());
652 
653  // Now check that after emission, we would find same flavors.
654  vector <int> radAndEmt;
655  if (idNow != 0) radAndEmt = it->second->radAndEmt(idNow,0);
656 
657  bool valid = false;
658  if (radAndEmt.size() == 2) {
659  if (radAndEmt[1] == event[emt].id())
660  valid = true;
661  if (event[emt].isQuark() && event[emt].colType() > 0
662  && radAndEmt[1] == 1)
663  valid = true;
664  if (event[emt].isQuark() && event[emt].colType() < 0
665  && radAndEmt[1] == 1)
666  valid = true;
667  }
668 
669  // Found valid splitting name.
670  if (valid && idNow != 0) names.push_back(it->first);
671  }
672 
673  return names;
674 
675 }
676 
677 //--------------------------------------------------------------------------
678 
679 // Generate name for a splitting
680 
681 vector<string> DireSplittingLibrary::getSplittingName(const Event& event,
682  int rad, int emt) { return getSplittingName_new(event, rad, emt); }
683 
684 //--------------------------------------------------------------------------
685 
686 // Return the total number of emissions for a particular splitting
687 
688 int DireSplittingLibrary::nEmissions( string name ) {
689 
690  std::unordered_map<string, DireSplitting*>::iterator it =
691  splittings.find(name);
692  if (it != splittings.end() && abs(it->second->kinMap()) == 2) return 2;
693 
694  // Flavour-changing 1->3 splitting for FSR implemented.
695  if ( name.find("Dire_fsr_qcd_1->2&1&2") != string::npos ) return 2;
696 
697  // Flavour-preserving 1->3 splitting for FSR implemented.
698  if ( name.find("Dire_fsr_qcd_1->1&1&1") != string::npos ) return 2;
699 
700  // Flavour-changing 1->3 splitting for FSR implemented.
701  if ( name.find("Dire_isr_qcd_1->2&1&2") != string::npos ) return 2;
702 
703  // Flavour-preserving 1->3 splitting for FSR implemented.
704  if ( name.find("Dire_isr_qcd_1->1&1&1") != string::npos ) return 2;
705 
706  // Default is one emission.
707  return 1;
708 
709 }
710 
711 //==========================================================================
712 
713 } // end namespace Pythia8
Definition: AgUStep.h:26