19 if (
mode != other.mode)
28 return header == other.header;
31 return header == other.header && iter == other.iter;
34 return line == other.line;
63 tmp = tag.empty() ?
"<!--" :
64 (tag ==
"<>") ?
"" : (
"<" + tag +
">");
73 tmp += tag.empty() ?
"-->" :
74 (tag ==
"<>") ?
"" : (
"</" + tag +
">");
81 (
tmp[
tmp.length() - 1] !=
'\r' &&
82 tmp[
tmp.length() - 1] !=
'\n')))
90 std::ostringstream ss;
91 ss << std::setprecision(7)
94 <<
" " << heprup.
IDBMUP.first
95 <<
" " << heprup.
IDBMUP.second
96 <<
" " << heprup.
EBMUP.first
97 <<
" " << heprup.
EBMUP.second
98 <<
" " << heprup.
PDFGUP.first
99 <<
" " << heprup.
PDFGUP.second
100 <<
" " << heprup.
PDFSUP.first
101 <<
" " << heprup.
PDFSUP.second
103 <<
" " << heprup.
NPRUP << std::endl;
112 }
else if (
line >= (
unsigned int)heprup.
NPRUP + 2) {
114 (
unsigned int)heprup.
NPRUP - 2));
118 std::ostringstream ss;
119 ss << std::setprecision(7)
125 <<
"\t" << heprup.
LPRUP[
line - 2] << std::endl;
146 result.
tmp =
"<LesHouchesEvents version=\"1.0\">\n";
158 result.
tmp =
"<init>\n";
165 static const std::string theEnd(
"</LesHouchesEvents>\n");
172 inline XSec() : xsec(0.0), err(0.0),
max(0.0) {}
198 for(; iter1 != a.
end() && iter2 != b.
end(); ++iter1, ++iter2) {
201 else if (*iter1 != *iter2)
205 return iter2 != b.
end();
216 <<
"Error in LHERunInfoProduct: LHE headers differ. "
217 "Cannot merge products." << std::endl;
223 while(!compatibleHeaders) {
228 std::set<Header, HeaderLess> headers;
230 std::inserter(headers, headers.begin()));
233 for(std::vector<LHERunInfoProduct::Header>::const_iterator
236 if (headers.count(*
header))
239 if (
header->tag() ==
"" ||
240 header->tag().find(
"Alpgen") == 0 ||
241 header->tag() ==
"MGGridCard" ||
242 header->tag() ==
"MGGenerationInfo") {
251 compatibleHeaders =
true;
255 if (!compatibleHeaders) {
257 <<
"Error in LHERunInfoProduct: LHE headers differ. "
258 "Cannot merge products." << std::endl;
269 std::map<int, XSec> processes;
273 XSec &
x = processes[
id];
281 XSec &
x = processes[
id];
283 double wgt1 = 1.0 / (x.err * x.err);
286 x.xsec = (wgt1 * x.xsec +
300 for(std::map<int, XSec>::const_iterator iter = processes.begin();
301 iter != processes.end(); ++iter, i++) {
void addHeader(const Header &header)
std::pair< double, double > EBMUP
const LHERunInfoProduct * runInfo
headers_const_iterator headers_end() const
std::pair< int, int > IDBMUP
const lhef::HEPRUP & heprup() const
std::pair< int, int > PDFGUP
const T & max(const T &a, const T &b)
headers_const_iterator headers_begin() const
Header::const_iterator iter
std::vector< double > XERRUP
headers_const_iterator header
std::vector< double > XMAXUP
size_type comments_size() const
comments_const_iterator comments_begin() const
std::pair< int, int > PDFSUP
bool mergeProduct(const LHERunInfoProduct &other)
std::vector< Header > headers_
static const std::string & endOfFile()
std::vector< double > XSECUP
const_iterator init() const
const_iterator begin() const