This class provides the weight used to reweight pileup (mu) distribution by querying JSON.
More...
#include <PileupProfileWeight.h>
This class provides the weight used to reweight pileup (mu) distribution by querying JSON.
Definition at line 19 of file PileupProfileWeight.h.
◆ getValue()
| StatusCode PileupProfileWeight::getValue |
( |
double & | value | ) |
const |
|
overridevirtual |
Definition at line 22 of file PileupProfileWeight.cxx.
22 {
24 ATH_CHECK(evtStore()->retrieve(evt,
"EventInfo"));
25
26 auto mu_actual =
static_cast<std::size_t
>(std::ceil(
evt->actualInteractionsPerCrossing()));
27 auto mu = std::to_string(mu_actual);
28
29
32 return StatusCode::SUCCESS;
33 }
34
35
36 try {
39 } catch (const std::exception&) {
41 return StatusCode::FAILURE;
42 }
43
44 return StatusCode::SUCCESS;
45}
#define ATH_CHECK
Evaluate an expression and check for errors.
nlohmann::json m_weightsMap
EventInfo_v1 EventInfo
Definition of the latest event info version.
◆ initialize()
| StatusCode PileupProfileWeight::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 11 of file PileupProfileWeight.cxx.
11 {
13 try {
15 } catch (const std::exception&) {
17 return StatusCode::FAILURE;
18 }
19 return StatusCode::SUCCESS;
20}
Gaudi::Property< std::string > m_weightsFile
◆ m_weightsFile
| Gaudi::Property<std::string> PileupProfileWeight::m_weightsFile {this, "WeightsFile", "", "Path to the weights file"} |
|
private |
◆ m_weightsMap
| nlohmann::json PileupProfileWeight::m_weightsMap |
|
private |
The documentation for this class was generated from the following files: