Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19244699
check_res.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
check_res.cc
View Options
#include
<iostream>
#include
"LHEF/LHEF.h"
#include
"HEJ/Event.hh"
#include
"HEJ/EventReweighter.hh"
#include
"HEJ/Mixmax.hh"
#include
"HEJ/stream.hh"
namespace
{
const
fastjet
::
JetDefinition
jet_def
{
fastjet
::
kt_algorithm
,
0.4
};
const
fastjet
::
JetDefinition
Born_jet_def
{
jet_def
};
constexpr
double
Born_jetptmin
=
30
;
constexpr
double
extpartonptmin
=
30
;
constexpr
double
max_ext_soft_pt_fraction
=
std
::
numeric_limits
<
double
>::
infinity
();
constexpr
double
jetptmin
=
35
;
constexpr
bool
log_corr
=
false
;
using
EventTreatment
=
HEJ
::
EventTreatment
;
using
namespace
HEJ
::
event_type
;
HEJ
::
EventTreatMap
treat
{
{
no_2_jets
,
EventTreatment
::
discard
},
{
bad_final_state
,
EventTreatment
::
discard
},
{
nonHEJ
,
EventTreatment
::
discard
},
{
unof
,
EventTreatment
::
discard
},
{
unob
,
EventTreatment
::
discard
},
{
qqxexb
,
EventTreatment
::
discard
},
{
qqxexf
,
EventTreatment
::
discard
},
{
qqxmid
,
EventTreatment
::
discard
},
{
FKL
,
EventTreatment
::
reweight
}
};
};
int
main
(
int
argn
,
char
**
argv
)
{
if
(
argn
==
5
&&
std
::
string
(
argv
[
4
])
==
"uno"
){
--
argn
;
treat
[
unof
]
=
EventTreatment
::
reweight
;
treat
[
unob
]
=
EventTreatment
::
reweight
;
treat
[
FKL
]
=
EventTreatment
::
discard
;
}
if
(
argn
!=
4
){
std
::
cerr
<<
"Usage: check_res eventfile xsection tolerance [uno]"
;
return
EXIT_FAILURE
;
}
const
double
xsec_ref
=
std
::
stod
(
argv
[
2
]);
const
double
tolerance
=
std
::
stod
(
argv
[
3
]);
HEJ
::
istream
in
{
argv
[
1
]};
LHEF
::
Reader
reader
{
in
};
HEJ
::
PhaseSpacePointConfig
psp_conf
;
psp_conf
.
jet_param
=
HEJ
::
JetParameters
{
jet_def
,
jetptmin
};
psp_conf
.
min_extparton_pt
=
extpartonptmin
;
psp_conf
.
max_ext_soft_pt_fraction
=
max_ext_soft_pt_fraction
;
HEJ
::
MatrixElementConfig
ME_conf
;
ME_conf
.
log_correction
=
log_corr
;
ME_conf
.
Higgs_coupling
=
HEJ
::
HiggsCouplingSettings
{};
HEJ
::
EventReweighterConfig
conf
;
conf
.
psp_config
=
std
::
move
(
psp_conf
);
conf
.
ME_config
=
std
::
move
(
ME_conf
);
conf
.
jet_param
=
psp_conf
.
jet_param
;
conf
.
treat
=
treat
;
reader
.
readEvent
();
const
bool
has_Higgs
=
std
::
find
(
begin
(
reader
.
hepeup
.
IDUP
),
end
(
reader
.
hepeup
.
IDUP
),
25
)
!=
end
(
reader
.
hepeup
.
IDUP
);
const
double
mu
=
has_Higgs
?
125.
:
91.188
;
HEJ
::
ScaleGenerator
scale_gen
{
{{
std
::
to_string
(
mu
),
HEJ
::
FixedScale
{
mu
}}},
{},
1.
};
HEJ
::
Mixmax
ran
{};
HEJ
::
EventReweighter
hej
{
reader
.
heprup
,
std
::
move
(
scale_gen
),
conf
,
ran
};
double
xsec
=
0.
;
double
xsec_err
=
0.
;
do
{
HEJ
::
Event
ev
{
HEJ
::
UnclusteredEvent
{
reader
.
hepeup
},
Born_jet_def
,
Born_jetptmin
};
auto
resummed_events
=
hej
.
reweight
(
ev
,
20
);
for
(
auto
const
&
ev
:
resummed_events
)
{
xsec
+=
ev
.
central
().
weight
;
xsec_err
+=
ev
.
central
().
weight
*
ev
.
central
().
weight
;
}
}
while
(
reader
.
readEvent
());
xsec_err
=
std
::
sqrt
(
xsec_err
);
const
double
significance
=
std
::
abs
(
xsec
-
xsec_ref
)
/
std
::
sqrt
(
xsec_err
*
xsec_err
+
tolerance
*
tolerance
);
std
::
cout
<<
xsec_ref
<<
" +/- "
<<
tolerance
<<
" ~ "
<<
xsec
<<
" +- "
<<
xsec_err
<<
" => "
<<
significance
<<
" sigma
\n
"
;
if
(
significance
>
3.
){
std
::
cerr
<<
"Cross section is off by over 3 sigma!
\n
"
;
return
EXIT_FAILURE
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 4:44 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6516751
Default Alt Text
check_res.cc (3 KB)
Attached To
Mode
rHEJ HEJ
Attached
Detach File
Event Timeline
Log In to Comment