ATLAS Offline Software
TileDetDescrManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * Updates:
7  * - 2022 Jan, Riccardo Maria BIANCHI <riccardo.maria.bianchi@cern.ch>
8  * Added checks to catch issues when quantities needed
9  * to build the readout geometry are not set correctly.
10  */
11 
15 #include "GeoModelKernel/Units.h"
16 
19 #include "CaloIdentifier/TileID.h"
21 
22 #include "GaudiKernel/MsgStream.h"
23 #include "GaudiKernel/SystemOfUnits.h"
25 
26 #include <iostream>
27 #include <iomanip>
28 #include <cmath>
29 
30 
31 // 23-feb-2005
32 
53 // Temporary solution for cell volumes
54 #include "CellVolumes.h"
55 // ------------- Temporary solution for cell volumes
56 
58  : AthMessaging ("TileDetDescrManager")
59  , m_dbManager(dbManager)
60  , m_elements_created(false)
61  , m_tile_id(0)
62  , m_cell_id(0)
63  , m_tile_hwid(0)
64 {
65  setName("Tile");
66 }
67 
69 {
70  clear();
71 }
72 
73 // -------- Access to raw geometry: -----------
75 {
76  return m_treeTops.size();
77 }
78 
79 PVConstLink TileDetDescrManager::getTreeTop(unsigned int i) const
80 {
81  if (i<m_treeTops.size())
82  return m_treeTops[i];
83  else
84  return 0;
85 }
86 
87 // -------------- Add a Tree top: ------------
88 void TileDetDescrManager::addTreeTop(PVConstLink link)
89 {
90  m_treeTops.push_back(link);
91 }
92 
93 // --- Readonly access to TileDddbManager object ----
95 {
96  return m_dbManager.get();
97 }
98 
99 // --- Release DB Manager ---
101 {
102  m_dbManager.reset();
103 }
104 
106 {
107  std::cout << "TileDetDescrManager : " << std::endl;
108  std::cout << " Number of Tile regions : " << m_tile_region_vec.size() << std::endl;
109  std::cout << " Number of Tile descr : " << m_tile_descr_vec.size() << std::endl;
110 
113 
114  for (; first != last; ++first) {
115  (*first)->print();
116  }
117 
118  std::cout << " Number of Tile modules : "
119  << m_tile_module_vec.size() << std::endl;
120 
123  for (; first1 != last1; ++first1) {
124  (*first1)->print(); // too many !
125  }
126 
127  std::cout << " Number of Tile cells : "
128  << m_tile_cell_vec.size() << std::endl;
129 
132  for (; first2 != last2; ++first2) {
133  (*first2)->print(); // too many !
134  }
135 
136  std::cout << std::endl;
137 }
138 
140 {
142 }
144 {
145  ATH_MSG_INFO( "Entering create_elements()" );
146 
147  // resize vectors :
148  m_tile_module_vec.resize( (int) m_tile_id->module_hash_max(),0);
149  m_tile_cell_vec.resize( (int) m_tile_id->cell_hash_max(),0);
150 
151  IdContext module_context = m_tile_id->module_context();
152  IdContext cell_context = m_tile_id->cell_context();
153 
156 
157  int n_regions = 0;
158  int n_modules = 0;
159  int n_cells = 0;
160 
161  // For each descriptor :
162  ATH_MSG_DEBUG( "Looping over descriptors..." );
163 
164  for (; first != last; ++first) {
165 
167  Identifier reg_id = descr->identify();
168 
169  int section = m_tile_id->section(reg_id);
170  int side = m_tile_id->side(reg_id);
171 
172  double zshift = descr->zshift();
173  bool doZshift = (zshift != 0.0);
174 
175  int etasign = descr->sign_eta();
176  if (side != etasign) {
177  ATH_MSG_ERROR( "side and eta sign in TileDetDescriptor[" << n_regions
178  << "] do not match" );
179  }
180  ++n_regions;
181 
182  ATH_MSG_DEBUG( "descriptor - " << reg_id << ", " << section << ", " << side
183  << ", " << zshift << ", " << doZshift
184  << ", " << etasign << ", " << n_regions );
185 
186  int nsamp = descr->n_samp();
187 
188  int nphi = descr->n_phi();
189  double dphi = descr->dphi();
190  double phi_min = descr->phi_min();
191  double phi_max = descr->phi_max();
192 
193  // create calo descriptors per one calo sample firsrt ( 6 * 3 = 18 in total)
194  CaloDetDescriptor* caloDescr;
195 
196  int calo_sample0;
197  if ( m_tile_id->is_tile_barrel(reg_id))
198  calo_sample0 = (int)CaloCell_ID::TileBar0;
199  else if ( m_tile_id->is_tile_extbarrel(reg_id))
200  calo_sample0 = (int)CaloCell_ID::TileExt0;
201  else if ( m_tile_id->is_tile_gap(reg_id))
202  calo_sample0 = (int)CaloCell_ID::TileGap1 - 1;
203  else
204  calo_sample0 = CaloCell_ID::Unknown;
205  std::vector<double> depth_in(1);
206  std::vector<double> depth_out(1);
207 
208  bool gap = (nsamp > (int)TileID::SAMP_E);
209  for (int isamp=0; isamp<(int)TileID::SAMP_E; ++isamp) {
210 
211  int neta = descr->n_eta(isamp);
212 
213  if (neta>0) {
214  int neta = descr->n_eta(isamp);
215  double deta = descr->deta(isamp);
216  double emin = descr->eta_min(isamp);
217  double emax = descr->eta_max(isamp);
218  double rmin = descr->rcenter(isamp)-descr->dr(isamp)/2;
219  double rmax = descr->rcenter(isamp)+descr->dr(isamp)/2;
220  double zmin = descr->zcenter(isamp)-descr->dz(isamp)/2;
221  double zmax = descr->zcenter(isamp)+descr->dz(isamp)/2;
222  depth_in[0] = rmin;
223  depth_out[0] = rmax;
224 
225  if ((zmax+zmin)/2. < 0) {
226  double ztmp = zmax;
227  zmax = -zmin;
228  zmin = -ztmp;
229  }
230 
231  CaloCell_ID::CaloSample sample = (CaloCell_ID::CaloSample)(calo_sample0 + isamp);
232 
233  caloDescr = new CaloDetDescriptor(reg_id,(AtlasDetectorID *)m_tile_id,m_cell_id,sample,isamp);
234  // caloDescr->set_cylindric(emin,emax,phi_min,phi_max,rmin,rmax,zmin,zmax,gap);
235  // --
236  caloDescr->setCaloEtaMin(emin);
237  caloDescr->setCaloEtaMax(emax);
238  caloDescr->setCaloPhiMin(phi_min);
239  caloDescr->setCaloPhiMax(phi_max);
240  caloDescr->setCaloRMin(rmin);
241  caloDescr->setCaloRMax(rmax);
242  caloDescr->setCaloZMin(zmin);
243  caloDescr->setCaloZMax(zmax);
244  // --
245 
246  caloDescr->set_eta_phi_granularity(neta,deta,nphi,dphi);
247  caloDescr->set_n_calo_depth(1);
248  caloDescr->set_depth_in(depth_in);
249  caloDescr->set_depth_out(depth_out);
250  add_calodescr(caloDescr);
251  }
252  }
253 
254  // special case - all gap scin in one sample
255  if (gap) {
256  double emin = 1.e+10;
257  double emax =-1.e+10;
258  double rmin = 1.e+10;
259  double rmax =-1.e+10;
260  double zmin = 1.e+10;
261  double zmax =-1.e+10;
262 
263  for (int isamp=TileID::SAMP_E; isamp<nsamp; ++isamp) {
264 
265  int neta = descr->n_eta(isamp);
266 
267  if (neta>0) {
268  emin = std::min(emin,(double)descr->eta_min(isamp));
269  emax = std::max(emax,(double)descr->eta_max(isamp));
270  rmin = std::min(rmin,(double)(descr->rcenter(isamp)-descr->dr(isamp)/2));
271  rmax = std::max(rmax,(double)(descr->rcenter(isamp)+descr->dr(isamp)/2));
272  zmin = std::min(zmin,(double)(descr->zcenter(isamp)-descr->dz(isamp)/2));
273  zmax = std::max(zmax,(double)(descr->zcenter(isamp)+descr->dz(isamp)/2));
274  }
275  }
276 
277  if ((zmax+zmin)/2. < 0) {
278  double ztmp = zmax;
279  zmax = -zmin;
280  zmin = -ztmp;
281  }
282 
283  double deta = 0.1; // fixed deta for gap scin
284  int neta = (emax>1.65) ? 7 : 6; // fixed number of eta bins for gap scin - 6 for RUN1/RUN2, 7 for RUN3/RUN4
285  depth_in[0] = zmin;
286  depth_out[0] = zmax;
288 
290  // caloDescr->set_cylindric(emin,emax,phi_min,phi_max,rmin,rmax,zmin,zmax,true);
291  // --
292  caloDescr->setCaloEtaMin(emin);
293  caloDescr->setCaloEtaMax(emax);
294  caloDescr->setCaloPhiMin(phi_min);
295  caloDescr->setCaloPhiMax(phi_max);
296  caloDescr->setCaloRMin(rmin);
297  caloDescr->setCaloRMax(rmax);
298  caloDescr->setCaloZMin(zmin);
299  caloDescr->setCaloZMax(zmax);
300  // --
301 
302  caloDescr->set_eta_phi_granularity(neta,deta,nphi,dphi);
303  caloDescr->set_n_calo_depth(1);
304  caloDescr->set_depth_in(depth_in);
305  caloDescr->set_depth_out(depth_out);
306  add_calodescr(caloDescr);
307  }
308 
309 
310  double emin = 99999.0;
311  double emax =-99999.0;
312  double rmin = 99999.0;
313  double rmax =-99999.0;
314  std::vector<double> delr;
315 
316  for (int isamp=0; isamp<nsamp; ++isamp) {
317  delr.push_back(descr->dr(isamp));
318  emin = std::min(emin,(double)descr->eta_min(isamp));
319  emax = std::max(emax,(double)descr->eta_max(isamp));
320  rmin = std::min(rmin,(double)(descr->rcenter(isamp)-descr->dr(isamp)/2));
321  rmax = std::max(rmax,(double)(descr->rcenter(isamp)+descr->dr(isamp)/2));
322  }
323  if (emin < 0.0 ) emin = 0.0; // avoid emin = -0.1 because of D0 in barrel
324  if (etasign < 0) {
325  double etmp = emax;
326  emax = -emin;
327  emin = -etmp;
328  }
329 
330  // and now create calo descriptors per every module ( 6 * 64 = 384 in total)
331  double phi = descr->phi_min() + dphi/2.;
332 
333  for (int iphi=0; iphi<nphi; ++iphi) {
334 
335  int module = iphi; // we count modules from 0 to N always
336 
337  // Temporary solution for cell volumes
338  int volumeIndex = 0;
339  // ------------ Temporary solution for cell volumes
340 
341  CaloDetDescriptor* modDescr;
342 
343  try {
345  IdentifierHash idhash;
346  /* int result = */ m_tile_id->get_hash(id,idhash,&module_context);
348  // modDescr->set_cylindric(emin,emax,phi-dphi/2.,phi+dphi/2,rmin,rmax);
349  // --
350  modDescr->setCaloEtaMin(emin);
351  modDescr->setCaloEtaMax(emax);
352  modDescr->setCaloPhiMin(phi-dphi/2.);
353  modDescr->setCaloPhiMax(phi+dphi/2.);
354  modDescr->setCaloRMin(rmin);
355  modDescr->setCaloRMax(rmax);
356  modDescr->setCaloZMin(rmin*sinh(emin));
357  modDescr->setCaloZMax(rmax*sinh(emax));
358 
359  // --
360  // modDescr->set_depth(delr,nsamp);
361  modDescr->set_n_calo_depth(nsamp);
362  modDescr->set_depth_in(delr);
363  add_module(idhash,modDescr);
364  ++n_modules;
365  } catch ( const TileID_Exception& ) {
366  ATH_MSG_ERROR( "can't build module ID from ("
367  << section << ","
368  << side << ","
369  << module << ")" );
370  continue;
371  }
372 
373  for (int isamp=0; isamp<nsamp; ++isamp) {
374 
375  int neta = descr->n_eta(isamp);
376 
377  if (neta>0) {
378 
379  int sample = std::min(isamp,(int)TileID::SAMP_E); // all gap scin are in sampling 3
380  double rcenter = descr->rcenter(isamp);
381  double dr = descr->dr(isamp);
382 
383  double deta = descr->deta(isamp);
384  double eta = descr->eta_min(isamp) + deta/2.; // this is unsigned eta
385 
386  for (int ieta=0; ieta<neta; ++ieta) {
387 
388  int tower = (sample == (int)TileID::SAMP_E) ? isamp : (int)((eta + 0.01) * 10); // tower number in 0.1 granularity
389 
390  try {
391  Identifier id = m_tile_id->cell_id(section,side,module,tower,sample,checks);
392  IdentifierHash idhash;
393  /* int result = */ m_tile_id->get_hash(id,idhash,&cell_context);
394 
397 
398  TileCellDim* cell_dim = get_cell_dim(id);
399 
400  // ideal eta/phi for all the cells
401  elt->set_cylindric_raw(eta*etasign,phi,rcenter);
402 
403  if (doZshift) {
404 
405  double eta1 = shiftEta(eta-deta/2,rcenter,zshift);
406  double eta2 = shiftEta(eta+deta/2,rcenter,zshift);
407 
408  if (0 == iphi) {
409  ATH_MSG_VERBOSE( "side/sec/mod/twr/samp="
410  <<side<<"/"<<section<<"/"<<module<<"/"<<tower<<"/"<<sample
411  << " rcen = "<<rcenter
412  << " dr = "<<dr
413  << " eta = " << eta
414  << " eta1 = " << eta1
415  << " eta2 = " << eta2
416  << " eta' = " << (eta1+eta2)/2.
417  << " deta = " << (eta2-eta1)
418  << " iphi = " << iphi
419  << " dphi = " << dphi );
420  }
421 
422  elt->set_cylindric((eta1+eta2)/2.*etasign,phi,rcenter);
423 // elt->set_cylindric_size((eta2-eta1),dphi,dr);
424 // keep ideal deta for the cell (0.1 or 0.2) instead of (eta2-eta1),
425 // otherwise algorithms which use "eta_raw" and "deta" might fail
426 // elt->set_cylindric_size(deta,dphi,dr);
427  elt->set_deta(deta);
428  elt->set_dphi(dphi);
429  elt->set_dr(dr);
430 
431  } else {
432 
433  if (0 == iphi) {
434  ATH_MSG_VERBOSE( "side/sec/mod/twr/samp="
435  <<side<<"/"<<section<<"/"<<module<<"/"<<tower<<"/"<<sample
436  << " rcen = "<<rcenter
437  << " dr = "<<dr
438  << " eta = " << eta
439  << " deta = " << deta
440  << " iphi = " << iphi
441  << " dphi = " << dphi );
442  }
443 
444  elt->set_cylindric(eta*etasign,phi,rcenter);
445  // elt->set_cylindric_size(deta,dphi,dr);
446  elt->set_deta(deta);
447  elt->set_dphi(dphi);
448  elt->set_dr(dr);
449  }
450 
451  // Temporary solution for cell volumes
452  if (section == TileID::BARREL && side == -1 && ieta == 0 && sample == 2)
453  ++volumeIndex; // skip D0 in negative side
454  if (section == TileID::BARREL)
455  elt->set_volume(vBarrelCells[volumeIndex++]);
456  else if (section == TileID::EXTBAR)
457  elt->set_volume(vExtendedCells[volumeIndex++]);
458  else if (section == TileID::GAPDET)
459  elt->set_volume(vItcGapCells[volumeIndex++]);
460 
461  // ----------------- Final solution for cell volumes
462  if (cell_dim) {
463 
464  double oldz = elt->z();
465  double olddz = elt->dz();
466  int ic=cell_dim->getNRows()-1;
467  double z1=0,z2=0;
468  if (side < 0) {
469  z1 = cell_dim->getZMax(0);
470  for ( ; ic>=0; --ic) {
471  z2 = cell_dim->getZMin(ic);
472  if (0 == iphi)
473  ATH_MSG_DEBUG( "z2: " << z2 << ", ZMax: " << cell_dim->getZMax(ic) << ", diff: " << z2-cell_dim->getZMax(ic) );
474  if (fabs(z2-cell_dim->getZMax(ic))>0.1) break;
475  }
476  } else {
477  z1 = cell_dim->getZMin(0);
478  for ( ; ic>=0; --ic) {
479  z2 = cell_dim->getZMax(ic);
480  if (0 == iphi)
481  ATH_MSG_DEBUG( "z2: " << z2 << ", ZMin: " << cell_dim->getZMin(ic) << ", diff: " << z2-cell_dim->getZMin(ic) );
482  if (fabs(z2-cell_dim->getZMin(ic))>0.1) break;
483  }
484  }
485 
486  if (ic<0) {
487  ATH_MSG_WARNING( "TileDetDescrManager -- ic < 0! Expect crashes or misbehavior! ==> This should be checked, because 'ic' should be related to the numbers of rows!! Note: 'ic' gets < 0 when z2-cell_dim is too small and does not make the above loop break; that can be caused, for example, if 'barrelPeriodThickness' and 'extendedPeriodThickness' are not set (or set to the default 0. value) and, as a result, ZMax is not properly set." );
488  }
489 
490  double z = (z1+z2)/2.;
491 
492  // D-layer has cells that are centered at 0.
493  // For these cells, the above calculation will usually
494  // come out to ~ 1e-14, the exact value varying depending
495  // on platform. For reproducibility, force very small
496  // numbers to 0.
497  if (std::abs(z) < 1e-8 * Gaudi::Units::mm) {
498  if (0 == iphi)
499  ATH_MSG_DEBUG( "Cell D0 - put cell center at Z=0" );
500  z = 0;
501  }
502 
503  double dz = 0.5 * fabs(cell_dim->getZMax(0) // special
504  -cell_dim->getZMin(0) // calculations
505  +cell_dim->getZMax(ic) // to get BC cells
506  -cell_dim->getZMin(ic)); // size and position right
507 
508  if (section == TileID::BARREL && sample==1 && tower < 8) {
509  if (msgLvl (MSG::VERBOSE) && 0 == iphi) {
510  double z1 = 0.5*(cell_dim->getZMax(0)+cell_dim->getZMin(0));
511  double dz1 = fabs(cell_dim->getZMax(0)-cell_dim->getZMin(0));
512  double z2 = 0.5*(cell_dim->getZMax(ic)+cell_dim->getZMin(ic));
513  double dz2 = fabs(cell_dim->getZMax(ic)-cell_dim->getZMin(ic));
514  ATH_MSG_VERBOSE( "old z/dz: " << oldz << " " << olddz << std::endl
515  <<"new z/dz: " << z << " " << dz << " ( B: " << z1 << " " << dz1 << " C: " << z2 << " " << dz2 << " ) "
516  << z/oldz*100-100 << " % diff "
517  <<"do not change z/dz for BC cells in barrel" );
518  }
519  } else if ( (section == TileID::GAPDET) && (sample == TileID::SAMP_E) ) {
520 
521  elt->set_z( descr->zcenter(isamp) );
522  elt->set_dz( descr->dz(isamp) );
523  if (0 == iphi) {
524  ATH_MSG_VERBOSE( "old z/dz: " << oldz << " " << olddz << std::endl
525  <<"new z/dz: " << elt->z() << " " << elt->dz() << " "
526  << elt->z()/oldz*100-100 << " % diff "
527  <<"use z/dz from descriptor for E cells" );
528  }
529 
530  } else {
531  // elt->set_z_pos_and_size(z,dz);
532  elt->set_z(z);
533  elt->set_dz(dz);
534  if (0 == iphi) {
535  ATH_MSG_VERBOSE( "old z/dz: " << oldz << " " << olddz << std::endl
536  <<"new z/dz: " << elt->z() << " " << elt->dz() << " "
537  << elt->z()/(oldz+1.e-10)*100-100 << " % diff" );
538  }
539  }
540 
541 
542  double oldr = elt->r();
543  double olddr = elt->dr();
544  double r1 = cell_dim->getRMin(0);
545  double r2 = cell_dim->getRMax(ic);
546  // elt->set_r_pos_and_size((r1+r2)/2.,fabs(r2-r1));
547 
548  elt->set_r((r1+r2)/2.);
549  elt->set_dr(fabs(r2-r1));
550  if (0 == iphi) {
551  ATH_MSG_VERBOSE( "old r/dr: " << oldr << " " << olddr << std::endl
552  <<"new r/dr: " << elt->r() << " " << elt->dr() << " "
553  << elt->r()/(oldr+1.e-10)*100-100 << " % diff" );
554  }
555 
556  double oldv=elt->volume();
557  double newv = cell_dim->getVolume(); // ps cell volume to correct for special cells
558  elt->set_volume(newv);
559  //
560  // ps cutout region in ext. barrel
561  //
562  int ModuleNcp = module + 1;
563 
564  if ( ( section == TileID::EXTBAR ) && ( TileID::SAMP_A == sample ) && ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) && ( (tower == 11) || (tower == 12) || (tower == 15) ) )
565  {
566  double oldv=elt->volume();
567 
568  if (msgLvl (MSG::VERBOSE)) {
569  ATH_MSG_VERBOSE( "CUTOUT CELL VOLUME UPDATE"<< std::endl
570  <<"old volume: " << oldv << std::endl
571  << " iphi = " << iphi
572  << " phi = " << (module + 0.5)*dphi <<" phi2 = "<<elt->phi()
573  << std::endl
574  << " Mod# = " << ModuleNcp <<" module = "<<module<<" tower = "<<tower
575  << std::endl
576  <<"sample = "<<sample
577  <<" A = " << (TileID::SAMP_A == sample)
578  <<" BC = "<< (TileID::SAMP_BC == sample)
579  <<" D = " << (TileID::SAMP_D == sample)
580  <<" ---------------------" );
581  cell_dim->print();
582  }
583 
584  double Radius2HL = tan ( M_PI / 64. );
585 
586  m_dbManager->SetCurrentSection(TileID::EXTBAR);
587  double epThickness = 0.0; // only used for tower == 15
588  double epVolume = 0.0; // only used for tower == 15
589  if ( tower == 15 ) epThickness = m_dbManager->TILBdzend2() * Gaudi::Units::cm;
590 
591  double volumeInRow[5]; // book large array
592  for (int iRow = 0; iRow < 5; iRow++) volumeInRow[iRow] = 0.;
593 
594 
595  for (unsigned int iRow = 0; iRow < cell_dim->getNRows(); iRow++)
596  {
597  double rowVolume = cell_dim->computeRowVolume(iRow);
598  double oldrv = rowVolume;
599 
600  ATH_MSG_VERBOSE( " *** rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] );
601 
602  ATH_MSG_DEBUG( "Computing radMax and deltaZ..." );
603  double radMax = cell_dim->getRMax(iRow), radMin = cell_dim->getRMin(iRow);
604  double deltaZ = cell_dim->getZMax(iRow) - cell_dim->getZMin(iRow);
605 
606  ATH_MSG_VERBOSE( "deltaz = "<<deltaZ<<" rmax = "<<radMax<<" rmin = "<<radMin<<" rowVolume = "<<rowVolume<<" oldrv = "<<oldrv<<" irow = "<<iRow<<" tower = "<<tower );
607 
608  if ( 15 == tower )
609  {
610  if ( m_dbManager->addPlatesToCell() )
611  {
612  epVolume = ( rowVolume/deltaZ ) * epThickness;
613  rowVolume -= epVolume;
614  deltaZ -= epThickness;
615 
616  ATH_MSG_VERBOSE( " \t\t epV = "<<epVolume<<" epT = "<<epThickness << " diff = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
617  }
618 
619  volumeInRow[iRow] += (rowVolume * (32./48) ); // the remaining 32 periods which are not cutted out
620  deltaZ *= 16./48.; // dz of the cutted part
621  rowVolume *= 16./48.; // volume of the cutted part of the cell, but before cut
622  ATH_MSG_VERBOSE( " *** 15 rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] <<" diff = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
623  }
624  else if ( 12 == tower )
625  {
626  volumeInRow[iRow] += (rowVolume * (2./25) ); // the remaining 2 periods which are not cutted out
627  deltaZ *= 23./25.; // dz of the cutted part
628  rowVolume *= 23./25.; // volume of the cutted part of the cell, but before cut
629  ATH_MSG_VERBOSE( " *** 12 rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] << " % = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
630  }
631 
632  ATH_MSG_VERBOSE( "deltaz = "<<deltaZ<<" rmax = "<<radMax<<" rmin = "<<radMin<<" changed dz ?"<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
633 
634  if ( (ModuleNcp == 61) || (ModuleNcp == 36) )
635  {
636  if ( iRow == 0 )
637  rowVolume = 0.;
638  else if ( iRow == 1 )
639  {
640  if (15 != tower)
641  {
642  rowVolume = 2.*radMax + radMin;
643  rowVolume *= 0.5*(radMax - radMin);
644  rowVolume *= Radius2HL * deltaZ;
645  }
646  else
647  {
648  rowVolume += epVolume;
649  }
650  }
651  else if (15 == tower) rowVolume += epVolume;
652 
653  volumeInRow[iRow] += rowVolume;
654 
655  ATH_MSG_VERBOSE( " *** rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] << " % = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
656  } // Module 61 36
657 
658  if ( (ModuleNcp == 62) || (ModuleNcp == 35) )
659  {
660  if ( iRow == 0 )
661  {
662  if (15 == tower)
663  {
664  rowVolume = radMax + radMin;
665  rowVolume *= (radMax - radMin);
666  rowVolume -= 0.5*radMin*(27*Gaudi::Units::mm);
667  rowVolume *= Radius2HL * ( deltaZ + epThickness ); // adding volume of cutted endplate
668  }
669  else
670  {
671  rowVolume = radMax - radMin - 35*Gaudi::Units::mm;
672  rowVolume *= (radMax + radMin);
673  rowVolume *= Radius2HL * deltaZ;
674  }
675  }
676  else if (15 == tower) rowVolume += epVolume;
677 
678  volumeInRow[iRow] += rowVolume;
679  ATH_MSG_VERBOSE( " *** rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] << " % = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
680  } // Module 62 35
681 
682  if ( (ModuleNcp == 60) || (ModuleNcp == 37) )
683  {
684  double deltax = 38.7*std::cos(25.3125*Gaudi::Units::deg);
685  double pstan = std::tan(25.3125*Gaudi::Units::deg);
686  double inv_pstan = 1. / pstan;
687  if ( ( 15 == tower ) )
688  {
689  if ( iRow < 2 )
690  rowVolume = 0;
691  else
692  rowVolume += epVolume;
693  }
694  else if ( iRow == 0 )
695  {
696  rowVolume = (radMax + radMin) * Radius2HL ;
697 
698  rowVolume += 2.*deltax + (radMax - radMin)* pstan ;
699 
700  // std::cout <<"\t\t\t test = "<<( 2.*deltax + (radMax - radMin)* pstan)/(radMax + radMin)* Radius2HL<<" dx = "<<deltax<<" rmin = "<<radMin<<" rmax = "<<radMax<<" pstan = "<<pstan<<std::endl;
701 
702  rowVolume *= 0.5 * (radMax - radMin) * deltaZ;
703 
704  // rowVolume *= (radMax - radMin) * Radius2HL * deltaZ;
705  }
706  else if ( iRow == 1 )
707  {
708  double radMin0 = cell_dim->getRMin(0);
709  rowVolume = (radMax + radMin) * Radius2HL;
710  rowVolume += 2.*deltax + (radMax + radMin - 2.*radMin0 )* pstan ;
711  rowVolume *= 0.5 * (radMax - radMin) ;
712  rowVolume -= 0.5 * std::pow( deltax + (radMax - radMin0) * pstan - radMax * Radius2HL, 2) * inv_pstan;
713  rowVolume *= deltaZ;
714  }
715 
716  volumeInRow[iRow] += rowVolume;
717  ATH_MSG_VERBOSE( " *** rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] << " % = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
718  } // Module 60 37
719 
720  ATH_MSG_VERBOSE( " *** rowVolume = "<<rowVolume<<" volumeInRow = "<< volumeInRow[iRow] << " % = "<<(volumeInRow[iRow] - oldrv)/oldrv*100. );
721  } // for iRow
722 
723 
724  double totalVolume = 0;
725  for (unsigned int iRow = 0; iRow < cell_dim->getNRows(); iRow++) totalVolume += volumeInRow[iRow];
726  elt->set_volume( totalVolume );
727 
728  ATH_MSG_VERBOSE( "\n total volume = "
729  << elt->volume() << " cell_dim xCheck ( "
730  << cell_dim->getVolume() <<" ) "
731  << elt->volume()/oldv*100-100 << " % diff" );
732 
733 
734  ATH_MSG_VERBOSE( "-----------------------------------------------" );
735  }
736  //
737  // ps special D4
738  //
739  if ( (section == TileID::GAPDET) && (sample == TileID::SAMP_D) )
740  {
741  if (side == -1) m_dbManager->SetCurrentEnvByType(4);
742  if (side == 1) m_dbManager->SetCurrentEnvByType(5);
743 
744  m_dbManager->SetCurrentModuleByIndex(module);
745  m_dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1);
746  int Id4 = int(fmod(m_dbManager->GetModType(),10));
747  m_dbManager->SetCurrentSection(Id4);
748 
749  double standardD4dz = elt->dz();
750  double specialD4dz = m_dbManager->TILBdzmodul()*Gaudi::Units::cm;
751  if (! m_dbManager->addPlatesToCell()) specialD4dz -= m_dbManager->TILBdzend1()*Gaudi::Units::cm;
752  // special case of non-existing D4 in EBA15 and EBC18
753  // if ( Id4 == 8 ) specialD4dz = 0.; commented out - don't set size to zero - it'll be used in TICAL derivation code
754 
755  if (elt->z() > 0.)
756  elt->set_z(elt->z()+0.5*(standardD4dz-specialD4dz));
757  else
758  elt->set_z(elt->z()-0.5*(standardD4dz-specialD4dz));
759  elt->set_dz(specialD4dz);
760  elt->set_volume(newv * specialD4dz/(standardD4dz));
761 
762  if (Id4 > 3) {
763  ATH_MSG_VERBOSE( "spD4 old z/dz: " << oldz << " " << standardD4dz << std::endl
764  <<"spD4 new z/dz: " << elt->z() << " " << elt->dz() << " "
765  << elt->z()/(oldz+1.e-10)*100-100 << " % diff" );
766 
767  ATH_MSG_VERBOSE( "spD4 old volume: " << oldv << std::endl
768  <<"spD4 new volume: " << elt->volume() << " "
769  << elt->volume()/oldv*100-100 << " % diff"
770  << " iphi = " << iphi
771  << " dphi = " << dphi << " phi = " << (module + 0.5)*dphi - M_PI <<" phi2 = "<<elt->phi() );
772  }
773  }
774  //
775  // ps special C10
776  //
777 
778  /*
779  if ( (section == TileID::GAPDET) && (sample == TileID::SAMP_C) )
780  {
781  if (side == -1) m_dbManager->SetCurrentEnvByType(4);
782  if (side == 1) m_dbManager->SetCurrentEnvByType(5);
783 
784  m_dbManager->SetCurrentModuleByIndex(module);
785  m_dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2);
786  int Ic10 = int(fmod(m_dbManager->GetModType()/100,100));
787 
788  double standardC10dz = elt->dz();
789  double standardC10vol = elt->volume();
790 
791  if ( Ic10 == 14 )
792  {
793  m_dbManager->SetCurrentSection( Ic10 );
794  m_dbManager->SetCurrentScin( m_dbManager->TILBcurscint() );
795 
796  double specialC10dz = m_dbManager->SCNTdt();
797  elt->set_dz(specialC10dz);
798  elt->set_volume(standardC10vol * specialC10dz/standardC10dz );
799 
800  if ( m_verbose )
801  std::cout<<"C10 old z/dz: " << oldz << " " << standardC10dz << std::endl
802  <<"C10 new z/dz: " << elt->z() << " " << elt->dz() << " "
803  << elt->z()/(oldz+1.e-10)*100-100 << " % diff" << std::endl;
804  if ( m_verbose )
805  std::cout<<"spC10 old volume: " << newv << std::endl
806  <<"spC10 new volume: " << elt->volume() << " "
807  << elt->volume()/oldv*100-100 << " % diff"
808  << " iphi = " << iphi
809  << " dphi = " << dphi
810  << std::endl;
811  }
812  }
813  */
814 
815  //
816  // ps special D5+D4
817  //
818  if ( (section == TileID::EXTBAR) && (sample == TileID::SAMP_D) && (tower == 10) )
819  {
820  // this is needed to read special D4 type and its size
821  if (side == -1) m_dbManager->SetCurrentEnvByType(4);
822  if (side == 1) m_dbManager->SetCurrentEnvByType(5);
823  m_dbManager->SetCurrentModuleByIndex(module);
824  m_dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1);
825  int Id4 = int(fmod(m_dbManager->GetModType(),10));
826  m_dbManager->SetCurrentSection(Id4);
827 
828  if ( Id4 == 8 )
829  {
830  oldz = elt->z();
831  double standardD5dz = elt->dz();
832  double specialD4dz = m_dbManager->TILBdzmodul()*Gaudi::Units::cm;
833  double specialD4Rin = m_dbManager->TILBrmin()*Gaudi::Units::cm;
834  if (m_dbManager->addPlatesToCell()) {
835  specialD4Rin -= m_dbManager->TILBdrfront()*Gaudi::Units::cm;
836  } else {
837  specialD4dz -= m_dbManager->TILBdzend1()*Gaudi::Units::cm;
838  }
839  double newS = (pow((elt->r() + elt->dr()/2.),2) - specialD4Rin*specialD4Rin)/(2.*elt->r()*elt->dr());
840  elt->set_volume(elt->volume()* (1. + newS*specialD4dz/standardD5dz));
841  /* commented out - don't change z and dz for special D5+D4
842  elt->set_dz(specialD4dz + standardD5dz);
843  if (elt->z() > 0.)
844  elt->set_z(elt->z()-0.5*specialD4dz);
845  else
846  elt->set_z(elt->z()+0.5*specialD4dz);
847  */
848 
849  ATH_MSG_VERBOSE( "D5 old z/dz: " << oldz << " " << standardD5dz << " spD4 dz: " << specialD4dz );
850  ATH_MSG_VERBOSE( "D5+D4 new z/dz: " << elt->z() << " " << elt->dz() << " " );
851  ATH_MSG_VERBOSE( "D5+D4 old volume: " << newv << std::endl
852  <<"D5+D4 new volume: " << elt->volume() << " "
853  << elt->volume()/oldv*100-100 << " % diff"
854  << " iphi = " << iphi
855  << " dphi = " << dphi <<" Id4 = "<< Id4 <<" modType = "<<m_dbManager->GetModType()
856  << " phi = " << (module + 0.5)*dphi - M_PI<<" phi2 = "<<elt->phi() );
857  ATH_MSG_VERBOSE( " module = "<< module
858  << " sample = " << sample
859  << " section = " << section
860  << " tower = " << tower );
861  }
862  }
863 
864  if (0 == iphi) {
865  ATH_MSG_VERBOSE( "old volume: " << oldv << std::endl
866  <<"new volume: " << elt->volume() << " "
867  << elt->volume()/oldv*100-100 << " % diff"
868  << " iphi = " << iphi
869  << " dphi = " << dphi );
870  }
871  }
872 
873  add_cell(elt);
874  ++n_cells;
875  } catch ( const TileID_Exception& ) {
876  ATH_MSG_ERROR( "can't build cell ID from ("
877  << section << "," << side << "," << module << ","
878  << tower << "," << sample << ")" );
879  }
880  eta += deta;
881  }
882  }
883  }
884  phi += dphi;
885  }
886  }
887 
888  ATH_MSG_DEBUG( n_cells << " cells and "
889  << n_modules << " half-modules were created for "
890  << n_regions << " Tile Regions" );
891 }
892 
893 
895 {
896  m_tile_region_vec.push_back(region);
897  m_tile_region_map[region->identify().get_identifier32().get_compact()] = region;
898 }
899 
901 {
902  m_tile_descr_vec.push_back(descriptor);
903 }
904 
906 {
907  int index = descr->getSampling(0)*descr->calo_sign();
908  m_calo_descr_vec.push_back(descr);
910 
911  ATH_MSG_VERBOSE( "new Tile CaloDetDescriptor" );
912  ATH_MSG_VERBOSE( " index " << index );
913  ATH_MSG_VERBOSE( " calo_sample " << descr->getSampling(0) );
914  ATH_MSG_VERBOSE( " calo_sign " << descr->calo_sign() );
915  ATH_MSG_VERBOSE( " layer " << descr->layer() );
916  ATH_MSG_VERBOSE( " is tile " << ((descr->is_tile()) ? "true" : "false" ) );
917  // ATH_MSG_VERBOSE( " is cylindric " << (descr->is_cylindric() ? "true" : "false") );
918  // ATH_MSG_VERBOSE( " is ec_cylindric " << (descr->is_ec_cylindric() ? "true" : "false") );
919  ATH_MSG_VERBOSE( " deta " << descr->deta() );
920  ATH_MSG_VERBOSE( " dphi " << descr->dphi() );
921  ATH_MSG_VERBOSE( " n_eta " << descr->n_eta() );
922  ATH_MSG_VERBOSE( " n_phi " << descr->n_phi() );
923  ATH_MSG_VERBOSE( " calo_eta_min " << descr->calo_eta_min() );
924  ATH_MSG_VERBOSE( " calo_eta_max " << descr->calo_eta_max() );
925  ATH_MSG_VERBOSE( " calo_phi_min " << descr->calo_phi_min() );
926  ATH_MSG_VERBOSE( " calo_phi_max " << descr->calo_phi_max() );
927  ATH_MSG_VERBOSE( " calo_r_min " << descr->calo_r_min() );
928  ATH_MSG_VERBOSE( " calo_r_max " << descr->calo_r_max() );
929  ATH_MSG_VERBOSE( " calo_z_min " << descr->calo_z_min() );
930  ATH_MSG_VERBOSE( " calo_z_max " << descr->calo_z_max() );
931 }
932 
934 {
935  m_tile_module_vec[idhash] = module;
936  m_tile_module_map[module->identify().get_identifier32().get_compact()] = module;
937 }
938 
940 {
941  m_tile_cell_vec[cell->subcalo_hash()] = cell;
942  unsigned int id = m_tile_id->cell_id(cell->subcalo_hash()).get_identifier32().get_compact();
944 }
945 
946 void TileDetDescrManager::add_cellDim(int section, int side, int tower, int sample, TileCellDim* cellDim)
947 {
948  unsigned int ID = m_tile_id->cell_id(section,side,0,tower,sample).get_identifier32().get_compact();
949  m_cell_dim_map[ID] = cellDim;
950 }
951 
953 {
954  int section = m_tile_id->section(cell_id);
955  if (section == Tile_Base_ID::AUXDET) return NULL;
956  int side = m_tile_id->side(cell_id);
957  int tower = m_tile_id->tower(cell_id);
958  int sample = m_tile_id->sample(cell_id);
959 
960  unsigned int newCell = m_tile_id->cell_id(section,side,0,tower,sample).get_identifier32().get_compact();
961  if (m_cell_dim_map.find(newCell) != m_cell_dim_map.end()) {
962  return (*m_cell_dim_map.find(newCell)).second;
963  } else {
964  return NULL;
965  }
966 }
967 
969 {
970  // Remove regions and descriptors
973  for (; first != last; ++first) delete (*first);
974  m_tile_region_vec.clear();
975 
978  for (; first2 != last2; ++first2) delete (*first2);
979  m_tile_descr_vec.clear();
980 
983  for (; first3 != last3; ++first3) delete (*first3);
984  m_tile_module_vec.clear();
985 
988  for (; first4 != last4; ++first4) delete (*first4);
989  m_tile_cell_vec.clear();
990 
991  // Remove Cell Dim's
992  cell_dim_map::const_iterator first5 = m_cell_dim_map.begin();
993  cell_dim_map::const_iterator last5 = m_cell_dim_map.end();
994  for (; first5 != last5; ++first5) delete (*first5).second;
995 
996  // clear cell descriptors used in CaloDetDescrManager
999  for (; first6 != last6; ++first6) delete (*first6);
1000  m_calo_descr_vec.clear();
1001 }
Tile_Base_ID::module_id
Identifier module_id(int section, int side, int module) const
Definition: Tile_Base_ID.cxx:505
TileDetDescrManager::tile_descriptors_begin
tile_descr_const_iterator tile_descriptors_begin() const
Definition: TileDetDescrManager.h:101
TileDetDescrManager::get_cell_dim
TileCellDim * get_cell_dim(const Identifier &cell_id) const
Definition: TileDetDescrManager.cxx:952
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
Tile_Base_ID::cell_hash_max
size_type cell_hash_max(void) const
Definition: Tile_Base_ID.cxx:1313
TileDetectorElement::set_dphi
void set_dphi(double dphi)
set cylindric size dphi
Definition: CaloDetectorElements.h:358
TileDetDescrManager::add_cellDim
void add_cellDim(int section, int side, int tower, int sample, TileCellDim *cellDim)
Definition: TileDetDescrManager.cxx:946
TileDddbManager_ptr
std::shared_ptr< TileDddbManager > TileDddbManager_ptr
Definition: TileDetDescrManager.h:28
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
max
#define max(a, b)
Definition: cfImp.cxx:41
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
TileDddbManager::TILE_PLUG1
@ TILE_PLUG1
Definition: TileDddbManager.h:44
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
TileDetDescrManager::m_cell_id
const CaloCell_ID * m_cell_id
Definition: TileDetDescrManager.h:212
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TileCellDim::computeRowVolume
double computeRowVolume(int iRow)
Definition: TileCellDim.cxx:103
Tile_Base_ID::is_tile_gap
bool is_tile_gap(const Identifier &id) const
Definition: Tile_Base_ID.cxx:223
TileDetDescrManager::m_tile_cell_map
calo_element_map m_tile_cell_map
Definition: TileDetDescrManager.h:229
TileDetDescrManager::add_cell
void add_cell(CaloDetDescrElement *cell)
Definition: TileDetDescrManager.cxx:939
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Tile_Base_ID::cell_context
IdContext cell_context(void) const
id for cells
Definition: Tile_Base_ID.cxx:1059
PixelAthClusterMonAlgCfg.zmin
zmin
Definition: PixelAthClusterMonAlgCfg.py:176
index
Definition: index.py:1
TileDetDescrManager::addTreeTop
void addTreeTop(PVConstLink)
Definition: TileDetDescrManager.cxx:88
CaloCell_ID_FCS::TileExt0
@ TileExt0
Definition: FastCaloSim_CaloCell_ID.h:37
Tile_Base_ID::SAMP_A
@ SAMP_A
Definition: Tile_Base_ID.h:53
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
Tile_Base_ID::SAMP_BC
@ SAMP_BC
Definition: Tile_Base_ID.h:54
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
TileCellDim::getVolume
double getVolume() const
Definition: TileCellDim.h:26
Tile_Base_ID::AUXDET
@ AUXDET
Definition: Tile_Base_ID.h:48
TileDetDescrManager::m_tile_region_vec
tile_region_vec m_tile_region_vec
Definition: TileDetDescrManager.h:215
Tile_Base_ID::sample
int sample(const Identifier &id) const
Definition: Tile_Base_ID.cxx:171
M_PI
#define M_PI
Definition: ActiveFraction.h:11
CaloDetDescriptor::set_n_calo_depth
void set_n_calo_depth(int n_calo_depth)
set number of calo depths
Definition: CaloDetDescriptor.cxx:340
TileDetDescrManager::print
void print() const
Definition: TileDetDescrManager.cxx:105
CaloDetDescriptor::setCaloEtaMin
void setCaloEtaMin(double eta_min)
Set Eta Min.
Definition: CaloDetDescriptor.h:628
deg
#define deg
Definition: SbPolyhedron.cxx:17
Tile_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier &id) const
Definition: Tile_Base_ID.cxx:214
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
Tile_Base_ID::GAPDET
@ GAPDET
Definition: Tile_Base_ID.h:48
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
TileDetDescrManager::create_elements
void create_elements()
Definition: TileDetDescrManager.cxx:139
TileDetDescrManager::m_tile_region_map
tile_region_map m_tile_region_map
Definition: TileDetDescrManager.h:216
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Tile_Base_ID::SAMP_E
@ SAMP_E
Definition: Tile_Base_ID.h:55
Tile_Base_ID::module_hash_max
size_type module_hash_max(void) const
Definition: Tile_Base_ID.cxx:1303
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Tile_Base_ID::BARREL
@ BARREL
Definition: Tile_Base_ID.h:48
TileDetDescrManager::tile_descriptors_end
tile_descr_const_iterator tile_descriptors_end() const
Definition: TileDetDescrManager.h:104
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
Tile_Base_ID::module_context
IdContext module_context(void) const
id for modules
Definition: Tile_Base_ID.cxx:1047
TileID.h
TileDetDescrManager.h
TileDetectorElement::set_deta
void set_deta(double deta)
set cylindric size deta
Definition: CaloDetectorElements.h:354
CaloDetDescriptor::setCaloZMin
void setCaloZMin(double z_min)
Set Z Min.
Definition: CaloDetDescriptor.h:648
TileDetDescrManager::m_calo_descr_vec
calo_descr_vec m_calo_descr_vec
Definition: TileDetDescrManager.h:220
TRT::Hit::side
@ side
Definition: HitInfo.h:83
TileDetDescrManager::m_cell_dim_map
cell_dim_map m_cell_dim_map
Definition: TileDetDescrManager.h:231
CaloDetDescrElement::dz
float dz() const
cell dz
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:379
TileCellDim
Definition: TileCellDim.h:19
TileDetDescrManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Definition: TileDetDescrManager.cxx:79
TileDetDescrManager::m_calo_descr_map
scalo_descr_map m_calo_descr_map
Definition: TileDetDescrManager.h:221
CaloDetDescrElement::set_volume
void set_volume(double volume)
set cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:400
TileDetectorElement::set_dr
void set_dr(double dr)
set cylindric size dr
Definition: CaloDetectorElements.h:366
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
CaloDetDescriptor.h
Definition of CaloDetDescriptor.
TileDetDescrManager::m_treeTops
std::vector< PVConstLink > m_treeTops
Definition: TileDetDescrManager.h:204
python.PyAthena.module
module
Definition: PyAthena.py:134
Tile_Base_ID::EXTBAR
@ EXTBAR
Definition: Tile_Base_ID.h:48
TileDetDescrManager::vExtendedCells
static const double vExtendedCells[12]
Definition: TileDetDescrManager.h:38
TileDetectorElement::set_dz
void set_dz(double dz)
set cartezian size dz
Definition: CaloDetectorElements.h:362
TileDetDescrManager::tile_cell_begin
calo_element_const_iterator tile_cell_begin() const
Definition: TileDetDescrManager.h:147
TileCellDim::getRMax
double getRMax(unsigned int index) const
Definition: TileCellDim.cxx:39
TileDetDescrManager::m_tile_module_vec
calo_descr_vec m_tile_module_vec
Definition: TileDetDescrManager.h:224
CaloDetDescriptor::setCaloEtaMax
void setCaloEtaMax(double eta_max)
Set Eta Max.
Definition: CaloDetDescriptor.h:633
TileDetDescrManager::TileDetDescrManager
TileDetDescrManager(TileDddbManager_ptr dbManager)
Z-shift for ext.barrel introduced with Z-shift > 0, eta coordinate of the cell is shifted by Deta = t...
Definition: TileDetDescrManager.cxx:57
TileHWID.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
TileCellDim::getNRows
unsigned int getNRows() const
Definition: TileCellDim.h:25
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
CaloCell_ID::CaloSample
CaloSampling::CaloSample CaloSample
Definition: CaloCell_ID.h:53
TileDetectorElement
Tile Detector Element.
Definition: CaloDetectorElements.h:327
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
z
#define z
TileDetDescrManager::vBarrelCells
static const double vBarrelCells[23]
Definition: TileDetDescrManager.h:37
TileDetDescrManager::add_module
void add_module(IdentifierHash idhash, CaloDetDescriptor *module)
Definition: TileDetDescrManager.cxx:933
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
TileDetDescrManager::getNumTreeTops
virtual unsigned int getNumTreeTops() const override
Definition: TileDetDescrManager.cxx:74
TileDetDescrRegion
Definition: TileDetDescrRegion.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileDetDescriptor
Definition: TileDetDescriptor.h:46
TileDetDescrManager::m_tile_cell_vec
calo_element_vec m_tile_cell_vec
Definition: TileDetDescrManager.h:228
CaloDetDescriptor::setCaloZMax
void setCaloZMax(double z_max)
Set Z Max.
Definition: CaloDetDescriptor.h:653
PixelAthClusterMonAlgCfg.zmax
zmax
Definition: PixelAthClusterMonAlgCfg.py:176
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
TileDetDescrManager::tile_cell_end
calo_element_const_iterator tile_cell_end() const
Definition: TileDetDescrManager.h:150
TileDetectorElement::set_cylindric_raw
void set_cylindric_raw(double eta_raw, double phi_raw, double r_raw)
set raw cylindric coordinates
Definition: CaloDetectorElements.cxx:566
TileID_Exception
Exception class for Tile Identifiers.
Definition: TileID_Exception.h:16
TileDetDescrManager::vItcGapCells
static const double vItcGapCells[6]
Definition: TileDetDescrManager.h:39
python.TransformConfig.descr
descr
print "%s.properties()" % self.__name__
Definition: TransformConfig.py:360
TileDetectorElement::set_cylindric
void set_cylindric(double eta, double phi, double r)
set cylindric coordinates
Definition: CaloDetectorElements.cxx:543
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
TileDetDescrManager::tile_module_end
calo_descr_const_iterator tile_module_end() const
Definition: TileDetDescrManager.h:131
TileCellDim::getRMin
double getRMin(unsigned int index) const
Definition: TileCellDim.cxx:31
CaloCell_ID_FCS::TileGap1
@ TileGap1
Definition: FastCaloSim_CaloCell_ID.h:34
CaloDetDescriptor::set_depth_in
void set_depth_in(std::vector< double > &calo_depth)
set vector of in depths
Definition: CaloDetDescriptor.cxx:347
TileDetDescrManager::m_dbManager
TileDddbManager_ptr m_dbManager
Definition: TileDetDescrManager.h:207
TileDetDescrManager::calo_descr_const_iterator
calo_descr_vec::const_iterator calo_descr_const_iterator
Definition: TileDetDescrManager.h:52
Tile_Base_ID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
Definition: Tile_Base_ID.cxx:1151
TileDetectorElement::set_r
void set_r(double r)
set r
Definition: CaloDetectorElements.h:374
min
#define min(a, b)
Definition: cfImp.cxx:40
grepfile.ic
int ic
Definition: grepfile.py:33
TileDetDescrManager::shiftEta
double shiftEta(double eta, double Rcen, double zshift)
Definition: TileDetDescrManager.h:234
TileDetDescrManager::add_calodescr
void add_calodescr(CaloDetDescriptor *descriptor)
Definition: TileDetDescrManager.cxx:905
TileDetDescrManager::tile_region_begin
tile_region_const_iterator tile_region_begin() const
Definition: TileDetDescrManager.h:90
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
TileDetDescrRegion::identify
virtual Identifier identify() const
Definition: TileDetDescrRegion.h:53
CaloDetDescrElement::volume
float volume() const
cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:381
TileDetectorElement::set_z
void set_z(double z)
set z
Definition: CaloDetectorElements.h:370
TileDetDescrManager::tile_region_const_iterator
tile_region_vec::const_iterator tile_region_const_iterator
Definition: TileDetDescrManager.h:44
TileDetDescrManager::tile_module_begin
calo_descr_const_iterator tile_module_begin() const
Definition: TileDetDescrManager.h:128
CaloDetDescriptor::setCaloPhiMin
void setCaloPhiMin(double phi_min)
Set Phi Min.
Definition: CaloDetDescriptor.h:638
TileCellDim::getZMax
double getZMax(unsigned int index) const
Definition: TileCellDim.cxx:55
TileDetDescrManager::~TileDetDescrManager
~TileDetDescrManager()
Definition: TileDetDescrManager.cxx:68
TileDetDescrManager::add
void add(TileDetDescrRegion *region)
Definition: TileDetDescrManager.cxx:894
TileDetDescrManager::m_tile_id
const TileID * m_tile_id
Definition: TileDetDescrManager.h:211
CaloDetDescriptor::set_depth_out
void set_depth_out(std::vector< double > &calo_depth)
set vector of out depths
Definition: CaloDetDescriptor.cxx:353
TileCellDim.h
TileDddbManager.h
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
Tile_Base_ID::SAMP_D
@ SAMP_D
Definition: Tile_Base_ID.h:55
DeMoScan.index
string index
Definition: DeMoScan.py:362
TileHWID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: TileHWID.h:314
TileDetDescrManager::tile_descr_const_iterator
tile_descr_vec::const_iterator tile_descr_const_iterator
Definition: TileDetDescrManager.h:48
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
CaloDetDescriptor::setCaloPhiMax
void setCaloPhiMax(double phi_max)
Set Phi Max.
Definition: CaloDetDescriptor.h:643
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
CaloDetDescriptor::set_eta_phi_granularity
void set_eta_phi_granularity(int neta, double deta, int nphi, double dphi)
Set Phi granularity.
Definition: CaloDetDescriptor.cxx:359
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
CaloDetDescriptor::setCaloRMin
void setCaloRMin(double r_min)
Set R Min.
Definition: CaloDetDescriptor.h:658
DeMoScan.first
bool first
Definition: DeMoScan.py:534
TileDetDescrManager::tile_region_end
tile_region_const_iterator tile_region_end() const
Definition: TileDetDescrManager.h:93
TileDetDescrManager::getDbManager
TileDddbManager * getDbManager() const
Definition: TileDetDescrManager.cxx:94
TileDetDescrManager::calo_element_const_iterator
calo_element_vec::const_iterator calo_element_const_iterator
Definition: TileDetDescrManager.h:56
TileDetDescrManager::clear
void clear()
Definition: TileDetDescrManager.cxx:968
CellVolumes.h
TileDetDescrManager::m_tile_module_map
calo_descr_map m_tile_module_map
Definition: TileDetDescrManager.h:225
TileCellDim::print
void print() const
Definition: TileCellDim.cxx:112
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Tile_Base_ID::section
int section(const Identifier &id) const
Definition: Tile_Base_ID.cxx:147
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
TileDetDescrManager::releaseDbManager
void releaseDbManager()
Definition: TileDetDescrManager.cxx:100
IdentifierHash
Definition: IdentifierHash.h:38
makeComparison.deltaZ
int deltaZ
Definition: makeComparison.py:46
CaloDetDescriptor::setCaloRMax
void setCaloRMax(double r_max)
Set R Max.
Definition: CaloDetDescriptor.h:663
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
Tile_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier &id) const
Test of an Identifier to see if it belongs to a particular part of the calorimeter.
Definition: Tile_Base_ID.cxx:205
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
TileDddbManager
This class provides access to constants in the Geometry DB.
Definition: TileDddbManager.h:38
TileDetDescrManager::m_tile_descr_vec
tile_descr_vec m_tile_descr_vec
Definition: TileDetDescrManager.h:217
AtlasDetectorID::do_checks
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: AtlasDetectorID.cxx:728
IdContext
class IdContext
Definition: IdContext.h:34
TileCellDim::getZMin
double getZMin(unsigned int index) const
Definition: TileCellDim.cxx:47
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
CaloDetectorElements.h
Calo Subsystem specific Detector Elements + Dummy element for testing.