CMS 3D CMS Logo

HGCalDDDConstants.cc
Go to the documentation of this file.
2 
6 
7 #include "CLHEP/Units/GlobalPhysicalConstants.h"
8 #include "CLHEP/Units/GlobalSystemOfUnits.h"
9 
10 //#define EDM_ML_DEBUG
11 
14 
16  const std::string& name) : hgpar_(hp) {
17  mode_ = hgpar_->mode_;
20  rmax_ = k_ScaleFromDDD * (hgpar_->waferR_) * std::cos(30.0*CLHEP::deg);
21  hexside_ = 2.0 * rmax_ * tan30deg_;
22 #ifdef EDM_ML_DEBUG
23  std::cout << "rmax_ " << rmax_ << ":" << hexside_ << " CellSize "
24  << 0.5*k_ScaleFromDDD*hgpar_->cellSize_[0] << ":"
25  << 0.5*k_ScaleFromDDD*hgpar_->cellSize_[1] << std::endl;
26 #endif
27  // init maps and constants
28  modHalf_ = 0;
29  for (int simreco = 0; simreco < 2; ++simreco) {
30  tot_layers_[simreco] = layersInit((bool)simreco);
31  max_modules_layer_[simreco].resize(tot_layers_[simreco]+1);
32  for (unsigned int layer=1; layer <= tot_layers_[simreco]; ++layer) {
33  max_modules_layer_[simreco][layer] = modulesInit(layer,(bool)simreco);
34  if (simreco == 1) {
35  modHalf_ += max_modules_layer_[simreco][layer];
36 #ifdef EDM_ML_DEBUG
37  std::cout << "Layer " << layer << " with " << max_modules_layer_[simreco][layer] << ":" << modHalf_ << " modules\n";
38 #endif
39  }
40  }
41  }
42  tot_wafers_ = wafers();
43 
44  edm::LogInfo("HGCalGeom") << "HGCalDDDConstants initialized for " << name
45  << " with " << layers(false) << ":"
46  << layers(true) << " layers, " << wafers()
47  << ":" << 2*modHalf_ << " wafers and "
48  << "maximum of " << maxCells(false) << ":"
49  << maxCells(true) << " cells";
50 
51 #ifdef EDM_ML_DEBUG
52  std::cout << "HGCalDDDConstants initialized for " << name << " with "
53  << layers(false) << ":" << layers(true) << " layers, "
54  << wafers() << " wafers and " << "maximum of " << maxCells(false)
55  << ":" << maxCells(true) << " cells" << std::endl;
56 #endif
57 
58  }
59 
60  int wminT(9999999), wmaxT(0), kount1(0), kount2(0);
61  for (unsigned int i=0; i<getTrFormN(); ++i) {
62  int lay0 = getTrForm(i).lay;
63  int wmin(9999999), wmax(0), kount(0);
64  for (int wafer=0; wafer<sectors(); ++wafer) {
65  if (waferInLayer(wafer,lay0,true)) {
66  if (wafer < wmin) wmin = wafer;
67  if (wafer > wmax) wmax = wafer;
68  ++kount;
69  }
70  }
71  if (wminT > wmin) wminT = wmin;
72  if (wmaxT < wmax) wmaxT = wmax;
73  if (kount1 < kount) kount1= kount;
74  kount2 += kount;
75 #ifdef EDM_ML_DEBUG
76  int lay1 = getIndex(lay0,true).first;
77  std::cout << "Index " << i << " Layer " << lay0 << ":" << lay1
78  << " Wafer " << wmin << ":" << wmax << ":" << kount << std::endl;
79 #endif
80  HGCWaferParam a1{ {wmin,wmax,kount} };
81  waferLayer_[lay0] = a1;
82  }
83  waferMax_ = std::array<int,4>{ {wminT,wmaxT,kount1,kount2} };
84 #ifdef EDM_ML_DEBUG
85  std::cout << "Overall wafer statistics: " << wminT << ":" << wmaxT << ":"
86  << kount1 << ":" << kount2 << std::endl;
87 #endif
88 }
89 
91 
92 std::pair<int,int> HGCalDDDConstants::assignCell(float x, float y, int lay,
93  int subSec, bool reco) const {
94  std::pair<int,float> index = getIndex(lay, reco);
95  std::pair<int,int> cellAssignment(-1,-1);
96  int i = index.first;
97  if (i < 0) return cellAssignment;
100  float xx = (reco) ? x : k_ScaleFromDDD*x;
101  float yy = (reco) ? y : k_ScaleFromDDD*y;
102  cellAssignment = assignCellHexagon(xx,yy);
103  }
104  return cellAssignment;
105 }
106 
107 std::pair<int,int> HGCalDDDConstants::assignCellHexagon(float x,
108  float y) const {
109  double xx(x), yy(y);
110  //First the wafer
111  int wafer = cellHex(xx, yy, rmax_, hgpar_->waferPosX_, hgpar_->waferPosY_);
112  // Now the cell
113  xx -= hgpar_->waferPosX_[wafer];
114  yy -= hgpar_->waferPosY_[wafer];
115  int cell(0);
116  if (hgpar_->waferTypeT_[wafer] == 1)
118  else
120  return std::pair<int,int>(wafer,cell);
121 }
122 
124  int indx = (type == 1) ? 0 : 1;
125  double cell = (0.5*k_ScaleFromDDD*hgpar_->cellSize_[indx]);
126  return cell;
127 }
128 
130  bool hexType,
131  bool reco) const {
132 
134  if (hexType) {
135  unsigned int type = (indx < hgpar_->waferTypeL_.size()) ?
136  hgpar_->waferTypeL_[indx] : 3;
137  if (type > 0) --type;
138  mytr = hgpar_->getModule(type, true);
139  } else {
140  if (reco) mytr = hgpar_->getModule(indx,true);
141  else mytr = hgpar_->getModule(indx,false);
142  }
143  return mytr;
144 }
145 
146 std::vector<HGCalParameters::hgtrap> HGCalDDDConstants::getModules() const {
147 
148  std::vector<HGCalParameters::hgtrap> mytrs;
149  for (unsigned int k=0; k<hgpar_->moduleLayR_.size(); ++k)
150  mytrs.emplace_back(hgpar_->getModule(k,true));
151  return mytrs;
152 }
153 
154 std::vector<HGCalParameters::hgtrform> HGCalDDDConstants::getTrForms() const {
155 
156  std::vector<HGCalParameters::hgtrform> mytrs;
157  for (unsigned int k=0; k<hgpar_->trformIndex_.size(); ++k)
158  mytrs.emplace_back(hgpar_->getTrForm(k));
159  return mytrs;
160 }
161 
162 bool HGCalDDDConstants::isValid(int lay, int mod, int cell, bool reco) const {
163 
164  bool ok(false), okMod(false);
165  int cellmax(0);
168  int32_t copyNumber = hgpar_->waferCopy_[mod];
169  ok = ((lay > 0 && lay <= (int)(layers(reco))));
170  if (ok) {
171  const int32_t lay_idx = reco ? (lay-1)*3 + 1 : lay;
172  const auto& the_modules = hgpar_->copiesInLayers_[lay_idx];
173  auto moditr = the_modules.find(copyNumber);
174  ok = okMod = (moditr != the_modules.end());
175 #ifdef EDM_ML_DEBUG
176  if (!ok) std::cout << "HGCalDDDConstants: Layer " << lay << ":"
177  << lay_idx << " Copy " << copyNumber << ":" << mod
178  << " Flag " << ok << std::endl;
179 #endif
180  if (ok) {
181  if (moditr->second >= 0) {
182  cellmax = (hgpar_->waferTypeT_[mod]==1) ?
183  (int)(hgpar_->cellFineX_.size()) : (int)(hgpar_->cellCoarseX_.size());
184  ok = (cell >=0 && cell <= cellmax);
185  } else {
186  ok = isValidCell(lay_idx, mod, cell);
187  }
188  }
189  }
190  }
191 
192 #ifdef EDM_ML_DEBUG
193  if (!ok) std::cout << "HGCalDDDConstants: Layer " << lay << ":"
194  << (lay > 0 && (lay <= (int)(layers(reco)))) << " Module "
195  << mod << ":" << okMod << " Cell " << cell << ":"
196  << cellmax << ":" << (cell >=0 && cell <= cellmax)
197  << ":" << maxCells(reco) << std::endl;
198 #endif
199  return ok;
200 }
201 
202 bool HGCalDDDConstants::isValidCell(int lay, int wafer, int cell) const {
203 
204  // Calculate the position of the cell
205  double x = hgpar_->waferPosX_[wafer];
206  double y = hgpar_->waferPosY_[wafer];
207  if (hgpar_->waferTypeT_[wafer] == 1) {
208  x += hgpar_->cellFineX_[cell];
209  y += hgpar_->cellFineY_[cell];
210  } else {
211  x += hgpar_->cellCoarseX_[cell];
212  y += hgpar_->cellCoarseY_[cell];
213  }
214  double rr = sqrt(x*x+y*y);
215  bool ok = ((rr >= hgpar_->rMinLayHex_[lay-1]) &
216  (rr <= hgpar_->rMaxLayHex_[lay-1]));
217 #ifdef EDM_ML_DEBUG
218  if (!ok)
219  std::cout << "Input " << lay << ":" << wafer << ":" << cell << " Position "
220  << x << ":" << y << ":" << rr << " Compare Limits "
221  << hgpar_->rMinLayHex_[lay-1] << ":" <<hgpar_->rMaxLayHex_[lay-1]
222  << " Flag " << ok << std::endl;
223 #endif
224  return ok;
225 }
226 
227 unsigned int HGCalDDDConstants::layers(bool reco) const {
228  return tot_layers_[(int)reco];
229 }
230 
231 unsigned int HGCalDDDConstants::layersInit(bool reco) const {
232  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
233 }
234 
235 std::pair<float,float> HGCalDDDConstants::locateCell(int cell, int lay,
236  int type, bool reco) const {
237  // type refers to wafer # for hexagon cell
238  float x(999999.), y(999999.);
239  std::pair<int,float> index = getIndex(lay, reco);
240  int i = index.first;
241  if (i < 0) return std::pair<float,float>(x,y);
244  x = hgpar_->waferPosX_[type];
245  y = hgpar_->waferPosY_[type];
246  if (hgpar_->waferTypeT_[type] == 1) {
247  x += hgpar_->cellFineX_[cell];
248  y += hgpar_->cellFineY_[cell];
249  } else {
250  x += hgpar_->cellCoarseX_[cell];
251  y += hgpar_->cellCoarseY_[cell];
252  }
253  if (!reco) {
254  x /= k_ScaleFromDDD;
255  y /= k_ScaleFromDDD;
256  }
257  }
258  return std::pair<float,float>(x,y);
259 }
260 
261 std::pair<float,float> HGCalDDDConstants::locateCellHex(int cell, int wafer,
262  bool reco) const {
263  float x(0), y(0);
264  if (hgpar_->waferTypeT_[wafer] == 1) {
265  x = hgpar_->cellFineX_[cell];
266  y = hgpar_->cellFineY_[cell];
267  } else {
268  x = hgpar_->cellCoarseX_[cell];
269  y = hgpar_->cellCoarseY_[cell];
270  }
271  if (!reco) {
272  x /= k_ScaleFromDDD;
273  y /= k_ScaleFromDDD;
274  }
275  return std::pair<float,float>(x,y);
276 }
277 
279 
280  int cells(0);
281  for (unsigned int i = 0; i<layers(reco); ++i) {
282  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
283  if (cells < maxCells(lay, reco)) cells = maxCells(lay, reco);
284  }
285  return cells;
286 }
287 
288 int HGCalDDDConstants::maxCells(int lay, bool reco) const {
289 
290  std::pair<int,float> index = getIndex(lay, reco);
291  int i = index.first;
292  if (i < 0) return 0;
295  unsigned int cells(0);
296  for (unsigned int k=0; k<hgpar_->waferTypeT_.size(); ++k) {
297  if (waferInLayer(k,index.first)) {
298  unsigned int cell = (hgpar_->waferTypeT_[k]==1) ?
299  (hgpar_->cellFineX_.size()) : (hgpar_->cellCoarseX_.size());
300  if (cell > cells) cells = cell;
301  }
302  }
303  return (int)(cells);
304  } else {
305  return 0;
306  }
307 }
308 
309 int HGCalDDDConstants::maxRows(int lay, bool reco) const {
310 
311  int kymax(0);
312  std::pair<int,float> index = getIndex(lay, reco);
313  int i = index.first;
314  if (i < 0) return kymax;
317  for (unsigned int k=0; k<hgpar_->waferCopy_.size(); ++k) {
318  if (waferInLayer(k,i)) {
319  int ky = ((hgpar_->waferCopy_[k])/100)%100;
320  if (ky > kymax) kymax = ky;
321  }
322  }
323  }
324  return kymax;
325 }
326 
327 int HGCalDDDConstants::modules(int lay, bool reco) const {
328  if( getIndex(lay,reco).first < 0 ) return 0;
329  return max_modules_layer_[(int)reco][lay];
330 }
331 
332 int HGCalDDDConstants::modulesInit(int lay, bool reco) const {
333  int nmod(0);
334  std::pair<int,float> index = getIndex(lay, reco);
335  if (index.first < 0) return nmod;
336  for (unsigned int k=0; k<hgpar_->waferPosX_.size(); ++k) {
337  if (waferInLayer(k,index.first)) ++nmod;
338  }
339  return nmod;
340 }
341 
342 std::vector<int> HGCalDDDConstants::numberCells(int lay, bool reco) const {
343 
344  std::pair<int,float> index = getIndex(lay, reco);
345  int i = index.first;
346  std::vector<int> ncell;
347  if (i >= 0) {
350  for (unsigned int k=0; k<hgpar_->waferTypeT_.size(); ++k) {
351  if (waferInLayer(k,i)) {
352  unsigned int cell = (hgpar_->waferTypeT_[k]==1) ?
353  (hgpar_->cellFineX_.size()) : (hgpar_->cellCoarseX_.size());
354  ncell.emplace_back((int)(cell));
355  }
356  }
357  }
358  }
359  return ncell;
360 }
361 
363 
364  int ncell(0);
365  if (wafer >= 0 && wafer < (int)(hgpar_->waferTypeT_.size())) {
366  if (hgpar_->waferTypeT_[wafer]==1)
367  ncell = (int)(hgpar_->cellFineX_.size());
368  else
369  ncell = (int)(hgpar_->cellCoarseX_.size());
370  }
371  return ncell;
372 }
373 
374 std::pair<int,int> HGCalDDDConstants::rowColumnWafer(int wafer) const {
375  int row(0), col(0);
376  if (wafer < (int)(hgpar_->waferCopy_.size())) {
377  int copy = hgpar_->waferCopy_[wafer];
378  col = copy%100;
379  if ((copy/10000)%10 != 0) col = -col;
380  row = (copy/100)%100;
381  if ((copy/100000)%10 != 0) row = -row;
382  }
383  return std::pair<int,int>(row,col);
384 }
385 
386 std::pair<int,int> HGCalDDDConstants::simToReco(int cell, int lay, int mod,
387  bool half) const {
388 
389  std::pair<int,float> index = getIndex(lay, false);
390  int i = index.first;
391  if (i < 0) {
392  return std::pair<int,int>(-1,-1);
393  }
394  int kx(-1), depth(-1);
397  kx = cell;
398  int type = hgpar_->waferTypeL_[mod];
399  if (type == 1) {
400  depth = hgpar_->layerGroup_[i];
401  } else if (type == 2) {
402  depth = hgpar_->layerGroupM_[i];
403  } else {
404  depth = hgpar_->layerGroupO_[i];
405  }
406  }
407  return std::pair<int,int>(kx,depth);
408 }
409 
411  const int ncopies = hgpar_->waferCopy_.size();
412  int wafer(ncopies);
413 #ifdef EDM_ML_DEBUG
414  bool ok(false);
415 #endif
416  for (int k=0; k<ncopies; ++k) {
417  if (copy == hgpar_->waferCopy_[k]) {
418  wafer = k;
419 #ifdef EDM_ML_DEBUG
420  ok = true;
421 #endif
422  break;
423  }
424  }
425 #ifdef EDM_ML_DEBUG
426  if (!ok) {
427  std::cout << "Cannot find " << copy << " in a list of " << ncopies << "\n";
428  for (int k=0; k<ncopies; ++k) std::cout << " " << hgpar_->waferCopy_[k];
429  std::cout << std::endl;
430  }
431 #endif
432  return wafer;
433 }
434 
435 void HGCalDDDConstants::waferFromPosition(const double x, const double y,
436  int& wafer, int& icell,
437  int& celltyp) const {
438 
439  double xx(k_ScaleFromDDD*x), yy(k_ScaleFromDDD*y);
440  int size_ = (int)(hgpar_->waferCopy_.size());
441  wafer = size_;
442  for (int k=0; k<size_; ++k) {
443  double dx = std::abs(xx-hgpar_->waferPosX_[k]);
444  double dy = std::abs(yy-hgpar_->waferPosY_[k]);
445  if (dx <= rmax_ && dy <= hexside_) {
446  if ((dy <= 0.5*hexside_) || (dx <= (2.*rmax_-dy/tan30deg_))) {
447  wafer = k;
448  celltyp = hgpar_->waferTypeT_[k];
449  xx -= hgpar_->waferPosX_[k];
450  yy -= hgpar_->waferPosY_[k];
451  break;
452  }
453  }
454  }
455  if (wafer < size_) {
456  if (celltyp == 1)
457  icell = cellHex(xx, yy, 0.5*k_ScaleFromDDD*hgpar_->cellSize_[0],
459  else
460  icell = cellHex(xx, yy, 0.5*k_ScaleFromDDD*hgpar_->cellSize_[1],
462  }
463 #ifdef EDM_ML_DEBUG
464  std::cout << "Position " << x << ":" << y << " Wafer " << wafer << ":"
465  << size_ << " XX " << xx << ":" << yy << " Cell " << icell
466  << " Type " << celltyp << std::endl;
467 #endif
468 }
469 
470 bool HGCalDDDConstants::waferInLayer(int wafer, int lay, bool reco) const {
471 
472  std::pair<int,float> indx = getIndex(lay, reco);
473  if (indx.first < 0) return false;
474  return waferInLayer(wafer,indx.first);
475 }
476 
477 std::pair<double,double> HGCalDDDConstants::waferPosition(int wafer,
478  bool reco) const {
479 
480  double xx(0), yy(0);
481  if (wafer >= 0 && wafer < (int)(hgpar_->waferPosX_.size())) {
482  xx = hgpar_->waferPosX_[wafer];
483  yy = hgpar_->waferPosY_[wafer];
484  }
485  if (!reco) {
486  xx /= k_ScaleFromDDD;
487  yy /= k_ScaleFromDDD;
488  }
489  std::pair<double,double> xy(xx,yy);
490  return xy;
491 }
492 
493 double HGCalDDDConstants::waferZ(int lay, bool reco) const {
494  std::pair<int,float> index = getIndex(lay, reco);
495  int i = index.first;
496  if (i < 0) return 0;
497  else return hgpar_->zLayerHex_[i];
498 }
499 
501 
502  int wafer(0);
503  for (unsigned int i = 0; i<layers(true); ++i) {
504  int lay = hgpar_->depth_[i];
505  wafer += modules(lay, true);
506  }
507  return wafer;
508 }
509 
510 int HGCalDDDConstants::wafers(int layer, int type) const {
511 
512  int wafer(0);
513  auto itr = waferLayer_.find(layer);
514  if (itr != waferLayer_.end()) {
515  unsigned ity = (type > 0 && type <= 2) ? type : 0;
516  wafer = (itr->second)[ity];
517  }
518  return wafer;
519 }
520 
521 bool HGCalDDDConstants::isHalfCell(int waferType, int cell) const {
522  if( waferType < 1 || cell < 0) return false;
523  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
524 }
525 
526 int HGCalDDDConstants::cellHex(double xx, double yy,
527  const double& cellR,
528  const std::vector<double>& posX,
529  const std::vector<double>& posY) const {
530  int num(0);
531  const double tol(0.00001);
532  double cellY = 2.0*cellR*tan30deg_;
533  for (unsigned int k=0; k<posX.size(); ++k) {
534  double dx = std::abs(xx - posX[k]);
535  double dy = std::abs(yy - posY[k]);
536  if (dx <= (cellR+tol) && dy <= (cellY+tol)) {
537  double xmax = (dy<=0.5*cellY) ? cellR : (cellR-(dy-0.5*cellY)/tan30deg_);
538  if (dx <= (xmax+tol)) {
539  num = k;
540  break;
541  }
542  }
543  }
544  return num;
545 }
546 
547 std::pair<int,float> HGCalDDDConstants::getIndex(int lay, bool reco) const {
548 
549  if (lay<1 || lay>(int)(hgpar_->layerIndex_.size())) return std::pair<int,float>(-1,0);
550  if (reco && lay>(int)(hgpar_->depthIndex_.size())) return std::pair<int,float>(-1,0);
551  int indx(0);
552  float cell(0);
555  indx = (reco ? hgpar_->depthLayerF_[lay-1] : hgpar_->layerIndex_[lay-1]);
556  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
557  }
558  return std::pair<int,float>(indx,cell);
559 }
560 
561 bool HGCalDDDConstants::waferInLayer(int wafer, int lay) const {
562 
563  const double rr = 2*rmax_*tan30deg_;
564  const double waferX = hgpar_->waferPosX_[wafer];
565  const double waferY = hgpar_->waferPosY_[wafer];
566  double xc[6], yc[6];
567  xc[0] = waferX+rmax_; yc[0] = waferY-0.5*rr;
568  xc[1] = waferX+rmax_; yc[1] = waferY+0.5*rr;
569  xc[2] = waferX; yc[2] = waferY+rr;
570  xc[3] = waferX-rmax_; yc[3] = waferY+0.5*rr;
571  xc[4] = waferX+rmax_; yc[4] = waferY-0.5*rr;
572  xc[5] = waferX; yc[5] = waferY-rr;
573  bool cornerOne(false), cornerAll(true);
574  for (int k=0; k<6; ++k) {
575  double rpos = std::sqrt(xc[k]*xc[k]+yc[k]*yc[k]);
576  if ((rpos >= hgpar_->rMinLayHex_[lay]) &&
577  (rpos <= hgpar_->rMaxLayHex_[lay])) cornerOne = true;
578  else cornerAll = false;
579  }
580  bool in(false);
582  in = cornerAll;
584  in = cornerOne;
585  return in;
586 }
587 
589 
bool isHalfCell(int waferType, int cell) const
std::vector< double > waferPosY_
type
Definition: HCALResponse.h:21
std::vector< int > layer_
double k_horizontalShift
std::vector< int > depthLayerF_
std::vector< int > depth_
std::vector< double > moduleCellR_
bool isValid(int lay, int mod, int cell, bool reco) const
layer_map copiesInLayers_
std::vector< HGCalParameters::hgtrap > getModules() const
std::vector< bool > cellCoarseHalf_
std::vector< bool > cellFineHalf_
std::array< uint32_t, 2 > tot_layers_
def copy(args, dbName)
std::map< int, HGCWaferParam > waferLayer_
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
std::vector< int > moduleLayR_
double cellSizeHex(int type) const
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Simrecovecs max_modules_layer_
unsigned int layersInit(bool reco) const
std::array< int, 4 > waferMax_
int maxRows(int lay, bool reco) const
std::vector< int > numberCells(int lay, bool reco) const
std::vector< double > cellFineY_
int modulesInit(int lay, bool reco) const
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
std::vector< uint32_t > trformIndex_
std::vector< int > layerGroupM_
HGCalGeometryMode::GeometryMode mode_
HGCalGeometryMode::GeometryMode mode_
#define constexpr
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
std::pair< float, float > locateCellHex(int cell, int wafer, bool reco) const
std::vector< double > cellCoarseX_
int modules(int lay, bool reco) const
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
unsigned int getTrFormN() const
unsigned int layers(bool reco) const
int numberCellsHexagon(int wafer) const
std::vector< double > cellSize_
std::vector< HGCalParameters::hgtrform > getTrForms() const
std::pair< int, int > assignCellHexagon(float x, float y) const
std::pair< double, double > waferPosition(int wafer, bool reco=true) const
std::vector< int > layerIndex_
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
hgtrform getTrForm(unsigned int k) const
T sqrt(T t)
Definition: SSEVec.h:18
std::pair< int, float > getIndex(int lay, bool reco) const
HGCalDDDConstants(const HGCalParameters *hp, const std::string &name)
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
hgtrap getModule(unsigned int k, bool reco) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValidCell(int layindex, int wafer, int cell) const
int sectors() const
std::vector< double > rMinLayHex_
std::pair< int, int > rowColumnWafer(const int wafer) const
std::vector< double > zLayerHex_
double waferZ(int layer, bool reco) const
int k[5][pyjets_maxn]
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:96
std::vector< double > rMaxLayHex_
int waferFromCopy(int copy) const
std::vector< int > layerGroup_
std::vector< double > moduleCellS_
std::vector< double > cellFineX_
std::vector< int > layerGroupO_
fixed size matrix
if(dp >Float(M_PI)) dp-
std::vector< int > waferCopy_
col
Definition: cuy.py:1008
std::vector< int > depthIndex_
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
double k_ScaleFromDDD
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const
const HGCalParameters * hgpar_
int maxCells(bool reco) const
std::vector< double > waferPosX_
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
std::vector< int > waferTypeL_
static double tan30deg_
std::array< int, 3 > HGCWaferParam
bool waferInLayer(int wafer, int lay, bool reco) const