ATLAS Offline Software
Loading...
Searching...
No Matches
FCAL_ChannelMap Class Reference

This class contains the tube and tile maps for the FCAL
A tile is of a set of FCAL tubes. More...

#include <FCAL_ChannelMap.h>

Collaboration diagram for FCAL_ChannelMap:

Classes

class  TilePosition
class  TubePosition

Public Types

typedef unsigned int tileName_t
typedef unsigned int tubeID_t
typedef std::map< tubeID_t, TubePositiontubeMap_t
typedef tubeMap_t::size_type tubemap_sizetype
typedef tubeMap_t::value_type tubemap_valuetype
typedef tubeMap_t::const_iterator tubemap_const_iterator
typedef std::map< tileName_t, TilePositiontileMap_t
 TileMap.
typedef tileMap_t::size_type tileMap_sizetype
typedef tileMap_t::value_type tileMap_valuetype
typedef tileMap_t::const_iterator tileMap_const_iterator
typedef unsigned int tileName_t
typedef unsigned int tubeID_t
typedef std::map< tubeID_t, TubePositiontubeMap_t
typedef tubeMap_t::size_type tubemap_sizetype
typedef tubeMap_t::value_type tubemap_valuetype
typedef tubeMap_t::const_iterator tubemap_const_iterator
typedef std::map< tileName_t, TilePositiontileMap_t
 TileMap.
typedef tileMap_t::size_type tileMap_sizetype
typedef tileMap_t::value_type tileMap_valuetype
typedef tileMap_t::const_iterator tileMap_const_iterator

Public Member Functions

 FCAL_ChannelMap (int itemp)
 Constructors:
tubemap_const_iterator tubemap_begin (int isam) const
 tubeMap access functions
tubemap_const_iterator tubemap_end (int isam) const
tubemap_sizetype tubemap_size (int isam) const
tubemap_const_iterator getTubeByCopyNumber (int isam, int copyNo) const
bool getTileID (int isam, float x, float y, int &eta, int &phi) const
 -— For the new LArFCAL_ID Identifier
float x (int isam, int eta, int phi) const
 For reconstruction, decoding of tile identifiers.
float y (int isam, int eta, int phi) const
void tileSize (int sam, int eta, int phi, float &dx, float &dy) const
void tileSize (int isam, int ntubes, float &dx, float &dy) const
void print_tubemap (int isam) const
 print functions
bool invert_x () const
 set and get for the inversion flags
bool invert_xy () const
void set_invert_x (bool)
void set_invert_xy (bool)
void add_tube (const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm)
void add_tube (const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm, const std::string &hvFT)
void finish ()
tileMap_const_iterator begin (int isam) const
tileMap_const_iterator end (int isam) const
 FCAL_ChannelMap (int itemp)
 Constructors:
tubemap_const_iterator tubemap_begin (int isam) const
 tubeMap access functions
tubemap_const_iterator tubemap_end (int isam) const
tubemap_sizetype tubemap_size (int isam) const
tubemap_const_iterator getTubeByCopyNumber (int isam, int copyNo) const
bool getTileID (int isam, float x, float y, int &eta, int &phi) const
 -— For the new LArFCAL_ID Identifier
float x (int isam, int eta, int phi) const
 For reconstruction, decoding of tile identifiers.
float y (int isam, int eta, int phi) const
void tileSize (int sam, int eta, int phi, float &dx, float &dy) const
void tileSize (int isam, int ntubes, float &dx, float &dy) const
void print_tubemap (int isam) const
 print functions
bool invert_x () const
 set and get for the inversion flags
bool invert_xy () const
void set_invert_x (bool)
void set_invert_xy (bool)
void add_tube (const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm)
void add_tube (const std::string &tileName, int mod, int id, int i, int j, double xCm, double yCm, const std::string &hvFT)
void finish ()
tileMap_const_iterator begin (int isam) const
tileMap_const_iterator end (int isam) const

Private Member Functions

float x1 (int isam, int eta, int phi) const
float y1 (int isam, int eta, int phi) const
void create_tileMap (int isam)
void create_tileMap (int isam)

Private Attributes

double m_tubeDx [3] {}
double m_tubeDy [3] {}
double m_tileDx [3] {}
double m_tileDy [3] {}
bool m_invert_x
bool m_invert_xy
tileMap_t m_tileMap [3]
tubeMap_t m_tubeMap [3]
 TubeMap.
std::vector< tubemap_const_iteratorm_tubeIndex [3]

Static Private Attributes

