CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
alpgen Namespace Reference

Functions

void fixEventHiggsTTbar (lhef::HEPEUP &hepeup)
 Fixes Event Record for ihrd = 8. More...
 
void fixEventMultiBoson (lhef::HEPEUP &hepeup)
 Fixes Event Record for ihrd = 5. More...
 
void fixEventSingleTop (lhef::HEPEUP &hepeup, double mb, int itopprc)
 Fixes Event Record for ihrd = 13. More...
 
void fixEventTTbar (lhef::HEPEUP &hepeup)
 Fixes Event Record for ihrd = 6. More...
 
void fixEventWZ (lhef::HEPEUP &hepeup)
 Fixes Event Record for ihrd = 1,2,3,4,10,14,15. More...
 
math::XYZTLorentzVector vectorFromHepeup (const lhef::HEPEUP &hepeup, int index)
 

Function Documentation

void alpgen::fixEventHiggsTTbar ( lhef::HEPEUP hepeup)

Fixes Event Record for ihrd = 8.

Definition at line 210 of file AlpgenEventRecordFixes.cc.

References funct::abs(), lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, submitPVValidationJobs::child1, gather_cfg::cout, first, mps_fire::i, lhef::HEPEUP::ICOLUP, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, lhef::HEPEUP::PUP, lhef::HEPEUP::resize(), edm::second(), lhef::HEPEUP::SPINUP, and vectorFromHepeup().

Referenced by AlpgenSource::produce().

210  {
211  using namespace math;
212 
213  int nup = hepeup.NUP;
214 
215  // Assert top is in the fourth position.
216  int fourthID = hepeup.IDUP[3];
217  if (std::abs(fourthID) != 6) {
218  std::cout << "Top is NOT in the fourth position - no need to fix." << std::endl;
219  return;
220  }
221 
222  // Open up space for 2 W bosons and two b quarks.
223  hepeup.resize(nup + 4);
224 
225  // reset top status codes
226  hepeup.ISTUP[3] = 2;
227  hepeup.ISTUP[4] = 2;
228  int it;
229  int itbar;
230  if (fourthID == 6) {
231  it = 3;
232  itbar = 4;
233  } else {
234  it = 4;
235  itbar = 3;
236  }
237 
238  // Reconstruct W's from decay product, fix mother-daughter relations.
239  // Glossary: iwdec is the location of the first W decay product;
240  // iwup is the location where the W will be put.
241  // ibup is the location where the b will be put.
242  for (int iw = 0; iw != 2; ++iw) {
243  int iwdec = nup - 4 + 2 * iw;
244  int iwup = nup + iw;
245  int ibup = iwup + 2;
246  int iwch = 0;
247  for (int iup = iwdec; iup != iwdec + 2; ++iup) {
248  hepeup.MOTHUP[iup].first = iwup + 1;
249  hepeup.MOTHUP[iup].second = 0;
250  iwch = (iwch - hepeup.IDUP[iup] % 2);
251  }
252  if (iwch > 0) {
253  hepeup.IDUP[iwup] = 24;
254  hepeup.IDUP[ibup] = 5;
255  hepeup.MOTHUP[iwup].first = it + 1;
256  hepeup.MOTHUP[iwup].second = 0;
257  hepeup.MOTHUP[ibup].first = it + 1;
258  hepeup.MOTHUP[ibup].second = 0;
259  }
260  if (iwch < 0) {
261  hepeup.IDUP[iwup] = -24;
262  hepeup.IDUP[ibup] = -5;
263  hepeup.MOTHUP[iwup].first = itbar + 1;
264  hepeup.MOTHUP[iwup].second = 0;
265  hepeup.MOTHUP[ibup].first = itbar + 1;
266  hepeup.MOTHUP[ibup].second = 0;
267  }
268  hepeup.ISTUP[iwup] = 2;
269  hepeup.ISTUP[ibup] = 1;
270 
271  // Reconstruct W momentum from its children.
273  child1 = vectorFromHepeup(hepeup, iwdec);
274  XYZTLorentzVector child2;
275  child2 = vectorFromHepeup(hepeup, iwdec + 1);
276 
277  XYZTLorentzVector bosonW;
278  bosonW = (child1 + child2);
279  hepeup.PUP[iwup][0] = bosonW.Px();
280  hepeup.PUP[iwup][1] = bosonW.Py();
281  hepeup.PUP[iwup][2] = bosonW.Pz();
282  hepeup.PUP[iwup][3] = bosonW.E();
283  hepeup.PUP[iwup][4] = bosonW.M();
284 
285  // Reconstruct b momentum from W and t.
286  int topIndex = (hepeup.MOTHUP[iwup].first) - 1;
287  XYZTLorentzVector topQuark;
288  topQuark = vectorFromHepeup(hepeup, topIndex);
289 
290  XYZTLorentzVector bottomQuark;
291  bottomQuark = (topQuark - bosonW);
292  hepeup.PUP[ibup][0] = bottomQuark.Px();
293  hepeup.PUP[ibup][1] = bottomQuark.Py();
294  hepeup.PUP[ibup][2] = bottomQuark.Pz();
295  hepeup.PUP[ibup][3] = bottomQuark.E();
296  hepeup.PUP[ibup][4] = bottomQuark.M();
297 
298  // Set color labels.
299  hepeup.ICOLUP[iwup].first = 0;
300  hepeup.ICOLUP[iwup].second = 0;
301  hepeup.ICOLUP[ibup].first = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].first;
302  hepeup.ICOLUP[ibup].second = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].second;
303  }
304 
305  hepeup.AQEDUP = hepeup.AQCDUP = -1.0; // alphas are not saved by Alpgen
306  for (int i = 0; i < hepeup.NUP; i++)
307  hepeup.SPINUP[i] = -9; // Alpgen does not store spin information
308 }
math::XYZTLorentzVector vectorFromHepeup(const lhef::HEPEUP &hepeup, int index)
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
U second(std::pair< T, U > const &p)
void resize(int nup)
Definition: LesHouches.h:161
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
std::vector< double > SPINUP
Definition: LesHouches.h:259
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
double AQCDUP
Definition: LesHouches.h:218
tuple cout
Definition: gather_cfg.py:144
double AQEDUP
Definition: LesHouches.h:213
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
void alpgen::fixEventMultiBoson ( lhef::HEPEUP hepeup)

Fixes Event Record for ihrd = 5.

Definition at line 81 of file AlpgenEventRecordFixes.cc.

References funct::abs(), lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, mps_fire::i, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, and lhef::HEPEUP::SPINUP.

Referenced by AlpgenSource::produce().

81  {
82  int nup = hepeup.NUP;
83 
84  // find first gauge bosons
85  int ivstart = 0;
86  int ivend = 0;
87  for (int i = 0; i != nup; ++i) {
88  if (std::abs(hepeup.IDUP[i]) == 24 || hepeup.IDUP[i] == 23) {
89  hepeup.ISTUP[i] = 2;
90  if (ivstart == 0)
91  ivstart = i;
92  ivend = i + 1;
93  }
94  }
95  int nvb = ivend - ivstart;
96 
97  // decay products pointers, starting from the end
98  for (int i = 0; i != nvb; ++i) {
99  hepeup.MOTHUP[nup - 2 * i - 1].first = ivend - i;
100  hepeup.MOTHUP[nup - 2 * i - 2].first = ivend - i;
101  hepeup.MOTHUP[nup - 2 * i - 1].second = 0;
102  hepeup.MOTHUP[nup - 2 * i - 2].second = 0;
103  }
104 
105  hepeup.AQEDUP = hepeup.AQCDUP = -1.0; // alphas are not saved by Alpgen
106  for (int i = 0; i < hepeup.NUP; i++)
107  hepeup.SPINUP[i] = -9; // Alpgen does not store spin information
108 }
std::vector< double > SPINUP
Definition: LesHouches.h:259
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
double AQCDUP
Definition: LesHouches.h:218
double AQEDUP
Definition: LesHouches.h:213
void alpgen::fixEventSingleTop ( lhef::HEPEUP hepeup,
double  mb,
int  itopprc 
)

