ATLAS Offline Software
AccMap.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 LARG4BARREL_ACCMAP_H
6 #define LARG4BARREL_ACCMAP_H
7 
8 #include "CurrMap.h"
9 
10 #include <map>
11 #include <vector>
12 #include <string>
13 
14 typedef std::map<int, CurrMap*> curr_map;
15 
16 class AccMap {
17 public:
18  ~AccMap() = default;
19  static const AccMap* GetAccMap();
20 
21  void Reset();
22  int Region(int region, int sampling, int eta) const;
23  const CurrMap* GetMap(int ifold, int ielecregion) const;
24  const CurrMap* GetMap(int ifold, int region, int sampling, int eta) const;
25  float GetXmin(int ifold) const {
26  if (ifold<m_nmax && ifold >=0) return m_xmin[ifold];
27  else return -999.;}
28  float GetXmax(int ifold) const {
29  if (ifold<m_nmax && ifold >=0) return m_xmax[ifold];
30  else return -999.;}
31  float GetYmin(int ifold) const {
32  if (ifold<m_nmax && ifold >=0) return m_ymin[ifold];
33  else return -999.;}
34  float GetYmax(int ifold) const {
35  if (ifold<m_nmax && ifold >=0) return m_ymax[ifold];
36  else return -999.;}
37 private:
38  AccMap();
40  const int m_nmax{14};
41  std::vector<float> m_xmin;
42  std::vector<float> m_xmax;
43  std::vector<float> m_ymin;
44  std::vector<float> m_ymax;
45 
46 #ifdef LARG4_STAND_ALONE
47 public:
48  void SetDirectory(const std::string& dir) { m_directory=dir; }
49 private:
50  std::string m_directory{"/afs/cern.ch/atlas/offline/data/lar/calo_data"};
51 #endif
52 
53 };
54 #endif
AccMap
Definition: AccMap.h:16
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
AccMap::~AccMap
~AccMap()=default
AccMap::m_theMap
curr_map m_theMap
Definition: AccMap.h:39
AccMap::m_ymin
std::vector< float > m_ymin
Definition: AccMap.h:43
CurrMap.h
curr_map
std::map< int, CurrMap * > curr_map
Definition: AccMap.h:14
AccMap::GetYmax
float GetYmax(int ifold) const
Definition: AccMap.h:34
AccMap::Region
int Region(int region, int sampling, int eta) const
Definition: AccMap.cxx:104
AccMap::m_xmin
std::vector< float > m_xmin
Definition: AccMap.h:41
AccMap::m_nmax
const int m_nmax
Definition: AccMap.h:40
AccMap::AccMap
AccMap()
Definition: AccMap.cxx:12
AccMap::GetXmax
float GetXmax(int ifold) const
Definition: AccMap.h:28
CurrMap
Definition: CurrMap.h:10
AccMap::m_ymax
std::vector< float > m_ymax
Definition: AccMap.h:44
beamspotman.dir
string dir
Definition: beamspotman.py:623
RCU::SetDirectory
bool SetDirectory(TObject *object, TDirectory *directory)
effects: set the directory this object is associated with returns: whether the object type actively k...
Definition: RootUtils.cxx:28
AccMap::GetMap
const CurrMap * GetMap(int ifold, int ielecregion) const
Definition: AccMap.cxx:92
AccMap::GetAccMap
static const AccMap * GetAccMap()
Definition: AccMap.cxx:72
AccMap::GetYmin
float GetYmin(int ifold) const
Definition: AccMap.h:31
AccMap::Reset
void Reset()
Definition: AccMap.cxx:78
AccMap::GetXmin
float GetXmin(int ifold) const
Definition: AccMap.h:25
AccMap::m_xmax
std::vector< float > m_xmax
Definition: AccMap.h:42