ATLAS Offline Software
Loading...
Searching...
No Matches
HITowerWeightTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef HIEVENTUTILS_HITOWERWEIGHTTOOL_H
6#define HIEVENTUTILS_HITOWERWEIGHTTOOL_H
7
10
11#include <TH3F.h>
12#include <TFile.h>
13#include <string>
14#include <map>
15
16
18// Tool that gets the tower weights for by tower by tower
19// difference in response during the HI jet reconstruction.
21
22class HITowerWeightTool : public extends<AthAlgTool, IHITowerWeightTool>
23{
24 public:
25 HITowerWeightTool(const std::string& type, const std::string& name, const IInterface* parent);
26 virtual ~HITowerWeightTool() = default;
27 virtual StatusCode initialize() override;
28
29 virtual float getEtaPhiResponse(float eta, float phi, int runIndex) const override;
30 virtual float getEtaPhiOffset(float eta, float phi, int runIndex) const override;
31 virtual float getWeight(float eta, float phi, int sampling) const override;
32 virtual float getWeightEta(float eta, float phi, int sampling) const override;
33 virtual float getWeightPhi(float eta, float phi, int sampling) const override;
34 virtual float getWeightMag(float eta, float phi, int sampling) const override;
35 virtual int getRunIndex(const EventContext& ctx) const override;
36
37 private:
38 Gaudi::Property<bool> m_applycorrection{this, "ApplyCorrection", true , "If false, unit weigts are applied"};
39 // 226000-MC; 287931-PbPb 2015, 338037-XeXe 2017, 367384-PbPb 2018, 440101-PbPb 2022, 463427-PbPb 2023, 490223-PbPb 2024
40 Gaudi::Property<std::vector<int>> m_defaultRunNumbers{this, "DefaultRunNumbers", {226000,287931,338037,367384,440101,463427,490223} , "List of run numbers that will be used if the event run number is not found in the InputFile"};
41 Gaudi::Property<std::string> m_inputFile{this, "InputFile", "cluster.geo.HIJING_2018.root","File containing cluster geometric moments."};
42 Gaudi::Property<std::string> m_configDir{this, "ConfigDir", "HIJetCorrection/","Directory containing configuration file."};
43
44 TH3F* m_h3W;
45 TH3F* m_h3Eta;
46 TH3F* m_h3Phi;
47 TH3F* m_h3Mag;
50 std::map<unsigned int, int> m_runMap;
51};
52
53#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Gaudi::Property< std::vector< int > > m_defaultRunNumbers
Gaudi::Property< std::string > m_configDir
virtual float getEtaPhiOffset(float eta, float phi, int runIndex) const override
virtual int getRunIndex(const EventContext &ctx) const override
HITowerWeightTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual float getWeightEta(float eta, float phi, int sampling) const override
virtual StatusCode initialize() override
virtual float getWeightMag(float eta, float phi, int sampling) const override
virtual ~HITowerWeightTool()=default
virtual float getEtaPhiResponse(float eta, float phi, int runIndex) const override
std::map< unsigned int, int > m_runMap
Gaudi::Property< std::string > m_inputFile
virtual float getWeight(float eta, float phi, int sampling) const override
virtual float getWeightPhi(float eta, float phi, int sampling) const override
Gaudi::Property< bool > m_applycorrection