ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
FCALTile Class Reference

A tile of the forward calorimeter readout geometry. More...

#include <FCALTile.h>

Collaboration diagram for FCALTile:

Public Member Functions

 FCALTile (const FCALTile &right)
 Copy constructor. More...
 
 FCALTile (const FCALModule *module, FCALTile::TileConstIterator tIterator)
 Constructor. More...
 
 ~FCALTile ()
 Destructor. More...
 
FCALTileoperator= (const FCALTile &right)
 Assignment. More...
 
double getX () const
 Gets the X Position of the Tile. More...
 
double getY () const
 Gets the Y position of the Tile. More...
 
unsigned int getNumTubes () const
 Gets the number of tubes in the tile. More...
 
int getIndexI () const
 Returns the index "i" of the tile. More...
 
int getIndexJ () const
 Returns the index "J" of the tile. More...
 
unsigned int identify () const
 Returns the identifier of this tile (convention: comes from the FCAL Channel Map). More...
 
bool operator< (const FCALTile &t) const
 For sorting operations: More...
 
const FCALModulegetModule () const
 Get the Module. More...
 
FCALTubeConstLink getTube (unsigned int i) const
 Get a tube. More...
 
const FCALHVLinegetHVLine (unsigned int i) const
 Get hvline. More...
 

Static Public Member Functions

static unsigned int getNumHVLines ()
 Get num hvlines. More...
 

Private Types

typedef FCAL_ChannelMap::tileMap_const_iterator TileConstIterator
 

Private Attributes

const FCALModulem_module
 
TileConstIterator m_tile
 
CxxUtils::CachedPointer< const FCALHVLinem_line [4]
 Cache of subgaps. More...
 
CxxUtils::CachedValue< std::vector< FCALTubeConstLink > > m_tube
 Cache of tubes. More...
 

Detailed Description

A tile of the forward calorimeter readout geometry.

This class represents the size, shape, position, and indices of a single tile within the FCAL. For access to the FCAL Tiles, you should use the FCAL Module class.

Definition at line 26 of file FCALTile.h.

Member Typedef Documentation

◆ TileConstIterator

Definition at line 28 of file FCALTile.h.

Constructor & Destructor Documentation

◆ FCALTile() [1/2]

FCALTile::FCALTile ( const FCALTile right)

Copy constructor.

Definition at line 15 of file FCALTile.cxx.

16  :m_module(right.m_module),m_tile(right.m_tile)
17 {
18 }

◆ FCALTile() [2/2]

FCALTile::FCALTile ( const FCALModule module,
FCALTile::TileConstIterator  tIterator 
)

Constructor.

Definition at line 20 of file FCALTile.cxx.

21  :m_module(module),m_tile(tIterator)
22 {
23 }

◆ ~FCALTile()

FCALTile::~FCALTile ( )
default

Destructor.

Member Function Documentation

◆ getHVLine()

const FCALHVLine * FCALTile::getHVLine ( unsigned int  i) const

Get hvline.

Definition at line 85 of file FCALTile.cxx.

85  {
86  if (!m_line[i].get()) {
87 
88  for (unsigned int j=0;j<getNumTubes();j++) {
89  unsigned int index=getTube(j)->getHVLine().getLineIndex();
90  if (i==index) {
91  m_line[i].set (&(getTube(j)->getHVLine()));
92  break;
93  }
94  }
95  }
96  return m_line[i].get();
97 }

◆ getIndexI()

int FCALTile::getIndexI ( ) const

Returns the index "i" of the tile.

Definition at line 61 of file FCALTile.cxx.

62 {
63  return ((*m_tile).first & 0X00000FFFF );
64 }

◆ getIndexJ()

int FCALTile::getIndexJ ( ) const

Returns the index "J" of the tile.

Definition at line 66 of file FCALTile.cxx.

67 {
68  return (((*m_tile).first & 0XFFFF0000 )>> 16);
69 }

◆ getModule()

const FCALModule * FCALTile::getModule ( ) const

Get the Module.

Definition at line 76 of file FCALTile.cxx.

76  {
77  return m_module;
78 }

◆ getNumHVLines()

unsigned int FCALTile::getNumHVLines ( )
static

Get num hvlines.

Definition at line 81 of file FCALTile.cxx.

81  {
82  return 4;
83 }

◆ getNumTubes()

unsigned int FCALTile::getNumTubes ( ) const

Gets the number of tubes in the tile.

Definition at line 56 of file FCALTile.cxx.

57 {
58  return (*m_tile).second.ntubes();
59 }

◆ getTube()

FCALTubeConstLink FCALTile::getTube ( unsigned int  i) const

Get a tube.

