Loading [MathJax]/extensions/tex2jax.js
hej is hosted by Hepforge, IPPP Durham
HEJ  2.3.0
High energy resummation for hadron colliders
Config.hh
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <map>
11 #include <string>
12 #include <utility>
13 #include <optional>
14 #include <vector>
15 
16 #include "fastjet/JetDefinition.hh"
17 #include "yaml-cpp/yaml.h"
18 
19 #include "HEJ/Constants.hh"
20 #include "HEJ/EWConstants.hh"
21 #include "HEJ/EventSelector.hh"
22 #include "HEJ/Fraction.hh"
24 #include "HEJ/ScaleFunction.hh"
25 #include "HEJ/event_types.hh"
26 #include "HEJ/output_formats.hh"
27 
28 namespace HEJ {
29 
31  struct JetParameters{
32  fastjet::JetDefinition def;
33  double min_pt{};
34  };
35 
37  struct ScaleConfig{
39  std::vector<ScaleFunction> base;
41  std::vector<double> factors;
43  double max_ratio{};
44  };
45 
47  struct RNGConfig {
49  std::string name;
51  std::optional<std::string> seed;
52  };
53 
57  size_t trials;
59  double max_dev;
60  };
61 
63  struct NLOConfig {
65  bool enabled = false;
67  size_t nj = 2;
68  };
69 
75  enum class EventTreatment{
76  reweight,
77  keep,
78  discard,
79  abort,
80  };
81 
83  using EventTreatMap = std::map<event_type::EventType, EventTreatment>;
84 
86  enum class WeightType{
87  weighted,
90  };
91 
108  struct Config {
121  size_t trials{};
123  std::optional<size_t> max_events;
127  std::vector<OutputFile> output;
133  std::vector<YAML::Node> analyses_parameters;
141  std::optional<PartialUnweightConfig> unweight_config;
147  double off_shell_tolerance = 0.;
148  };
149 
155  NLOConfig nlo,
158  ):
159  jet_param{std::move(jet_param)},
160  nlo{std::move(nlo)},
162  {}
170  };
171 
174  MatrixElementConfig() = default;
176  bool log_correction,
179  NLOConfig nlo,
181  double regulator_lambda = CLAMBDA
182  ):
184  Higgs_coupling{std::move(Higgs_coupling)},
185  ew_parameters{std::move(ew_parameters)},
186  nlo{std::move(nlo)},
189  {}
190 
204  };
205 
214  return psp_config.jet_param;}
216  JetParameters const & jet_param() const {
217  return psp_config.jet_param;}
222  };
223 
233  inline
235  return {
236  conf.resummation_jets,
237  conf.nlo,
238  conf.soft_pt_regulator
239  };
240  }
241 
246  inline
248  return {
249  conf.log_correction,
250  conf.Higgs_coupling,
251  conf.ew_parameters,
252  conf.nlo,
253  conf.soft_pt_regulator,
254  conf.regulator_lambda
255  };
256  }
257 
262  inline
264  return {
267  conf.treat,
268  conf.input_selector
269  };
270  }
271 
272 } // namespace HEJ
Header file defining all global constants used for HEJ.
Defines the electro weak parameters.
Classes for event selection.
Header file for fractions, i.e. floating point numbers between 0 and 1.
Defines the settings for Higgs boson coupling to gluons.
Functions to calculate the (renormalisation and factorisation) scales for an event.
Class for selecting events accepted by all chosen selectors.
Definition: EventSelector.hh:30
Collection of electro-weak constants.
Definition: EWConstants.hh:24
Define different types of events.
Main HEJ 2 Namespace.
Definition: mainpage.dox:1
PhaseSpacePointConfig to_PhaseSpacePointConfig(Config const &conf)
Definition: Config.hh:234
@ discard
constexpr double CLAMBDA
Default scale for virtual correction cf. eq. (20) in .
Definition: Constants.hh:24
WeightType
Possible setting for the event weight.
Definition: Config.hh:86
@ unweighted_resum
unweighted only resummation part
@ weighted
weighted events
@ partially_unweighted
mixed weighted and unweighted
std::map< event_type::EventType, EventTreatment > EventTreatMap
Container to store the treatments for various event types.
Definition: Config.hh:83
EventReweighterConfig to_EventReweighterConfig(Config const &conf)
Definition: Config.hh:263
EventTreatment
Definition: Config.hh:75
constexpr double DEFAULT_SOFT_PT_REGULATOR
default value for the maximal pt fraction of soft radiation in any tagging jets This cut is needed to...
Definition: Constants.hh:29
MatrixElementConfig to_MatrixElementConfig(Config const &conf)
Definition: Config.hh:247
Defines formats for output to event files.
Definition: Config.hh:108
Fraction< double > soft_pt_regulator
Maximum transverse momentum fraction from soft radiation in any tagging jet (e.g. extremal or qqbar j...
Definition: Config.hh:117
std::vector< YAML::Node > analyses_parameters
Parameters for custom analyses
Definition: Config.hh:133
std::vector< OutputFile > output
Event output files names and formats.
Definition: Config.hh:127
JetParameters fixed_order_jets
Fixed-order jet properties.
Definition: Config.hh:114
AndSelector input_selector
Input event selection.
Definition: Config.hh:143
double regulator_lambda
The regulator lambda for the subtraction terms.
Definition: Config.hh:119
ScaleConfig scales
Parameters for scale variation
Definition: Config.hh:110
EventTreatMap treat
Map to decide what to do for different event types.
Definition: Config.hh:131
JetParameters resummation_jets
Resummation jet properties.
Definition: Config.hh:112
RNGConfig rng
Parameters for random number generation.
Definition: Config.hh:129
EWConstants ew_parameters
elector weak parameters
Definition: Config.hh:137
size_t trials
Number of resummation configurations to generate per fixed-order event.
Definition: Config.hh:121
std::optional< PartialUnweightConfig > unweight_config
Settings for partial unweighting.
Definition: Config.hh:141
WeightType weight_type
Type of event weight e.g. (un)weighted.
Definition: Config.hh:139
NLOConfig nlo
NLO truncation settings.
Definition: Config.hh:145
double off_shell_tolerance
Tolerance towards numerical inaccuracies in input momenta.
Definition: Config.hh:147
bool log_correction
Whether to include the logarithmic correction from running.
Definition: Config.hh:125
HiggsCouplingSettings Higgs_coupling
Settings for effective Higgs-gluon coupling.
Definition: Config.hh:135
std::optional< size_t > max_events
Maximal number of events.
Definition: Config.hh:123
Configuration options for the EventReweighter class.
Definition: Config.hh:207
EventTreatMap treat
Treatment of the various event types.
Definition: Config.hh:219
JetParameters & jet_param()
Access properties of resummation jets.
Definition: Config.hh:213
AndSelector input_selector
Input event selection.
Definition: Config.hh:221
PhaseSpacePointConfig psp_config
Settings for phase space point generation.
Definition: Config.hh:209
MatrixElementConfig ME_config
Settings for matrix element calculation.
Definition: Config.hh:211
JetParameters const & jet_param() const
Access properties of resummation jets (const version)
Definition: Config.hh:216
Settings for Higgs boson coupling to gluons.
Definition: HiggsCouplingSettings.hh:14
Jet parameters.
Definition: Config.hh:31
double min_pt
Definition: Config.hh:33
fastjet::JetDefinition def
Definition: Config.hh:32
Configuration options for the MatrixElement class.
Definition: Config.hh:173
Fraction< double > soft_pt_regulator
Maximum transverse momentum fraction from soft radiation in any tagging jet (e.g. extremal or qqbar j...
Definition: Config.hh:201
EWConstants ew_parameters
elector weak parameters
Definition: Config.hh:196
double regulator_lambda
The regulator lambda for the subtraction terms.
Definition: Config.hh:203
MatrixElementConfig(bool log_correction, HiggsCouplingSettings Higgs_coupling, EWConstants ew_parameters, NLOConfig nlo, Fraction< double > soft_pt_regulator=Fraction< double >{DEFAULT_SOFT_PT_REGULATOR}, double regulator_lambda=CLAMBDA)
Definition: Config.hh:175
NLOConfig nlo
NLO truncation settings.
Definition: Config.hh:198
HiggsCouplingSettings Higgs_coupling
Settings for effective Higgs-gluon coupling.
Definition: Config.hh:194
bool log_correction
Whether to include the logarithmic correction from running.
Definition: Config.hh:192
Settings for NLO truncation of HEJ resummation.
Definition: Config.hh:63
bool enabled
Whether to enable NLO truncation.
Definition: Config.hh:65
size_t nj
NLO Born number of jets.
Definition: Config.hh:67
Settings for partial unweighting.
Definition: Config.hh:55
size_t trials
Number of trials for training.
Definition: Config.hh:57
double max_dev
Maximum distance in standard deviations from mean logarithmic weight.
Definition: Config.hh:59
Configuration options for the PhaseSpacePoint class.
Definition: Config.hh:151
PhaseSpacePointConfig(JetParameters jet_param, NLOConfig nlo, Fraction< double > soft_pt_regulator=Fraction< double >{DEFAULT_SOFT_PT_REGULATOR})
Definition: Config.hh:153
Fraction< double > soft_pt_regulator
Maximum transverse momentum fraction from soft radiation in any tagging jet (e.g. extremal or qqbar j...
Definition: Config.hh:169
NLOConfig nlo
NLO truncation settings.
Definition: Config.hh:166
JetParameters jet_param
Properties of resummation jets.
Definition: Config.hh:164
Settings for random number generator.
Definition: Config.hh:47
std::optional< std::string > seed
Optional initial seed.
Definition: Config.hh:51
std::string name
Random number generator name.
Definition: Config.hh:49
Settings for scale variation.
Definition: Config.hh:37
double max_ratio
Maximum ratio between renormalisation and factorisation scale.
Definition: Config.hh:43
std::vector< ScaleFunction > base
Base scale choices.
Definition: Config.hh:39
std::vector< double > factors
Factors for multiplicative scale variation.
Definition: Config.hh:41