CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LHAupLesHouches.cc
Go to the documentation of this file.
1 #include <algorithm>
2 #include <iostream>
3 #include <iterator>
4 #include <sstream>
5 #include <string>
6 #include <memory>
7 #include <assert.h>
8 
10 
11 using namespace Pythia8;
12 
13 
15 {
16  if (!runInfo) return false;
17  const lhef::HEPRUP &heprup = *runInfo->getHEPRUP();
18 
19  setBeamA(heprup.IDBMUP.first, heprup.EBMUP.first,
20  heprup.PDFGUP.first, heprup.PDFSUP.first);
21  setBeamB(heprup.IDBMUP.second, heprup.EBMUP.second,
22  heprup.PDFGUP.second, heprup.PDFSUP.second);
23  setStrategy(heprup.IDWTUP);
24 
25  for(int i = 0; i < heprup.NPRUP; i++)
26  addProcess(heprup.LPRUP[i], heprup.XSECUP[i],
27  heprup.XERRUP[i], heprup.XMAXUP[i]);
28 
29  //hadronisation->onInit().emit();
30 
31  //runInfo.reset();
32  return true;
33 }
34 
35 
36 bool LHAupLesHouches::setEvent(int inProcId, double mRecalculate)
37 {
38  if (!event) return false;
39 
40  if ( event->getReadAttempts() > 0 ) return false; // record already tried
41 
42  const lhef::HEPEUP &hepeup = *event->getHEPEUP();
43 
44  if ( !hepeup.NUP ) return false;
45 
46  setProcess(hepeup.IDPRUP, hepeup.XWGTUP, hepeup.SCALUP,
47  hepeup.AQEDUP, hepeup.AQCDUP);
48 
49  for(int i = 0; i < hepeup.NUP; i++)
50  addParticle(hepeup.IDUP[i], hepeup.ISTUP[i],
51  hepeup.MOTHUP[i].first, hepeup.MOTHUP[i].second,
52  hepeup.ICOLUP[i].first, hepeup.ICOLUP[i].second,
53  hepeup.PUP[i][0], hepeup.PUP[i][1],
54  hepeup.PUP[i][2], hepeup.PUP[i][3],
55  hepeup.PUP[i][4], hepeup.VTIMUP[i],
56  hepeup.SPINUP[i]);
57 
58  const lhef::LHEEvent::PDF *pdf = event->getPDF();
59  if (pdf) {
60  this->setPdf(pdf->id.first, pdf->id.second,
61  pdf->x.first, pdf->x.second,
62  pdf->scalePDF,
63  pdf->xPDF.first, pdf->xPDF.second, true);
64  }
65  else {
66  this->setPdf(hepeup.IDUP[0], hepeup.IDUP[1],
67  hepeup.PUP[0][3] / runInfo->getHEPRUP()->EBMUP.first,
68  hepeup.PUP[1][3] / runInfo->getHEPRUP()->EBMUP.second,
69  0., 0., 0., false);
70  }
71 
72  //hadronisation->onBeforeHadronisation().emit();
73 
74  //event.reset();
75 
76  event->attempted();
77 
78  return true;
79 }
int i
Definition: DBlmapReader.cc:9
std::pair< double, double > EBMUP
Definition: LesHouches.h:78
std::pair< double, double > x
Definition: PdfInfo.h:11
std::vector< double > VTIMUP
Definition: LesHouches.h:254
std::pair< int, int > IDBMUP
Definition: LesHouches.h:73
std::pair< double, double > xPDF
Definition: PdfInfo.h:12
std::pair< int, int > PDFGUP
Definition: LesHouches.h:84
bool setEvent(int idProcIn, double mRecalculate=-1.)
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:236
std::vector< FiveVector > PUP
Definition: LesHouches.h:248
std::vector< double > SPINUP
Definition: LesHouches.h:261
std::vector< int > ISTUP
Definition: LesHouches.h:230
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< int > IDUP
Definition: LesHouches.h:225
std::vector< double > XERRUP
Definition: LesHouches.h:114
std::pair< int, int > id
Definition: PdfInfo.h:10
std::vector< double > XMAXUP
Definition: LesHouches.h:119
double AQCDUP
Definition: LesHouches.h:220
std::pair< int, int > PDFSUP
Definition: LesHouches.h:90
double AQEDUP
Definition: LesHouches.h:215
std::vector< double > XSECUP
Definition: LesHouches.h:108
double XWGTUP
Definition: LesHouches.h:196
double scalePDF
Definition: PdfInfo.h:13
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:242
std::vector< int > LPRUP
Definition: LesHouches.h:124
double SCALUP
Definition: LesHouches.h:210