CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
HGCalDDDConstants Class Reference

#include <HGCalDDDConstants.h>

Public Member Functions

std::pair< int, int > assignCell (float x, float y, int lay, int subSec, bool reco) const
 
std::array< int, 5 > assignCellHex (float x, float y, int lay, bool reco) const
 
std::array< int, 3 > assignCellTrap (float x, float y, float z, int lay, bool reco) const
 
std::pair< double, double > cellEtaPhiTrap (int type, int irad) const
 
bool cellInLayer (int waferU, int waferV, int cellU, int cellV, int lay, bool reco) const
 
double cellSizeHex (int type) const
 
std::pair< double, double > cellSizeTrap (int type, int irad) const
 
double cellThickness (int layer, int waferU, int waferV) const
 
HGCalTypes::CellType cellType (int type, int waferU, int waferV) const
 
double distFromEdgeHex (double x, double y, double z) const
 
double distFromEdgeTrap (double x, double y, double z) const
 
void etaPhiFromPosition (const double x, const double y, const double z, const int layer, int &ieta, int &iphi, int &type, double &wt) const
 
int firstLayer () const
 
HGCalGeometryMode::GeometryMode geomMode () const
 
int getLayer (double z, bool reco) const
 
int getLayerOffset () const
 
HGCalParameters::hgtrap getModule (unsigned int k, bool hexType, bool reco) const
 
std::vector< HGCalParameters::hgtrapgetModules () const
 
const HGCalParametersgetParameter () const
 
int getPhiBins (int lay) const
 
const std::vector< double > & getRadiusLayer (int layer) const
 
std::pair< int, int > getREtaRange (int lay) const
 
HGCalParameters::hgtrform getTrForm (unsigned int k) const
 
unsigned int getTrFormN () const
 
std::vector< HGCalParameters::hgtrformgetTrForms () const
 
int getTypeHex (int layer, int waferU, int waferV) const
 
int getTypeTrap (int layer) const
 
int getUVMax (int type) const
 
 HGCalDDDConstants (const HGCalParameters *hp, const std::string &name)
 
bool isHalfCell (int waferType, int cell) const
 
bool isValidHex (int lay, int mod, int cell, bool reco) const
 
bool isValidHex8 (int lay, int modU, int modV, int cellU, int cellV, bool fullAndPart=false) const
 
bool isValidHex8 (int lay, int waferU, int waferV, bool fullAndPart=false) const
 
bool isValidTrap (int lay, int ieta, int iphi) const
 
int lastLayer (bool reco) const
 
int layerIndex (int lay, bool reco) const
 
unsigned int layers (bool reco) const
 
unsigned int layersInit (bool reco) const
 
int levelTop (int ind=0) const
 
std::pair< float, float > locateCell (const HGCSiliconDetId &, bool debug=false) const
 
std::pair< float, float > locateCell (int cell, int lay, int type, bool reco) const
 
std::pair< float, float > locateCell (int lay, int waferU, int waferV, int cellU, int cellV, bool reco, bool all, bool debug=false) const
 
std::pair< float, float > locateCellHex (int cell, int wafer, bool reco) const
 
std::pair< float, float > locateCellTrap (int lay, int ieta, int iphi, bool reco) const
 
bool maskCell (const DetId &id, int corners) const
 
int maxCells (bool reco) const
 
int maxCells (int lay, bool reco) const
 
int maxCellUV () const
 
int maxModules () const
 
int maxModulesPerLayer () const
 
int maxRows (int lay, bool reco) const
 
double minSlope () const
 
int modifyUV (int uv, int type1, int type2) const
 
int modules (int lay, bool reco) const
 
int modulesInit (int lay, bool reco) const
 
double mouseBite (bool reco) const
 
int numberCells (bool reco) const
 
std::vector< int > numberCells (int lay, bool reco) const
 
int numberCellsHexagon (int lay, int waferU, int waferV, bool flag) const
 
int numberCellsHexagon (int wafer) const
 
std::pair< double, double > rangeR (double z, bool reco) const
 
std::pair< double, double > rangeRLayer (int lay, bool reco) const
 
std::pair< double, double > rangeZ (bool reco) const
 
std::pair< int, int > rowColumnWafer (const int wafer) const
 
int sectors () const
 
std::pair< int, int > simToReco (int cell, int layer, int mod, bool half) const
 
unsigned int volumes () const
 
int waferCount (const int type) const
 
int waferFileIndex (unsigned int kk) const
 
std::tuple< int, int, int > waferFileInfo (unsigned int kk) const
 
bool waferFileInfoExist (int kk) const
 
std::tuple< int, int, int > waferFileInfoFromIndex (int kk) const
 
unsigned int waferFileSize () const
 
int waferFromCopy (int copy) const
 
void waferFromPosition (const double x, const double y, const int layer, int &waferU, int &waferV, int &cellU, int &cellV, int &celltype, double &wt, bool debug=false) const
 
void waferFromPosition (const double x, const double y, int &wafer, int &icell, int &celltyp) const
 
bool waferFullInLayer (int wafer, int lay, bool reco) const
 
bool waferInLayer (int wafer, int lay, bool reco) const
 
int waferMax () const
 
int waferMin () const
 
std::pair< double, double > waferParameters (bool reco) const
 
std::pair< double, double > waferPosition (int lay, int waferU, int waferV, bool reco, bool debug=false) const
 
std::pair< double, double > waferPosition (int wafer, bool reco) const
 
int wafers () const
 
int wafers (int layer, int type) const
 
double waferSepar (bool reco) const
 
double waferSize (bool reco) const
 
int waferToCopy (int wafer) const
 
int waferType (DetId const &id, bool fromFile=false) const
 
std::tuple< int, int, int > waferType (HGCSiliconDetId const &id, bool fromFile=false) const
 
int waferType (int layer, int waferU, int waferV, bool fromFile=false) const
 
int waferTypeL (int wafer) const
 
std::pair< int, int > waferTypeRotation (int layer, int waferU, int waferV, bool fromFile=false, bool debug=false) const
 
int waferTypeT (int wafer) const
 
int waferUVMax () const
 
bool waferVirtual (int layer, int waferU, int waferV) const
 
double waferZ (int layer, bool reco) const
 
 ~HGCalDDDConstants ()
 

Private Types

typedef std::array< int, 3 > HGCWaferParam
 
typedef std::array< std::vector< int32_t >, 2 > Simrecovecs
 

Private Member Functions

void cellHex (double xloc, double yloc, int cellType, int &cellU, int &cellV, bool debug=false) const
 
int cellHex (double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
 
std::pair< int, float > getIndex (int lay, bool reco) const
 
bool isValidCell (int layindex, int wafer, int cell) const
 
bool isValidCell8 (int lay, int waferU, int waferV, int cellU, int cellV, int type) const
 
bool waferInLayerTest (int wafer, int lay, bool full) const
 
std::pair< double, double > waferPosition (int waferU, int waferV, bool reco) const
 

Private Attributes

const float dPhiMin = 0.02
 
HGCalGeomTools geomTools_
 
double hexside_
 
const HGCalParametershgpar_
 
const double k_horizontalShift = 1.0
 
Simrecovecs max_modules_layer_
 
int32_t maxWafersPerLayer_
 
HGCalGeometryMode::GeometryMode mode_
 
int32_t modHalf_
 
double rmax_
 
const double sqrt3_
 
std::array< uint32_t, 2 > tot_layers_
 
int32_t tot_wafers_
 
std::unordered_map< int32_t, bool > waferIn_
 
std::map< int, HGCWaferParamwaferLayer_
 
std::array< int, 4 > waferMax_
 

Static Private Attributes

constexpr static double tan30deg_ = 0.5773502693
 

Detailed Description

this class reads the constant section of the numbering xml-files of the high granulairy calorimeter

Date
2014/03/20 00:06:50
Author
Sunanda Banerjee, SINP sunan.nosp@m.da.b.nosp@m.anerj.nosp@m.ee@c.nosp@m.ern.c.nosp@m.h

Definition at line 25 of file HGCalDDDConstants.h.

Member Typedef Documentation

◆ HGCWaferParam

typedef std::array<int, 3> HGCalDDDConstants::HGCWaferParam
private

Definition at line 202 of file HGCalDDDConstants.h.

◆ Simrecovecs

typedef std::array<std::vector<int32_t>, 2> HGCalDDDConstants::Simrecovecs
private

Definition at line 201 of file HGCalDDDConstants.h.

Constructor & Destructor Documentation

◆ HGCalDDDConstants()

HGCalDDDConstants::HGCalDDDConstants ( const HGCalParameters hp,
const std::string &  name 
)

Definition at line 23 of file HGCalDDDConstants.cc.

24  : hgpar_(hp), sqrt3_(std::sqrt(3.0)) {
25  mode_ = hgpar_->mode_;
26 #ifdef EDM_ML_DEBUG
27  edm::LogVerbatim("HGCalGeom") << "Mode " << mode_;
28 #endif
32  hexside_ = 2.0 * rmax_ * tan30deg_;
33 #ifdef EDM_ML_DEBUG
34  edm::LogVerbatim("HGCalGeom") << "rmax_ " << rmax_ << ":" << hexside_ << " CellSize "
37 #endif
38  }
39  // init maps and constants
40  modHalf_ = 0;
42  for (int simreco = 0; simreco < 2; ++simreco) {
43  tot_layers_[simreco] = layersInit((bool)simreco);
44  max_modules_layer_[simreco].resize(tot_layers_[simreco] + 1);
45  for (unsigned int layer = 1; layer <= tot_layers_[simreco]; ++layer) {
46  max_modules_layer_[simreco][layer] = modulesInit(layer, (bool)simreco);
47  if (simreco == 1) {
48  modHalf_ += max_modules_layer_[simreco][layer];
50 #ifdef EDM_ML_DEBUG
51  edm::LogVerbatim("HGCalGeom") << "Layer " << layer << " with " << max_modules_layer_[simreco][layer] << ":"
52  << modHalf_ << " modules in RECO";
53  } else {
54  edm::LogVerbatim("HGCalGeom") << "Layer " << layer << " with " << max_modules_layer_[simreco][layer]
55  << " modules in SIM";
56 #endif
57  }
58  }
59 #ifdef EDM_ML_DEBUG
60  edm::LogVerbatim("HGCalGeom") << "SimReco " << simreco << " with " << tot_layers_[simreco] << " Layers";
61 #endif
62  }
63  tot_wafers_ = wafers();
64 
65 #ifdef EDM_ML_DEBUG
66  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants initialized for " << name << " with " << layers(false) << ":"
67  << layers(true) << " layers, " << wafers() << ":" << 2 * modHalf_
68  << " wafers with maximum " << maxWafersPerLayer_ << " per layer and "
69  << "maximum of " << maxCells(false) << ":" << maxCells(true) << " cells";
70 #endif
73  int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
74  for (unsigned int i = 0; i < getTrFormN(); ++i) {
75  int lay0 = getTrForm(i).lay;
76  int wmin(9999999), wmax(-9999999), kount(0);
77  for (int wafer = 0; wafer < sectors(); ++wafer) {
78  bool waferIn = waferInLayer(wafer, lay0, true);
80  int kndx = HGCalWaferIndex::waferIndex(lay0,
83  waferIn_[kndx] = waferIn;
84  }
85  if (waferIn) {
87  ? wafer
89  if (waferU < wmin)
90  wmin = waferU;
91  if (waferU > wmax)
92  wmax = waferU;
93  ++kount;
94  }
95  }
96  if (wminT > wmin)
97  wminT = wmin;
98  if (wmaxT < wmax)
99  wmaxT = wmax;
100  if (kount1 < kount)
101  kount1 = kount;
102  kount2 += kount;
103 #ifdef EDM_ML_DEBUG
104  int lay1 = getIndex(lay0, true).first;
105  edm::LogVerbatim("HGCalGeom") << "Index " << i << " Layer " << lay0 << ":" << lay1 << " Wafer " << wmin << ":"
106  << wmax << ":" << kount;
107 #endif
108  HGCWaferParam a1{{wmin, wmax, kount}};
109  waferLayer_[lay0] = a1;
110  }
111  waferMax_ = std::array<int, 4>{{wminT, wmaxT, kount1, kount2}};
112 #ifdef EDM_ML_DEBUG
113  edm::LogVerbatim("HGCalGeom") << "Overall wafer statistics: " << wminT << ":" << wmaxT << ":" << kount1 << ":"
114  << kount2;
115 #endif
116  }
117 }

References HGCalParameters::cellSize_, funct::cos(), getIndex(), getTrForm(), getTrFormN(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hexside_, hgpar_, mps_fire::i, HGCalParameters::k_ScaleFromDDD, HGCalParameters::hgtrform::lay, layers(), layersInit(), SiStripPI::max, max_modules_layer_, maxCells(), maxWafersPerLayer_, HGCalParameters::mode_, mode_, modHalf_, modulesInit(), Skims_PA_cff::name, rmax_, sectors(), tan30deg_, tot_layers_, tot_wafers_, HGCalParameters::waferCopy_, waferIn_, HGCalWaferIndex::waferIndex(), waferInLayer(), waferLayer_, waferMax_, HGCalParameters::waferR_, wafers(), HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), cms::cuda::wmax, and cms::cuda::wmin.

◆ ~HGCalDDDConstants()

HGCalDDDConstants::~HGCalDDDConstants ( )

Definition at line 119 of file HGCalDDDConstants.cc.

119 {}

Member Function Documentation

◆ assignCell()

std::pair< int, int > HGCalDDDConstants::assignCell ( float  x,
float  y,
int  lay,
int  subSec,
bool  reco 
) const

Definition at line 121 of file HGCalDDDConstants.cc.

121  {
122  const auto& index = getIndex(lay, reco);
123  if (index.first < 0)
124  return std::make_pair(-1, -1);
126  float xx = (reco) ? x : HGCalParameters::k_ScaleFromDDD * x;
127  float yy = (reco) ? y : HGCalParameters::k_ScaleFromDDD * y;
128 
129  // First the wafer
130  int wafer = cellHex(xx, yy, rmax_, hgpar_->waferPosX_, hgpar_->waferPosY_);
131  if (wafer < 0 || wafer >= (int)(hgpar_->waferTypeT_.size())) {
132  edm::LogWarning("HGCalGeom") << "Wafer no. out of bound for " << wafer << ":" << (hgpar_->waferTypeT_).size()
133  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
134  << " ***** ERROR *****";
135  return std::make_pair(-1, -1);
136  } else {
137  // Now the cell
138  xx -= hgpar_->waferPosX_[wafer];
139  yy -= hgpar_->waferPosY_[wafer];
140  if (hgpar_->waferTypeT_[wafer] == 1)
141  return std::make_pair(wafer,
142  cellHex(xx,
143  yy,
146  hgpar_->cellFineY_));
147  else
148  return std::make_pair(wafer,
149  cellHex(xx,
150  yy,
153  hgpar_->cellCoarseY_));
154  }
155  } else {
156  return std::make_pair(-1, -1);
157  }
158 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, cellHex(), HGCalParameters::cellSize_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hgpar_, HGCalParameters::k_ScaleFromDDD, mode_, dt_dqm_sourceclient_common_cff::reco, rmax_, findQualityFiles::size, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferTypeT_, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.

Referenced by HGCNumberingScheme::assignCell(), and HGCalGeometry::getClosestCell().

◆ assignCellHex()

std::array< int, 5 > HGCalDDDConstants::assignCellHex ( float  x,
float  y,
int  lay,
bool  reco 
) const

Definition at line 160 of file HGCalDDDConstants.cc.

160  {
161  int waferU(0), waferV(0), waferType(-1), cellU(0), cellV(0);
163  double xx = (reco) ? HGCalParameters::k_ScaleToDDD * x : x;
164  double yy = (reco) ? HGCalParameters::k_ScaleToDDD * y : y;
165  double wt(1.0);
166  waferFromPosition(xx, yy, lay, waferU, waferV, cellU, cellV, waferType, wt);
167  }
168  return std::array<int, 5>{{waferU, waferV, waferType, cellU, cellV}};
169 }

References HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalParameters::k_ScaleToDDD, mode_, dt_dqm_sourceclient_common_cff::reco, waferFromPosition(), waferType(), x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.

Referenced by HGCalGeometry::getClosestCell().

◆ assignCellTrap()

std::array< int, 3 > HGCalDDDConstants::assignCellTrap ( float  x,
float  y,
float  z,
int  lay,
bool  reco 
) const

Definition at line 171 of file HGCalDDDConstants.cc.

