ATLAS Offline Software
LArTemperatureCorrectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARTEMPERATURECORRECTIONTOOL_H
6 #define LARTEMPERATURECORRECTIONTOOL_H
7 
26 #include <TFile.h>
27 #include <TTree.h>
28 
29 #include <map>
30 #include <memory>
31 #include <string>
32 
34  public:
35  struct AllValues {
36  double barrel;
37  double endcapA;
38  double endcapC;
39  };
40  LArTemperatureCorrectionTool(const std::string& filename);
46  return get_corrections(run).endcapA;
47  }
49  return get_corrections(run).endcapC;
50  }
51  int get_cache_size() const { return m_cache.size(); }
52  int get_first_run() const { return m_first_run; }
53  int get_last_run() const { return m_last_run; }
56 
57  private:
58  std::unique_ptr<TFile> m_file;
59  TTree* m_tree; // raw pointer, let ROOT manage it
62  std::map<int, AllValues> m_cache;
64 };
65 
66 #endif
LArTemperatureCorrectionTool::get_first_run
int get_first_run() const
Definition: LArTemperatureCorrectionTool.h:52
LArTemperatureCorrectionTool::base_temperature
AllValues base_temperature
Definition: LArTemperatureCorrectionTool.h:54
LArTemperatureCorrectionTool::AllValues::barrel
double barrel
Definition: LArTemperatureCorrectionTool.h:36
LArTemperatureCorrectionTool::m_first_run
int m_first_run
Definition: LArTemperatureCorrectionTool.h:63
LArTemperatureCorrectionTool::search_temperature
AllValues search_temperature(int run)
Definition: LArTemperatureCorrectionTool.cxx:77
LArTemperatureCorrectionTool::get_correction_barrel
double get_correction_barrel(int run)
Definition: LArTemperatureCorrectionTool.h:44
LArTemperatureCorrectionTool::m_file
std::unique_ptr< TFile > m_file
Definition: LArTemperatureCorrectionTool.h:58
LArTemperatureCorrectionTool::get_correction_endcapA
double get_correction_endcapA(int run)
Definition: LArTemperatureCorrectionTool.h:45
LArTemperatureCorrectionTool
Correction on the energy for temperature fluctuations authors: Ruggero Turra 2015.
Definition: LArTemperatureCorrectionTool.h:33
LArTemperatureCorrectionTool::m_tree
TTree * m_tree
Definition: LArTemperatureCorrectionTool.h:59
AsgMessaging.h
LArTemperatureCorrectionTool::AllValues::endcapC
double endcapC
Definition: LArTemperatureCorrectionTool.h:38
LArTemperatureCorrectionTool::get_cache_size
int get_cache_size() const
Definition: LArTemperatureCorrectionTool.h:51
LArTemperatureCorrectionTool::search_correction
AllValues search_correction(int run)
Definition: LArTemperatureCorrectionTool.cxx:65
run
Definition: run.py:1
LArTemperatureCorrectionTool::get_correction_endcapC
double get_correction_endcapC(int run)
Definition: LArTemperatureCorrectionTool.h:48
LArTemperatureCorrectionTool::m_last_run
int m_last_run
Definition: LArTemperatureCorrectionTool.h:63
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
LArTemperatureCorrectionTool::sensitivity_temperature
AllValues sensitivity_temperature
Definition: LArTemperatureCorrectionTool.h:55
LArTemperatureCorrectionTool::get_last_run
int get_last_run() const
Definition: LArTemperatureCorrectionTool.h:53
LArTemperatureCorrectionTool::AllValues
Definition: LArTemperatureCorrectionTool.h:35
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
LArTemperatureCorrectionTool::AllValues::endcapA
double endcapA
Definition: LArTemperatureCorrectionTool.h:37
LArTemperatureCorrectionTool::get_corrections
AllValues get_corrections(int run)
correction should be applied on MC as a multiplication: E = E * correction
Definition: LArTemperatureCorrectionTool.cxx:119
LArTemperatureCorrectionTool::m_cache
std::map< int, AllValues > m_cache
Definition: LArTemperatureCorrectionTool.h:62
LArTemperatureCorrectionTool::LArTemperatureCorrectionTool
LArTemperatureCorrectionTool(const std::string &filename)
Definition: LArTemperatureCorrectionTool.cxx:19