ATLAS Offline Software
TileRoI_Map.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILERAWUTILS_TILEROI_MAP_H
6 #define TILERAWUTILS_TILEROI_MAP_H
7 
8 // #include "TileEvent/TileRoI_ID.h"
11 
13 #include <string>
14 #include <vector>
15 #include <map>
16 
17 class TileID;
18 class TileHWID;
19 class Identifier;
20 class HWIdentifier;
22 class TileCablingService;
23 
32 class TileRoI_Map : public AthAlgTool {
33 
34  public:
37  TileRoI_Map( const std::string& type, const std::string& name,
38  const IInterface* parent ) ;
39 
44 
45  // For clarity, use TrigTowerID for TT Identifier .
46  typedef Identifier TT_ID;
47  typedef int COLL_ID ;
48 
49  virtual ~TileRoI_Map() ;
52  static const InterfaceID& interfaceID( ) ;
53 
58  TT_ID TrigTowerID (const Identifier& id ) const;
59 
60  TT_ID TrigTowerID (const HWIdentifier& id ) const;
61 
64  const std::vector<COLL_ID>& CollectionID(const TT_ID& id) const ;
65 
69  bool validId(const TT_ID& tt_id) const ;
70 
75  bool getEtaPhiRegion(unsigned int hashid,
76  float& etamin, float& etamax,
77  float& phimin, float& phimax ) const ;
78 
79  private:
80 
81  bool addEntry(const HWIdentifier& adc_hwid) ;
82 
83  // a rectangular region in eta phi
85  {
86  public:
87  EtaPhiRegion() : etamin(999.), etamax(-999.),
88  phimin(999.), phimax(-999.)
89  { } ;
90 
91  void set(float eta, float phi){
92 
95 
98  }
99 
100  float etamin;
101  float etamax;
102  float phimin;
103  float phimax;
104 
105  } ;
106 
107  void printEtaPhiRegions();
108 
111  typedef std::map<Identifier, TT_ID> OFFMAP ;
112  typedef std::map<HWIdentifier, TT_ID> ONLMAP ;
113  typedef std::vector<COLL_ID> COLL_ID_VEC;
114  typedef std::map<TT_ID, COLL_ID_VEC > ROIMAP ;
115 
116  typedef std::map<int, EtaPhiRegion > E_P_MAP ;
117 
121 
123 
124  const TileID* m_tileID;
128 
130  bool m_print;
131 };
132 
133 
134 #endif
135 
TileRoI_Map::EtaPhiRegion
Definition: TileRoI_Map.h:85
TileRoI_Map::m_onlmap
ONLMAP m_onlmap
Definition: TileRoI_Map.h:119
max
#define max(a, b)
Definition: cfImp.cxx:41
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
TileRoI_Map::E_P_MAP
std::map< int, EtaPhiRegion > E_P_MAP
Definition: TileRoI_Map.h:116
TileRoI_Map::m_print
bool m_print
Definition: TileRoI_Map.h:130
TileRoI_Map::m_offmap
OFFMAP m_offmap
Definition: TileRoI_Map.h:118
TileFragHash.h
TileRoI_Map::EtaPhiRegion::EtaPhiRegion
EtaPhiRegion()
Definition: TileRoI_Map.h:87
TileRoI_Map::m_cablingSvc
const TileCablingService * m_cablingSvc
Definition: TileRoI_Map.h:127
TileFragHash
Hash table for Tile fragments (==drawers ==collections in StoreGate)
Definition: TileFragHash.h:24
HWIdentifier
Definition: HWIdentifier.h:13
TileRoI_Map::CollectionID
const std::vector< COLL_ID > & CollectionID(const TT_ID &id) const
reserve lookup.
Definition: TileRoI_Map.cxx:163
TileRoI_Map::COLL_ID
int COLL_ID
Definition: TileRoI_Map.h:47
TileRoI_Map::m_idhash
TileFragHash m_idhash
Definition: TileRoI_Map.h:129
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileRoI_Map::COLL_ID_VEC
std::vector< COLL_ID > COLL_ID_VEC
Definition: TileRoI_Map.h:113
TileRoI_Map::TrigTowerID
TT_ID TrigTowerID(const Identifier &id) const
return TrigTowerID for various queries.
Definition: TileRoI_Map.cxx:128
TileDetDescrManager
Definition: TileDetDescrManager.h:33
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
TileRoI_Map::EtaPhiRegion::set
void set(float eta, float phi)
Definition: TileRoI_Map.h:91
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TileCablingService
Definition: TileCablingService.h:23
min
#define min(a, b)
Definition: cfImp.cxx:40
TileRoI_Map::OFFMAP
std::map< Identifier, TT_ID > OFFMAP
Map for offline ID and online id.
Definition: TileRoI_Map.h:111
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TileRoI_Map::getEtaPhiRegion
bool getEtaPhiRegion(unsigned int hashid, float &etamin, float &etamax, float &phimin, float &phimax) const
returns Eta-Phi Region for a hashed ID of the Collection.
Definition: TileRoI_Map.cxx:213
TileRoI_Map::m_tileMgr
const TileDetDescrManager * m_tileMgr
Definition: TileRoI_Map.h:126
TileRoI_Map::printEtaPhiRegions
void printEtaPhiRegions()
Definition: TileRoI_Map.cxx:181
TileRoI_Map::ROIMAP
std::map< TT_ID, COLL_ID_VEC > ROIMAP
Definition: TileRoI_Map.h:114
TileRoI_Map::TT_ID
Identifier TT_ID
Definition: TileRoI_Map.h:46
TileRoI_Map::EtaPhiRegion::etamax
float etamax
Definition: TileRoI_Map.h:101
TileRoI_Map::ONLMAP
std::map< HWIdentifier, TT_ID > ONLMAP
Definition: TileRoI_Map.h:112
TileRoI_Map::EtaPhiRegion::phimin
float phimin
Definition: TileRoI_Map.h:102
TileRoI_Map::m_roimap
ROIMAP m_roimap
Definition: TileRoI_Map.h:120
TileRoI_Map::initialize
StatusCode initialize()
define a RoI identifier type, two ints.
Definition: TileRoI_Map.cxx:36
TileRoI_Map::EtaPhiRegion::etamin
float etamin
Definition: TileRoI_Map.h:100
TileRoI_Map::validId
bool validId(const TT_ID &tt_id) const
check validity
Definition: TileRoI_Map.cxx:175
TileRoI_Map::m_epmap
E_P_MAP m_epmap
Definition: TileRoI_Map.h:122
TileRoI_Map::~TileRoI_Map
virtual ~TileRoI_Map()
Definition: TileRoI_Map.cxx:67
TileRoI_Map::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: TileRoI_Map.cxx:20
TileRoI_Map::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileRoI_Map.h:125
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileRoI_Map::EtaPhiRegion::phimax
float phimax
Definition: TileRoI_Map.h:103
TileRoI_Map::addEntry
bool addEntry(const HWIdentifier &adc_hwid)
Definition: TileRoI_Map.cxx:72
AthAlgTool
Definition: AthAlgTool.h:26
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
TileRoI_Map
TileCal RoI map to offline Identifier.
Definition: TileRoI_Map.h:32
TileRoI_Map::m_tileID
const TileID * m_tileID
Definition: TileRoI_Map.h:124
TileID_Exception.h
TileRoI_Map::TileRoI_Map
TileRoI_Map(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition: TileRoI_Map.cxx:24
Identifier
Definition: IdentifierFieldParser.cxx:14