CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 221 of file AlpgenEventRecordFixes.cc.

References abs, lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, gather_cfg::cout, first, 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().

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

Fixes Event Record for ihrd = 5.

Definition at line 88 of file AlpgenEventRecordFixes.cc.

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

Referenced by AlpgenSource::produce().

89 {
90  int nup = hepeup.NUP;
91 
92  // find first gauge bosons
93  int ivstart=0;
94  int ivend=0;
95  for(int i = 0; i != nup; ++i) {
96  if(std::abs(hepeup.IDUP[i]) == 24 || hepeup.IDUP[i] == 23) {
97  hepeup.ISTUP[i] = 2;
98  if(ivstart == 0) ivstart = i;
99  ivend = i+1;
100  }
101  }
102  int nvb = ivend-ivstart;
103 
104  // decay products pointers, starting from the end
105  for(int i = 0; i != nvb; ++i) {
106  hepeup.MOTHUP[nup - 2*i -1].first = ivend-i;
107  hepeup.MOTHUP[nup - 2*i -2].first = ivend-i;
108  hepeup.MOTHUP[nup - 2*i -1].second = 0;
109  hepeup.MOTHUP[nup - 2*i -2].second = 0;
110  }
111 
112  hepeup.AQEDUP = hepeup.AQCDUP = -1.0; // alphas are not saved by Alpgen
113  for(int i = 0; i < hepeup.NUP; i++)
114  hepeup.SPINUP[i] = -9; // Alpgen does not store spin information
115 
116 }
int i
Definition: DBlmapReader.cc:9
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:236
std::vector< double > SPINUP
Definition: LesHouches.h:261
std::vector< int > ISTUP
Definition: LesHouches.h:230
std::vector< int > IDUP
Definition: LesHouches.h:225
double AQCDUP
Definition: LesHouches.h:220
double AQEDUP
Definition: LesHouches.h:215
void alpgen::fixEventSingleTop ( lhef::HEPEUP hepeup,
double  mb,
int  itopprc 
)

Fixes Event Record for ihrd = 13.

Definition at line 323 of file AlpgenEventRecordFixes.cc.

References abs, gather_cfg::cout, first, 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().

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

Fixes Event Record for ihrd = 6.

Definition at line 119 of file AlpgenEventRecordFixes.cc.

References abs, lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, gather_cfg::cout, first, 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().

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

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

Definition at line 27 of file AlpgenEventRecordFixes.cc.

References lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, 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().

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

19  {
20  return math::XYZTLorentzVector (hepeup.PUP[index][0],
21  hepeup.PUP[index][1],
22  hepeup.PUP[index][2],
23  hepeup.PUP[index][3]);
24 }
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
std::vector< FiveVector > PUP
Definition: LesHouches.h:248