171  {
172  int irad(-1), iphi(-1), type(-1);
173  const auto& indx = getIndex(layer, reco);
174  if (indx.first < 0)
175  return std::array<int, 3>{{irad, iphi, type}};
176  double xx = (z > 0) ? x : -x;
177  double r = (reco ? std::sqrt(x * x + y * y) : HGCalParameters::k_ScaleFromDDD * std::sqrt(x * x + y * y));
178  double phi = (r == 0. ? 0. : std::atan2(y, xx));
179  if (phi < 0)
180  phi += (2.0 * M_PI);
181  type = hgpar_->scintType(layer);
182  auto ir = std::lower_bound(hgpar_->radiusLayer_[type].begin(), hgpar_->radiusLayer_[type].end(), r);
183  irad = (int)(ir - hgpar_->radiusLayer_[type].begin());
184  irad = std::clamp(irad, hgpar_->iradMinBH_[indx.first], hgpar_->iradMaxBH_[indx.first]);
185  iphi = 1 + (int)(phi / indx.second);
186 #ifdef EDM_ML_DEBUG
187  edm::LogVerbatim("HGCalGeom") << "assignCellTrap Input " << x << ":" << y << ":" << z << ":" << layer << ":" << reco
188  << " x|r " << xx << ":" << r << " phi " << phi << " o/p " << irad << ":" << iphi << ":"
189  << type;
190 #endif
191  return std::array<int, 3>{{irad, iphi, type}};
192 }

References getIndex(), hgpar_, createfilelist::int, LEDCalibrationChannels::iphi, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, HGCalParameters::k_ScaleFromDDD, cuda_std::lower_bound(), M_PI, phi, alignCSCRings::r, HGCalParameters::radiusLayer_, HGCalParameters::scintType(), mathSSE::sqrt(), x, geometryCSVtoXML::xx, y, and z.

Referenced by HGCalGeometry::getClosestCell(), and HGCalNumberingScheme::getUnitID().

◆ cellEtaPhiTrap()

std::pair< double, double > HGCalDDDConstants::cellEtaPhiTrap ( int  type,
int  irad 
) const

Definition at line 194 of file HGCalDDDConstants.cc.

194  {
195  double dr(0), df(0);
197  double r = 0.5 * ((hgpar_->radiusLayer_[type][irad - 1] + hgpar_->radiusLayer_[type][irad]));
198  dr = (hgpar_->radiusLayer_[type][irad] - hgpar_->radiusLayer_[type][irad - 1]);
199  df = r * hgpar_->cellSize_[type];
200  }
201  return std::make_pair(dr, df);
202 }

References HGCalParameters::cellSize_, flavorHistoryFilter_cfi::dr, hgpar_, mode_, alignCSCRings::r, HGCalParameters::radiusLayer_, and HGCalGeometryMode::Trapezoid.

◆ cellHex() [1/2]

void HGCalDDDConstants::cellHex ( double  xloc,
double  yloc,
int  cellType,
int &  cellU,
int &  cellV,
bool  debug = false 
) const
private

Definition at line 1422 of file HGCalDDDConstants.cc.

1422  {
1423  int N = (cellType == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
1424  double Rc = 2 * rmax_ / (3 * N);
1425  double rc = 0.5 * Rc * sqrt3_;
1426  double v0 = ((xloc / Rc - 1.0) / 1.5);
1427  int cv0 = (v0 > 0) ? (N + (int)(v0 + 0.5)) : (N - (int)(-v0 + 0.5));
1428  double u0 = (0.5 * yloc / rc + 0.5 * cv0);
1429  int cu0 = (u0 > 0) ? (N / 2 + (int)(u0 + 0.5)) : (N / 2 - (int)(-u0 + 0.5));
1430  cu0 = std::max(0, std::min(cu0, 2 * N - 1));
1431  cv0 = std::max(0, std::min(cv0, 2 * N - 1));
1432  if (cv0 - cu0 >= N)
1433  cv0 = cu0 + N - 1;
1434 #ifdef EDM_ML_DEBUG
1435  if (debug)
1436  edm::LogVerbatim("HGCalGeom") << "cellHex: input " << xloc << ":" << yloc << ":" << cellType << " parameter " << rc
1437  << ":" << Rc << " u0 " << u0 << ":" << cu0 << " v0 " << v0 << ":" << cv0;
1438 #endif
1439  bool found(false);
1440  static const int shift[3] = {0, 1, -1};
1441  for (int i1 = 0; i1 < 3; ++i1) {
1442  cellU = cu0 + shift[i1];
1443  for (int i2 = 0; i2 < 3; ++i2) {
1444  cellV = cv0 + shift[i2];
1445  if (((cellV - cellU) < N) && ((cellU - cellV) <= N) && (cellU >= 0) && (cellV >= 0) && (cellU < 2 * N) &&
1446  (cellV < 2 * N)) {
1447  double xc = (1.5 * (cellV - N) + 1.0) * Rc;
1448  double yc = (2 * cellU - cellV - N) * rc;
1449  if ((std::abs(yloc - yc) <= rc) && (std::abs(xloc - xc) <= Rc) &&
1450  ((std::abs(xloc - xc) <= 0.5 * Rc) || (std::abs(yloc - yc) <= sqrt3_ * (Rc - std::abs(xloc - xc))))) {
1451 #ifdef EDM_ML_DEBUG
1452  if (debug)
1453  edm::LogVerbatim("HGCalGeom")
1454  << "cellHex: local " << xc << ":" << yc << " difference " << std::abs(xloc - xc) << ":"
1455  << std::abs(yloc - yc) << ":" << sqrt3_ * (Rc - std::abs(yloc - yc)) << " comparator " << rc << ":"
1456  << Rc << " (u,v) = (" << cellU << "," << cellV << ")";
1457 #endif
1458  found = true;
1459  break;
1460  }
1461  }
1462  }
1463  if (found)
1464  break;
1465  }
1466  if (!found) {
1467  cellU = cu0;
1468  cellV = cv0;
1469  }
1470 }

References funct::abs(), cellType(), debug, newFWLiteAna::found, hgpar_, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, SiStripPI::max, min(), N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, rmax_, edm::shift, sqrt3_, and V0Monitor_cff::v0.

◆ cellHex() [2/2]

int HGCalDDDConstants::cellHex ( double  xx,
double  yy,
const double &  cellR,
const std::vector< double > &  posX,
const std::vector< double > &  posY 
) const
private

Definition at line 1403 of file HGCalDDDConstants.cc.

1404  {
1405  int num(0);
1406  const double tol(0.00001);
1407  double cellY = 2.0 * cellR * tan30deg_;
1408  for (unsigned int k = 0; k < posX.size(); ++k) {
1409  double dx = std::abs(xx - posX[k]);
1410  double dy = std::abs(yy - posY[k]);
1411  if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
1412  double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) / tan30deg_);
1413  if (dx <= (xmax + tol)) {
1414  num = k;
1415  break;
1416  }
1417  }
1418  }
1419  return num;
1420 }

References funct::abs(), PVValHelper::dx, PVValHelper::dy, dqmdumpme::k, EgammaValidation_cff::num, RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, tan30deg_, TrackerOfflineValidation_Dqm_cff::xmax, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

Referenced by assignCell(), and waferFromPosition().

◆ cellInLayer()

bool HGCalDDDConstants::cellInLayer ( int  waferU,
int  waferV,
int  cellU,
int  cellV,
int  lay,
bool  reco 
) const

Definition at line 204 of file HGCalDDDConstants.cc.

204  {
205  const auto& indx = getIndex(lay, true);
206  if (indx.first >= 0) {
210  ? locateCell(lay, waferU, waferV, cellU, cellV, reco, true, false)
211  : locateCell(cellU, lay, waferU, reco));
212  double rpos = sqrt(xy.first * xy.first + xy.second * xy.second);
213  return ((rpos >= hgpar_->rMinLayHex_[indx.first]) && (rpos <= hgpar_->rMaxLayHex_[indx.first]));
214  } else {
215  return true;
216  }
217  } else {
218  return false;
219  }
220 }

References getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, locateCell(), mode_, HGCalParameters::rMinLayHex_, mathSSE::sqrt(), and geometryCSVtoXML::xy.

Referenced by HGCalGeometry::newCell().

◆ cellSizeHex()

double HGCalDDDConstants::cellSizeHex ( int  type) const

Definition at line 235 of file HGCalDDDConstants.cc.

235  {
236  int indx =
238  : ((type == 1) ? 1 : 0));
239  double cell =
242  return cell;
243 }

References HGCalParameters::cellSize_, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgpar_, HGCalParameters::k_ScaleFromDDD, mode_, and HGCalGeometryMode::Trapezoid.

◆ cellSizeTrap()

std::pair<double, double> HGCalDDDConstants::cellSizeTrap ( int  type,
int  irad 
) const
inline

Definition at line 36 of file HGCalDDDConstants.h.

36  {
37  return std::make_pair(hgpar_->radiusLayer_[type][irad - 1], hgpar_->radiusLayer_[type][irad]);
38  }

References hgpar_, and HGCalParameters::radiusLayer_.

Referenced by HGCalGeometry::get8Corners(), HGCalGeometry::getCorners(), and HGCalGeometry::getNewCorners().

◆ cellThickness()

double HGCalDDDConstants::cellThickness ( int  layer,
int  waferU,
int  waferV 
) const

Definition at line 222 of file HGCalDDDConstants.cc.

222  {
223  double thick(-1);
224  int type = waferType(layer, waferU, waferV, false);
225  if (type >= 0) {
227  thick = 10000.0 * hgpar_->cellThickness_[type]; // cm to micron
229  thick = 100.0 * (type + 1); // type = 1,2,3 for 100,200,300 micron
230  }
231  }
232  return thick;
233 }

References HGCalParameters::cellThickness_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, mode_, and waferType().

Referenced by HGCalTBAnalyzer::analyzeSimHits().

◆ cellType()

HGCalTypes::CellType HGCalDDDConstants::cellType ( int  type,
int  waferU,
int  waferV 
) const

Definition at line 245 of file HGCalDDDConstants.cc.

245  {
246  // type=0: in the middle; 1..6: the edges clocwise from bottom left;
247  // =11..16: the corners clockwise from bottom
248  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
249  if (cellU == 0) {
250  if (cellV == 0)
252  else if (cellV - cellU == N - 1)
254  else
256  } else if (cellV == 0) {
257  if (cellU - cellV == N)
259  else
261  } else if (cellU - cellV == N) {
262  if (cellU == 2 * N - 1)
264  else
266  } else if (cellU == 2 * N - 1) {
267  if (cellV == 2 * N - 1)
269  else
271  } else if (cellV == 2 * N - 1) {
272  if (cellV - cellU == N - 1)
274  else
276  } else if (cellV - cellU == N - 1) {
278  } else if ((cellU > 2 * N - 1) || (cellV > 2 * N - 1) || (cellV >= (cellU + N)) || (cellU > (cellV + N))) {
280  } else {
282  }
283 }

References HGCalTypes::BottomCorner, HGCalTypes::BottomLeftCorner, HGCalTypes::BottomLeftEdge, HGCalTypes::BottomRightCorner, HGCalTypes::BottomRightEdge, HGCalTypes::CentralType, hgpar_, HGCalTypes::LeftEdge, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalTypes::RightEdge, HGCalTypes::TopCorner, HGCalTypes::TopLeftCorner, HGCalTypes::TopLeftEdge, HGCalTypes::TopRightCorner, HGCalTypes::TopRightEdge, and HGCalTypes::UndefinedType.

Referenced by cellHex(), and HGCalTopology::neighbors().

◆ distFromEdgeHex()

double HGCalDDDConstants::distFromEdgeHex ( double  x,
double  y,
double  z 
) const

Definition at line 285 of file HGCalDDDConstants.cc.

285  {
286  // Assming the point is within a hexagonal plane of the wafer, calculate
287  // the shortest distance from the edge
288  if (z < 0)
289  x = -x;
290  double dist(0);
291  // Input x, y in Geant4 unit and transformed to CMSSW standard
295  int ll = layerIndex(getLayer(z, false), false);
296  xx -= hgpar_->xLayerHex_[ll];
297  yy -= hgpar_->yLayerHex_[ll];
298  }
299  int sizew = (int)(hgpar_->waferPosX_.size());
300  int wafer = sizew;
301  // Transform to the local coordinate frame of the wafer first
302  for (int k = 0; k < sizew; ++k) {
303  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
304  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
305  if ((dx <= rmax_) && (dy <= hexside_) && ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy)))) {
306  wafer = k;
307  xx -= hgpar_->waferPosX_[k];
308  yy -= hgpar_->waferPosY_[k];
309  break;
310  }
311  }
312  // Look at only one quarter (both x,y are positive)
313  if (wafer < sizew) {
314  if (std::abs(yy) < 0.5 * hexside_) {
315  dist = rmax_ - std::abs(xx);
316  } else {
317  dist = 0.5 * ((rmax_ - std::abs(xx)) - sqrt3_ * (std::abs(yy) - 0.5 * hexside_));
318  }
319  } else {
320  dist = 0;
321  }
323 #ifdef EDM_ML_DEBUG
324  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeHex: Local " << xx << ":" << yy << " wafer " << wafer << " flag "
325  << (wafer < sizew) << " Distance " << rmax_ << ":" << (rmax_ - std::abs(xx)) << ":"
326  << (std::abs(yy) - 0.5 * hexside_) << ":" << 0.5 * hexside_ << ":" << dist;
327 #endif
328  return dist;
329 }

References funct::abs(), PVValHelper::dx, PVValHelper::dy, getLayer(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hexside_, hgpar_, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, layerIndex(), mode_, rmax_, sqrt3_, tan30deg_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, x, HGCalParameters::xLayerHex_, geometryCSVtoXML::xx, y, HGCalParameters::yLayerHex_, geometryCSVtoXML::yy, and z.

Referenced by HFNoseSD::isItinFidVolume(), and HGCalSD::isItinFidVolume().

◆ distFromEdgeTrap()

double HGCalDDDConstants::distFromEdgeTrap ( double  x,
double  y,
double  z 
) const

Definition at line 331 of file HGCalDDDConstants.cc.

331  {
332  // Assming the point is within the eta-phi plane of the scintillator tile,
333  // calculate the shortest distance from the edge
334  int lay = getLayer(z, false);
335  double xx = (z < 0) ? -x : x;
336  int indx = layerIndex(lay, false);
337  double r = HGCalParameters::k_ScaleFromDDD * std::sqrt(x * x + y * y);
338  double phi = (r == 0. ? 0. : std::atan2(y, xx));
339  if (phi < 0)
340  phi += (2.0 * M_PI);
341  int type = hgpar_->scintType(lay);
342  double cell = hgpar_->scintCellSize(lay);
343  // Compare with the center of the tile find distances along R and also phi
344  // Take the smaller value
345  auto ir = std::lower_bound(hgpar_->radiusLayer_[type].begin(), hgpar_->radiusLayer_[type].end(), r);
346  int irad = (int)(ir - hgpar_->radiusLayer_[type].begin());
347  irad = std::clamp(irad, hgpar_->iradMinBH_[indx], hgpar_->iradMaxBH_[indx]);
348  int iphi = 1 + (int)(phi / cell);
349  double dphi = std::max(0.0, (0.5 * cell - std::abs(phi - (iphi - 0.5) * cell)));
350  double dist = std::min((r - hgpar_->radiusLayer_[type][irad - 1]), (hgpar_->radiusLayer_[type][irad] - r));
351 #ifdef EDM_ML_DEBUG
352  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeTrap: Global " << x << ":" << y << ":" << z << " Layer " << lay
353  << " Index " << indx << ":" << type << " xx " << xx << " R " << r << ":" << irad << ":"
354  << hgpar_->radiusLayer_[type][irad - 1] << ":" << hgpar_->radiusLayer_[type][irad]
355  << " Phi " << phi << ":" << iphi << ":" << (iphi - 0.5) * cell << " cell " << cell
356  << " Dphi " << dphi << " Dist " << dist << ":" << r * dphi;
357 #endif
358  return HGCalParameters::k_ScaleToDDD * std::min(r * dphi, dist);
359 }

References funct::abs(), getLayer(), hgpar_, createfilelist::int, LEDCalibrationChannels::iphi, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, layerIndex(), cuda_std::lower_bound(), M_PI, SiStripPI::max, min(), phi, alignCSCRings::r, HGCalParameters::radiusLayer_, HGCalParameters::scintCellSize(), HGCalParameters::scintType(), mathSSE::sqrt(), x, geometryCSVtoXML::xx, y, and z.

Referenced by HGCScintSD::isItinFidVolume().

◆ etaPhiFromPosition()

void HGCalDDDConstants::etaPhiFromPosition ( const double  x,
const double  y,
const double  z,
const int  layer,
int &  ieta,
int &  iphi,
int &  type,
double &  wt 
) const

◆ firstLayer()

int HGCalDDDConstants::firstLayer ( ) const
inline

◆ geomMode()

HGCalGeometryMode::GeometryMode HGCalDDDConstants::geomMode ( ) const
inline

◆ getIndex()

std::pair< int, float > HGCalDDDConstants::getIndex ( int  lay,
bool  reco 
) const
private

Definition at line 1472 of file HGCalDDDConstants.cc.

1472  {
1473  int indx = layerIndex(lay, reco);
1474  if (indx < 0)
1475  return std::make_pair(-1, 0);
1476  float cell(0);
1478  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1479  } else {
1481  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1482  } else {
1483  cell = hgpar_->scintCellSize(lay);
1484  }
1485  }
1486  return std::make_pair(indx, cell);
1487 }

References HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, layerIndex(), mode_, HGCalParameters::moduleCellR_, HGCalParameters::moduleCellS_, and HGCalParameters::scintCellSize().

Referenced by assignCell(), assignCellTrap(), cellInLayer(), HGCalDDDConstants(), isValidTrap(), locateCell(), locateCellTrap(), maxCells(), maxRows(), modules(), modulesInit(), numberCells(), rangeRLayer(), simToReco(), waferFullInLayer(), waferInLayer(), wafers(), and waferZ().

◆ getLayer()

int HGCalDDDConstants::getLayer ( double  z,
bool  reco 
) const

Definition at line 361 of file HGCalDDDConstants.cc.

361  {
362  // Get the layer # from the gloabl z coordinate
363  unsigned int k = 0;
364  double zz = (reco ? std::abs(z) : HGCalParameters::k_ScaleFromDDD * std::abs(z));
365  const auto& zLayerHex = hgpar_->zLayerHex_;
366  auto itr = std::find_if(zLayerHex.begin() + 1, zLayerHex.end(), [&k, &zz, &zLayerHex](double zLayer) {
367  ++k;
368  return zz < 0.5 * (zLayerHex[k - 1] + zLayerHex[k]);
369  });
370  int lay = (itr == zLayerHex.end()) ? static_cast<int>(zLayerHex.size()) : k;
372  int indx = layerIndex(lay, false);
373  if (indx >= 0)
374  lay = hgpar_->layerGroupO_[indx];
375  } else {
376  lay += (hgpar_->firstLayer_ - 1);
377  }
378  return lay;
379 }

References funct::abs(), HGCalParameters::firstLayer_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hgpar_, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerGroupO_, layerIndex(), mode_, dt_dqm_sourceclient_common_cff::reco, z, HGCalParameters::zLayerHex_, and geometryCSVtoXML::zz.

Referenced by distFromEdgeHex(), distFromEdgeTrap(), HGCMouseBite::exclude(), and HGCalGeometry::getClosestCell().

◆ getLayerOffset()

int HGCalDDDConstants::getLayerOffset ( ) const
inline

Definition at line 54 of file HGCalDDDConstants.h.

54 { return hgpar_->layerOffset_; }

References hgpar_, and HGCalParameters::layerOffset_.

◆ getModule()

HGCalParameters::hgtrap HGCalDDDConstants::getModule ( unsigned int  k,
bool  hexType,
bool  reco 
) const

Definition at line 381 of file HGCalDDDConstants.cc.

381  {
383  if (hexType) {
384  if (indx >= hgpar_->waferTypeL_.size())
385  edm::LogWarning("HGCalGeom") << "Wafer no. out bound for index " << indx << ":" << (hgpar_->waferTypeL_).size()
386  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
387  << " ***** ERROR *****";
388  unsigned int type =
389  ((indx < hgpar_->waferTypeL_.size()) ? hgpar_->waferTypeL_[indx] - 1 : HGCSiliconDetId::HGCalCoarseThick);
390  mytr = hgpar_->getModule(type, reco);
391  } else {
392  mytr = hgpar_->getModule(indx, reco);
393  }
394  return mytr;
395 }

References HGCalParameters::getModule(), HGCSiliconDetId::HGCalCoarseThick, hgpar_, findQualityFiles::size, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, and HGCalParameters::waferTypeL_.

Referenced by HGCalGeometry::getSummary().

◆ getModules()

std::vector< HGCalParameters::hgtrap > HGCalDDDConstants::getModules ( ) const

Definition at line 397 of file HGCalDDDConstants.cc.

397  {
398  std::vector<HGCalParameters::hgtrap> mytrs;
399  for (unsigned int k = 0; k < hgpar_->moduleLayR_.size(); ++k)
400  mytrs.emplace_back(hgpar_->getModule(k, true));
401  return mytrs;
402 }

References HGCalParameters::getModule(), hgpar_, dqmdumpme::k, and HGCalParameters::moduleLayR_.

◆ getParameter()

const HGCalParameters* HGCalDDDConstants::getParameter ( ) const
inline

Definition at line 57 of file HGCalDDDConstants.h.

57 { return hgpar_; }

References hgpar_.

Referenced by HGCalGeometry::getSummary().

◆ getPhiBins()

int HGCalDDDConstants::getPhiBins ( int  lay) const

Definition at line 404 of file HGCalDDDConstants.cc.

404  {
405  return ((mode_ == HGCalGeometryMode::Trapezoid) ? hgpar_->scintCells(lay) : 0);
406 }

References hgpar_, mode_, HGCalParameters::scintCells(), and HGCalGeometryMode::Trapezoid.

◆ getRadiusLayer()

const std::vector<double>& HGCalDDDConstants::getRadiusLayer ( int  layer) const
inline

◆ getREtaRange()

std::pair< int, int > HGCalDDDConstants::getREtaRange ( int  lay) const

Definition at line 408 of file HGCalDDDConstants.cc.

408  {
409  int irmin(0), irmax(0);
411  int indx = layerIndex(lay, false);
412  if ((indx >= 0) && (indx < static_cast<int>(hgpar_->iradMinBH_.size()))) {
413  irmin = hgpar_->iradMinBH_[indx];
414  irmax = hgpar_->iradMaxBH_[indx];
415  }
416  }
417  return std::make_pair(irmin, irmax);
418 }

References hgpar_, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, layerIndex(), mode_, and HGCalGeometryMode::Trapezoid.

Referenced by HGCalTriggerGeometryV9Imp2::getModuleFromTriggerCell(), and HGCalTriggerGeometryV9Imp2::getTriggerCellsFromModule().

◆ getTrForm()

HGCalParameters::hgtrform HGCalDDDConstants::getTrForm ( unsigned int  k) const
inline

Definition at line 64 of file HGCalDDDConstants.h.

64 { return hgpar_->getTrForm(k); }

References HGCalParameters::getTrForm(), hgpar_, and dqmdumpme::k.

Referenced by HGCalGeometry::getSummary(), and HGCalDDDConstants().

◆ getTrFormN()

unsigned int HGCalDDDConstants::getTrFormN ( ) const
inline

Definition at line 65 of file HGCalDDDConstants.h.

65 { return hgpar_->trformIndex_.size(); }

References hgpar_, and HGCalParameters::trformIndex_.

Referenced by HGCalGeometry::getSummary(), and HGCalDDDConstants().

◆ getTrForms()

std::vector< HGCalParameters::hgtrform > HGCalDDDConstants::getTrForms ( ) const

Definition at line 420 of file HGCalDDDConstants.cc.

420  {
421  std::vector<HGCalParameters::hgtrform> mytrs;
422  for (unsigned int k = 0; k < hgpar_->trformIndex_.size(); ++k)
423  mytrs.emplace_back(hgpar_->getTrForm(k));
424  return mytrs;
425 }

References HGCalParameters::getTrForm(), hgpar_, dqmdumpme::k, and HGCalParameters::trformIndex_.

Referenced by HGCalTrackCollectionProducer::beginLuminosityBlock().

◆ getTypeHex()

int HGCalDDDConstants::getTypeHex ( int  layer,
int  waferU,
int  waferV 
) const

Definition at line 436 of file HGCalDDDConstants.cc.

436  {
437  // Get the module type for a silicon wafer
439  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
440  return ((itr == hgpar_->typesInLayers_.end() ? 2 : hgpar_->waferTypeL_[itr->second]));
441  } else {
442  return -1;
443  }
444 }

References HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgpar_, mode_, HGCalParameters::typesInLayers_, HGCalWaferIndex::waferIndex(), and HGCalParameters::waferTypeL_.

Referenced by HGCalTriggerGeometryV9Imp2::detIdWaferType(), HGCalTriggerGeometryV9Imp1::detIdWaferType(), and HGCalTopology::neighbors().

◆ getTypeTrap()

int HGCalDDDConstants::getTypeTrap ( int  layer) const

Definition at line 427 of file HGCalDDDConstants.cc.

427  {
428  // Get the module type for scinitllator
430  return hgpar_->scintType(layer);
431  } else {
432  return -1;
433  }
434 }

References hgpar_, mode_, HGCalParameters::scintType(), and HGCalGeometryMode::Trapezoid.

Referenced by HGCalTriggerGeometryV9Imp1::fillInvalidTriggerCells(), HGCalTriggerGeometryV9Imp1::getCellsFromTriggerCell(), and HGCalTriggerGeometryV9Imp1::getNeighborsFromTriggerCell().

◆ getUVMax()

int HGCalDDDConstants::getUVMax ( int  type) const
inline

Definition at line 69 of file HGCalDDDConstants.h.

