11#include "GaudiKernel/Bootstrap.h"
12#include "GaudiKernel/ISvcLocator.h"
37 for (
int i = 0; i < 4; i++) {
48 return (*m_tile).second.x();
53 return (*m_tile).second.y();
58 return (*m_tile).second.ntubes();
63 return ((*m_tile).first & 0X00000FFFF );
68 return (((*m_tile).first & 0XFFFF0000 )>> 16);
73 return (*m_tile).first;
89 unsigned int index=
getTube(j)->getHVLine().getLineIndex();
104 std::vector<FCALTubeConstLink> tube;
106 SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
107 if(!detStore.isValid()) {
108 throw std::runtime_error(
"Error in FCALTile: cannot access DetectorStore (tube access)");
112 if (detStore->retrieve(channelMap)==StatusCode::FAILURE) {
113 throw std::runtime_error(
"Error in FCALTile: cannot access Channel Map");
116 unsigned int moduleNumber =
m_module->getModuleIndex();
117 unsigned int iSampling = moduleNumber-1;
118 unsigned int iSide =
m_module->getEndcapIndex();
121 if ((*t).second.get_tileName()==(*m_tile).first) {
122 std::string FeedThrough = (*t).second.getHVft();
124 std::string::size_type pos = FeedThrough.find(
'.');
125 if (pos==std::string::npos) {
126 std::cout <<
"Big problem, feedthrough: " << FeedThrough << std::endl;
127 throw std::runtime_error(
"Error parsing FCAL HV Feedthrough string (finding substring)");
130 std::string FeedMe=FeedThrough.substr(0,pos);
133 std::string Line=FeedThrough.substr(pos);
135 std::istringstream FeedStream(FeedMe);
136 unsigned int feedNumber;
137 if (!(FeedStream>>feedNumber)) {
138 throw std::runtime_error(
"Error parsing FCAL HV Feedthrough string (parsing substring 1)");
141 std::istringstream LineStream(Line);
142 unsigned int lineNumber;
143 if (!(LineStream>>lineNumber)) {
144 throw std::runtime_error(
"Error parsing FCAL HV Feedthrough string (parsing substring 2)");
147 int hv_moduleNumber=lineNumber/4;
148 if (feedNumber==23) hv_moduleNumber+=8;
154 unsigned int index=0;
156 if (lineNumber%4==0)
index=0;
157 else if (lineNumber%4==1)
index=3;
158 else if (lineNumber%4==2)
index=1;
159 else if (lineNumber%4==3)
index=2;
160 else throw std::runtime_error(
"Error in FCALTile: unrecognized HV Line");
166 tube.push_back(tubeLink);
169 m_tube.set (std::move (tube));
171 return (*
m_tube.ptr())[i];
GeoIntrusivePtr< const FCALTube > FCALTubeConstLink
const FCALHVManager & getHVManager() const
Get the HV Manager:
This class provides direct access to information on the HV electrodes within the barrels.
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
Describes one HV Module within the FCAL.
const FCALHVLine & getHVLine(unsigned int iLine) const
const FCALDetectorManager * getManager() const
Gets the manager.
CxxUtils::CachedValue< std::vector< FCALTubeConstLink > > m_tube
Cache of tubes.
unsigned int identify() const
Returns the identifier of this tile (convention: comes from the FCAL Channel Map).
int getIndexJ() const
Returns the index "J" of the tile.
int getIndexI() const
Returns the index "i" of the tile.
static unsigned int getNumHVLines()
Get num hvlines.
FCALTubeConstLink getTube(unsigned int i) const
Get a tube.
const FCALHVLine * getHVLine(unsigned int i) const
Get hvline.
double getY() const
Gets the Y position of the Tile.
CxxUtils::CachedPointer< const FCALHVLine > m_line[4]
Cache of subgaps.
FCALTile(const FCALTile &right)
Copy constructor.
FCAL_ChannelMap::tileMap_const_iterator TileConstIterator
double getX() const
Gets the X Position of the Tile.
FCALTile & operator=(const FCALTile &right)
Assignment.
const FCALModule * m_module
unsigned int getNumTubes() const
Gets the number of tubes in the tile.
const FCALModule * getModule() const
Get the Module.
This class represents an FCAL Tube.
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.
tubeMap_t::const_iterator tubemap_const_iterator
tubemap_const_iterator tubemap_end(int isam) const
tubemap_const_iterator tubemap_begin(int isam) const
tubeMap access functions
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)