static const double m_tubeSpacing [] = {0.75*Gaudi::Units::cm, 0.8179*Gaudi::Units::cm, 0.90*Gaudi::Units::cm}
 Geometrical parameters here, in CLHEP::cm please to be compatible with G3.

Detailed Description

This class contains the tube and tile maps for the FCAL
A tile is of a set of FCAL tubes.

Definition at line 33 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h.

Member Typedef Documentation

◆ tileMap_const_iterator [1/2]

◆ tileMap_const_iterator [2/2]

◆ tileMap_sizetype [1/2]

◆ tileMap_sizetype [2/2]

◆ tileMap_t [1/2]

◆ tileMap_t [2/2]

◆ tileMap_valuetype [1/2]

◆ tileMap_valuetype [2/2]

◆ tileName_t [1/2]

◆ tileName_t [2/2]

◆ tubeID_t [1/2]

◆ tubeID_t [2/2]

◆ tubemap_const_iterator [1/2]

◆ tubemap_const_iterator [2/2]

◆ tubemap_sizetype [1/2]

◆ tubemap_sizetype [2/2]

◆ tubeMap_t [1/2]

◆ tubeMap_t [2/2]

◆ tubemap_valuetype [1/2]

◆ tubemap_valuetype [2/2]

Constructor & Destructor Documentation

◆ FCAL_ChannelMap() [1/2]

FCAL_ChannelMap::FCAL_ChannelMap ( int itemp)

Constructors:

Definition at line 27 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

28{
29
30 /* === Initialize geometrical dimensions */
31 for(int i=0; i<3; i++){
32 m_tubeDx[i] = m_tubeSpacing[i] / 2.;
33 m_tubeDy[i] = m_tubeSpacing[i] * sqrt(3.)/2.;
34 }
35
36 // FCAL1 small cells are 2x2 tubes
37 m_tileDx[0] = 2. * m_tubeSpacing[0];
38 m_tileDy[0] = 2. * m_tubeSpacing[0] * sqrt(3.)/2.;
39
40 // FCAL2 small cells are 2x3 tubes
41 m_tileDx[1] = 2. * m_tubeSpacing[1];
42 m_tileDy[1] = 3. * m_tubeSpacing[1] * sqrt(3.)/2.;
43
44 // FCAL3 cells are 6x6 tubes
45 m_tileDx[2] = 6. * m_tubeSpacing[2];
46 m_tileDy[2] = 6. * m_tubeSpacing[2] * sqrt(3.)/2.;
47
48
49 m_invert_x = flag & 1;
50 m_invert_xy = flag & 2;
51
52}
static const double m_tubeSpacing[]
Geometrical parameters here, in CLHEP::cm please to be compatible with G3.
bool flag
Definition master.py:29

◆ FCAL_ChannelMap() [2/2]

FCAL_ChannelMap::FCAL_ChannelMap ( int itemp)

Constructors:

Member Function Documentation

◆ add_tube() [1/4]

void FCAL_ChannelMap::add_tube ( const std::string & tileName,
int mod,
int id,
int i,
int j,
double xCm,
double yCm )

Definition at line 69 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

69 {
70
71 // Get three integers from the tileName:
72 std::istringstream tileStream1(std::string(tileName,1,1));
73 std::istringstream tileStream2(std::string(tileName,3,2));
74 std::istringstream tileStream3(std::string(tileName,6,3));
75 int a1=0,a2=0,a3=0;
76 if (tileStream1) tileStream1 >> a1;
77 if (tileStream2) tileStream2 >> a2;
78 if (tileStream3) tileStream3 >> a3;
79
80 tileName_t tilename = (a3 << 16) + a2;
81
82 TubePosition tb(tilename, x*Gaudi::Units::cm, y*Gaudi::Units::cm,"");
83 // Add offsets, becaues iy and ix can be negative HMA
84
85 i = i+200;
86 j = j+200;
87 // m_tubeMap[mod-1][(j << 16) + i] = tb;
88 unsigned int ThisId = (j<<16) + i;
89 tubemap_const_iterator p = m_tubeMap[mod-1].insert(m_tubeMap[mod-1].end(),std::make_pair(ThisId,tb));
90 m_tubeIndex[mod-1].push_back(p);
91}
float x(int isam, int eta, int phi) const
For reconstruction, decoding of tile identifiers.

◆ add_tube() [2/4]

void FCAL_ChannelMap::add_tube ( const std::string & tileName,
int mod,
int id,
int i,
int j,
double xCm,
double yCm )