69 { return ((type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_); }

References hgpar_, HGCalParameters::nCellsCoarse_, and HGCalParameters::nCellsFine_.

Referenced by maskCell(), and HGCalTopology::neighbors().

◆ isHalfCell()

bool HGCalDDDConstants::isHalfCell ( int  waferType,
int  cell 
) const

Definition at line 446 of file HGCalDDDConstants.cc.

446  {
447  if (waferType < 1 || cell < 0)
448  return false;
449  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
450 }

References HGCalParameters::cellCoarseHalf_, HGCalParameters::cellFineHalf_, hgpar_, and waferType().

◆ isValidCell()

bool HGCalDDDConstants::isValidCell ( int  layindex,
int  wafer,
int  cell 
) const
private

Definition at line 1489 of file HGCalDDDConstants.cc.

1489  {
1490  // Calculate the position of the cell
1491  // Works for options HGCalHexagon/HGCalHexagonFull
1492  double x = hgpar_->waferPosX_[wafer];
1493  double y = hgpar_->waferPosY_[wafer];
1494  if (hgpar_->waferTypeT_[wafer] - 1 == HGCSiliconDetId::HGCalFine) {
1495  x += hgpar_->cellFineX_[cell];
1496  y += hgpar_->cellFineY_[cell];
1497  } else {
1498  x += hgpar_->cellCoarseX_[cell];
1499  y += hgpar_->cellCoarseY_[cell];
1500  }
1501  double rr = sqrt(x * x + y * y);
1502  bool result = ((rr >= hgpar_->rMinLayHex_[lay - 1]) && (rr <= hgpar_->rMaxLayHex_[lay - 1]) &&
1503  (wafer < (int)(hgpar_->waferPosX_.size())));
1504 #ifdef EDM_ML_DEBUG
1505  if (!result)
1506  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << wafer << ":" << cell << " Position " << x << ":" << y
1507  << ":" << rr << " Compare Limits " << hgpar_->rMinLayHex_[lay - 1] << ":"
1508  << hgpar_->rMaxLayHex_[lay - 1] << " Flag " << result;
1509 #endif
1510  return result;
1511 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, HGCSiliconDetId::HGCalFine, hgpar_, createfilelist::int, mps_fire::result, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, findQualityFiles::rr, mathSSE::sqrt(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferTypeT_, x, and y.

Referenced by isValidHex().

◆ isValidCell8()

bool HGCalDDDConstants::isValidCell8 ( int  lay,
int  waferU,
int  waferV,
int  cellU,
int  cellV,
int  type 
) const
private

Definition at line 1513 of file HGCalDDDConstants.cc.

1513  {
1514  float x(0), y(0);
1515  int kndx = cellV * 100 + cellU;
1516  if (type == 0) {
1517  auto ktr = hgpar_->cellFineIndex_.find(kndx);
1518  if (ktr != hgpar_->cellFineIndex_.end()) {
1519  x = hgpar_->cellFineX_[ktr->second];
1520  y = hgpar_->cellFineY_[ktr->second];
1521  }
1522 #ifdef EDM_ML_DEBUG
1523  edm::LogVerbatim("HGCalGeom") << "Fine " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
1524  << (ktr != hgpar_->cellFineIndex_.end());
1525 #endif
1526  } else {
1527  auto ktr = hgpar_->cellCoarseIndex_.find(kndx);
1528  if (ktr != hgpar_->cellCoarseIndex_.end()) {
1529  x = hgpar_->cellCoarseX_[ktr->second];
1530  y = hgpar_->cellCoarseY_[ktr->second];
1531  }
1532 #ifdef EDM_ML_DEBUG
1533  edm::LogVerbatim("HGCalGeom") << "Coarse " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
1534  << (ktr != hgpar_->cellCoarseIndex_.end());
1535 #endif
1536  }
1537  const auto& xy = waferPosition(lay, waferU, waferV, true, false);
1538  x += xy.first;
1539  y += xy.second;
1540 #ifdef EDM_ML_DEBUG
1541  edm::LogVerbatim("HGCalGeom") << "With wafer (" << waferU << "," << waferV << ") " << x << ":" << y;
1542 #endif
1543  double rr = sqrt(x * x + y * y);
1544  int ll = lay - hgpar_->firstLayer_;
1545  bool result = ((rr >= hgpar_->rMinLayHex_[ll]) && (rr <= hgpar_->rMaxLayHex_[ll]));
1546 #ifdef EDM_ML_DEBUG
1547  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << ll << ":" << waferU << ":" << waferV << ":" << cellU << ":"
1548  << cellV << " Position " << x << ":" << y << ":" << rr << " Compare Limits "
1549  << hgpar_->rMinLayHex_[ll] << ":" << hgpar_->rMaxLayHex_[ll] << " Flag " << result;
1550 #endif
1551  return result;
1552 }

References HGCalParameters::cellCoarseIndex_, HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineIndex_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, HGCalParameters::firstLayer_, hgpar_, mps_fire::result, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, findQualityFiles::rr, mathSSE::sqrt(), waferPosition(), x, geometryCSVtoXML::xy, and y.

Referenced by isValidHex8().

◆ isValidHex()

bool HGCalDDDConstants::isValidHex ( int  lay,
int  mod,
int  cell,
bool  reco 
) const

Definition at line 452 of file HGCalDDDConstants.cc.

452  {
453  // Check validity for a layer|wafer|cell of pre-TDR version
454  bool result(false), resultMod(false);
455  int cellmax(0);
457  int32_t copyNumber = hgpar_->waferCopy_[mod];
458  result = ((lay > 0 && lay <= (int)(layers(reco))));
459  if (result) {
460  const int32_t lay_idx = reco ? (lay - 1) * 3 + 1 : lay;
461  const auto& the_modules = hgpar_->copiesInLayers_[lay_idx];
462  auto moditr = the_modules.find(copyNumber);
463  result = resultMod = (moditr != the_modules.end());
464 #ifdef EDM_ML_DEBUG
465  if (!result)
466  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants: Layer " << lay << ":" << lay_idx << " Copy " << copyNumber
467  << ":" << mod << " Flag " << result;
468 #endif
469  if (result) {
470  if (moditr->second >= 0) {
471  if (mod >= (int)(hgpar_->waferTypeT_.size()))
472  edm::LogWarning("HGCalGeom") << "Module no. out of bound for " << mod << " to be compared with "
473  << (hgpar_->waferTypeT_).size() << " ***** ERROR *****";
474  cellmax = ((hgpar_->waferTypeT_[mod] - 1 == HGCSiliconDetId::HGCalFine) ? (int)(hgpar_->cellFineX_.size())
475  : (int)(hgpar_->cellCoarseX_.size()));
476  result = (cell >= 0 && cell <= cellmax);
477  } else {
478  result = isValidCell(lay_idx, mod, cell);
479  }
480  }
481  }
482  }
483 
484 #ifdef EDM_ML_DEBUG
485  if (!result)
486  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants: Layer " << lay << ":"
487  << (lay > 0 && (lay <= (int)(layers(reco)))) << " Module " << mod << ":" << resultMod
488  << " Cell " << cell << ":" << cellmax << ":" << (cell >= 0 && cell <= cellmax) << ":"
489  << maxCells(reco);
490 #endif
491  return result;
492 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCalParameters::copiesInLayers_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, HGCSiliconDetId::HGCalFine, hgpar_, createfilelist::int, isValidCell(), layers(), maxCells(), mod(), mode_, mps_fire::result, findQualityFiles::size, HGCalParameters::waferCopy_, and HGCalParameters::waferTypeT_.

Referenced by HGCNumberingScheme::getUnitID(), and HGCalTopology::valid().

◆ isValidHex8() [1/2]

bool HGCalDDDConstants::isValidHex8 ( int  lay,
int  modU,
int  modV,
int  cellU,
int  cellV,
bool  fullAndPart = false 
) const

Definition at line 526 of file HGCalDDDConstants.cc.

526  {
527  // First check validity for a layer|wafer| of post TDR version
528  if (!isValidHex8(layer, modU, modV, fullAndPart))
529  return false;
530  int indx = HGCalWaferIndex::waferIndex(layer, modU, modV);
531  auto itr = hgpar_->typesInLayers_.find(indx);
532  int type = hgpar_->waferTypeL_[itr->second];
533  int N = ((hgpar_->waferTypeL_[itr->second] == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_);
534 #ifdef EDM_ML_DEBUG
535  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants::isValidHex8:Cell " << cellU << ":" << cellV << ":" << N
536  << " Tests " << (cellU >= 0) << ":" << (cellU < 2 * N) << ":" << (cellV >= 0) << ":"
537  << (cellV < 2 * N) << ":" << ((cellV - cellU) < N) << ":" << ((cellU - cellV) <= N);
538 #endif
539  if ((cellU < 0) || (cellU >= 2 * N) || (cellV < 0) || (cellV >= 2 * N))
540  return false;
541  if (((cellV - cellU) >= N) || ((cellU - cellV) > N))
542  return false;
543 
544  return isValidCell8(layer, modU, modV, cellU, cellV, type);
545 }

References hgpar_, isValidCell8(), isValidHex8(), N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::typesInLayers_, HGCalWaferIndex::waferIndex(), and HGCalParameters::waferTypeL_.

◆ isValidHex8() [2/2]

bool HGCalDDDConstants::isValidHex8 ( int  lay,
int  waferU,
int  waferV,
bool  fullAndPart = false 
) const

Definition at line 494 of file HGCalDDDConstants.cc.

494  {
495  // Check validity for a layer|wafer|cell of post-TDR version
496  int indx = HGCalWaferIndex::waferIndex(layer, modU, modV);
497  auto itr = hgpar_->typesInLayers_.find(indx);
498 #ifdef EDM_ML_DEBUG
499  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants::isValidHex8:WaferType " << layer << ":" << modU << ":" << modV
500  << ":" << indx << " Test " << (itr != hgpar_->typesInLayers_.end());
501 #endif
502  if (itr == hgpar_->typesInLayers_.end())
503  return false;
504  auto jtr = waferIn_.find(indx);
505 #ifdef EDM_ML_DEBUG
506  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants::isValidHex8:WaferIn " << jtr->first << ":" << jtr->second;
507 #endif
508  if (!(jtr->second))
509  return false;
510 
511  if (fullAndPart) {
512  auto ktr = hgpar_->waferTypes_.find(indx);
513  if (ktr != hgpar_->waferTypes_.end()) {
514  if (hgpar_->waferMaskMode_ > 0) {
515  if (ktr->second.first == HGCalTypes::WaferOut)
516  return false;
517  } else {
518  if (ktr->second.first < HGCalTypes::WaferCornerMin)
519  return false;
520  }
521  }
522  }
523  return true;
524 }

References hgpar_, HGCalParameters::typesInLayers_, HGCalTypes::WaferCornerMin, waferIn_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferMaskMode_, HGCalTypes::WaferOut, and HGCalParameters::waferTypes_.

Referenced by HGCalTopology::addHGCSiliconId(), isValidHex8(), HGCalTopology::valid(), and HGCalTopology::validModule().

◆ isValidTrap()

bool HGCalDDDConstants::isValidTrap ( int  lay,
int  ieta,
int  iphi 
) const

Definition at line 547 of file HGCalDDDConstants.cc.

547  {
548  // Check validity for a layer|eta|phi of scintillator
549  const auto& indx = getIndex(layer, true);
550  if (indx.first < 0)
551  return false;
552  return ((irad >= hgpar_->iradMinBH_[indx.first]) && (irad <= hgpar_->iradMaxBH_[indx.first]) && (iphi > 0) &&
553  (iphi <= hgpar_->scintCells(layer)));
554 }

References getIndex(), hgpar_, LEDCalibrationChannels::iphi, and HGCalParameters::iradMinBH_.

Referenced by HGCalTopology::addHGCSCintillatorId(), and HGCalTopology::valid().

◆ lastLayer()

int HGCalDDDConstants::lastLayer ( bool  reco) const

Definition at line 556 of file HGCalDDDConstants.cc.

556 { return (hgpar_->firstLayer_ + tot_layers_[(int)reco] - 1); }

References HGCalParameters::firstLayer_, hgpar_, and tot_layers_.

Referenced by HGCalGeometry::neighborZ().

◆ layerIndex()

int HGCalDDDConstants::layerIndex ( int  lay,
bool  reco 
) const

Definition at line 560 of file HGCalDDDConstants.cc.

560  {
561  int ll = lay - hgpar_->firstLayer_;
562  if (ll < 0 || ll >= (int)(hgpar_->layerIndex_.size()))
563  return -1;
565  if (reco && ll >= (int)(hgpar_->depthIndex_.size()))
566  return -1;
567  return (reco ? hgpar_->depthLayerF_[ll] : hgpar_->layerIndex_[ll]);
568  } else {
569  return (hgpar_->layerIndex_[ll]);
570  }
571 }

References HGCalParameters::depthIndex_, HGCalParameters::depthLayerF_, HGCalParameters::firstLayer_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hgpar_, HGCalParameters::layerIndex_, and mode_.

Referenced by distFromEdgeHex(), distFromEdgeTrap(), getIndex(), getLayer(), getREtaRange(), and HGCalGeometry::getSummary().

◆ layers()

unsigned int HGCalDDDConstants::layers ( bool  reco) const

◆ layersInit()

unsigned int HGCalDDDConstants::layersInit ( bool  reco) const

Definition at line 573 of file HGCalDDDConstants.cc.

573  {
574  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
575 }

References HGCalParameters::depthIndex_, hgpar_, and HGCalParameters::layerIndex_.

Referenced by HGCalDDDConstants().

◆ levelTop()

int HGCalDDDConstants::levelTop ( int  ind = 0) const
inline

◆ locateCell() [1/3]

std::pair< float, float > HGCalDDDConstants::locateCell ( const HGCSiliconDetId id,
bool  debug = false 
) const

Definition at line 659 of file HGCalDDDConstants.cc.

659  {
660  int lay(id.layer());
661  double r = 0.5 * (hgpar_->waferSize_ + hgpar_->sensorSeparation_);
662  double R = 2.0 * r / sqrt3_;
663  int ncells = (id.type() == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
664  int n2 = ncells / 2;
665  auto xyoff = geomTools_.shiftXY(hgpar_->layerCenter_[lay - 1], (2.0 * r));
666  double xpos = xyoff.first + ((-2 * id.waferU() + id.waferV()) * r);
667  double ypos = xyoff.second + (1.5 * id.waferV() * R);
668 #ifdef EDM_ML_DEBUG
669  if (debug)
670  edm::LogVerbatim("HGCalGeom") << "LocateCell " << id << " Lay " << lay << " r:R " << r << ":" << R << " N "
671  << ncells << ":" << n2 << " Off " << xyoff.first << ":" << xyoff.second << " Pos "
672  << xpos << ":" << ypos;
673 #endif
674  double R1 = hgpar_->waferSize_ / (3.0 * ncells);
675  double r1 = 0.5 * R1 * sqrt3_;
676  xpos += ((1.5 * (id.cellV() - ncells) + 1.0) * R1);
677  ypos += ((id.cellU() - 0.5 * id.cellV() - n2) * 2 * r1);
678 #ifdef EDM_ML_DEBUG
679  if (debug)
680  edm::LogVerbatim("HGCalGeom") << "LocateCell r1:R1 " << r1 << ":" << R1 << " dx:dy "
681  << ((1.5 * (id.cellV() - ncells) + 1.0) * R1) << ":"
682  << ((id.cellU() - 0.5 * id.cellV() - n2) * 2 * r1) << " Pos " << xpos << ":" << ypos;
683 #endif
684  return std::make_pair(xpos * id.zside(), ypos);
685 }

References debug, geomTools_, hgpar_, HGCalParameters::layerCenter_, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, dttmaxenums::R, alignCSCRings::r, diffTwoXMLs::r1, HGCalParameters::sensorSeparation_, HGCalGeomTools::shiftXY(), sqrt3_, HGCalParameters::waferSize_, and ecaldqm::zside().

◆ locateCell() [2/3]

std::pair< float, float > HGCalDDDConstants::locateCell ( int  cell,
int  lay,
int  type,
bool  reco 
) const

Definition at line 577 of file HGCalDDDConstants.cc.

577  {
578  // type refers to wafer # for hexagon cell
579  float x(999999.), y(999999.);
580  const auto& index = getIndex(lay, reco);
581  int i = index.first;
582  if (i < 0)
583  return std::make_pair(x, y);
585  x = hgpar_->waferPosX_[type];
586  y = hgpar_->waferPosY_[type];
587 #ifdef EDM_ML_DEBUG
588  float x0(x), y0(y);
589 #endif
591  x += hgpar_->cellFineX_[cell];
592  y += hgpar_->cellFineY_[cell];
593  } else {
594  x += hgpar_->cellCoarseX_[cell];
595  y += hgpar_->cellCoarseY_[cell];
596  }
597 #ifdef EDM_ML_DEBUG
598  edm::LogVerbatim("HGCalGeom") << "LocateCell (Wafer) " << x0 << ":" << y0 << " Final " << x << ":" << y;
599 #endif
600  if (!reco) {
603  }
604  }
605  return std::make_pair(x, y);
606 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, HGCSiliconDetId::HGCalFine, hgpar_, mps_fire::i, HGCalParameters::k_ScaleToDDD, mode_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferTypeT_, x, and y.

Referenced by HGCalSimHitValidation::analyzeHits(), HGCalTBAnalyzer::analyzeSimHits(), cellInLayer(), HFNoseNumberingScheme::checkPosition(), HGCalNumberingScheme::checkPosition(), HGCalGeometry::get8Corners(), HGCalGeometry::getCorners(), HGCNumberingScheme::getLocalCoords(), HGCalGeometry::getNewCorners(), and HGCalGeometry::getPosition().

◆ locateCell() [3/3]

std::pair< float, float > HGCalDDDConstants::locateCell ( int  lay,
int  waferU,
int  waferV,
int  cellU,
int  cellV,
bool  reco,
bool  all,
bool  debug = false 
) const

Definition at line 608 of file HGCalDDDConstants.cc.

609  {
610  float x(0), y(0);
611  int indx = HGCalWaferIndex::waferIndex(lay, waferU, waferV);
612  auto itr = hgpar_->typesInLayers_.find(indx);
613  int type = ((itr == hgpar_->typesInLayers_.end()) ? 2 : hgpar_->waferTypeL_[itr->second]);
614 #ifdef EDM_ML_DEBUG
615  if (debug)
616  edm::LogVerbatim("HGCalGeom") << "LocateCell " << lay << ":" << waferU << ":" << waferV << ":" << indx << ":"
617  << (itr == hgpar_->typesInLayers_.end()) << ":" << type;
618 #endif
619  int kndx = cellV * 100 + cellU;
620  if (type == 0) {
621  auto ktr = hgpar_->cellFineIndex_.find(kndx);
622  if (ktr != hgpar_->cellFineIndex_.end()) {
623  x = hgpar_->cellFineX_[ktr->second];
624  y = hgpar_->cellFineY_[ktr->second];
625  }
626 #ifdef EDM_ML_DEBUG
627  if (debug)
628  edm::LogVerbatim("HGCalGeom") << "Fine " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
629  << (ktr != hgpar_->cellFineIndex_.end());
630 #endif
631  } else {
632  auto ktr = hgpar_->cellCoarseIndex_.find(kndx);
633  if (ktr != hgpar_->cellCoarseIndex_.end()) {
634  x = hgpar_->cellCoarseX_[ktr->second];
635  y = hgpar_->cellCoarseY_[ktr->second];
636  }
637 #ifdef EDM_ML_DEBUG
638  if (debug)
639  edm::LogVerbatim("HGCalGeom") << "Coarse " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
640  << (ktr != hgpar_->cellCoarseIndex_.end());
641 #endif
642  }
643  if (!reco) {
646  }
647  if (all) {
648  const auto& xy = waferPosition(lay, waferU, waferV, reco, debug);
649  x += xy.first;
650  y += xy.second;
651 #ifdef EDM_ML_DEBUG
652  if (debug)
653  edm::LogVerbatim("HGCalGeom") << "With wafer " << x << ":" << y << ":" << xy.first << ":" << xy.second;
654 #endif
655  }
656  return std::make_pair(x, y);
657 }

References python.cmstools::all(), HGCalParameters::cellCoarseIndex_, HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineIndex_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, debug, hgpar_, HGCalParameters::k_ScaleToDDD, HGCalParameters::typesInLayers_, HGCalWaferIndex::waferIndex(), waferPosition(), HGCalParameters::waferTypeL_, x, geometryCSVtoXML::xy, and y.

◆ locateCellHex()

std::pair< float, float > HGCalDDDConstants::locateCellHex ( int  cell,
int  wafer,
bool  reco 
) const

◆ locateCellTrap()

std::pair< float, float > HGCalDDDConstants::locateCellTrap ( int  lay,
int  ieta,
int  iphi,
bool  reco 
) const

Definition at line 703 of file HGCalDDDConstants.cc.

703  {
704  float x(0), y(0);
705  const auto& indx = getIndex(lay, reco);
706  if (indx.first >= 0) {
707  int ir = std::abs(irad);
708  int type = hgpar_->scintType(lay);
709  double phi = (iphi - 0.5) * indx.second;
710  double z = hgpar_->zLayerHex_[indx.first];
711  double r = 0.5 * (hgpar_->radiusLayer_[type][ir - 1] + hgpar_->radiusLayer_[type][ir]);
712  std::pair<double, double> range = rangeR(z, true);
713 #ifdef EDM_ML_DEBUG
714  edm::LogVerbatim("HGCalGeom") << "locateCellTrap:: Input " << lay << ":" << irad << ":" << iphi << ":" << reco
715  << " IR " << ir << ":" << hgpar_->iradMinBH_[indx.first] << ":"
716  << hgpar_->iradMaxBH_[indx.first] << " Type " << type << " Z " << indx.first << ":"
717  << z << " phi " << phi << " R " << r << ":" << range.first << ":" << range.second;
718 #endif
719  r = std::max(range.first, std::min(r, range.second));
720  x = r * std::cos(phi);
721  y = r * std::sin(phi);
722  if (irad < 0)
723  x = -x;
724  }
725  if (!reco) {
728  }
729  return std::make_pair(x, y);
730 }

References funct::abs(), funct::cos(), getIndex(), hgpar_, LEDCalibrationChannels::iphi, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, HGCalParameters::k_ScaleToDDD, SiStripPI::max, min(), phi, alignCSCRings::r, HGCalParameters::radiusLayer_, FastTimerService_cff::range, rangeR(), HGCalParameters::scintType(), funct::sin(), x, y, z, and HGCalParameters::zLayerHex_.

Referenced by HGCalSimHitValidation::analyzeHits(), and HGCalNumberingScheme::checkPosition().

◆ maskCell()

bool HGCalDDDConstants::maskCell ( const DetId id,
int  corners 
) const

Definition at line 732 of file HGCalDDDConstants.cc.

732  {
733  bool mask(false);
734  if (corners > 2 && corners <= (int)(HGCalParameters::k_CornerSize)) {
736  int N(0), layer(0), waferU(0), waferV(0), u(0), v(0);
737  if (detId.det() == DetId::Forward) {
738  HFNoseDetId id(detId);
739  N = getUVMax(id.type());
740  layer = id.layer();
741  waferU = id.waferU();
742  waferV = id.waferV();
743  u = id.cellU();
744  v = id.cellV();
745  } else {
746  HGCSiliconDetId id(detId);
747  N = getUVMax(id.type());
748  layer = id.layer();
749  waferU = id.waferU();
750  waferV = id.waferV();
751  u = id.cellU();
752  v = id.cellV();
753  }
754  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
755  auto itr = hgpar_->waferTypes_.find(wl);
756 #ifdef EDM_ML_DEBUG
757  edm::LogVerbatim("HGCalGeom") << "MaskCell: Layer " << layer << " Wafer " << waferU << ":" << waferV << " Index "
758  << wl << ":" << (itr != hgpar_->waferTypes_.end());
759 #endif
760  if (itr != hgpar_->waferTypes_.end()) {
761  if ((itr->second).second <= HGCalWaferMask::k_OffsetRotation)
762  mask = HGCalWaferMask::maskCell(u, v, N, (itr->second).first, (itr->second).second, corners);
763  else
764  mask = !(HGCalWaferMask::goodCell(
765  u, v, N, (itr->second).first, ((itr->second).second - HGCalWaferMask::k_OffsetRotation)));
766  }
767  }
768  }
769  return mask;
770 }

References DetId::det(), DetId::Forward, getUVMax(), HGCalWaferMask::goodCell(), HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgpar_, triggerObjects_cff::id, HGCalParameters::k_CornerSize, HGCalWaferMask::k_OffsetRotation, HGCalWaferMask::maskCell(), mode_, N, edm::second(), findQualityFiles::v, HGCalWaferIndex::waferIndex(), HGCalParameters::waferTypes_, and LaserClient_cfi::wl.

Referenced by hgcal::RecHitTools::maskCell(), HGCalTopology::maskCell(), HFNoseSD::setDetUnitId(), HGCalSD::setDetUnitId(), and HGCalTopology::valid().

◆ maxCells() [1/2]

int HGCalDDDConstants::maxCells ( bool  reco) const

Definition at line 772 of file HGCalDDDConstants.cc.

772  {
773  int cells(0);
774  for (unsigned int i = 0; i < layers(reco); ++i) {
775  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
776  if (cells < maxCells(lay, reco))
777  cells = maxCells(lay, reco);
778  }
779  return cells;
780 }

References postprocess-scan-build::cells, HGCalParameters::depth_, hgpar_, mps_fire::i, HGCalParameters::layer_, and layers().

Referenced by HGCalDDDConstants(), HGCalTopology::HGCalTopology(), and isValidHex().

◆ maxCells() [2/2]

int HGCalDDDConstants::maxCells ( int  lay,
bool  reco 
) const

Definition at line 782 of file HGCalDDDConstants.cc.

782  {
783  const auto& index = getIndex(lay, reco);
784  if (index.first < 0)
785  return 0;
787  unsigned int cells(0);
788  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
789  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
790  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCSiliconDetId::HGCalFine) ? (hgpar_->cellFineX_.size())
791  : (hgpar_->cellCoarseX_.size());
792  if (cell > cells)
793  cells = cell;
794  }
795  }
796  return (int)(cells);
798  int cells(0);
799  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
800  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
804  : hgpar_->waferTypeL_[itr->second]);
806  cells = std::max(cells, 3 * N * N);
807  }
808  }
809  return cells;
810  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
811  return hgpar_->scintCells(index.first + hgpar_->firstLayer_);
812  } else {
813  return 0;
814  }
815 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, postprocess-scan-build::cells, HGCalParameters::defineFull_, HGCalParameters::firstLayer_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, HGCSiliconDetId::HGCalCoarseThick, HGCSiliconDetId::HGCalFine, hgpar_, dqmdumpme::k, SiStripPI::max, mode_, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::scintCells(), HGCalGeometryMode::Trapezoid, HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), waferInLayerTest(), HGCalParameters::waferTypeL_, HGCalParameters::waferTypeT_, HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

