ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSuperCellIDTool.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef CALODETDESCR_CALOSUPERCELLIDTOOL_H
17#define CALODETDESCR_CALOSUPERCELLIDTOOL_H
18
19
23#include "GaudiKernel/ToolHandle.h"
24
25
26class CaloCell_ID;
28
30 : public extends<AthAlgTool, ICaloSuperCellIDTool>
31{
32public:
39 CaloSuperCellIDTool (const std::string& type,
40 const std::string& name,
41 const IInterface* parent);
42
43
45 virtual StatusCode initialize();
46
47
53 virtual Identifier offlineToSuperCellID (const Identifier& id) const;
54
55
60 virtual std::vector<Identifier>
61 superCellToOfflineID (const Identifier& id) const;
62
63
71 virtual std::vector<Identifier>
72 offlineToSuperCellRegion (const Identifier& reg_id) const;
73
74
82 virtual std::vector<Identifier>
83 superCellToOfflineRegion (const Identifier& reg_id) const;
84
85
86private:
88 void initFCALIDMap();
89
90 // During initialization, we create a table describing the mapping
91 // beween offline and supercell regions. There is one entry per
92 // unique pair of offline/supercell regions, sorted in increasing
93 // hash order. (So there may be multiple entries for a given
94 // offline or supercell region, but such entries should be adjacent
95 // in the table.)
96
98 void initIDMap ();
99
133
135 void addMapEntry (const IDMapElt& elt);
136
138 std::vector<IDMapElt> m_idmap;
139
142 std::vector<int> m_offlineIndex;
143
146 std::vector<int> m_superCellIndex;
147
151 std::vector<int> m_superCellIndexEnd;
152
154 std::vector<Identifier> m_fcal_fromCell;
155 std::vector< std::vector<Identifier> > m_fcal_fromSuperCell;
156
160};
161
162
163#endif // not CALODETDESCR_CALOSUPERCELLIDTOOL_H
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for offline supercell identifiers.
std::vector< std::vector< Identifier > > m_fcal_fromSuperCell
std::vector< int > m_superCellIndex
Entry I contains the index in the mapping table of the first entry for the supercell region with hash...
void initFCALIDMap()
FCAL is a special case.
virtual StatusCode initialize()
Standard Gaudi initialize method.
virtual Identifier offlineToSuperCellID(const Identifier &id) const
Given an offline cell identifier, return the corresponding supercell identifier.
std::vector< IDMapElt > m_idmap
List of mapping table entries.
virtual std::vector< Identifier > offlineToSuperCellRegion(const Identifier &reg_id) const
Given an offline region identifier, return the corresponding supercell region identifier(s).
virtual std::vector< Identifier > superCellToOfflineID(const Identifier &id) const
Given a supercell identifier, return the list of corresponding offline cell identifiers.
std::vector< Identifier > m_fcal_fromCell
hashTable for FCAL
void addMapEntry(const IDMapElt &elt)
Add an entry to the region mapping table.
void initIDMap()
Initialize the mapping table.
std::vector< int > m_superCellIndexEnd
Entry I contains one past the index in the mapping table of the last entry for the supercell region w...
virtual std::vector< Identifier > superCellToOfflineRegion(const Identifier &reg_id) const
Given a supercell region identifier, return the corresponding offline region identifier(s).
const CaloCell_ID * m_cell_helper
Entry point for calorimeter ID helpers.
const CaloCell_SuperCell_ID * m_sc_helper
std::vector< int > m_offlineIndex
Entry I contains the index in the mapping table of the first entry for the offline region with hash I...
CaloSuperCellIDTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
This is a "hash" representation of an Identifier.
IdentifierHash m_cell_reg
Offline region hash for this entry.
int m_cell_ieta_adj
Offset between the first defined cell in the region and the point were offline and supercells are ali...
int m_cell_ietamin
Offline minimum and maximum (inclusive) eta indices for this entry.
int m_sc_ietamin
Supercell minimum and maximum (inclusive) eta indices for this entry.
int m_etadiv
Number of offline cells per supercell, in eta/phi.
IdentifierHash m_sc_reg
Supercell region hash for this entry.