ATLAS Offline Software
MuonCalibDefaultCalibrationSource.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MuonCalib_MuonCalibDefaultCalibrationSource
6 #define MuonCalib_MuonCalibDefaultCalibrationSource
7 
8 #include <map>
9 #include <string>
10 #include <vector>
11 
13 #include "GaudiKernel/ToolHandle.h"
16 
17 namespace MuonCalib {
18 
19  // MuonCalibStandAloneBase
20  class RegionSelectorBase;
21 
22  class SamplePoint;
24  public:
25  //===============================destructor -- constructor======================
27  MuonCalibDefaultCalibrationSource(const std::string &t, const std::string &n, const IInterface *p);
29  //===============================AlgTool interface =============================
32 
33  private:
34  //===============================job options====================================
35  // regions and t0 values
36  std::vector<std::string> m_t0_region_str;
37  std::vector<float> m_t0;
38  std::vector<bool> m_time_slewing_applied_t0;
39  std::vector<bool> m_bfield_applied_t0;
40  // regions and rt
41  std::vector<std::string> m_rt_region_str;
42  std::vector<std::string> m_rt_files;
43  std::vector<bool> m_time_slewing_applied_rt;
44  std::vector<bool> m_bfield_applied_rt;
45  //==============================private data members============================
46  // creation flags
47  std::vector<unsigned int> m_creation_flags_t0;
48  std::vector<unsigned int> m_creation_flags_rt;
49  // region classes
50  std::vector<std::unique_ptr<RegionSelectorBase> > m_t0_regions, m_rt_regions;
51  // rtt point vector
52  std::vector<std::map<int, SamplePoint> > m_rt_points;
53  // region selection service - copy part of the calibration
54  ServiceHandle<RegionSelectionSvc> m_reg_sel_svc{this, "RegionSelectionSvc", "RegionSelectionSvc"};
55  //===============================private functions==============================
56  // initialize regions
57  StatusCode initialize_regions(const std::vector<std::string> &reg_str, std::vector<std::unique_ptr<RegionSelectorBase> > &reg);
58  void initialize_creation_flags(const std::vector<bool> &ts_applied, const std::vector<bool> &bf_applied, unsigned int n_regions,
59  std::vector<unsigned int> &flags);
61  bool store_t0_fun();
62  bool store_rt_fun();
63 
64  protected:
65  //===============================IMuonCalibConditionsSource interface ==========
67  bool insert_calibration(bool store_t0, bool store_rt);
68  };
69 
70 } // namespace MuonCalib
71 
72 #endif
MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_t0
std::vector< unsigned int > m_creation_flags_t0
Definition: MuonCalibDefaultCalibrationSource.h:47
MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_rt
std::vector< bool > m_time_slewing_applied_rt
Definition: MuonCalibDefaultCalibrationSource.h:43
MuonCalib::MuonCalibDefaultCalibrationSource::~MuonCalibDefaultCalibrationSource
virtual ~MuonCalibDefaultCalibrationSource()
MuonCalib::MuonCalibDefaultCalibrationSource::initialize
StatusCode initialize()
initialize
Definition: MuonCalibDefaultCalibrationSource.cxx:38
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
MuonCalib::MuonCalibDefaultCalibrationSource::load_rt_files
StatusCode load_rt_files()
Definition: MuonCalibDefaultCalibrationSource.cxx:90
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_regions
std::vector< std::unique_ptr< RegionSelectorBase > > m_t0_regions
Definition: MuonCalibDefaultCalibrationSource.h:50
MuonCalib::MuonCalibDefaultCalibrationSource::m_creation_flags_rt
std::vector< unsigned int > m_creation_flags_rt
Definition: MuonCalibDefaultCalibrationSource.h:48
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_points
std::vector< std::map< int, SamplePoint > > m_rt_points
Definition: MuonCalibDefaultCalibrationSource.h:52
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_rt
std::vector< bool > m_bfield_applied_rt
Definition: MuonCalibDefaultCalibrationSource.h:44
beamspotman.n
n
Definition: beamspotman.py:731
MuonCalib::MuonCalibDefaultCalibrationSource::initialize_creation_flags
void initialize_creation_flags(const std::vector< bool > &ts_applied, const std::vector< bool > &bf_applied, unsigned int n_regions, std::vector< unsigned int > &flags)
Definition: MuonCalibDefaultCalibrationSource.cxx:79
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibDefaultCalibrationSource::m_time_slewing_applied_t0
std::vector< bool > m_time_slewing_applied_t0
Definition: MuonCalibDefaultCalibrationSource.h:38
MuonCalib::MuonCalibDefaultCalibrationSource::m_reg_sel_svc
ServiceHandle< RegionSelectionSvc > m_reg_sel_svc
Definition: MuonCalibDefaultCalibrationSource.h:54
MuonCalib::MuonCalibDefaultCalibrationSource
Definition: MuonCalibDefaultCalibrationSource.h:23
MuonCalib::MuonCalibDefaultCalibrationSource::m_bfield_applied_t0
std::vector< bool > m_bfield_applied_t0
Definition: MuonCalibDefaultCalibrationSource.h:39
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_files
std::vector< std::string > m_rt_files
Definition: MuonCalibDefaultCalibrationSource.h:42
MuonCalib::MuonCalibDefaultCalibrationSource::insert_calibration
bool insert_calibration(bool store_t0, bool store_rt)
insert calibration
Definition: MuonCalibDefaultCalibrationSource.cxx:60
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_region_str
std::vector< std::string > m_rt_region_str
Definition: MuonCalibDefaultCalibrationSource.h:41
MuonCalib::MuonCalibDefaultCalibrationSource::initialize_regions
StatusCode initialize_regions(const std::vector< std::string > &reg_str, std::vector< std::unique_ptr< RegionSelectorBase > > &reg)
Definition: MuonCalibDefaultCalibrationSource.cxx:66
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0_region_str
std::vector< std::string > m_t0_region_str
Definition: MuonCalibDefaultCalibrationSource.h:36
MuonCalib::MuonCalibDefaultCalibrationSource::m_t0
std::vector< float > m_t0
Definition: MuonCalibDefaultCalibrationSource.h:37
MuonCalib::MuonCalibDefaultCalibrationSource::store_rt_fun
bool store_rt_fun()
Definition: MuonCalibDefaultCalibrationSource.cxx:135
IMuonCalibConditionsSource.h
MuonCalib::MuonCalibDefaultCalibrationSource::MuonCalibDefaultCalibrationSource
MuonCalibDefaultCalibrationSource(const std::string &t, const std::string &n, const IInterface *p)
constructor
Definition: MuonCalibDefaultCalibrationSource.cxx:25
MuonCalib::IMuonCalibConditionsSource
Definition: IMuonCalibConditionsSource.h:17
AthAlgTool
Definition: AthAlgTool.h:26
MuonCalib::MuonCalibDefaultCalibrationSource::store_t0_fun
bool store_t0_fun()
Definition: MuonCalibDefaultCalibrationSource.cxx:119
MuonCalib::MuonCalibDefaultCalibrationSource::m_rt_regions
std::vector< std::unique_ptr< RegionSelectorBase > > m_rt_regions
Definition: MuonCalibDefaultCalibrationSource.h:50
ServiceHandle< RegionSelectionSvc >
RegionSelectionSvc.h