◆ maxCellUV()

int HGCalDDDConstants::maxCellUV ( ) const
inline

◆ maxModules()

int HGCalDDDConstants::maxModules ( ) const
inline

Definition at line 92 of file HGCalDDDConstants.h.

92 { return modHalf_; }

References modHalf_.

◆ maxModulesPerLayer()

int HGCalDDDConstants::maxModulesPerLayer ( ) const
inline

Definition at line 93 of file HGCalDDDConstants.h.

93 { return maxWafersPerLayer_; }

References maxWafersPerLayer_.

◆ maxRows()

int HGCalDDDConstants::maxRows ( int  lay,
bool  reco 
) const

Definition at line 817 of file HGCalDDDConstants.cc.

817  {
818  int kymax(0);
819  const auto& index = getIndex(lay, reco);
820  int i = index.first;
821  if (i < 0)
822  return kymax;
824  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
826  int ky = ((hgpar_->waferCopy_[k]) / 100) % 100;
827  if (ky > kymax)
828  kymax = ky;
829  }
830  }
832  kymax = 1 + 2 * hgpar_->waferUVMaxLayer_[index.first];
833  }
834  return kymax;
835 }

References HGCalParameters::defineFull_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, mps_fire::i, dqmdumpme::k, mode_, HGCalParameters::waferCopy_, waferInLayerTest(), and HGCalParameters::waferUVMaxLayer_.

◆ minSlope()

double HGCalDDDConstants::minSlope ( ) const
inline

Definition at line 95 of file HGCalDDDConstants.h.

95 { return hgpar_->slopeMin_[0]; }

References hgpar_, and HGCalParameters::slopeMin_.

Referenced by HGCScintSD::update(), HGCalSD::update(), HFNoseSD::update(), and HGCSD::update().

◆ modifyUV()

int HGCalDDDConstants::modifyUV ( int  uv,
int  type1,
int  type2 
) const

Definition at line 837 of file HGCalDDDConstants.cc.

837  {
838  // Modify u/v for transition of type1 to type2
839  return (((type1 == type2) || (type1 * type2 != 0)) ? uv : ((type1 == 0) ? (2 * uv + 1) / 3 : (3 * uv) / 2));
840 }

Referenced by HGCalTopology::neighbors().

◆ modules()

int HGCalDDDConstants::modules ( int  lay,
bool  reco 
) const

Definition at line 842 of file HGCalDDDConstants.cc.

842  {
843  if (getIndex(lay, reco).first < 0)
844  return 0;
845  else
846  return max_modules_layer_[(int)reco][lay];
847 }

References dqmdumpme::first, getIndex(), createfilelist::int, and max_modules_layer_.

Referenced by wafers().

◆ modulesInit()

int HGCalDDDConstants::modulesInit ( int  lay,
bool  reco 
) const

Definition at line 849 of file HGCalDDDConstants.cc.

849  {
850  int nmod(0);
851  const auto& index = getIndex(lay, reco);
852  if (index.first < 0)
853  return nmod;
855  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
856  if (waferInLayerTest(k, index.first, hgpar_->defineFull_))
857  ++nmod;
858  }
859  } else {
860  nmod = 1 + hgpar_->lastModule_[index.first] - hgpar_->firstModule_[index.first];
861  }
862  return nmod;
863 }

References HGCalParameters::defineFull_, HGCalParameters::firstModule_, getIndex(), hgpar_, dqmdumpme::k, HGCalParameters::lastModule_, mode_, HGCalGeometryMode::Trapezoid, waferInLayerTest(), and HGCalParameters::waferPosX_.

Referenced by HGCalDDDConstants().

◆ mouseBite()

double HGCalDDDConstants::mouseBite ( bool  reco) const

◆ numberCells() [1/2]

int HGCalDDDConstants::numberCells ( bool  reco) const

Definition at line 869 of file HGCalDDDConstants.cc.

869  {
870  int cells(0);
871  unsigned int nlayer = (reco) ? hgpar_->depth_.size() : hgpar_->layer_.size();
872  for (unsigned k = 0; k < nlayer; ++k) {
873  std::vector<int> ncells = numberCells(((reco) ? hgpar_->depth_[k] : hgpar_->layer_[k]), reco);
874  cells = std::accumulate(ncells.begin(), ncells.end(), cells);
875  }
876  return cells;
877 }

References postprocess-scan-build::cells, HGCalParameters::depth_, hgpar_, dqmdumpme::k, HGCalParameters::layer_, and dt_dqm_sourceclient_common_cff::reco.

Referenced by HGCalTopology::allGeomModules().

◆ numberCells() [2/2]

std::vector< int > HGCalDDDConstants::numberCells ( int  lay,
bool  reco 
) const

Definition at line 879 of file HGCalDDDConstants.cc.

879  {
880  const auto& index = getIndex(lay, reco);
881  int i = index.first;
882  std::vector<int> ncell;
883  if (i >= 0) {
885  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
887  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCSiliconDetId::HGCalFine)
888  ? (hgpar_->cellFineX_.size())
889  : (hgpar_->cellCoarseX_.size());
890  ncell.emplace_back((int)(cell));
891  }
892  }
893  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
894  int nphi = hgpar_->scintCells(lay);
895  for (int k = hgpar_->firstModule_[i]; k <= hgpar_->lastModule_[i]; ++k)
896  ncell.emplace_back(nphi);
897  } else {
898  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
899  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
900  int cell = numberCellsHexagon(lay,
903  true);
904  ncell.emplace_back(cell);
905  }
906  }
907  }
908  }
909  return ncell;
910 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCalParameters::defineFull_, HGCalParameters::firstModule_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, HGCSiliconDetId::HGCalFine, hgpar_, mps_fire::i, dqmdumpme::k, mode_, nphi, numberCellsHexagon(), HGCalParameters::scintCells(), HGCalGeometryMode::Trapezoid, HGCalParameters::waferCopy_, waferInLayerTest(), HGCalParameters::waferTypeT_, HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

◆ numberCellsHexagon() [1/2]

int HGCalDDDConstants::numberCellsHexagon ( int  lay,
int  waferU,
int  waferV,
bool  flag 
) const

Definition at line 923 of file HGCalDDDConstants.cc.

923  {
924  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(lay, waferU, waferV));
925  int type =
927  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
928  if (flag)
929  return (3 * N * N);
930  else
931  return N;
932 }

References RemoveAddSevLevel::flag, HGCSiliconDetId::HGCalCoarseThick, hgpar_, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::typesInLayers_, HGCalWaferIndex::waferIndex(), and HGCalParameters::waferTypeL_.

◆ numberCellsHexagon() [2/2]

int HGCalDDDConstants::numberCellsHexagon ( int  wafer) const

Definition at line 912 of file HGCalDDDConstants.cc.

912  {
913  if (wafer >= 0 && wafer < (int)(hgpar_->waferTypeT_.size())) {
914  if (hgpar_->waferTypeT_[wafer] - 1 == HGCSiliconDetId::HGCalFine)
915  return (int)(hgpar_->cellFineX_.size());
916  else
917  return (int)(hgpar_->cellCoarseX_.size());
918  } else {
919  return 0;
920  }
921 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCSiliconDetId::HGCalFine, hgpar_, and HGCalParameters::waferTypeT_.

Referenced by HGCalTriggerGeometryHexImp1::fillMaps(), HGCalGeometry::newCell(), and numberCells().

◆ rangeR()

std::pair< double, double > HGCalDDDConstants::rangeR ( double  z,
bool  reco 
) const

Definition at line 934 of file HGCalDDDConstants.cc.

934  {
935  double rmin(0), rmax(0), zz(0);
936  if (hgpar_->detectorType_ > 0) {
937  zz = (reco ? std::abs(z) : HGCalParameters::k_ScaleFromDDD * std::abs(z));
938  if (hgpar_->detectorType_ <= 2) {
940  } else {
941  rmin = HGCalGeomTools::radius(
943  }
944  if ((hgpar_->detectorType_ == 2) && (zz >= hgpar_->zLayerHex_[hgpar_->firstMixedLayer_ - 1])) {
945  rmax = HGCalGeomTools::radius(
947  } else {
949  }
950  }
951  if (!reco) {
954  }
955 #ifdef EDM_ML_DEBUG
956  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeR: " << z << ":" << zz << " R " << rmin << ":" << rmax;
957 #endif
958  return std::make_pair(rmin, rmax);
959 }

References funct::abs(), HGCalParameters::detectorType_, HGCalParameters::firstLayer_, HGCalParameters::firstMixedLayer_, hgpar_, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, HGCalGeomTools::radius(), HGCalParameters::radiusMixBoundary_, HGCalParameters::rMaxFront_, HGCalParameters::rMinFront_, HGCalParameters::slopeMin_, HGCalParameters::slopeTop_, z, HGCalParameters::zFrontMin_, HGCalParameters::zFrontTop_, HGCalParameters::zLayerHex_, and geometryCSVtoXML::zz.

Referenced by ticl::SeedingRegionByTracks::buildFirstLayers(), HFNoseNumberingScheme::checkPosition(), HGCalNumberingScheme::checkPosition(), HGCDigitizer::checkPosition(), locateCellTrap(), and HGCalGeometry::neighborZ().

◆ rangeRLayer()

std::pair< double, double > HGCalDDDConstants::rangeRLayer ( int  lay,
bool  reco 
) const

Definition at line 961 of file HGCalDDDConstants.cc.

961  {
962  double rmin(0), rmax(0);
963  const auto& index = getIndex(lay, reco);
964  if (index.first >= 0 && index.first < static_cast<int>(hgpar_->rMinLayHex_.size())) {
965  rmin = hgpar_->rMinLayHex_[index.first];
966  rmax = hgpar_->rMaxLayHex_[index.first];
967  }
968  if (!reco) {
971  }
972 #ifdef EDM_ML_DEBUG
973  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeR: " << lay << ":" << index.first << " R " << rmin << ":"
974  << rmax;
975 #endif
976  return std::make_pair(rmin, rmax);
977 }

References getIndex(), hgpar_, HGCalParameters::k_ScaleToDDD, HGCalParameters::rMaxLayHex_, and HGCalParameters::rMinLayHex_.

◆ rangeZ()

std::pair< double, double > HGCalDDDConstants::rangeZ ( bool  reco) const

Definition at line 979 of file HGCalDDDConstants.cc.

979  {
980  double zmin = (hgpar_->zLayerHex_[0] - hgpar_->waferThick_);
981  double zmax = (hgpar_->zLayerHex_[hgpar_->zLayerHex_.size() - 1] + hgpar_->waferThick_);
982 #ifdef EDM_ML_DEBUG
983  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeZ: " << zmin << ":" << zmax << ":" << hgpar_->waferThick_;
984 #endif
985  if (!reco) {
988  }
989  return std::make_pair(zmin, zmax);
990 }

References hgpar_, HGCalParameters::k_ScaleToDDD, HGCalParameters::waferThick_, HGCalParameters::zLayerHex_, SiStripMonitorCluster_cfi::zmax, and SiStripMonitorCluster_cfi::zmin.

Referenced by HFNoseNumberingScheme::checkPosition(), HGCalNumberingScheme::checkPosition(), and HGCDigitizer::checkPosition().

◆ rowColumnWafer()

std::pair< int, int > HGCalDDDConstants::rowColumnWafer ( const int  wafer) const

Definition at line 992 of file HGCalDDDConstants.cc.

992  {
993  int row(0), col(0);
994  if (wafer < (int)(hgpar_->waferCopy_.size())) {
995  int copy = hgpar_->waferCopy_[wafer];
996  col = copy % 100;
997  if ((copy / 10000) % 10 != 0)
998  col = -col;
999  row = (copy / 100) % 100;
1000  if ((copy / 100000) % 10 != 0)
1001  row = -row;
1002  }
1003  return std::make_pair(row, col);
1004 }

References cuy::col, filterCSVwithJSON::copy, hgpar_, and HGCalParameters::waferCopy_.

◆ sectors()

int HGCalDDDConstants::sectors ( ) const
inline

◆ simToReco()

std::pair< int, int > HGCalDDDConstants::simToReco ( int  cell,
int  layer,
int  mod,
bool  half 
) const

Definition at line 1006 of file HGCalDDDConstants.cc.

1006  {
1008  return std::make_pair(cell, lay);
1009  } else {
1010  const auto& index = getIndex(lay, false);
1011  int i = index.first;
1012  if (i < 0) {
1013  edm::LogWarning("HGCalGeom") << "Wrong Layer # " << lay << " not in the list ***** ERROR *****";
1014  return std::make_pair(-1, -1);
1015  }
1016  if (mod >= (int)(hgpar_->waferTypeL_).size()) {
1017  edm::LogWarning("HGCalGeom") << "Invalid Wafer # " << mod << "should be < " << (hgpar_->waferTypeL_).size()
1018  << " ***** ERROR *****";
1019  return std::make_pair(-1, -1);
1020  }
1021  int depth(-1);
1022  int kx = cell;
1023  int type = hgpar_->waferTypeL_[mod];
1024  if (type == 1) {
1025  depth = hgpar_->layerGroup_[i];
1026  } else if (type == 2) {
1027  depth = hgpar_->layerGroupM_[i];
1028  } else {
1029  depth = hgpar_->layerGroupO_[i];
1030  }
1031  return std::make_pair(kx, depth);
1032  }
1033 }

References LEDCalibrationChannels::depth, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hgpar_, mps_fire::i, HGCalParameters::layerGroup_, HGCalParameters::layerGroupM_, HGCalParameters::layerGroupO_, mod(), mode_, findQualityFiles::size, and HGCalParameters::waferTypeL_.

Referenced by HGCalTimingAnalyzer::analyzeSimHits(), HGCalTBAnalyzer::analyzeSimHits(), CaloParticleDebugger::fillSimHits(), and CaloTruthAccumulator::fillSimHits().

◆ volumes()

unsigned int HGCalDDDConstants::volumes ( ) const
inline

Definition at line 110 of file HGCalDDDConstants.h.

110 { return hgpar_->moduleLayR_.size(); }

References hgpar_, and HGCalParameters::moduleLayR_.

◆ waferCount()

int HGCalDDDConstants::waferCount ( const int  type) const
inline

Definition at line 125 of file HGCalDDDConstants.h.

125 { return ((type == 0) ? waferMax_[2] : waferMax_[3]); }

References waferMax_.

◆ waferFileIndex()

int HGCalDDDConstants::waferFileIndex ( unsigned int  kk) const
inline

Definition at line 132 of file HGCalDDDConstants.h.

132  {
133  if (kk < hgpar_->waferInfoMap_.size()) {
134  auto itr = hgpar_->waferInfoMap_.begin();
135  std::advance(itr, kk);
136  return itr->first;
137  } else
138  return 0;
139  }

References hgpar_, GetRecoTauVFromDQM_MC_cff::kk, and HGCalParameters::waferInfoMap_.

◆ waferFileInfo()

std::tuple<int, int, int> HGCalDDDConstants::waferFileInfo ( unsigned int  kk) const
inline

Definition at line 140 of file HGCalDDDConstants.h.

140  {
141  if (kk < hgpar_->waferInfoMap_.size()) {
142  auto itr = hgpar_->waferInfoMap_.begin();
143  std::advance(itr, kk);
144  return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient);
145  } else
146  return std::make_tuple(0, 0, 0);
147  }

References hgpar_, GetRecoTauVFromDQM_MC_cff::kk, and HGCalParameters::waferInfoMap_.

◆ waferFileInfoExist()

bool HGCalDDDConstants::waferFileInfoExist ( int  kk) const
inline

Definition at line 155 of file HGCalDDDConstants.h.

155 { return (hgpar_->waferInfoMap_.find(kk) != hgpar_->waferInfoMap_.end()); }

References hgpar_, GetRecoTauVFromDQM_MC_cff::kk, and HGCalParameters::waferInfoMap_.

◆ waferFileInfoFromIndex()

std::tuple<int, int, int> HGCalDDDConstants::waferFileInfoFromIndex ( int  kk) const
inline

Definition at line 148 of file HGCalDDDConstants.h.

148  {
149  auto itr = hgpar_->waferInfoMap_.find(kk);
150  if (itr != hgpar_->waferInfoMap_.end()) {
151  return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient);
152  } else
153  return std::make_tuple(0, 0, 0);
154  }

References hgpar_, GetRecoTauVFromDQM_MC_cff::kk, and HGCalParameters::waferInfoMap_.

◆ waferFileSize()

unsigned int HGCalDDDConstants::waferFileSize ( ) const
inline

Definition at line 131 of file HGCalDDDConstants.h.

131 { return hgpar_->waferInfoMap_.size(); }

References hgpar_, and HGCalParameters::waferInfoMap_.

Referenced by waferType(), and waferTypeRotation().

◆ waferFromCopy()

int HGCalDDDConstants::waferFromCopy ( int  copy) const

Definition at line 1035 of file HGCalDDDConstants.cc.

1035  {
1036  const int ncopies = hgpar_->waferCopy_.size();
1037  int wafer(ncopies);
1038  bool result(false);
1039  for (int k = 0; k < ncopies; ++k) {
1040  if (copy == hgpar_->waferCopy_[k]) {
1041  wafer = k;
1042  result = true;
1043  break;
1044  }
1045  }
1046  if (!result) {
1047  wafer = -1;
1048 #ifdef EDM_ML_DEBUG
1049  edm::LogVerbatim("HGCalGeom") << "Cannot find " << copy << " in a list of " << ncopies << " members";
1050  for (int k = 0; k < ncopies; ++k)
1051  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << hgpar_->waferCopy_[k];
1052 #endif
1053  }
1054 #ifdef EDM_ML_DEBUG
1055  edm::LogVerbatim("HGCalGeom") << "WaferFromCopy " << copy << ":" << wafer << ":" << result;
1056 #endif
1057  return wafer;
1058 }

References filterCSVwithJSON::copy, hgpar_, dqmdumpme::k, mps_fire::result, and HGCalParameters::waferCopy_.

Referenced by HGCNumberingScheme::getUnitID().

◆ waferFromPosition() [1/2]

void HGCalDDDConstants::waferFromPosition ( const double  x,
const double  y,
const int  layer,
int &  waferU,
int &  waferV,
int &  cellU,
int &  cellV,
int &  celltype,
double &  wt,
bool  debug = false 
) const

Definition at line 1102 of file HGCalDDDConstants.cc.

1111  {
1112  int ll = layer - hgpar_->firstLayer_;
1115  waferU = waferV = 1 + hgpar_->waferUVMax_;
1116  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
1117  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
1118  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
1119  if (dx <= rmax_ && dy <= hexside_) {
1120  if ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy))) {
1123  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1125  : hgpar_->waferTypeL_[itr->second]);
1126 #ifdef EDM_ML_DEBUG
1127  if (debug)
1128  edm::LogVerbatim("HGCalGeom") << "WaferFromPosition:: Input " << layer << ":" << ll << ":"
1129  << hgpar_->firstLayer_ << ":" << x << ":" << y << ":" << hgpar_->xLayerHex_[ll]
1130  << ":" << hgpar_->yLayerHex_[ll] << ":" << xx << ":" << yy << " compared with "
1131  << hgpar_->waferPosX_[k] << ":" << hgpar_->waferPosY_[k] << " difference " << dx
1132  << ":" << dy << ":" << dx * tan30deg_ << ":" << (hexside_ - dy)
1133  << " comparator " << rmax_ << ":" << hexside_ << " wafer " << waferU << ":"
1134  << waferV << ":" << celltype;
1135 #endif
1136  xx -= hgpar_->waferPosX_[k];
1137  yy -= hgpar_->waferPosY_[k];
1138  break;
1139  }
1140  }
1141  }
1142  if (std::abs(waferU) <= hgpar_->waferUVMax_) {
1143  cellHex(xx, yy, celltype, cellU, cellV, debug);
1144  wt = ((celltype < 2) ? (hgpar_->cellThickness_[celltype] / hgpar_->waferThick_) : 1.0);
1145  } else {
1146  cellU = cellV = 2 * hgpar_->nCellsFine_;
1147  wt = 1.0;
1148  celltype = -1;
1149  }
1150 #ifdef EDM_ML_DEBUG
1151  if (celltype < 0) {
1154  edm::LogVerbatim("HGCalGeom") << "waferFromPosition: Bad type for X " << x << ":" << x1 << ":" << xx << " Y " << y
1155  << ":" << y1 << ":" << yy << " Wafer " << waferU << ":" << waferV << " Cell " << cellU
1156  << ":" << cellV;
1157  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
1158  double dx = std::abs(x1 - hgpar_->waferPosX_[k]);
1159  double dy = std::abs(y1 - hgpar_->waferPosY_[k]);
1160  edm::LogVerbatim("HGCalGeom") << "Wafer [" << k << "] Position (" << hgpar_->waferPosX_[k] << ", "
1161  << hgpar_->waferPosY_[k] << ") difference " << dx << ":" << dy << ":"
1162  << dx * tan30deg_ << ":" << hexside_ - dy << " Paramerers " << rmax_ << ":"
1163  << hexside_;
1164  }
1165  }
1166 #endif
1167 }

References funct::abs(), cellHex(), HGCalParameters::cellThickness_, debug, PVValHelper::dx, PVValHelper::dy, HGCalParameters::firstLayer_, hexside_, HGCSiliconDetId::HGCalCoarseThick, hgpar_, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::nCellsFine_, rmax_, tan30deg_, HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferThick_, HGCalParameters::waferTypeL_, HGCalWaferIndex::waferU(), HGCalParameters::waferUVMax_, HGCalWaferIndex::waferV(), x, testProducerWithPsetDescEmpty_cfi::x1, HGCalParameters::xLayerHex_, geometryCSVtoXML::xx, y, testProducerWithPsetDescEmpty_cfi::y1, HGCalParameters::yLayerHex_, and geometryCSVtoXML::yy.

◆ waferFromPosition() [2/2]

void HGCalDDDConstants::waferFromPosition ( const double  x,
const double  y,
int &  wafer,
int &  icell,
int &  celltyp 
) const

Definition at line 1060 of file HGCalDDDConstants.cc.

1060  {
1061  // Input x, y in Geant4 unit and transformed to CMSSW standard
1064  int size_ = (int)(hgpar_->waferCopy_.size());
1065  wafer = size_;
1066  for (int k = 0; k < size_; ++k) {
1067  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
1068  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
1069  if (dx <= rmax_ && dy <= hexside_) {
1070  if ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy))) {
1071  wafer = k;
1072  celltyp = hgpar_->waferTypeT_[k];
1073  xx -= hgpar_->waferPosX_[k];
1074  yy -= hgpar_->waferPosY_[k];
1075  break;
1076  }
1077  }
1078  }
1079  if (wafer < size_) {
1080  if (celltyp - 1 == HGCSiliconDetId::HGCalFine)
1081  icell = cellHex(
1083  else
1084  icell = cellHex(xx,
1085  yy,
1088  hgpar_->cellCoarseY_);
1089  } else {
1090  wafer = -1;
1091 #ifdef EDM_ML_DEBUG
1092  edm::LogWarning("HGCalGeom") << "Cannot get wafer type corresponding to " << x << ":" << y << " " << xx << ":"
1093  << yy;
1094 #endif
1095  }
1096 #ifdef EDM_ML_DEBUG
1097  edm::LogVerbatim("HGCalGeom") << "Position " << x << ":" << y << " Wafer " << wafer << ":" << size_ << " XX " << xx
1098  << ":" << yy << " Cell " << icell << " Type " << celltyp;
1099 #endif
1100 }

References funct::abs(), HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, cellHex(), HGCalParameters::cellSize_, PVValHelper::dx, PVValHelper::dy, hexside_, HGCSiliconDetId::HGCalFine, hgpar_, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, rmax_, tan30deg_, HGCalParameters::waferCopy_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferTypeT_, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.

Referenced by assignCellHex(), HFNoseNumberingScheme::checkPosition(), HGCalNumberingScheme::checkPosition(), HFNoseNumberingScheme::getUnitID(), HGCNumberingScheme::getUnitID(), and HGCalNumberingScheme::getUnitID().

◆ waferFullInLayer()

bool HGCalDDDConstants::waferFullInLayer ( int  wafer,
int  lay,
bool  reco 
) const

Definition at line 1176 of file HGCalDDDConstants.cc.

1176  {
1177  const auto& indx = getIndex(lay, reco);
1178  if (indx.first < 0)
1179  return false;
1180  return waferInLayerTest(wafer, indx.first, false);
1181 }

References getIndex(), and waferInLayerTest().

◆ waferInLayer()

bool HGCalDDDConstants::waferInLayer ( int  wafer,
int  lay,
bool  reco 
) const

Definition at line 1169 of file HGCalDDDConstants.cc.

1169  {
1170  const auto& indx = getIndex(lay, reco);
1171  if (indx.first < 0)
1172  return false;
1173  return waferInLayerTest(wafer, indx.first, hgpar_->defineFull_);
1174 }

References HGCalParameters::defineFull_, getIndex(), hgpar_, and waferInLayerTest().

Referenced by HGCalGeometry::getSummary(), and HGCalDDDConstants().

◆ waferInLayerTest()

bool HGCalDDDConstants::waferInLayerTest ( int  wafer,
int  lay,
bool  full 
) const
private

Definition at line 1554 of file HGCalDDDConstants.cc.

1554  {
1555  bool flag = ((mode_ == HGCalGeometryMode::Hexagon) || (mode_ == HGCalGeometryMode::HexagonFull)) ? true : false;
1556  std::pair<int, int> corner = HGCalGeomTools::waferCorner(hgpar_->waferPosX_[wafer],
1557  hgpar_->waferPosY_[wafer],
1558  rmax_,
1559  hexside_,
1560  hgpar_->rMinLayHex_[lay],
1561  hgpar_->rMaxLayHex_[lay],
1562  flag);
1563  bool in = (full ? (corner.first > 0) : (corner.first == (int)(HGCalParameters::k_CornerSize)));
1564 #ifdef EDM_ML_DEBUG
1565  edm::LogVerbatim("HGCalGeom") << "WaferInLayerTest: Layer " << lay << " wafer " << wafer << " R-limits "
1566  << hgpar_->rMinLayHex_[lay] << ":" << hgpar_->rMaxLayHex_[lay] << " Corners "
1567  << corner.first << ":" << corner.second << " In " << in;
1568 #endif
1569  return in;
1570 }

References distTCMET_cfi::corner, RemoveAddSevLevel::flag, full, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hexside_, hgpar_, recoMuon::in, HGCalParameters::k_CornerSize, mode_, rmax_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, HGCalGeomTools::waferCorner(), HGCalParameters::waferPosX_, and HGCalParameters::waferPosY_.

Referenced by maxCells(), maxRows(), modulesInit(), numberCells(), waferFullInLayer(), and waferInLayer().

◆ waferMax()

int HGCalDDDConstants::waferMax ( ) const
inline

Definition at line 126 of file HGCalDDDConstants.h.

126 { return waferMax_[1]; }

References waferMax_.

◆ waferMin()

int HGCalDDDConstants::waferMin ( ) const
inline

Definition at line 127 of file HGCalDDDConstants.h.

127 { return waferMax_[0]; }

References waferMax_.

◆ waferParameters()

std::pair< double, double > HGCalDDDConstants::waferParameters ( bool  reco) const

Definition at line 1183 of file HGCalDDDConstants.cc.

1183  {
1184  if (reco)
1185  return std::make_pair(rmax_, hexside_);
1186  else
1188 }

References hexside_, HGCalParameters::k_ScaleToDDD, and rmax_.

◆ waferPosition() [1/3]

std::pair< double, double > HGCalDDDConstants::waferPosition ( int  lay,
int  waferU,
int  waferV,
bool  reco,
bool  debug = false 
) const

Definition at line 1203 of file HGCalDDDConstants.cc.

1204  {
1205  int ll = lay - hgpar_->firstLayer_;
1206  double x = hgpar_->xLayerHex_[ll];
1207  double y = hgpar_->yLayerHex_[ll];
1208 #ifdef EDM_ML_DEBUG
1209  if (debug)
1210  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << ":" << ll << " Shift " << hgpar_->xLayerHex_[ll] << ":"
1211  << hgpar_->yLayerHex_[ll];
1212 #endif
1213  if (!reco) {
1216  }
1217 
1218  const auto& xy = waferPosition(waferU, waferV, reco);
1219  x += xy.first;
1220  y += xy.second;
1221 #ifdef EDM_ML_DEBUG
1222  if (debug)
1223  edm::LogVerbatim("HGCalGeom") << "With wafer " << x << ":" << y << ":" << xy.first << ":" << xy.second;
1224 #endif
1225  return std::make_pair(x, y);
1226 }

References debug, HGCalParameters::firstLayer_, hgpar_, HGCalParameters::k_ScaleToDDD, waferPosition(), x, HGCalParameters::xLayerHex_, geometryCSVtoXML::xy, y, and HGCalParameters::yLayerHex_.

◆ waferPosition() [2/3]

std::pair< double, double > HGCalDDDConstants::waferPosition ( int  wafer,
bool  reco 
) const

Definition at line 1190 of file HGCalDDDConstants.cc.

1190  {
1191  double xx(0), yy(0);
1192  if (wafer >= 0 && wafer < (int)(hgpar_->waferPosX_.size())) {
1193  xx = hgpar_->waferPosX_[wafer];
1194  yy = hgpar_->waferPosY_[wafer];
1195  }
1196  if (!reco) {
1199  }
1200  return std::make_pair(xx, yy);
1201 }

References hgpar_, HGCalParameters::k_ScaleToDDD, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

Referenced by HGCMouseBite::exclude(), isValidCell8(), locateCell(), and waferPosition().

◆ waferPosition() [3/3]

std::pair< double, double > HGCalDDDConstants::waferPosition ( int  waferU,
int  waferV,
bool  reco 
) const
private

Definition at line 1572 of file HGCalDDDConstants.cc.

1572  {
1573  double xx(0), yy(0);
1574  int indx = HGCalWaferIndex::waferIndex(0, waferU, waferV);
1575  auto itr = hgpar_->wafersInLayers_.find(indx);
1576  if (itr != hgpar_->wafersInLayers_.end()) {
1577  xx = hgpar_->waferPosX_[itr->second];
1578  yy = hgpar_->waferPosY_[itr->second];
1579  }
1580  if (!reco) {
1583  }
1584  return std::make_pair(xx, yy);
1585 }

References hgpar_, HGCalParameters::k_ScaleToDDD, HGCalWaferIndex::waferIndex(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::wafersInLayers_, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

◆ wafers() [1/2]

int HGCalDDDConstants::wafers ( ) const

Definition at line 1375 of file HGCalDDDConstants.cc.

1375  {
1376  int wafer(0);
1378  for (unsigned int i = 0; i < layers(true); ++i) {
1379  int lay = hgpar_->depth_[i];
1380  wafer += modules(lay, true);
1381  }
1382  } else {
1383  wafer = (int)(hgpar_->moduleLayR_.size());
1384  }
1385  return wafer;
1386 }

References HGCalParameters::depth_, hgpar_, mps_fire::i, createfilelist::int, layers(), mode_, HGCalParameters::moduleLayR_, modules(), and HGCalGeometryMode::Trapezoid.

Referenced by HGCalTopology::allGeomModules(), and HGCalDDDConstants().

◆ wafers() [2/2]

int HGCalDDDConstants::wafers ( int  layer,
int  type 
) const

Definition at line 1388 of file HGCalDDDConstants.cc.

1388  {
1389  int wafer(0);
1391  auto itr = waferLayer_.find(layer);
1392  if (itr != waferLayer_.end()) {
1393  unsigned ity = (type > 0 && type <= 2) ? type : 0;
1394  wafer = (itr->second)[ity];
1395  }
1396  } else {
1397  const auto& index = getIndex(layer, true);
1398  wafer = 1 + hgpar_->lastModule_[index.first] - hgpar_->firstModule_[index.first];
1399  }
1400  return wafer;
1401 }

References HGCalParameters::firstModule_, getIndex(), hgpar_, HGCalParameters::lastModule_, mode_, HGCalGeometryMode::Trapezoid, and waferLayer_.

◆ waferSepar()

double HGCalDDDConstants::waferSepar ( bool  reco) const
inline

◆ waferSize()

double HGCalDDDConstants::waferSize ( bool  reco) const
inline

◆ waferToCopy()

int HGCalDDDConstants::waferToCopy ( int  wafer) const
inline

Definition at line 164 of file HGCalDDDConstants.h.

164  {
165  return ((wafer >= 0) && (wafer < (int)(hgpar_->waferCopy_.size()))) ? hgpar_->waferCopy_[wafer]
166  : (int)(hgpar_->waferCopy_.size());
167  }

References hgpar_, and HGCalParameters::waferCopy_.

◆ waferType() [1/3]

int HGCalDDDConstants::waferType ( DetId const &  id,
bool  fromFile = false 
) const

Definition at line 1228 of file HGCalDDDConstants.cc.

1228  {
1229  int type(1);
1231  if (fromFile && (waferFileSize() > 0)) {
1232  int layer(0), waferU(0), waferV(0);
1233  if (id.det() != DetId::Forward) {
1234  HGCSiliconDetId hid(id);
1235  layer = hid.layer();
1236  waferU = hid.waferU();
1237  waferV = hid.waferV();
1238  } else {
1239  HFNoseDetId hid(id);
1240  layer = hid.layer();
1241  waferU = hid.waferU();
1242  waferV = hid.waferV();
1243  }
1244  auto itr = hgpar_->waferInfoMap_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1245  if (itr != hgpar_->waferInfoMap_.end())
1246  type = (itr->second).type;
1247  } else {
1248  type = ((id.det() != DetId::Forward) ? HGCSiliconDetId(id).type() : HFNoseDetId(id).type());
1249  }
1251  type = waferTypeL(HGCalDetId(id).wafer()) - 1;
1252  }
1253  return type;
1254 }

References DetId::Forward, HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, HFNoseDetId::layer(), HGCSiliconDetId::layer(), mode_, HFNoseDetId::type(), HGCSiliconDetId::type(), waferFileSize(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, waferTypeL(), HFNoseDetId::waferU(), HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), and HFNoseDetId::waferV().

Referenced by assignCellHex(), cellThickness(), isHalfCell(), and HGCalUncalibRecHitRecWeightsAlgo< HGCDataFrame >::makeRecHit().

◆ waferType() [2/3]

std::tuple< int, int, int > HGCalDDDConstants::waferType ( HGCSiliconDetId const &  id,
bool  fromFile = false 
) const

Definition at line 1275 of file HGCalDDDConstants.cc.

1275  {
1276  const auto& index = HGCalWaferIndex::waferIndex(id.layer(), id.waferU(), id.waferV());
1277  int type(-1), part(-1), orient(-1);
1278  if (fromFile && (waferFileSize() > 0)) {
1279  auto itr = hgpar_->waferInfoMap_.find(index);
1280  if (itr != hgpar_->waferInfoMap_.end()) {
1281  type = (itr->second).type;
1282  part = (itr->second).part;
1283  orient = (itr->second).orient;
1284  }
1285  } else {
1286  auto ktr = hgpar_->typesInLayers_.find(index);
1287  if (ktr != hgpar_->typesInLayers_.end())
1288  type = hgpar_->waferTypeL_[ktr->second];
1289  auto itr = hgpar_->waferTypes_.find(index);
1290  if (itr != hgpar_->waferTypes_.end()) {
1291  if ((itr->second).second < HGCalWaferMask::k_OffsetRotation) {
1292  orient = (itr->second).second;
1293  if ((itr->second).first == HGCalGeomTools::k_allCorners) {
1295  } else if ((itr->second).first == HGCalGeomTools::k_fiveCorners) {
1297  } else if ((itr->second).first == HGCalGeomTools::k_fourCorners) {
1299  } else if ((itr->second).first == HGCalGeomTools::k_threeCorners) {
1301  }
1302  } else {
1303  part = (itr->second).first;
1304  orient = ((itr->second).second - HGCalWaferMask::k_OffsetRotation);
1305  }
1306  } else {
1308  orient = 0;
1309  }
1310  }
1311  return std::make_tuple(type, part, orient);
1312 }

References dqmdumpme::first, hgpar_, HGCalGeomTools::k_allCorners, HGCalGeomTools::k_fiveCorners, HGCalGeomTools::k_fourCorners, HGCalWaferMask::k_OffsetRotation, HGCalGeomTools::k_threeCorners, edm::second(), HGCalParameters::typesInLayers_, waferFileSize(), HGCalTypes::WaferFive, HGCalTypes::WaferFull, HGCalTypes::WaferHalf, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, HGCalTypes::WaferThree, HGCalParameters::waferTypeL_, and HGCalParameters::waferTypes_.

◆ waferType() [3/3]

int HGCalDDDConstants::waferType ( int  layer,
int  waferU,
int  waferV,
bool  fromFile = false 
) const

Definition at line 1256 of file HGCalDDDConstants.cc.

1256  {
1259  if (fromFile && (waferFileSize() > 0)) {
1260  auto itr = hgpar_->waferInfoMap_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1261  if (itr != hgpar_->waferInfoMap_.end())
1262  type = (itr->second).type;
1263  } else {
1264  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1265  if (itr != hgpar_->typesInLayers_.end())
1266  type = hgpar_->waferTypeL_[itr->second];
1267  }
1269  if ((waferU >= 0) && (waferU < (int)(hgpar_->waferTypeL_.size())))
1270  type = (hgpar_->waferTypeL_[waferU] - 1);
1271  }
1272  return type;
1273 }

References HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, HGCSiliconDetId::HGCalCoarseThick, hgpar_, createfilelist::int, mode_, HGCalParameters::typesInLayers_, waferFileSize(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, and HGCalParameters::waferTypeL_.

◆ waferTypeL()

int HGCalDDDConstants::waferTypeL ( int  wafer) const
inline

Definition at line 173 of file HGCalDDDConstants.h.

173  {
174  return ((wafer >= 0) && (wafer < (int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;
175  }

References hgpar_, and HGCalParameters::waferTypeL_.

Referenced by HGCalTBAnalyzer::analyzeRecHits(), HGCalTriggerTools::sensorCellThicknessV8(), PFRecHitQTestThresholdInThicknessNormalizedMIPs::test(), and waferType().

◆ waferTypeRotation()

std::pair< int, int > HGCalDDDConstants::waferTypeRotation ( int  layer,
int  waferU,
int  waferV,
bool  fromFile = false,
bool  debug = false 
) const

Definition at line 1314 of file HGCalDDDConstants.cc.

1315  {
1316  int type(HGCalTypes::WaferOut), rotn(0);
1317  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
1318  if (fromFile && (waferFileSize() > 0)) {
1319  auto itr = hgpar_->waferInfoMap_.find(wl);
1320  if (itr != hgpar_->waferInfoMap_.end()) {
1321  type = (itr->second).part;
1322  rotn = (itr->second).orient;
1323  }
1324  } else {
1325  auto itr = hgpar_->waferTypes_.find(wl);
1327  if (itr != hgpar_->waferTypes_.end()) {
1328  if ((itr->second).second < HGCalWaferMask::k_OffsetRotation) {
1329  rotn = (itr->second).second;
1330  if ((itr->second).first == HGCalGeomTools::k_allCorners) {
1332  } else if ((itr->second).first == HGCalGeomTools::k_fiveCorners) {
1334  } else if ((itr->second).first == HGCalGeomTools::k_fourCorners) {
1336  } else if ((itr->second).first == HGCalGeomTools::k_threeCorners) {
1338  }
1339  } else {
1340  type = (itr->second).first;
1341  rotn = ((itr->second).second - HGCalWaferMask::k_OffsetRotation);
1342  }
1343  }
1344  }
1345  }
1346 #ifdef EDM_ML_DEBUG
1347  if (debug)
1348  edm::LogVerbatim("HGCalGeom") << "waferTypeRotation: Layer " << layer << " Wafer " << waferU << ":" << waferV
1349  << " Index " << std::hex << wl << std::dec << ":"
1350  << (itr != hgpar_->waferTypes_.end()) << " Type " << type << " Rotation " << rotn;
1351 #endif
1352  return std::make_pair(type, rotn);
1353 }

References debug, TauDecayModes::dec, dqmdumpme::first, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgpar_, HGCalGeomTools::k_allCorners, HGCalGeomTools::k_fiveCorners, HGCalGeomTools::k_fourCorners, HGCalWaferMask::k_OffsetRotation, HGCalGeomTools::k_threeCorners, mode_, edm::second(), waferFileSize(), HGCalTypes::WaferFive, HGCalTypes::WaferFull, HGCalTypes::WaferHalf, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, HGCalTypes::WaferOut, HGCalTypes::WaferThree, HGCalParameters::waferTypes_, and LaserClient_cfi::wl.

◆ waferTypeT()

int HGCalDDDConstants::waferTypeT ( int  wafer) const
inline

◆ waferUVMax()

int HGCalDDDConstants::waferUVMax ( ) const
inline

Definition at line 181 of file HGCalDDDConstants.h.

181 { return hgpar_->waferUVMax_; }

References hgpar_, and HGCalParameters::waferUVMax_.

Referenced by HGCalTopology::HGCalTopology().

◆ waferVirtual()

bool HGCalDDDConstants::waferVirtual ( int  layer,
int  waferU,
int  waferV 
) const

Definition at line 1355 of file HGCalDDDConstants.cc.

1355  {
1356  bool type(false);
1358  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV, false);
1359  type = (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
1361  int wl = HGCalWaferIndex::waferIndex(layer, waferU, 0, true);
1362  type = (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
1363  }
1364  return type;
1365 }

References HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, mode_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferTypes_, and LaserClient_cfi::wl.

◆ waferZ()

double HGCalDDDConstants::waferZ ( int  layer,
bool  reco 
) const

Member Data Documentation

◆ dPhiMin

const float HGCalDDDConstants::dPhiMin = 0.02
private

Definition at line 200 of file HGCalDDDConstants.h.

◆ geomTools_

HGCalGeomTools HGCalDDDConstants::geomTools_
private

Definition at line 198 of file HGCalDDDConstants.h.

Referenced by locateCell().

◆ hexside_

double HGCalDDDConstants::hexside_
private

◆ hgpar_

const HGCalParameters* HGCalDDDConstants::hgpar_
private

◆ k_horizontalShift

const double HGCalDDDConstants::k_horizontalShift = 1.0
private

Definition at line 199 of file HGCalDDDConstants.h.

◆ max_modules_layer_

Simrecovecs HGCalDDDConstants::max_modules_layer_
private

Definition at line 210 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and modules().

◆ maxWafersPerLayer_

int32_t HGCalDDDConstants::maxWafersPerLayer_
private

Definition at line 211 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxModulesPerLayer().

◆ mode_

HGCalGeometryMode::GeometryMode HGCalDDDConstants::mode_
private

◆ modHalf_

int32_t HGCalDDDConstants::modHalf_
private

Definition at line 208 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxModules().

◆ rmax_

double HGCalDDDConstants::rmax_
private

◆ sqrt3_

const double HGCalDDDConstants::sqrt3_
private

Definition at line 205 of file HGCalDDDConstants.h.

Referenced by cellHex(), distFromEdgeHex(), and locateCell().

◆ tan30deg_

constexpr static double HGCalDDDConstants::tan30deg_ = 0.5773502693
staticconstexprprivate

◆ tot_layers_

std::array<uint32_t, 2> HGCalDDDConstants::tot_layers_
private

Definition at line 209 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), lastLayer(), and layers().

◆ tot_wafers_

int32_t HGCalDDDConstants::tot_wafers_
private

Definition at line 208 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants().

◆ waferIn_

std::unordered_map<int32_t, bool> HGCalDDDConstants::waferIn_
private

Definition at line 214 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and isValidHex8().

◆ waferLayer_

std::map<int, HGCWaferParam> HGCalDDDConstants::waferLayer_
private

Definition at line 212 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and wafers().

◆ waferMax_

std::array<int, 4> HGCalDDDConstants::waferMax_
private

Definition at line 213 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), waferCount(), waferMax(), and waferMin().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
DDAxes::y
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
HGCalWaferIndex::waferV
static int32_t waferV(const int32_t index)
Definition: HGCalWaferIndex.cc:42
HGCalDDDConstants::tot_wafers_
int32_t tot_wafers_
Definition: HGCalDDDConstants.h:208
HGCalParameters::cellCoarseHalf_
std::vector< bool > cellCoarseHalf_
Definition: HGCalParameters.h:121
HGCalGeomTools::waferCorner
static std::pair< int32_t, int32_t > waferCorner(double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug=false)
Definition: HGCalGeomTools.cc:219
V0Monitor_cff.v0
v0
Definition: V0Monitor_cff.py:7
HGCalParameters::nSectors_
int nSectors_
Definition: HGCalParameters.h:68
mps_fire.i
i
Definition: mps_fire.py:355
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
HGCalDDDConstants::tan30deg_
constexpr static double tan30deg_
Definition: HGCalDDDConstants.h:204
HGCalParameters::moduleCellS_
std::vector< double > moduleCellS_
Definition: HGCalParameters.h:76
HGCalParameters::firstLayer_
int firstLayer_
Definition: HGCalParameters.h:166
HGCalDDDConstants::waferFromPosition
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
Definition: HGCalDDDConstants.cc:1060
HGCalDDDConstants::maxWafersPerLayer_
int32_t maxWafersPerLayer_
Definition: HGCalDDDConstants.h:211
HGCalWaferMask::goodCell
static bool goodCell(int u, int v, int N, int type, int rotn)
Definition: HGCalWaferMask.cc:107
HGCalDDDConstants::cellHex
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
Definition: HGCalDDDConstants.cc:1403
HGCalDDDConstants::sqrt3_
const double sqrt3_
Definition: HGCalDDDConstants.h:205
HGCalDDDConstants::modulesInit
int modulesInit(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:849
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HGCalParameters::zLayerHex_
std::vector< double > zLayerHex_
Definition: HGCalParameters.h:106
HGCalDDDConstants::waferIn_
std::unordered_map< int32_t, bool > waferIn_
Definition: HGCalDDDConstants.h:214
HGCalDDDConstants::isValidCell
bool isValidCell(int layindex, int wafer, int cell) const
Definition: HGCalDDDConstants.cc:1489
LaserClient_cfi.wl
wl
Definition: LaserClient_cfi.py:46
HGCalParameters::moduleCellR_
std::vector< double > moduleCellR_
Definition: HGCalParameters.h:83
HGCalParameters::zFrontMin_
std::vector< double > zFrontMin_
Definition: HGCalParameters.h:133
HGCalParameters::getModule
hgtrap getModule(unsigned int k, bool reco) const
Definition: HGCalParameters.cc:35
min
T min(T a, T b)
Definition: MathUtil.h:58
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
findQualityFiles.rr
string rr
Definition: findQualityFiles.py:185
HGCalParameters::rMaxLayHex_
std::vector< double > rMaxLayHex_
Definition: HGCalParameters.h:108
HGCalParameters::cellFineY_
std::vector< double > cellFineY_
Definition: HGCalParameters.h:115
HGCalTypes::WaferThree
Definition: HGCalTypes.h:57
HGCalTypes::WaferFull
Definition: HGCalTypes.h:50
mod
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
cuy.col
col
Definition: cuy.py:1010
HGCalParameters::k_CornerSize
static constexpr uint32_t k_CornerSize
Definition: HGCalParameters.h:38
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
distTCMET_cfi.corner
corner
Definition: distTCMET_cfi.py:38
HGCalParameters::slopeTop_
std::vector< double > slopeTop_
Definition: HGCalParameters.h:162
HGCalParameters::layerIndex_
std::vector< int > layerIndex_
Definition: HGCalParameters.h:98
HGCalParameters::yLayerHex_
std::vector< double > yLayerHex_
Definition: HGCalParameters.h:105
HGCalParameters::scintCellSize
double scintCellSize(const int layer) const
Definition: HGCalParameters.h:61
HGCalTypes::CellType::TopLeftEdge
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
HGCalParameters::nCellsCoarse_
int nCellsCoarse_
Definition: HGCalParameters.h:137
HGCalParameters::wafersInLayers_
wafer_map wafersInLayers_
Definition: HGCalParameters.h:170
HGCalParameters::waferSize_
double waferSize_
Definition: HGCalParameters.h:138
HGCalTypes::WaferOut
Definition: HGCalTypes.h:58
HGCalTypes::WaferCornerMin
static constexpr int32_t WaferCornerMin
Definition: HGCalTypes.h:61
HGCalGeomTools::shiftXY
std::pair< double, double > shiftXY(int waferPosition, double waferSize) const
Definition: HGCalGeomTools.cc:166
full
Definition: GenABIO.cc:168
DDAxes::x
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
findQualityFiles.v
v
Definition: findQualityFiles.py:179
HGCalParameters::moduleLayR_
std::vector< int > moduleLayR_
Definition: HGCalParameters.h:77
HGCalParameters::waferUVMaxLayer_
std::vector< int > waferUVMaxLayer_
Definition: HGCalParameters.h:143
HGCalTypes::WaferFive
Definition: HGCalTypes.h:51
HFNoseDetId
Definition: HFNoseDetId.h:22
HGCalParameters::iradMaxBH_
std::vector< int > iradMaxBH_
Definition: HGCalParameters.h:158
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
HGCalTypes::CellType::TopRightEdge
SiStripMonitorCluster_cfi.zmin
zmin
Definition: SiStripMonitorCluster_cfi.py:200
HGCalTypes::CellType::UndefinedType
dqmdumpme.first
first
Definition: dqmdumpme.py:55
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:26
HGCalDDDConstants::max_modules_layer_
Simrecovecs max_modules_layer_
Definition: HGCalDDDConstants.h:210
HGCSiliconDetId::HGCalCoarseThick
Definition: HGCSiliconDetId.h:24
HGCalDDDConstants::geomTools_
HGCalGeomTools geomTools_
Definition: HGCalDDDConstants.h:198
HGCalParameters::waferPosY_
std::vector< double > waferPosY_
Definition: HGCalParameters.h:113
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HGCalParameters::sensorSeparation_
double sensorSeparation_
Definition: HGCalParameters.h:140
HGCalDDDConstants::isValidHex8
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
Definition: HGCalDDDConstants.cc:494
nphi
const int nphi
Definition: CMTRawAnalyzer.h:424
HGCalTypes::CellType::BottomCorner
HGCalGeomTools::k_fiveCorners
static const int k_fiveCorners
Definition: HGCalGeomTools.h:14
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HGCalDDDConstants::waferType
int waferType(DetId const &id, bool fromFile=false) const
Definition: HGCalDDDConstants.cc:1228
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
debug
#define debug
Definition: HDRShower.cc:19
part
part
Definition: HCALResponse.h:20
HGCalGeometryMode::Trapezoid
Definition: HGCalGeometryMode.h:25
HGCalParameters::trformIndex_
std::vector< uint32_t > trformIndex_
Definition: HGCalParameters.h:84
HGCalDDDConstants::isValidCell8
bool isValidCell8(int lay, int waferU, int waferV, int cellU, int cellV, int type) const
Definition: HGCalDDDConstants.cc:1513
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCalDDDConstants::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalDDDConstants.h:207
trackingPlots.hp
hp
Definition: trackingPlots.py:1246
HGCalParameters::radiusLayer_
std::vector< double > radiusLayer_[2]
Definition: HGCalParameters.h:156
HGCalParameters::cellFineHalf_
std::vector< bool > cellFineHalf_
Definition: HGCalParameters.h:117
HGCalDDDConstants::maxCells
int maxCells(bool reco) const
Definition: HGCalDDDConstants.cc:772
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
HGCalParameters::layerGroup_
std::vector< int > layerGroup_
Definition: HGCalParameters.h:99
HGCalParameters::radiusMixBoundary_
std::vector< double > radiusMixBoundary_
Definition: HGCalParameters.h:152
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HGCalParameters::waferPosX_
std::vector< double > waferPosX_
Definition: HGCalParameters.h:112
HGCalDDDConstants::waferInLayer
bool waferInLayer(int wafer, int lay, bool reco) const
Definition: HGCalDDDConstants.cc:1169
HGCalParameters::waferUVMax_
int waferUVMax_
Definition: HGCalParameters.h:142
DDAxes::z
HGCalDDDConstants::layerIndex
int layerIndex(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:560
HGCalGeomTools::k_allCorners
static const int k_allCorners
Definition: HGCalGeomTools.h:13
N
#define N
Definition: blowfish.cc:9
HGCalParameters::rMinLayHex_
std::vector< double > rMinLayHex_
Definition: HGCalParameters.h:107
RecoTauValidation_cfi.posX
posX
Definition: RecoTauValidation_cfi.py:288
HGCalDDDConstants::waferFileSize
unsigned int waferFileSize() const
Definition: HGCalDDDConstants.h:131
HGCalDDDConstants::wafers
int wafers() const
Definition: HGCalDDDConstants.cc:1375
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
HGCalParameters::typesInLayers_
wafer_map typesInLayers_
Definition: HGCalParameters.h:171
HGCalParameters::getTrForm
hgtrform getTrForm(unsigned int k) const
Definition: HGCalParameters.cc:108
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HGCalParameters::waferCopy_
std::vector< int > waferCopy_
Definition: HGCalParameters.h:109
HGCalDDDConstants::rangeR
std::pair< double, double > rangeR(double z, bool reco) const
Definition: HGCalDDDConstants.cc:934
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:27
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HGCalParameters::iradMinBH_
std::vector< int > iradMinBH_
Definition: HGCalParameters.h:157
HGCalWaferIndex::waferU
static int32_t waferU(const int32_t index)
Definition: HGCalWaferIndex.cc:37
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
HGCSiliconDetId::HGCalFine
Definition: HGCSiliconDetId.h:24
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:69
edm::LogWarning
Definition: MessageLogger.h:141
HGCalParameters::mouseBite_
double mouseBite_
Definition: HGCalParameters.h:141
cms::cuda::wmin
V wmin
Definition: HistoContainer.h:136
HGCalParameters::nCellsFine_
int nCellsFine_
Definition: HGCalParameters.h:136
HGCalParameters::firstModule_
std::vector< int > firstModule_
Definition: HGCalParameters.h:160
HGCalDDDConstants::hexside_
double hexside_
Definition: HGCalDDDConstants.h:206
HFNoseDetId::type
int type() const
get the type
Definition: HFNoseDetId.h:50
HGCalDDDConstants::waferLayer_
std::map< int, HGCWaferParam > waferLayer_
Definition: HGCalDDDConstants.h:212
HGCalDDDConstants::modHalf_
int32_t modHalf_
Definition: HGCalDDDConstants.h:208
HGCalDDDConstants::numberCells
int numberCells(bool reco) const
Definition: HGCalDDDConstants.cc:869
HGCalParameters::depth_
std::vector< int > depth_
Definition: HGCalParameters.h:101
HGCalParameters::rMaxFront_
std::vector< double > rMaxFront_
Definition: HGCalParameters.h:164
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HGCalParameters::cellFineIndex_
wafer_map cellFineIndex_
Definition: HGCalParameters.h:116
HGCalDDDConstants::getIndex
std::pair< int, float > getIndex(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:1472
HGCalParameters::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalParameters.h:131
HGCalParameters::cellCoarseY_
std::vector< double > cellCoarseY_
Definition: HGCalParameters.h:119
cms::cuda::wmax
V V wmax
Definition: HistoContainer.h:136
HGCalGeometryMode::Hexagon8Full
Definition: HGCalGeometryMode.h:25
recoMuon::in
Definition: RecoMuonEnumerators.h:6
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:558
HGCalParameters::scintType
int scintType(const int layer) const
Definition: HGCalParameters.h:62
createfilelist.int
int
Definition: createfilelist.py:10
HGCalParameters::scintCells
int scintCells(const int layer) const
Definition: HGCalParameters.h:60
HGCalParameters::layerGroupO_
std::vector< int > layerGroupO_
Definition: HGCalParameters.h:123
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
edm::LogVerbatim
Definition: MessageLogger.h:297
HGCalTypes::CellType::TopLeftCorner
HGCalTypes::CellType::LeftEdge
PVValHelper::dy
Definition: PVValidationHelpers.h:49
HGCalParameters::layerGroupM_
std::vector< int > layerGroupM_
Definition: HGCalParameters.h:122
HGCalDDDConstants::sectors
int sectors() const
Definition: HGCalDDDConstants.h:108
HGCalParameters::waferR_
double waferR_
Definition: HGCalParameters.h:128
HGCalDDDConstants::getUVMax
int getUVMax(int type) const
Definition: HGCalDDDConstants.h:69
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
HGCalParameters::layerOffset_
int layerOffset_
Definition: HGCalParameters.h:168
HGCalParameters::waferThick_
double waferThick_
Definition: HGCalParameters.h:139
HGCalDDDConstants::rmax_
double rmax_
Definition: HGCalDDDConstants.h:206
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:47
HGCalTypes::CellType::TopCorner
HGCalDDDConstants::getTrForm
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Definition: HGCalDDDConstants.h:64
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
HGCalGeometryMode::Hexagon
Definition: HGCalGeometryMode.h:25
HGCalParameters::k_ScaleFromDDD
static constexpr double k_ScaleFromDDD
Definition: HGCalParameters.h:30
HGCalParameters::waferTypeT_
std::vector< int > waferTypeT_
Definition: HGCalParameters.h:111
HGCalDDDConstants::waferMax_
std::array< int, 4 > waferMax_
Definition: HGCalDDDConstants.h:213
HGCalTypes::CellType::BottomRightCorner
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalDDDConstants::tot_layers_
std::array< uint32_t, 2 > tot_layers_
Definition: HGCalDDDConstants.h:209
HGCalDDDConstants::numberCellsHexagon
int numberCellsHexagon(int wafer) const
Definition: HGCalDDDConstants.cc:912
HGCalParameters
Definition: HGCalParameters.h:13
HGCalWaferMask::k_OffsetRotation
static const int k_OffsetRotation
Definition: HGCalWaferMask.h:31
HGCalParameters::k_ScaleToDDD
static constexpr double k_ScaleToDDD
Definition: HGCalParameters.h:31
DDAxes::phi
HGCalDetId
Definition: HGCalDetId.h:8
HGCalGeomTools::radius
static void radius(double zf, double zb, std::vector< double > const &zFront1, std::vector< double > const &rFront1, std::vector< double > const &slope1, std::vector< double > const &zFront2, std::vector< double > const &rFront2, std::vector< double > const &slope2, int flag, std::vector< double > &zz, std::vector< double > &rin, std::vector< double > &rout)
Definition: HGCalGeomTools.cc:11
HGCalGeometryMode::HexagonFull
Definition: HGCalGeometryMode.h:25
type
type
Definition: HCALResponse.h:21
HGCalParameters::detectorType_
int detectorType_
Definition: HGCalParameters.h:66
HGCalDDDConstants::cellType
HGCalTypes::CellType cellType(int type, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:245
std
Definition: JetResolutionObject.h:76
HGCalParameters::waferMaskMode_
int waferMaskMode_
Definition: HGCalParameters.h:173
HGCalTypes::CellType::BottomLeftCorner
HGCalParameters::waferInfoMap_
waferInfo_map waferInfoMap_
Definition: HGCalParameters.h:174
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
HGCalParameters::slopeMin_
std::vector< double > slopeMin_
Definition: HGCalParameters.h:132
HGCalParameters::depthIndex_
std::vector< int > depthIndex_
Definition: HGCalParameters.h:102
HGCalParameters::defineFull_
bool defineFull_
Definition: HGCalParameters.h:144
HGCalParameters::xLayerHex_
std::vector< double > xLayerHex_
Definition: HGCalParameters.h:104
HGCalTypes::CellType::RightEdge
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
HGCalGeomTools::k_threeCorners
static const int k_threeCorners
Definition: HGCalGeomTools.h:16
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HGCalParameters::waferTypes_
waferT_map waferTypes_
Definition: HGCalParameters.h:172
HGCalTypes::CellType::BottomRightEdge
HGCalDDDConstants::waferPosition
std::pair< double, double > waferPosition(int wafer, bool reco) const
Definition: HGCalDDDConstants.cc:1190
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
HGCalTypes::WaferHalf
Definition: HGCalTypes.h:54
dt_dqm_sourceclient_common_cff.reco
reco
Definition: dt_dqm_sourceclient_common_cff.py:110
HGCalGeomTools::k_fourCorners
static const int k_fourCorners
Definition: HGCalGeomTools.h:15
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
postprocess-scan-build.cells
cells
Definition: postprocess-scan-build.py:13
HGCalParameters::layerCenter_
std::vector< int > layerCenter_
Definition: HGCalParameters.h:169
HGCalParameters::rMinFront_
std::vector< double > rMinFront_
Definition: HGCalParameters.h:134
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:161
HGCalDDDConstants::modules
int modules(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:842
HGCSiliconDetId::type
int type() const
get the type
Definition: HGCSiliconDetId.h:51
HGCalParameters::cellFineX_
std::vector< double > cellFineX_
Definition: HGCalParameters.h:114
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HGCalWaferIndex::waferIndex
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
Definition: HGCalWaferIndex.cc:17
HGCalParameters::cellThickness_
std::vector< double > cellThickness_
Definition: HGCalParameters.h:145
HGCalParameters::firstMixedLayer_
int firstMixedLayer_
Definition: HGCalParameters.h:167
HGCalDDDConstants::getLayer
int getLayer(double z, bool reco) const
Definition: HGCalDDDConstants.cc:361
HGCalTypes::CellType::CentralType
HGCalGeometryMode::Hexagon8
Definition: HGCalGeometryMode.h:25
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HGCalDDDConstants::waferTypeL
int waferTypeL(int wafer) const
Definition: HGCalDDDConstants.h:173
HGCalParameters::waferTypeL_
std::vector< int > waferTypeL_
Definition: HGCalParameters.h:110
HGCalParameters::cellCoarseX_
std::vector< double > cellCoarseX_
Definition: HGCalParameters.h:118
mps_fire.result
result
Definition: mps_fire.py:303
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalParameters::layer_
std::vector< int > layer_
Definition: HGCalParameters.h:97
HGCalDDDConstants::getTrFormN
unsigned int getTrFormN() const
Definition: HGCalDDDConstants.h:65
HGCalDDDConstants::layersInit
unsigned int layersInit(bool reco) const
Definition: HGCalDDDConstants.cc:573
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:577
HGCalParameters::cellCoarseIndex_
wafer_map cellCoarseIndex_
Definition: HGCalParameters.h:120
DetId::Forward
Definition: DetId.h:30
HGCalParameters::depthLayerF_
std::vector< int > depthLayerF_
Definition: HGCalParameters.h:103
HGCalParameters::zFrontTop_
std::vector< double > zFrontTop_
Definition: HGCalParameters.h:163
HGCalParameters::hgtrap
Definition: HGCalParameters.h:41
dttmaxenums::R
Definition: DTTMax.h:29
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
HGCalParameters::levelT_
std::vector< int > levelT_
Definition: HGCalParameters.h:129
PVValHelper::dx
Definition: PVValidationHelpers.h:48
HGCalDDDConstants::hgpar_
const HGCalParameters * hgpar_
Definition: HGCalDDDConstants.h:203
HGCalWaferMask::maskCell
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)
Definition: HGCalWaferMask.cc:10
HGCalTypes::CellType::BottomLeftEdge
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
RecoTauValidation_cfi.posY
posY
Definition: RecoTauValidation_cfi.py:289
HGCalDDDConstants::HGCWaferParam
std::array< int, 3 > HGCWaferParam
Definition: HGCalDDDConstants.h:202
HGCalDDDConstants::waferInLayerTest
bool waferInLayerTest(int wafer, int lay, bool full) const
Definition: HGCalDDDConstants.cc:1554
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
HGCalTypes::CellType::TopRightCorner
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
HGCalParameters::copiesInLayers_
layer_map copiesInLayers_
Definition: HGCalParameters.h:135