Fixes Event Record for ihrd = 13.

Definition at line 310 of file AlpgenEventRecordFixes.cc.

References funct::abs(), submitPVValidationJobs::child1, gather_cfg::cout, first, mps_fire::i, lhef::HEPEUP::ICOLUP, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, lhef::HEPEUP::PUP, lhef::HEPEUP::resize(), edm::second(), mathSSE::sqrt(), and vectorFromHepeup().

Referenced by AlpgenSource::produce().

310  {
311  using namespace math;
312 
313  int nup = hepeup.NUP;
314 
315  // Number of W bosons.
316  int nw = 1;
317  // Fix number of Ws in final state.
318  if (itopprc >= 3)
319  nw = 2;
320 
321  // Open up space for W bosons and b quarks.
322  hepeup.resize(nup + 2);
323 
324  // Assign mass to the incoming bottom quark, if required.
325  for (int i = 0; i != 2; ++i) {
326  if (std::abs(hepeup.IDUP[i]) == 5) {
327  hepeup.PUP[i][4] = mb;
328  double energyb = hepeup.PUP[i][3];
329  hepeup.PUP[i][3] = std::sqrt(energyb * energyb + mb * mb);
330  }
331  }
332 
333  // Identify the top.
334  hepeup.ISTUP[2] = 2;
335  int it = 0;
336  int itbar = 0;
337  if (hepeup.IDUP[2] == 6)
338  it = 2;
339  else if (hepeup.IDUP[2] == -6)
340  itbar = 2;
341  else {
342  std::cout << "Wrong assumption about top position, stop." << std::endl;
343  // FIXME: Should throw an exception here.
344  return;
345  }
346 
347  // TOP DECAY
348  // Reconstruct W's from decay products.
349  // iwdec: 1st W decay product.
350  int iwdec = 0;
351  if (nw == 1)
352  iwdec = nup - 2;
353  else if (nw == 2)
354  iwdec = nup - 4;
355 
356  // Put W and b at the end.
357  int iwup = nup;
358  int ibup = iwup + 1;
359  int iwch = 0;
360  for (int iup = iwdec; iup != iwdec + 2; ++iup) {
361  hepeup.MOTHUP[iup].first = iwup + 1;
362  hepeup.MOTHUP[iup].second = 0;
363  iwch = (iwch - hepeup.IDUP[iup] % 2);
364  }
365 
366  if (iwch > 0) {
367  hepeup.IDUP[iwup] = 24;
368  hepeup.IDUP[ibup] = 5;
369  hepeup.MOTHUP[iwup].first = it + 1;
370  hepeup.MOTHUP[iwup].second = 0;
371  hepeup.MOTHUP[ibup].first = it + 1;
372  hepeup.MOTHUP[ibup].second = 0;
373  }
374  if (iwch < 0) {
375  hepeup.IDUP[iwup] = -24;
376  hepeup.IDUP[ibup] = -5;
377  hepeup.MOTHUP[iwup].first = itbar + 1;
378  hepeup.MOTHUP[iwup].second = 0;
379  hepeup.MOTHUP[ibup].first = itbar + 1;
380  hepeup.MOTHUP[ibup].second = 0;
381  }
382  hepeup.ISTUP[iwup] = 2;
383  hepeup.ISTUP[ibup] = 1;
384 
385  // Reconstruct W momentum from its children.
387  child1 = vectorFromHepeup(hepeup, iwdec);
388  XYZTLorentzVector child2;
389  child2 = vectorFromHepeup(hepeup, iwdec + 1);
390 
391  XYZTLorentzVector bosonW;
392  bosonW = (child1 + child2);
393  hepeup.PUP[iwup][0] = bosonW.Px();
394  hepeup.PUP[iwup][1] = bosonW.Py();
395  hepeup.PUP[iwup][2] = bosonW.Pz();
396  hepeup.PUP[iwup][3] = bosonW.E();
397  hepeup.PUP[iwup][4] = bosonW.M();
398 
399  // Reconstruct b momentum from W and t.
400  int topIndex = (hepeup.MOTHUP[iwup].first) - 1;
401  XYZTLorentzVector topQuark;
402  topQuark = vectorFromHepeup(hepeup, topIndex);
403 
404  XYZTLorentzVector bottomQuark;
405  bottomQuark = (topQuark - bosonW);
406  hepeup.PUP[ibup][0] = bottomQuark.Px();
407  hepeup.PUP[ibup][1] = bottomQuark.Py();
408  hepeup.PUP[ibup][2] = bottomQuark.Pz();
409  hepeup.PUP[ibup][3] = bottomQuark.E();
410  hepeup.PUP[ibup][4] = bottomQuark.M();
411 
412  // Set color labels.
413  hepeup.ICOLUP[iwup].first = 0;
414  hepeup.ICOLUP[iwup].second = 0;
415  hepeup.ICOLUP[ibup].first = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].first;
416  hepeup.ICOLUP[ibup].second = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].second;
417 
418  nup = nup + 2;
419 
420  // If there is a second W, we deal with it now.
421  // Unlike the first W, this one appears EXPLICITLY in the Event Record.
422  if (nw == 2) {
423  // W DECAY
424  // iwdec: 1st W decay product.
425  iwdec = nup - 4;
426  // iwup: location of the W in the event record.
427  iwup = nup - 7;
428  iwch = 0;
429  for (int iup = iwdec; iup != iwdec + 2; ++iup) {
430  hepeup.MOTHUP[iup].first = iwup + 1;
431  hepeup.MOTHUP[iup].second = 0;
432  iwch = (iwch - hepeup.IDUP[iup] % 2);
433  }
434  hepeup.ISTUP[iwup] = 2;
435  hepeup.ICOLUP[iwup].first = 0;
436  hepeup.ICOLUP[iwup].second = 0;
437  }
438 }
math::XYZTLorentzVector vectorFromHepeup(const lhef::HEPEUP &hepeup, int index)
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
U second(std::pair< T, U > const &p)
void resize(int nup)
Definition: LesHouches.h:161
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
tuple cout
Definition: gather_cfg.py:144
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
void alpgen::fixEventTTbar ( lhef::HEPEUP hepeup)

Fixes Event Record for ihrd = 6.

Definition at line 110 of file AlpgenEventRecordFixes.cc.

References funct::abs(), lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, submitPVValidationJobs::child1, gather_cfg::cout, first, mps_fire::i, lhef::HEPEUP::ICOLUP, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, lhef::HEPEUP::PUP, lhef::HEPEUP::resize(), edm::second(), lhef::HEPEUP::SPINUP, and vectorFromHepeup().

Referenced by AlpgenSource::produce().

110  {
111  using namespace math;
112 
113  int nup = hepeup.NUP;
114 
115  // Assert top is in the third position.
116  int thirdID = hepeup.IDUP[2];
117  if (std::abs(thirdID) != 6) {
118  std::cout << "Top is NOT in the third position - no need to fix." << std::endl;
119  return;
120  }
121 
122  // Open up space for 2 W bosons and two b quarks.
123  hepeup.resize(nup + 4);
124 
125  // reset top status codes
126  hepeup.ISTUP[2] = 2;
127  hepeup.ISTUP[3] = 2;
128  int it;
129  int itbar;
130  if (thirdID == 6) {
131  it = 2;
132  itbar = 3;
133  } else {
134  it = 3;
135  itbar = 2;
136  }
137 
138  // Reconstruct W's from decay product, fix mother-daughter relations.
139  // Glossary: iwdec is the location of the first W decay product;
140  // iwup is the location where the W will be put.
141  // ibup is the location where the b will be put.
142  for (int iw = 0; iw != 2; ++iw) {
143  int iwdec = nup - 4 + 2 * iw;
144  int iwup = nup + iw;
145  int ibup = iwup + 2;
146  int iwch = 0;
147  for (int iup = iwdec; iup != iwdec + 2; ++iup) {
148  hepeup.MOTHUP[iup].first = iwup + 1;
149  hepeup.MOTHUP[iup].second = 0;
150  iwch = (iwch - hepeup.IDUP[iup] % 2);
151  }
152  if (iwch > 0) {
153  hepeup.IDUP[iwup] = 24;
154  hepeup.IDUP[ibup] = 5;
155  hepeup.MOTHUP[iwup].first = it + 1;
156  hepeup.MOTHUP[iwup].second = 0;
157  hepeup.MOTHUP[ibup].first = it + 1;
158  hepeup.MOTHUP[ibup].second = 0;
159  }
160  if (iwch < 0) {
161  hepeup.IDUP[iwup] = -24;
162  hepeup.IDUP[ibup] = -5;
163  hepeup.MOTHUP[iwup].first = itbar + 1;
164  hepeup.MOTHUP[iwup].second = 0;
165  hepeup.MOTHUP[ibup].first = itbar + 1;
166  hepeup.MOTHUP[ibup].second = 0;
167  }
168  hepeup.ISTUP[iwup] = 2;
169  hepeup.ISTUP[ibup] = 1;
170 
171  // Reconstruct W momentum from its children.
173  child1 = vectorFromHepeup(hepeup, iwdec);
174  XYZTLorentzVector child2;
175  child2 = vectorFromHepeup(hepeup, iwdec + 1);
176 
177  XYZTLorentzVector bosonW;
178  bosonW = (child1 + child2);
179  hepeup.PUP[iwup][0] = bosonW.Px();
180  hepeup.PUP[iwup][1] = bosonW.Py();
181  hepeup.PUP[iwup][2] = bosonW.Pz();
182  hepeup.PUP[iwup][3] = bosonW.E();
183  hepeup.PUP[iwup][4] = bosonW.M();
184 
185  // Reconstruct b momentum from W and t.
186  int topIndex = (hepeup.MOTHUP[iwup].first) - 1;
187  XYZTLorentzVector topQuark;
188  topQuark = vectorFromHepeup(hepeup, topIndex);
189 
190  XYZTLorentzVector bottomQuark;
191  bottomQuark = (topQuark - bosonW);
192  hepeup.PUP[ibup][0] = bottomQuark.Px();
193  hepeup.PUP[ibup][1] = bottomQuark.Py();
194  hepeup.PUP[ibup][2] = bottomQuark.Pz();
195  hepeup.PUP[ibup][3] = bottomQuark.E();
196  hepeup.PUP[ibup][4] = bottomQuark.M();
197 
198  // Set color labels.
199  hepeup.ICOLUP[iwup].first = 0;
200  hepeup.ICOLUP[iwup].second = 0;
201  hepeup.ICOLUP[ibup].first = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].first;
202  hepeup.ICOLUP[ibup].second = hepeup.ICOLUP[(hepeup.MOTHUP[iwup].first) - 1].second;
203  }
204 
205  hepeup.AQEDUP = hepeup.AQCDUP = -1.0; // alphas are not saved by Alpgen
206  for (int i = 0; i < hepeup.NUP; i++)
207  hepeup.SPINUP[i] = -9; // Alpgen does not store spin information
208 }
math::XYZTLorentzVector vectorFromHepeup(const lhef::HEPEUP &hepeup, int index)
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
U second(std::pair< T, U > const &p)
void resize(int nup)
Definition: LesHouches.h:161
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
std::vector< double > SPINUP
Definition: LesHouches.h:259
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
double AQCDUP
Definition: LesHouches.h:218
tuple cout
Definition: gather_cfg.py:144
double AQEDUP
Definition: LesHouches.h:213
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
void alpgen::fixEventWZ ( lhef::HEPEUP hepeup)

Fixes Event Record for ihrd = 1,2,3,4,10,14,15.

Definition at line 23 of file AlpgenEventRecordFixes.cc.

References lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, mps_fire::i, lhef::HEPEUP::ICOLUP, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, lhef::HEPEUP::PUP, lhef::HEPEUP::resize(), lhef::HEPEUP::SPINUP, and mathSSE::sqrt().

Referenced by AlpgenSource::produce().

23  {
24  // Nomenclature...
25  int nup = hepeup.NUP;
26 
27  // Open up space for the vector boson.
28  hepeup.resize(nup + 1);
29 
30  // Assignments specific to individual hard processes.
31  // This one fixes the Event Record for W and Z.
32  int iwch = 0;
33 
34  // The last two particles in the record make the boson.
35  double bosonPx = 0.;
36  double bosonPy = 0.;
37  double bosonPz = 0.;
38  double bosonE = 0.;
39  for (int i = nup - 2; i != nup; ++i) {
40  bosonPx += hepeup.PUP[i][0];
41  bosonPy += hepeup.PUP[i][1];
42  bosonPz += hepeup.PUP[i][2];
43  bosonE += hepeup.PUP[i][3];
44  hepeup.MOTHUP[i].first = nup + 1;
45  hepeup.MOTHUP[i].second = 0;
46  iwch = (iwch - hepeup.IDUP[i] % 2);
47  }
48  // electron+nubar -> 11 + (-12) => -(1)+0 = -1 => W-
49  // positron+nu -> -11+ 12 => -(-1)+0 = +1 => W+
50  // u dbar -> 2 -1 => 0 -(-1) = 1 => W+
51  // c dbar -> 4 -1 => W+
52  // etc.
53 
54  // Boson ID.
55  int bosonIndex = nup;
56  int bosonId = 23;
57  double bosonMass = std::sqrt(bosonE * bosonE - (bosonPx * bosonPx + bosonPy * bosonPy + bosonPz * bosonPz));
58  if (iwch > 0)
59  bosonId = 24;
60  if (iwch < 0)
61  bosonId = -24;
62 
63  // Boson in the Event Record.
64  hepeup.IDUP[bosonIndex] = bosonId;
65  hepeup.ISTUP[bosonIndex] = 2;
66  hepeup.MOTHUP[bosonIndex].first = 1;
67  hepeup.MOTHUP[bosonIndex].second = 2;
68  hepeup.PUP[bosonIndex][0] = bosonPx;
69  hepeup.PUP[bosonIndex][1] = bosonPy;
70  hepeup.PUP[bosonIndex][2] = bosonPz;
71  hepeup.PUP[bosonIndex][3] = bosonE;
72  hepeup.PUP[bosonIndex][4] = bosonMass;
73  hepeup.ICOLUP[bosonIndex].first = 0;
74  hepeup.ICOLUP[bosonIndex].second = 0;
75 
76  hepeup.AQEDUP = hepeup.AQCDUP = -1.0; // alphas are not saved by Alpgen
77  for (int i = 0; i < hepeup.NUP; i++)
78  hepeup.SPINUP[i] = -9; // Alpgen does not store spin information
79 }
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
void resize(int nup)
Definition: LesHouches.h:161
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
std::vector< double > SPINUP
Definition: LesHouches.h:259
std::vector< int > ISTUP
Definition: LesHouches.h:228
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
std::vector< int > IDUP
Definition: LesHouches.h:223
double AQCDUP
Definition: LesHouches.h:218
double AQEDUP
Definition: LesHouches.h:213
math::XYZTLorentzVector alpgen::vectorFromHepeup ( const lhef::HEPEUP hepeup,
int  index 
)

Functions to fixthe HEPEUP Event Record, adding the particles that ALPGEN skips in the .unw event. A function to return a LorentzVector from a given position in the HEPEUP

Definition at line 18 of file AlpgenEventRecordFixes.cc.

References lhef::HEPEUP::PUP.

Referenced by fixEventHiggsTTbar(), fixEventSingleTop(), and fixEventTTbar().

18  {
20  hepeup.PUP[index][0], hepeup.PUP[index][1], hepeup.PUP[index][2], hepeup.PUP[index][3]);
21 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::vector< FiveVector > PUP
Definition: LesHouches.h:246