◆ add_tube() [3/4]

void FCAL_ChannelMap::add_tube ( const std::string & tileName,
int mod,
int id,
int i,
int j,
double xCm,
double yCm,
const std::string & hvFT )

Definition at line 95 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

95 {
96
97 // Get three integers from the tileName:
98 std::istringstream tileStream1(std::string(tileName,1,1));
99 std::istringstream tileStream2(std::string(tileName,3,2));
100 std::istringstream tileStream3(std::string(tileName,6,3));
101 int a1=0,a2=0,a3=0;
102 if (tileStream1) tileStream1 >> a1;
103 if (tileStream2) tileStream2 >> a2;
104 if (tileStream3) tileStream3 >> a3;
105
106 tileName_t tilename = (a3 << 16) + a2;
107
108 TubePosition tb(tilename, x*Gaudi::Units::cm, y*Gaudi::Units::cm, hvFT);
109 // Add offsets, becaues iy and ix can be negative HMA
110
111 i = i+200;
112 j = j+200;
113 // m_tubeMap[mod-1][(j << 16) + i] = tb;
114 unsigned int ThisId = (j<<16) + i;
115 tubemap_const_iterator p = m_tubeMap[mod-1].insert(m_tubeMap[mod-1].end(),std::make_pair(ThisId,tb));
116 m_tubeIndex[mod-1].push_back(p);
117}

◆ add_tube() [4/4]

void FCAL_ChannelMap::add_tube ( const std::string & tileName,
int mod,
int id,
int i,
int j,
double xCm,
double yCm,
const std::string & hvFT )

◆ begin() [1/2]

◆ begin() [2/2]

tileMap_const_iterator FCAL_ChannelMap::begin ( int isam) const
inline

◆ create_tileMap() [1/2]

void FCAL_ChannelMap::create_tileMap ( int isam)
private

Definition at line 130 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

131{
133 tubemap_const_iterator first = m_tubeMap[isam-1].begin();
134 tubemap_const_iterator last = m_tubeMap[isam-1].end();
135
136 // Loop over tubes -> find unique tiles and fill the descriptors
137 while (first != last){
138
139 tileName_t tileName = (first->second).get_tileName();
140 tile = m_tileMap[isam-1].find(tileName);
141
142 if (tile == m_tileMap[isam-1].end()){ // New tile found
143 float x = (first->second).x();
144 float y = (first->second).y();
145 unsigned int ntubes = 1;
146 TilePosition tp(x, y, ntubes);
147 m_tileMap[isam-1][tileName] = tp;
148 }
149 else{ // Existing tile
150 float x = (tile->second).x() + (first->second).x();
151 float y = (tile->second).y() + (first->second).y();
152 unsigned int ntubes = (tile->second).ntubes() + 1;
153 TilePosition tp(x, y, ntubes);
154 m_tileMap[isam-1][tileName] = tp;
155 }
156 ++first;
157 }
158
159 //
160 // List the number of tubes and tiles
161 //
162 // std::cout << "FCAL::create_tilemap: FCAL # " << isam
163 // << " Number of tiles = " << m_tileMap[isam-1].size()
164 // << " Number of tubes = " << m_tubeMap[isam-1].size()
165 // << std::endl;
166
167 // this->print_tubemap(isam);
168
169
170 //
171 // loop over tiles and set (x,y) to average tile positions
172 //
173 tileMap_const_iterator tilefirst = m_tileMap[isam-1].begin();
174 tileMap_const_iterator tilelast = m_tileMap[isam-1].end();
175 while (tilefirst != tilelast) {
176 // Tell clang to optimize assuming that FP exceptions can trap.
177 // Otherwise, it can vectorize the division, which can lead to
178 // spurious division-by-zero traps from unused vector lanes.
180 tileName_t tileName = tilefirst->first;
181 unsigned int ntubes = (tilefirst->second).ntubes();
182 float xtubes = (float) ntubes;
183 float x = (tilefirst->second).x() / xtubes;
184 float y = (tilefirst->second).y() / xtubes;
185 TilePosition tp(x, y, ntubes);
186 m_tileMap[isam-1][tileName] = tp;
187 ++tilefirst;
188 }
189
190}
#define y
#define x
bool first
Definition DeMoScan.py:534
#define CXXUTILS_TRAPPING_FP
Definition trapping_fp.h:24

◆ create_tileMap() [2/2]

void FCAL_ChannelMap::create_tileMap ( int isam)
private

◆ end() [1/2]

tileMap_const_iterator FCAL_ChannelMap::end ( int isam) const
inline

