ATLAS Offline Software
Loading...
Searching...
No Matches
TileRoI_Map.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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
17class TileID;
18class TileHWID;
19class Identifier;
20class HWIdentifier;
23
30
31
32class TileRoI_Map : public AthAlgTool {
33
34 public:
37 TileRoI_Map( const std::string& type, const std::string& name,
38 const IInterface* parent ) ;
39
42
43 StatusCode initialize();
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
57
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
68
69 bool validId(const TT_ID& tt_id) const ;
70
74
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
93 etamin = std::min(etamin,eta);
94 etamax = std::max(etamax,eta);
95
96 phimin = std::min(phimin,phi);
97 phimax = std::max(phimax,phi);
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{nullptr};
125 const TileHWID* m_tileHWID{nullptr};
128
130 Gaudi::Property<bool> m_print{this, "Print", false};
131};
132
133
134#endif
135
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Hash table for Tile fragments (==drawers ==collections in StoreGate)
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
Helper class for TileCal offline identifiers.
Definition TileID.h:67
void set(float eta, float phi)
Definition TileRoI_Map.h:91
TT_ID TrigTowerID(const Identifier &id) const
return TrigTowerID for various queries.
const TileDetDescrManager * m_tileMgr
std::map< HWIdentifier, TT_ID > ONLMAP
Identifier TT_ID
Definition TileRoI_Map.h:46
const TileCablingService * m_cablingSvc
OFFMAP m_offmap
const TileID * m_tileID
std::map< int, EtaPhiRegion > E_P_MAP
const std::vector< COLL_ID > & CollectionID(const TT_ID &id) const
reserve lookup.
StatusCode initialize()
define a RoI identifier type, two ints.
virtual ~TileRoI_Map()
ROIMAP m_roimap
Gaudi::Property< bool > m_print
ONLMAP m_onlmap
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
TileFragHash m_idhash
bool validId(const TT_ID &tt_id) const
check validity
bool addEntry(const HWIdentifier &adc_hwid)
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.
std::vector< COLL_ID > COLL_ID_VEC
TileRoI_Map(const std::string &type, const std::string &name, const IInterface *parent)
constructor
void printEtaPhiRegions()
E_P_MAP m_epmap
const TileHWID * m_tileHWID
std::map< TT_ID, COLL_ID_VEC > ROIMAP
std::map< Identifier, TT_ID > OFFMAP
Map for offline ID and online id.