Definition at line 100 of file FCALTile.cxx.

100  {
101 
102  if (!m_tube.isValid()) {
103 
104  std::vector<FCALTubeConstLink> tube;
105 
106  //std::cout << " in FCALTile::getTube " << std::endl;
107  // Then go to storegate..
108  ISvcLocator *svcLocator = Gaudi::svcLocator();
109 
111  if (svcLocator->service("DetectorStore", detStore, false )==StatusCode::FAILURE) {
112  throw std::runtime_error("Error in FCALTile: cannot access DetectorStore (tube access)");
113  }
114 
115  const FCAL_ChannelMap *channelMap;
116  if (detStore->retrieve(channelMap)==StatusCode::FAILURE) {
117  throw std::runtime_error("Error in FCALTile: cannot access Channel Map");
118  }
119 
120  unsigned int moduleNumber = m_module->getModuleIndex(); // 1, 2, or 3.
121  unsigned int iSampling = moduleNumber-1; // by convention.
122  unsigned int iSide = m_module->getEndcapIndex();
123 
124  //std::cout << " side,sampling " << iSide << " " << iSampling << std::endl;
125 
126  for (FCAL_ChannelMap::tubemap_const_iterator t=channelMap->tubemap_begin(moduleNumber);t!=channelMap->tubemap_end(moduleNumber); ++t) {
127  if ((*t).second.get_tileName()==(*m_tile).first) {
128  std::string FeedThrough = (*t).second.getHVft();
129  //int ElectrodeId = (*t).second.getElectrodeDataID();
130  //std::cout << "FeedThrough " << FeedThrough << std::endl;
131 
132 
133  // Is it possible to
134 
135  std::string::size_type pos = FeedThrough.find('.');
136  if (pos==std::string::npos) {
137  std::cout << "Big problem, feedthrough: " << FeedThrough << std::endl;
138  throw std::runtime_error("Error parsing FCAL HV Feedthrough string (finding substring)");
139  }
140 
141  std::string FeedMe=FeedThrough.substr(0,pos);
142 
143  pos++;
144  std::string Line=FeedThrough.substr(pos);
145 
146  std::istringstream FeedStream(FeedMe);
147  unsigned int feedNumber;
148  if (!(FeedStream>>feedNumber)) {
149  throw std::runtime_error("Error parsing FCAL HV Feedthrough string (parsing substring 1)");
150  }
151 
152  std::istringstream LineStream(Line);
153  unsigned int lineNumber;
154  if (!(LineStream>>lineNumber)) {
155  throw std::runtime_error("Error parsing FCAL HV Feedthrough string (parsing substring 2)");
156  }
157 
158  int hv_moduleNumber=lineNumber/4;
159  if (feedNumber==23) hv_moduleNumber+=8;
160 
161  //std::cout << " feedNumber, lineNumber " << feedNumber << " " << lineNumber << std::endl;
162 
163  const FCALHVManager& hvManager=getModule()->getManager()->getHVManager();
164  const FCALHVModule& hvMod = hvManager.getHVModule(iSide,hv_moduleNumber,iSampling);
165  unsigned int index=0;
166 
167  if (lineNumber%4==0) index=0;
168  else if (lineNumber%4==1) index=3;
169  else if (lineNumber%4==2) index=1;
170  else if (lineNumber%4==3) index=2;
171  else throw std::runtime_error("Error in FCALTile: unrecognized HV Line");
172 
173  const FCALHVLine& hvElec = hvMod.getHVLine(index);
174  //std::cout << " add hvElec for index " << index << " hvElec= " << hvElec << std::endl;
175 
176  FCALTubeConstLink tubeLink(new FCALTube(this, hvElec, (*t).second.x(),(*t).second.y()));
177 
178  tube.push_back(tubeLink);
179  }
180  }
181  m_tube.set (std::move (tube));
182  }
183  return (*m_tube.ptr())[i];
184 }

◆ getX()

double FCALTile::getX ( ) const

Gets the X Position of the Tile.

Definition at line 46 of file FCALTile.cxx.

47 {
48  return (*m_tile).second.x();
49 }

◆ getY()

double FCALTile::getY ( ) const

Gets the Y position of the Tile.

Definition at line 51 of file FCALTile.cxx.

52 {
53  return (*m_tile).second.y();
54 }

◆ identify()

unsigned int FCALTile::identify ( ) const

Returns the identifier of this tile (convention: comes from the FCAL Channel Map).

Definition at line 71 of file FCALTile.cxx.

72 {
73  return (*m_tile).first;
74 }

◆ operator<()

bool FCALTile::operator< ( const FCALTile t) const
inline

For sorting operations:

Definition at line 86 of file FCALTile.h.

86 { return ((*m_tile).first) < (*t.m_tile).first; }

◆ operator=()

FCALTile & FCALTile::operator= ( const FCALTile right)

Assignment.

Definition at line 31 of file FCALTile.cxx.

32 {
33  if (this!=&right) {
34  m_module=right.m_module;
35  m_tile=right.m_tile;
36  m_tube.reset();
37  for (int i = 0; i < 4; i++) {
38  m_line[i].store (nullptr);
39  }
40  }
41  return *this;
42 }

Member Data Documentation

◆ m_line

CxxUtils::CachedPointer<const FCALHVLine> FCALTile::m_line[4]
private

Cache of subgaps.

Definition at line 117 of file FCALTile.h.

◆ m_module

const FCALModule* FCALTile::m_module
private

Definition at line 111 of file FCALTile.h.

◆ m_tile

TileConstIterator FCALTile::m_tile
private

Definition at line 112 of file FCALTile.h.

◆ m_tube

CxxUtils::CachedValue<std::vector<FCALTubeConstLink> > FCALTile::m_tube
private

Cache of tubes.

Definition at line 122 of file FCALTile.h.


The documentation for this class was generated from the following files:
FCALModule::getManager
const FCALDetectorManager * getManager() const
Gets the manager.
Definition: FCALModule.h:170
FCALTile::getNumTubes
unsigned int getNumTubes() const
Gets the number of tubes in the tile.
Definition: FCALTile.cxx:56
CxxUtils::CachedValue::reset
void reset()
Reset the value to invalid.
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
index
Definition: index.py:1
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
FCAL_ChannelMap
This class contains the tube and tile maps for the FCAL A tile is of a set of FCAL tubes.
Definition: LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h:34
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FCALHVManager::getHVModule
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
Definition: FCALHVManager.cxx:190
CxxUtils::CachedPointer::set
void set(pointer_t elt) const
Set the element, assuming it is currently null.
python.PyAthena.module
module
Definition: PyAthena.py:134
FCALHVLine
Definition: FCALHVLine.h:15
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
FCALTile::m_module
const FCALModule * m_module
Definition: FCALTile.h:111
lumiFormat.i
int i
Definition: lumiFormat.py:92
FCALDetectorManager::getHVManager
const FCALHVManager & getHVManager() const
Get the HV Manager:
Definition: FCALDetectorManager.cxx:90
FCALTile::m_tube
CxxUtils::CachedValue< std::vector< FCALTubeConstLink > > m_tube
Cache of tubes.
Definition: FCALTile.h:122
FCALTile::getModule
const FCALModule * getModule() const
Get the Module.
Definition: FCALTile.cxx:76
FCALModule::getModuleIndex
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
Definition: FCALModule.cxx:74
FCALTile::m_line
CxxUtils::CachedPointer< const FCALHVLine > m_line[4]
Cache of subgaps.
Definition: FCALTile.h:117
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
FCALHVModule::getHVLine
const FCALHVLine & getHVLine(unsigned int iLine) const
Definition: FCALHVModule.cxx:72
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
FCALModule::getEndcapIndex
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
Definition: FCALModule.cxx:69
FCALTile::m_tile
TileConstIterator m_tile
Definition: FCALTile.h:112
CxxUtils::CachedPointer::store
void store(pointer_t elt)
Store a new value to the element.
FCALTile::getHVLine
const FCALHVLine * getHVLine(unsigned int i) const
Get hvline.
Definition: FCALTile.cxx:85
FCAL_ChannelMap::tubemap_const_iterator
tubeMap_t::const_iterator tubemap_const_iterator
Definition: LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h:71
DeMoScan.first
bool first
Definition: DeMoScan.py:534
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
CxxUtils::CachedPointer::get
pointer_t get() const
Return the current value of the element.
FCALHVModule
Describes one HV Module within the FCAL.
Definition: FCALHVModule.h:20
FCAL_ChannelMap::tubemap_end
tubemap_const_iterator tubemap_end(int isam) const
Definition: LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx:480
FCALTile::getTube
FCALTubeConstLink getTube(unsigned int i) const
Get a tube.
Definition: FCALTile.cxx:100
Trk::SurfaceType::Line
@ Line
FCALHVManager
This class provides direct access to information on the HV electrodes within the barrels....
Definition: FCALHVManager.h:35
FCALTube
This class represents an FCAL Tube. The tube has a position and it also has links to the High Voltage...
Definition: FCALTube.h:20
FCAL_ChannelMap::tubemap_begin
tubemap_const_iterator tubemap_begin(int isam) const
tubeMap access functions
Definition: LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx:472
calibdata.tube
tube
Definition: calibdata.py:31