◆ end() [2/2]

tileMap_const_iterator FCAL_ChannelMap::end ( int isam) const
inline

◆ finish() [1/2]

◆ finish() [2/2]

void FCAL_ChannelMap::finish ( )

◆ getTileID() [1/2]

bool FCAL_ChannelMap::getTileID ( int isam,
float x,
float y,
int & eta,
int & phi ) const

-— For the new LArFCAL_ID Identifier

Definition at line 212 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

214{
215
216// /* ### MIRROR for compatibility between G3 and ASCII files ### */
217
218 float x = x_orig;
219 float y = y_orig;
220
221 if(m_invert_xy){
222 x = y_orig;
223 y = x_orig;
224 }
225
226 if(m_invert_x) x = -x;
227
228 /* === Compute the tubeID */
229 int ktx = (int) (x / m_tubeDx[isam-1]);
230 int kty = (int) (y / m_tubeDy[isam-1]);
231 if (x < 0.) ktx--;
232 if (y < 0.) kty--;
233
234 // S.M.: in case we lookup real positions inside the Tile (not only
235 // integer grids for the tubes) half of the time we are outisde a
236 // tube bin since the integer pattern of the tubes is like in this
237 // sketch:
238 //
239 // # # # #
240 // # # # #
241 // # # # #
242 //
243 // in order to avoid this problem we have to make sure the integer
244 // indices for x and y have either both to be even or both to be odd
245 // (For Module 0 one has to be odd the other even ...). We take the
246 // y-index and check for odd/even and change the x-index in case
247 // it's different from the first tube in the current sampling ...
248 //
249 // S.M. update: in case we are in a hole of the integer grid the
250 // relative x and y w.r.t to the original tube are used to assign a
251 // tube according to the hexagonal pattern.
252
253 tubemap_const_iterator it = m_tubeMap[isam-1].begin();
254 unsigned int firstId = it->first;
255
256 // take offset from actual map
257 int ix = ktx+((int)((firstId&0xffff)-it->second.x()/m_tubeDx[isam-1]))+1;
258 int iy = kty+((int)((firstId>>16)-it->second.y()/m_tubeDy[isam-1]))+1;
259
260 int isOddEven = (((firstId>>16)%2)+(firstId%2))%2;
261 bool movex = false;
262
263 if ( (iy%2) != ((ix+isOddEven)%2) ) {
264 double yc = y/m_tubeDy[isam-1] - kty - 0.5;
265 if ( fabs(yc) > 0.5/sqrt(3) ) {
266 double xk = x/m_tubeDx[isam-1] - ktx;
267 if ( xk > 0.5 ) {
268 xk = 1 - xk;
269 }
270 double yn = 0.5-xk*(1./3);
271 if ( fabs(yc) > fabs(yn) ) {
272 if ( yc > 0 )
273 iy++;
274 else
275 iy--;
276 }
277 else
278 movex = true;
279 }
280 else
281 movex = true;
282 if ( movex ) {
283 if ( x/m_tubeDx[isam-1] - ktx > 0.5 )
284 ix++;
285 else
286 ix--;
287 }
288 }
289
290 tubeID_t tubeID = (iy << 16) + ix;
291
292 it = m_tubeMap[isam-1].find(tubeID);
293 if (it != m_tubeMap[isam-1].end()){
294 tileName_t tilename = (it->second).get_tileName();
295 phi = tilename & 0xffff;
296 eta = tilename >> 16;
297 return true ;
298 }
299 // reach here only if it failed the second time.
300
301 return false;
302
303}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method

◆ getTileID() [2/2]

bool FCAL_ChannelMap::getTileID ( int isam,
float x,
float y,
int & eta,
int & phi ) const

-— For the new LArFCAL_ID Identifier

◆ getTubeByCopyNumber() [1/2]

FCAL_ChannelMap::tubemap_const_iterator FCAL_ChannelMap::getTubeByCopyNumber ( int isam,
int copyNo ) const

Definition at line 119 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

119 {
120 return m_tubeIndex[isam-1][copyNo];
121}

◆ getTubeByCopyNumber() [2/2]

tubemap_const_iterator FCAL_ChannelMap::getTubeByCopyNumber ( int isam,
int copyNo ) const

◆ invert_x() [1/2]

bool FCAL_ChannelMap::invert_x ( ) const
inline

set and get for the inversion flags

Definition at line 263 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h.

263 {
264return m_invert_x;
265}

◆ invert_x() [2/2]

