ATLAS Offline Software
Loading...
Searching...
No Matches
JZCombineWeight.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef RATESANALYSIS_JZCOMBINEWEIGHT_H
6#define RATESANALYSIS_JZCOMBINEWEIGHT_H 1
7
9
11#include "GaudiKernel/PropertyHolder.h"
12
13#include <nlohmann/json.hpp>
14
18
19class JZCombineWeight : public extends<AthAlgTool, IAdditionalWeight> {
20 public:
21 using extends::extends;
22
23 virtual StatusCode initialize() override;
24 virtual StatusCode getValue(double& value) const override;
25
26 private:
27 std::size_t getIndex(double value) const;
28
29 private:
30 Gaudi::Property<std::string> m_jetCollectionHS {
31 this, "JetCollectionHS", "AntiKt4TruthJets", "Name of the hard-scatter jet collection"};
32 Gaudi::Property<std::string> m_jetCollectionPU {
33 this, "JetCollectionPU", "InTimeAntiKt4TruthJets", "Name of the pile-up jet collection"};
34 Gaudi::Property<std::string> m_weightsFile {
35 this, "WeightsFile", "", "Path to the weights file"};
36 Gaudi::Property<std::vector<double>> m_binning {
37 this, "Binning", {}, "Pt binning used to define categories"};
38 Gaudi::Property<std::vector<std::string>> m_weightsName {
39 this, "WeightsName", {}, "Weights to be calculated - their product is used"};
40
41 nlohmann::json m_weightsMap;
42};
43
44#endif
This class provides the weight used to combine JZ sliced samples by querying JSON.
Gaudi::Property< std::string > m_weightsFile
virtual StatusCode getValue(double &value) const override
Gaudi::Property< std::vector< double > > m_binning
Gaudi::Property< std::vector< std::string > > m_weightsName
Gaudi::Property< std::string > m_jetCollectionHS
std::size_t getIndex(double value) const
virtual StatusCode initialize() override
This class provides the weight used to combine JZ sliced samples by querying JSON.
nlohmann::json m_weightsMap
Gaudi::Property< std::string > m_jetCollectionPU