![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "boost/format.hpp"
36 return idhelper->
side (
id);
53 const std::string&
name,
56 m_cell_helper(nullptr),
73 return StatusCode::SUCCESS;
104 float inv_cell_etasize = 1. / cell_etasize;
110 if (inv_cell_etasize < 0)
break;
112 float inv_cell_phisize = 1. / cell_phisize;
114 float cell_etamax = cell_etamin +
115 cell_etasize*(cell_ietamax - cell_ietamin + 1);
131 float sc_etamax= sc_etamin + sc_etasize*(sc_ietamax - sc_ietamin + 1);
135 float etamax =
std::min (cell_etamax, sc_etamax);
142 elt.
m_etadiv =
int (sc_etasize * inv_cell_etasize + 0.1);
143 elt.
m_phidiv =
int (sc_phisize * inv_cell_phisize + 0.1);
159 const float inv_sc_etasize = 1. / sc_etasize;
203 (
" %3d %d/%2d/%2d/%d %3d %d/%2d/%2d/%d %d %d %3d %3d %3d %3d %3d %3d\n") %
204 (
int)elt.m_cell_reg %
215 elt.m_etadiv % elt.m_phidiv %
216 elt.m_cell_ietamin % elt.m_cell_ietamax %
217 elt.m_sc_ietamin % elt.m_sc_ietamax %
218 elt.m_cell_ieta_adj % elt.m_sc_ieta_adj;
225 msg(MSG::INFO ) <<
"Done with initIDMap" <<
endmsg;
262 const int sc_phi = fcal_helper->
phi (cell_id);
263 const int sc_lay = fcal_helper->
module (cell_id);
264 const int cell_ieta = fcal_helper->
eta (cell_id);
265 int sc_pn = fcal_helper->
pos_neg( cell_id );
268 sc_ieta = cell_ieta / 4;
270 else if (sc_lay==2) {
271 sc_ieta = cell_ieta / 4;
273 else if (sc_lay==1) {
276 else if (cell_ieta < 24)
279 sc_ieta = 2 + (cell_ieta-24)/4;
290 msg(
MSG::DEBUG) <<
"\n LArFCAL ---------------------------\n";
296 (
" %5d %2d/%2d/%2d/%2d ... %2d cells\n") %
299 sfcal_helper->
module(sc_id) %
300 sfcal_helper->
eta(sc_id) %
301 sfcal_helper->
phi(sc_id) %
345 }
while (ndx < (
int)
m_idmap.size() &&
m_idmap[ndx].m_cell_reg == rhash);
389 int sample_sc = sample_offline;
408 std::vector<Identifier>
411 std::vector<Identifier>
out;
429 for (; ndx <
end; ++ndx) {
446 for (; ieta <= ietamax; ++ieta) {
476 out.push_back (cell_id);
482 out.push_back (cell_id);
485 out.push_back (cell_id);
492 out.push_back (cell_id);
496 out.push_back (cell_id);
498 out.push_back (cell_id);
513 std::vector<Identifier>
516 std::vector<Identifier>
out;
524 m_idmap[ndx].m_cell_reg == rhash)
541 std::vector<Identifier>
544 std::vector<Identifier>
out;
551 for (; ndx <
end; ++ndx) {
552 if (
m_idmap[ndx].m_sc_reg == rhash)
def retrieve(aClass, aKey=None)
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int tower(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Identifier region_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy) const
Make a region ID from constituting fields and subCalo index; for (Mini)FCAL and Tiles,...
int module(const Identifier id) const
module [1,3]
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
int eta_max(const Identifier regId) const
max value of eta index (-999 == failure)
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
int module(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
const LArFCAL_SuperCell_ID * fcal_idHelper() const
access to FCAL idHelper
id_range fcal_range() const
Range over full set of FCAL Identifiers.
id_range reg_range(void) const
Range over set of region Identifiers (LAr + Tiles)
IdentifierHash calo_region_hash(const Identifier regionId) const
create hash id from 'global' region id
int phi(const Identifier id) const
phi [0,15]
Identifier region_id(int index) const
build single region, module, tower, cell, pmt, adc identifiers
bool is_em(const Identifier id) const
test if the id belongs to LArEM
float eta0(const Identifier regId) const
minimum LAr eta for this region
int sample(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
::StatusCode StatusCode
StatusCode definition for legacy code.
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
This class factors out code common between TileID and Tile_SuperCell_ID.
Helper base class for offline cell identifiers.
Helper class for offline supercell identifiers.
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
#define CHECK(...)
Evaluate an expression and check for errors.
float phiGranularity(const Identifier regId) const
LAr phi granularity (NOT_VALID == failure)
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
Helpers for checking error return status codes and reporting errors.
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
Identifier cell_id(const Identifier &any_id) const
Helper class for LArFCAL offline identifiers.
Helper base class for offline cell identifiers.
size_type calo_region_hash_max(void) const
cell 'global' region table max size
const TileID * tile_idHelper() const
access to Tile idHelper
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
int section(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
float etaGranularity(const Identifier regId) const
LAr eta granularity (NOT_VALID == failure)