bool FCAL_ChannelMap::invert_x ( ) const

set and get for the inversion flags

◆ invert_xy() [1/2]

bool FCAL_ChannelMap::invert_xy ( ) const
inline

◆ invert_xy() [2/2]

bool FCAL_ChannelMap::invert_xy ( ) const

◆ print_tubemap() [1/2]

void FCAL_ChannelMap::print_tubemap ( int isam) const

print functions

Definition at line 454 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

455{
457
458 std::cout << "First 10 elements of the New FCAL tube map : " << imap << std::endl;
459 std::stringstream coutx;
460 coutx.precision(5);
461 for ( int i=0; i<10; ++i, ++it)
462 coutx << std::hex << it->first << "\t"
463 << (it->second).get_tileName() << std::dec <<"\t"
464 << (it->second).x() <<"\t"
465 << (it->second).y() << std::endl;
466 std::cout<<coutx.str();
467}

◆ print_tubemap() [2/2]

void FCAL_ChannelMap::print_tubemap ( int isam) const

print functions

◆ set_invert_x() [1/2]

void FCAL_ChannelMap::set_invert_x ( bool flag)
inline

◆ set_invert_x() [2/2]

void FCAL_ChannelMap::set_invert_x ( bool )

◆ set_invert_xy() [1/2]

void FCAL_ChannelMap::set_invert_xy ( bool flag)
inline

◆ set_invert_xy() [2/2]

void FCAL_ChannelMap::set_invert_xy ( bool )

◆ tileSize() [1/4]

void FCAL_ChannelMap::tileSize ( int isam,
int ntubes,
float & dx,
float & dy ) const

Definition at line 390 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

390 {
391
392 dx = m_tubeDx[sam-1];
393 dy = m_tubeDy[sam-1];
394 // float ntubes = (it->second).ntubes();
395 if(sam == 1 || sam == 3) {
396 float scale =sqrt(ntubes);
397 dx = dx * scale;
398 dy = dy * scale;
399 }
400 else {
401 const float inv_1_5 = 1. / 1.5;
402 float scale = sqrt(ntubes * inv_1_5);
403 dx = dx * scale;
404 dy = dy * scale * 1.5 ;
405 }
406
407
408 // There is a fundamental discrepancy between dx and dy. A cell will
409 // contain twice as many distinct x-positions as y-positions. Diagram:
410
411 // . . . . -
412 //. . . . -
413 // . . . . - 4 x dy
414 // . . . . -
415 // ||||||||
416 // 8 x dx
417
418 dx = 2*dx;
419
420 if(m_invert_xy){
421 // switch xy
422 float temp = dx;
423 dx = dy;
424 dy = temp;
425 }
426
427}

◆ tileSize() [2/4]

void FCAL_ChannelMap::tileSize ( int isam,
int ntubes,
float & dx,
float & dy ) const

◆ tileSize() [3/4]

void FCAL_ChannelMap::tileSize ( int sam,
int eta,
int phi,
float & dx,
float & dy ) const

Definition at line 429 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

431{
432
433 tileName_t tilename = (eta << 16) + phi ;
434
435 tileMap_const_iterator it = m_tileMap[sam-1].find(tilename);
436 if(it != m_tileMap[sam-1].end()) {
437 int ntubes = (it->second).ntubes();
438 tileSize(sam,ntubes,dx,dy);
439 return ;
440 }
441 else {
442 // can't find the tile, throw exception.
443 char l_str[200] ;
444 snprintf(l_str, sizeof(l_str),
445 "Error in FCAL_ChannelMap::tilesize, wrong tile,phi= %d ,eta=: %d ",phi,eta);
446 std::string errorMessage(l_str);
447 throw std::range_error(errorMessage.c_str());
448 }
449}
void tileSize(int sam, int eta, int phi, float &dx, float &dy) const

◆ tileSize() [4/4]

void FCAL_ChannelMap::tileSize ( int sam,
int eta,
int phi,
float & dx,
float & dy ) const

◆ tubemap_begin() [1/2]

FCAL_ChannelMap::tubemap_const_iterator FCAL_ChannelMap::tubemap_begin ( int isam) const

tubeMap access functions

Definition at line 472 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

473{
474 return m_tubeMap[imap-1].begin();
475}

◆ tubemap_begin() [2/2]

tubemap_const_iterator FCAL_ChannelMap::tubemap_begin ( int isam) const

tubeMap access functions

◆ tubemap_end() [1/2]

FCAL_ChannelMap::tubemap_const_iterator FCAL_ChannelMap::tubemap_end ( int isam) const

