Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19250505
check_lhe.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
730 B
Referenced Files
None
Subscribers
None
check_lhe.cc
View Options
#include
<iostream>
#include
"RHEJ/stream.hh"
#include
"LHEF/LHEF.h"
static
constexpr
double
ep
=
1e-3
;
int
main
(
int
argn
,
char
**
argv
)
{
if
(
argn
!=
2
){
std
::
cerr
<<
"Usage: check_lhe lhe_file
\n
"
;
return
EXIT_FAILURE
;
}
RHEJ
::
istream
in
{
argv
[
1
]};
LHEF
::
Reader
reader
{
in
};
std
::
vector
<
double
>
xsec_ref
(
reader
.
heprup
.
NPRUP
,
0.
);
while
(
reader
.
readEvent
()){
xsec_ref
[
reader
.
hepeup
.
IDPRUP
-
1
]
+=
reader
.
hepeup
.
weight
();
}
for
(
size_t
i
=
0
;
i
<
xsec_ref
.
size
();
++
i
){
std
::
cout
<<
xsec_ref
[
i
]
<<
'\t'
<<
reader
.
heprup
.
XSECUP
[
i
]
<<
'\n'
;
if
(
std
::
abs
(
xsec_ref
[
i
]
/
reader
.
heprup
.
XSECUP
[
i
]
-
1
)
>
ep
){
std
::
cerr
<<
"Cross sections deviate substantially"
;
return
EXIT_FAILURE
;
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 5:41 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6516162
Default Alt Text
check_lhe.cc (730 B)
Attached To
Mode
rHEJ HEJ
Attached
Detach File
Event Timeline
Log In to Comment