CMS 3D CMS Logo

LHEEventProduct.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <iomanip>
3 #include <sstream>
4 #include <string>
5 
8 
10  const lhef::HEPEUP &hepeup = event->hepeup();
11  int line = this->line++;
12 
13  if (!line) {
14  std::ostringstream ss;
15  ss << std::setprecision(7) << std::scientific << std::uppercase << " " << hepeup.NUP << " " << hepeup.IDPRUP
16  << " " << event->originalXWGTUP() << " " << hepeup.SCALUP << " " << hepeup.AQEDUP << " " << hepeup.AQCDUP
17  << std::endl;
18  tmp = ss.str();
19  return;
20  }
21  line--;
22 
23  if (line < hepeup.NUP) {
24  std::ostringstream ss;
25  ss << std::setprecision(10) << std::scientific << std::uppercase << "\t" << hepeup.IDUP[line] << "\t"
26  << hepeup.ISTUP[line] << "\t" << hepeup.MOTHUP[line].first << "\t" << hepeup.MOTHUP[line].second << "\t"
27  << hepeup.ICOLUP[line].first << "\t" << hepeup.ICOLUP[line].second << "\t" << hepeup.PUP[line][0] << "\t"
28  << hepeup.PUP[line][1] << "\t" << hepeup.PUP[line][2] << "\t" << hepeup.PUP[line][3] << "\t"
29  << hepeup.PUP[line][4] << std::setprecision(3) << "\t" << hepeup.VTIMUP[line] << std::setprecision(1)
30  << std::fixed << "\t" << hepeup.SPINUP[line] << std::endl;
31  tmp = ss.str();
32  return;
33  }
34  line -= hepeup.NUP;
35 
36  if (event->pdf()) {
37  if (!line) {
38  const PDF &pdf = *event->pdf();
39  std::ostringstream ss;
40  ss << std::setprecision(7) << std::scientific << std::uppercase << "#pdf " << pdf.id.first << " "
41  << pdf.id.second << " " << pdf.x.first << " " << pdf.x.second << " " << pdf.scalePDF << " "
42  << pdf.xPDF.first << " " << pdf.xPDF.second << std::endl;
43  tmp = ss.str();
44  return;
45  }
46  line--;
47  }
48 
49  if (line < (int)event->comments_size()) {
50  tmp = *(event->comments_begin() + line);
51  return;
52  }
53  line -= event->comments_size();
54 
55  if (!line) {
56  tmp = "</event>\n";
57  return;
58  }
59 
60  tmp.clear();
61  this->line = npos;
62 }
63 
66  result.event = this;
67  result.line = 0;
68  result.tmp = "<event>\n";
69  return result;
70 }
lhef::HEPEUP::AQCDUP
double AQCDUP
Definition: LesHouches.h:218
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
LHEEventProduct::const_iterator::tmp
std::string tmp
Definition: LHEEventProduct.h:94
lhef::HEPEUP::MOTHUP
std::vector< std::pair< int, int > > MOTHUP
Definition: LesHouches.h:234
gen::PdfInfo::x
std::pair< double, double > x
Definition: PdfInfo.h:13
lhef::HEPEUP::ISTUP
std::vector< int > ISTUP
Definition: LesHouches.h:228
lhef::HEPEUP::SPINUP
std::vector< double > SPINUP
Definition: LesHouches.h:259
LHEEventProduct::const_iterator::line
unsigned int line
Definition: LHEEventProduct.h:93
LHEEventProduct::const_iterator
Definition: LHEEventProduct.h:60
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
gen::PdfInfo
Definition: PdfInfo.h:11
lhef::HEPEUP::NUP
int NUP
Definition: LesHouches.h:184
gen::PdfInfo::xPDF
std::pair< double, double > xPDF
Definition: PdfInfo.h:14
lhef::HEPEUP::ICOLUP
std::vector< std::pair< int, int > > ICOLUP
Definition: LesHouches.h:240
LHEEventProduct::const_iterator::next
void next()
Definition: LHEEventProduct.cc:9
lhef::HEPEUP::VTIMUP
std::vector< double > VTIMUP
Definition: LesHouches.h:252
LHEEventProduct::const_iterator::npos
static const unsigned int npos
Definition: LHEEventProduct.h:96
lhef::HEPEUP::AQEDUP
double AQEDUP
Definition: LesHouches.h:213
lhef::HEPEUP
Definition: LesHouches.h:138
gen::PdfInfo::scalePDF
double scalePDF
Definition: PdfInfo.h:15
LesHouches.h
LHEEventProduct::hepeup
const lhef::HEPEUP & hepeup() const
Definition: LHEEventProduct.h:46
LHEEventProduct.h
lhef::HEPEUP::IDUP
std::vector< int > IDUP
Definition: LesHouches.h:223
LHEEventProduct::pdf
const PDF * pdf() const
Definition: LHEEventProduct.h:47
gen::PdfInfo::id
std::pair< int, int > id
Definition: PdfInfo.h:12
lhef::HEPEUP::IDPRUP
int IDPRUP
Definition: LesHouches.h:189
LHEEventProduct::begin
const_iterator begin() const
Definition: LHEEventProduct.cc:64
mps_fire.result
result
Definition: mps_fire.py:311
event
Definition: event.py:1
lhef::HEPEUP::PUP
std::vector< FiveVector > PUP
Definition: LesHouches.h:246
lhef::HEPEUP::SCALUP
double SCALUP
Definition: LesHouches.h:208