Definition at line 480 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

481{
482 return m_tubeMap[imap-1].end();
483}

◆ tubemap_end() [2/2]

tubemap_const_iterator FCAL_ChannelMap::tubemap_end ( int isam) const

◆ tubemap_size() [1/2]

FCAL_ChannelMap::tubemap_sizetype FCAL_ChannelMap::tubemap_size ( int isam) const

Definition at line 487 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

488{
489 return m_tubeMap[imap-1].size();
490}

◆ tubemap_size() [2/2]

tubemap_sizetype FCAL_ChannelMap::tubemap_size ( int isam) const

◆ x() [1/2]

float FCAL_ChannelMap::x ( int isam,
int eta,
int phi ) const

For reconstruction, decoding of tile identifiers.

Definition at line 311 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

312{
313 if(m_invert_xy) {
314 return y1(isam,eta,phi);
315 }
316 return x1 (isam, eta, phi);
317}

◆ x() [2/2]

float FCAL_ChannelMap::x ( int isam,
int eta,
int phi ) const

For reconstruction, decoding of tile identifiers.

◆ x1()

float FCAL_ChannelMap::x1 ( int isam,
int eta,
int phi ) const
private

Definition at line 320 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

321{
322 float x;
323
324 tileName_t tilename = (eta << 16) + phi ;
325
326 tileMap_const_iterator it = m_tileMap[isam-1].find(tilename);
327 if(it != m_tileMap[isam-1].end())
328 {
329 x = (it->second).x();
330 } else
331 { // can't find the tile, throw exception.
332 char l_str[200] ;
333 snprintf(l_str, sizeof(l_str),
334 "Error in FCAL_ChannelMap::x, wrong tile,phi= %d ,eta=: %d ",phi,eta);
335 std::string errorMessage(l_str);
336 throw std::range_error(errorMessage.c_str());
337 }
338
339 if(m_invert_x) {
340 return -x;
341 }
342 else {
343 return x;
344 }
345
346 return x;
347
348}

◆ y() [1/2]

float FCAL_ChannelMap::y ( int isam,
int eta,
int phi ) const

Definition at line 355 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

356{
357 if(m_invert_xy){
358 return x1(isam,eta,phi);
359 }
360 return y1 (isam, eta, phi);
361}

◆ y() [2/2]

float FCAL_ChannelMap::y ( int isam,
int eta,
int phi ) const

◆ y1()

float FCAL_ChannelMap::y1 ( int isam,
int eta,
int phi ) const
private

Definition at line 364 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx.

365{
366 float y;
367
368 tileName_t tilename = (eta << 16) + phi ;
369
370 tileMap_const_iterator it = m_tileMap[isam-1].find(tilename);
371 if(it != m_tileMap[isam-1].end())
372 {
373 y = (it->second).y();
374 } else
375 { // can't find the tile, throw exception.
376 char l_str[200] ;
377 snprintf(l_str, sizeof(l_str),
378 "Error in FCAL_ChannelMap::x, wrong tile,phi= %d ,eta=: %d",phi,eta);
379 std::string errorMessage(l_str);
380 throw std::range_error(errorMessage.c_str());
381 }
382
383 return y;
384}

Member Data Documentation

◆ m_invert_x

bool FCAL_ChannelMap::m_invert_x
mutableprivate

◆ m_invert_xy

bool FCAL_ChannelMap::m_invert_xy
mutableprivate

◆ m_tileDx

double FCAL_ChannelMap::m_tileDx {}
private

◆ m_tileDy

double FCAL_ChannelMap::m_tileDy {}
private

◆ m_tileMap

tileMap_t FCAL_ChannelMap::m_tileMap
private

◆ m_tubeDx

double FCAL_ChannelMap::m_tubeDx {}
private

◆ m_tubeDy

double FCAL_ChannelMap::m_tubeDy {}
private

◆ m_tubeIndex

std::vector< tubemap_const_iterator > FCAL_ChannelMap::m_tubeIndex
private

◆ m_tubeMap

tubeMap_t FCAL_ChannelMap::m_tubeMap
private

◆ m_tubeSpacing

const double FCAL_ChannelMap::m_tubeSpacing = {0.75*Gaudi::Units::cm, 0.8179*Gaudi::Units::cm, 0.90*Gaudi::Units::cm}
staticprivate

Geometrical parameters here, in CLHEP::cm please to be compatible with G3.

Definition at line 25 of file LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h.


The documentation for this class was generated from the following files: