|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CaloDetDescr/CaloDetDescrElement.h"
19 #include "GaudiKernel/ISvcLocator.h"
21 #include "GaudiKernel/ToolHandle.h"
29 return left.second < right.second;
42 std::cout <<
"TileCellCont\t\t DEBUG \t constructor" << std::endl;
45 ISvcLocator* svcLoc = Gaudi::svcLocator();
47 SmartIF<StoreGateSvc>
detStore{svcLoc->service(
"DetectorStore")};
49 std::cout <<
"Could not locate DetectorStore" << std::endl;
50 return StatusCode::FAILURE;
54 const TileID* tileID =
nullptr;
55 if (
detStore->retrieve(tileID,
"TileID").isFailure()) {
56 std::cout <<
"Could not get TileID helper !" << std::endl;
57 return StatusCode::FAILURE;
61 if (
detStore->retrieve(tileHWID,
"TileHWID").isFailure()) {
62 std::cout <<
"Could not get TileHWID helper !" << std::endl;
63 return StatusCode::FAILURE;
68 if (
detStore->retrieve(tileMgr).isFailure()) {
69 std::cout <<
"Unable to retrieve TileDetDescrManager from DetectorStore" << std::endl;
70 return StatusCode::FAILURE;
75 if (
detStore->retrieve(mbtsMgr).isFailure()) {
76 std::cout <<
"Warning: unable to retrieve MbtsDetDescrManager from DetectorStore" << std::endl;
81 std::cout <<
"TileCellCont::initialize ERROR : TileHid2RESrc has to be initialized before this" << std::endl;
82 return StatusCode::FAILURE;
87 int maxChannels =
cabling->getMaxChannels();
94 std::vector<int> rodids;
100 rodids.push_back(rodid);
107 std::vector<int> Rw2Pmt;
108 Rw2Pmt.resize(maxChannels, -1);
109 std::vector<int> Rw2Cell;
110 Rw2Cell.resize(maxChannels, -1);
111 std::vector<int_pair>
tmp;
125 }
else if (
index >= 0) {
137 this->push_back(newColl);
141 if (
tmp.size() > 0) {
145 for (
unsigned int i = 0;
i <
tmp.size(); ++
i) {
147 cell_hash =
tmp[
i].second;
161 if ((*
i) != -1) std::cout <<
"Channel : " << idxraw++ <<
" connected to cell " << (*i) << std::endl;
174 std::cout <<
"Number of RODs is : " <<
m_mbts_rods.size() << std::endl;
176 std::cout <<
" MBTS RODs : " <<
m_mbts_rods[
k] << std::endl;
184 std::cout <<
"TileCellCont\t\t DEBUG \t" <<
i <<
" " << std::hex <<
m_hash.
identifier(
i) << std::dec <<
" " <<
aa->identify() <<
" " << bb->
eta() <<
" " << bb->
phi() << std::endl;
189 return StatusCode::SUCCESS;
193 const std::vector<TileCellCollection*>::const_iterator
195 return this->
begin() + rodid;
201 for (
int i = 0;
i < 4;
i++)
203 for (
int i = 0;
i < 4;
i++)
207 for (
unsigned int i = 0;
i < this->
size();
i++) {
217 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
unsigned int find_rod(const unsigned int &id) const
virtual double phi() const override final
get phi (through CaloDetDescrElement)
static const TileCablingService * getInstance()
get pointer to service instance
std::pair< int, int > int_pair
std::vector< int > m_Rw2Cell[4]
void initialize(int offset, int runnum)
initialize
std::vector< int > m_Rw2Pmt[4]
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
TileCellCont()
constructor
bool sort_pred(const int_pair &left, const int_pair &right)
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
const std::vector< TileCellCollection * >::const_iterator find(const unsigned int &id) const
Finds a collection.
Helper class for TileCal online (hardware) identifiers.
uint32_t getRodID(int frag_id) const
make a ROD SrcID for a fragment ID
std::vector< unsigned int > m_mbts_IDs
@ OWN_ELEMENTS
this data object owns its elements
Helper class for TileCal offline identifiers.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< unsigned int > m_mbts_rods
CaloDetDescrElement * get_element(const Identifier &elementId) const
static const unsigned int MAX_ROS
Number of ROSs
TileCellCollection * m_MBTS
const TileHid2RESrcID * m_src
map Hash ID to ROD
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
value_type push_back(value_type pElem)
Add an element to the end of the collection.
int max() const
return maximum number of IDs
StatusCode initialize(void)
IdentifierHash cell_hash(const Identifier &cell_id) const
fast conversion from ID to hash for cells
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
ID identifier(int i) const
reverse conversion
std::map< unsigned int, unsigned int > m_mapMBTS
StatusCode finalize(void)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
std::vector< unsigned int > m_eventNumber
eventNumber of a given Collection