ATLAS Offline Software
Loading...
Searching...
No Matches
AccMap.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 LARG4BARREL_ACCMAP_H
6#define LARG4BARREL_ACCMAP_H
7
8#include "CurrMap.h"
9#include <string>
10#include <array>
11#include <memory>
12
13class AccMap {
14public:
15 ~AccMap() = default;
16 static const AccMap* GetAccMap();
17
18 // Use constexpr for fixed dimensions
19 static constexpr int MAX_FOLDS = 23; // Folds 0-13 and straight 21-22
20 static constexpr int MAX_REGIONS = 10; // Electronic regions 0-9
21 static constexpr int N_MAX_VEC = 14; // Original m_nmax limit
22
23 int Region(int region, int sampling, int eta) const noexcept;
24 const CurrMap* GetMap(int ifold, int ielecregion) const noexcept;
25 const CurrMap* GetMap(int ifold, int region, int sampling, int eta) const noexcept;
26 float GetXmin(int ifold) const { return (ifold >= 0 && ifold < N_MAX_VEC) ? m_xmin[ifold] : -999.0f; }
27 float GetXmax(int ifold) const { return (ifold >= 0 && ifold < N_MAX_VEC) ? m_xmax[ifold] : -999.0f; }
28 float GetYmin(int ifold) const { return (ifold >= 0 && ifold < N_MAX_VEC) ? m_ymin[ifold] : -999.0f; }
29 float GetYmax(int ifold) const { return (ifold >= 0 && ifold < N_MAX_VEC) ? m_ymax[ifold] : -999.0f; }
30private:
31 AccMap();
32 std::array<std::array<std::unique_ptr<CurrMap>, MAX_REGIONS>, MAX_FOLDS> m_fastMap;
33 std::array<float, N_MAX_VEC> m_xmin{};
34 std::array<float, N_MAX_VEC> m_xmax{};
35 std::array<float, N_MAX_VEC> m_ymin{};
36 std::array<float, N_MAX_VEC> m_ymax{};
37
38#ifdef LARG4_STAND_ALONE
39public:
40 void SetDirectory(const std::string& dir) { m_directory=dir; }
41private:
42 std::string m_directory{"/afs/cern.ch/atlas/offline/data/lar/calo_data"};
43#endif
44
45};
46#endif
Scalar eta() const
pseudorapidity method
float GetYmax(int ifold) const
Definition AccMap.h:29
float GetXmax(int ifold) const
Definition AccMap.h:27
const CurrMap * GetMap(int ifold, int ielecregion) const noexcept
Definition AccMap.cxx:76
float GetXmin(int ifold) const
Definition AccMap.h:26
static constexpr int N_MAX_VEC
Definition AccMap.h:21
AccMap()
Definition AccMap.cxx:12
std::array< float, N_MAX_VEC > m_ymin
Definition AccMap.h:35
std::array< float, N_MAX_VEC > m_ymax
Definition AccMap.h:36
std::array< float, N_MAX_VEC > m_xmax
Definition AccMap.h:34
float GetYmin(int ifold) const
Definition AccMap.h:28
~AccMap()=default
static constexpr int MAX_FOLDS
Definition AccMap.h:19
static constexpr int MAX_REGIONS
Definition AccMap.h:20
std::array< std::array< std::unique_ptr< CurrMap >, MAX_REGIONS >, MAX_FOLDS > m_fastMap
Definition AccMap.h:32
static const AccMap * GetAccMap()
Definition AccMap.cxx:65
std::array< float, N_MAX_VEC > m_xmin
Definition AccMap.h:33