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 HGCScintillatorDetId &, bool debug=false) 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
 
bool tileTrapezoid () 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 waferHexagon6 () const
 
bool waferHexagon8 () 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
 
int layerFromIndex (int index, bool reco) const
 
int32_t waferIndex (int wafer, int index) 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
 
bool fullAndPart_
 
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 26 of file HGCalDDDConstants.h.

Member Typedef Documentation

◆ HGCWaferParam

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

Definition at line 214 of file HGCalDDDConstants.h.

◆ Simrecovecs

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

Definition at line 213 of file HGCalDDDConstants.h.

Constructor & Destructor Documentation

◆ HGCalDDDConstants()

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

Definition at line 25 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellSize_, funct::cos(), fullAndPart_, getIndex(), getTrForm(), getTrFormN(), HGCalGeometryMode::Hexagon8File, 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_, waferHexagon6(), waferHexagon8(), 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 118 of file HGCalDDDConstants.cc.

118 {}

Member Function Documentation

◆ assignCell()

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

Definition at line 120 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, cellHex(), HGCalParameters::cellSize_, getIndex(), hgpar_, HGCalParameters::k_ScaleFromDDD, dt_dqm_sourceclient_common_cff::reco, rmax_, findQualityFiles::size, waferHexagon6(), 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 159 of file HGCalDDDConstants.cc.

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

References HGCalParameters::k_ScaleToDDD, dt_dqm_sourceclient_common_cff::reco, waferFromPosition(), waferHexagon8(), 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 170 of file HGCalDDDConstants.cc.

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

References getIndex(), hgpar_, createfilelist::int, LEDCalibrationChannels::iphi, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, HGCalParameters::k_ScaleFromDDD, pfDeepBoostedJetPreprocessParams_cfi::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 193 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellSize_, hgcalPerformanceValidation::df, flavorHistoryFilter_cfi::dr, hgpar_, alignCSCRings::r, HGCalParameters::radiusLayer_, and tileTrapezoid().

◆ cellHex() [1/2]

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

Definition at line 1443 of file HGCalDDDConstants.cc.

1443  {
1444  int N = (cellType == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
1445  double Rc = 2 * rmax_ / (3 * N);
1446  double rc = 0.5 * Rc * sqrt3_;
1447  double v0 = ((xloc / Rc - 1.0) / 1.5);
1448  int cv0 = (v0 > 0) ? (N + (int)(v0 + 0.5)) : (N - (int)(-v0 + 0.5));
1449  double u0 = (0.5 * yloc / rc + 0.5 * cv0);
1450  int cu0 = (u0 > 0) ? (N / 2 + (int)(u0 + 0.5)) : (N / 2 - (int)(-u0 + 0.5));
1451  cu0 = std::max(0, std::min(cu0, 2 * N - 1));
1452  cv0 = std::max(0, std::min(cv0, 2 * N - 1));
1453  if (cv0 - cu0 >= N)
1454  cv0 = cu0 + N - 1;
1455 #ifdef EDM_ML_DEBUG
1456  if (debug)
1457  edm::LogVerbatim("HGCalGeom") << "cellHex: input " << xloc << ":" << yloc << ":" << cellType << " parameter " << rc
1458  << ":" << Rc << " u0 " << u0 << ":" << cu0 << " v0 " << v0 << ":" << cv0;
1459 #endif
1460  bool found(false);
1461  static const int shift[3] = {0, 1, -1};
1462  for (int i1 = 0; i1 < 3; ++i1) {
1463  cellU = cu0 + shift[i1];
1464  for (int i2 = 0; i2 < 3; ++i2) {
1465  cellV = cv0 + shift[i2];
1466  if (((cellV - cellU) < N) && ((cellU - cellV) <= N) && (cellU >= 0) && (cellV >= 0) && (cellU < 2 * N) &&
1467  (cellV < 2 * N)) {
1468  double xc = (1.5 * (cellV - N) + 1.0) * Rc;
1469  double yc = (2 * cellU - cellV - N) * rc;
1470  if ((std::abs(yloc - yc) <= rc) && (std::abs(xloc - xc) <= Rc) &&
1471  ((std::abs(xloc - xc) <= 0.5 * Rc) || (std::abs(yloc - yc) <= sqrt3_ * (Rc - std::abs(xloc - xc))))) {
1472 #ifdef EDM_ML_DEBUG
1473  if (debug)
1474  edm::LogVerbatim("HGCalGeom")
1475  << "cellHex: local " << xc << ":" << yc << " difference " << std::abs(xloc - xc) << ":"
1476  << std::abs(yloc - yc) << ":" << sqrt3_ * (Rc - std::abs(yloc - yc)) << " comparator " << rc << ":"
1477  << Rc << " (u,v) = (" << cellU << "," << cellV << ")";
1478 #endif
1479  found = true;
1480  break;
1481  }
1482  }
1483  }
1484  if (found)
1485  break;
1486  }
1487  if (!found) {
1488  cellU = cu0;
1489  cellV = cv0;
1490  }
1491 }

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 1424 of file HGCalDDDConstants.cc.

1425  {
1426  int num(0);
1427  const double tol(0.00001);
1428  double cellY = 2.0 * cellR * tan30deg_;
1429  for (unsigned int k = 0; k < posX.size(); ++k) {
1430  double dx = std::abs(xx - posX[k]);
1431  double dy = std::abs(yy - posY[k]);
1432  if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
1433  double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) / tan30deg_);
1434  if (dx <= (xmax + tol)) {
1435  num = k;
1436  break;
1437  }
1438  }
1439  }
1440  return num;
1441 }

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 203 of file HGCalDDDConstants.cc.

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

References getIndex(), hgpar_, locateCell(), HGCalParameters::rMinLayHex_, mathSSE::sqrt(), waferHexagon6(), waferHexagon8(), and geometryCSVtoXML::xy.

Referenced by HGCalGeometry::newCell().

◆ cellSizeHex()

double HGCalDDDConstants::cellSizeHex ( int  type) const

Definition at line 232 of file HGCalDDDConstants.cc.

232  {
233  int indx = ((waferHexagon8()) ? ((type >= 1) ? 1 : 0) : ((type == 1) ? 1 : 0));
234  double cell = (tileTrapezoid() ? 0.5 * hgpar_->cellSize_[indx]
236  return cell;
237 }

References HGCalParameters::cellSize_, hgpar_, HGCalParameters::k_ScaleFromDDD, tileTrapezoid(), and waferHexagon8().

◆ cellSizeTrap()

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

Definition at line 37 of file HGCalDDDConstants.h.

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

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 219 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellThickness_, hgpar_, waferHexagon6(), waferHexagon8(), and waferType().

Referenced by HGCalTBAnalyzer::analyzeSimHits().

◆ cellType()

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

Definition at line 239 of file HGCalDDDConstants.cc.

239  {
240  // type=0: in the middle; 1..6: the edges clocwise from bottom left;
241  // =11..16: the corners clockwise from bottom
242  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
243  if (cellU == 0) {
244  if (cellV == 0)
246  else if (cellV - cellU == N - 1)
248  else
250  } else if (cellV == 0) {
251  if (cellU - cellV == N)
253  else
255  } else if (cellU - cellV == N) {
256  if (cellU == 2 * N - 1)
258  else
260  } else if (cellU == 2 * N - 1) {
261  if (cellV == 2 * N - 1)
263  else
265  } else if (cellV == 2 * N - 1) {
266  if (cellV - cellU == N - 1)
268  else
270  } else if (cellV - cellU == N - 1) {
272  } else if ((cellU > 2 * N - 1) || (cellV > 2 * N - 1) || (cellV >= (cellU + N)) || (cellU > (cellV + N))) {
274  } else {
276  }
277 }

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 279 of file HGCalDDDConstants.cc.

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

References funct::abs(), PVValHelper::dx, PVValHelper::dy, getLayer(), hexside_, hgpar_, createfilelist::int, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, layerIndex(), rmax_, sqrt3_, tan30deg_, waferHexagon8(), 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 325 of file HGCalDDDConstants.cc.

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

References funct::abs(), getLayer(), hgpar_, createfilelist::int, LEDCalibrationChannels::iphi, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, layerIndex(), pfDeepBoostedJetPreprocessParams_cfi::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 1493 of file HGCalDDDConstants.cc.

1493  {
1494  int indx = layerIndex(lay, reco);
1495  if (indx < 0)
1496  return std::make_pair(-1, 0);
1497  float cell(0);
1498  if (waferHexagon6()) {
1499  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1500  } else {
1501  if (waferHexagon8()) {
1502  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1503  } else {
1504  cell = hgpar_->scintCellSize(lay);
1505  }
1506  }
1507  return std::make_pair(indx, cell);
1508 }

References hgpar_, layerIndex(), HGCalParameters::moduleCellR_, HGCalParameters::moduleCellS_, HGCalParameters::scintCellSize(), waferHexagon6(), and waferHexagon8().

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 355 of file HGCalDDDConstants.cc.

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

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

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

◆ getLayerOffset()

int HGCalDDDConstants::getLayerOffset ( ) const
inline

Definition at line 55 of file HGCalDDDConstants.h.

55 { return hgpar_->layerOffset_; }

References hgpar_, and HGCalParameters::layerOffset_.

◆ getModule()

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

Definition at line 375 of file HGCalDDDConstants.cc.

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

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 391 of file HGCalDDDConstants.cc.

391  {
392  std::vector<HGCalParameters::hgtrap> mytrs;
393  for (unsigned int k = 0; k < hgpar_->moduleLayR_.size(); ++k)
394  mytrs.emplace_back(hgpar_->getModule(k, true));
395  return mytrs;
396 }

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

◆ getParameter()

const HGCalParameters* HGCalDDDConstants::getParameter ( ) const
inline

Definition at line 58 of file HGCalDDDConstants.h.

58 { return hgpar_; }

References hgpar_.

Referenced by HGCalGeometry::getSummary().

◆ getPhiBins()

int HGCalDDDConstants::getPhiBins ( int  lay) const

Definition at line 398 of file HGCalDDDConstants.cc.

398 { return (tileTrapezoid() ? hgpar_->scintCells(lay) : 0); }

References hgpar_, HGCalParameters::scintCells(), and tileTrapezoid().

◆ getRadiusLayer()

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

Definition at line 61 of file HGCalDDDConstants.h.

61  {
62  int type = (tileTrapezoid() ? hgpar_->scintType(layer) : 0);
63  return hgpar_->radiusLayer_[type];
64  }

References hgpar_, HGCalParameters::radiusLayer_, HGCalParameters::scintType(), and tileTrapezoid().

◆ getREtaRange()

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

Definition at line 400 of file HGCalDDDConstants.cc.

400  {
401  int irmin(0), irmax(0);
402  if (tileTrapezoid()) {
403  int indx = layerIndex(lay, false);
404  if ((indx >= 0) && (indx < static_cast<int>(hgpar_->iradMinBH_.size()))) {
405  irmin = hgpar_->iradMinBH_[indx];
406  irmax = hgpar_->iradMaxBH_[indx];
407  }
408  }
409  return std::make_pair(irmin, irmax);
410 }

References hgpar_, HGCalParameters::iradMaxBH_, HGCalParameters::iradMinBH_, layerIndex(), and tileTrapezoid().

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

◆ getTrForm()

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

Definition at line 65 of file HGCalDDDConstants.h.

65 { 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 66 of file HGCalDDDConstants.h.

66 { 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 412 of file HGCalDDDConstants.cc.

412  {
413  std::vector<HGCalParameters::hgtrform> mytrs;
414  for (unsigned int k = 0; k < hgpar_->trformIndex_.size(); ++k)
415  mytrs.emplace_back(hgpar_->getTrForm(k));
416  return mytrs;
417 }

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 428 of file HGCalDDDConstants.cc.

428  {
429  // Get the module type for a silicon wafer
430  if (waferHexagon8()) {
431  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
432  return ((itr == hgpar_->typesInLayers_.end() ? 2 : hgpar_->waferTypeL_[itr->second]));
433  } else {
434  return -1;
435  }
436 }

References hgpar_, HGCalParameters::typesInLayers_, waferHexagon8(), HGCalWaferIndex::waferIndex(), and HGCalParameters::waferTypeL_.

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

◆ getTypeTrap()

int HGCalDDDConstants::getTypeTrap ( int  layer) const

Definition at line 419 of file HGCalDDDConstants.cc.

419  {
420  // Get the module type for scinitllator
421  if (tileTrapezoid()) {
422  return hgpar_->scintType(layer);
423  } else {
424  return -1;
425  }
426 }

References hgpar_, HGCalParameters::scintType(), and tileTrapezoid().

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

◆ getUVMax()

int HGCalDDDConstants::getUVMax ( int  type) const
inline

Definition at line 70 of file HGCalDDDConstants.h.

70 { 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 438 of file HGCalDDDConstants.cc.

438  {
439  if (waferType < 1 || cell < 0)
440  return false;
441  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
442 }

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

◆ isValidCell()

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

Definition at line 1530 of file HGCalDDDConstants.cc.

1530  {
1531  // Calculate the position of the cell
1532  // Works for options HGCalHexagon/HGCalHexagonFull
1533  double x = hgpar_->waferPosX_[wafer];
1534  double y = hgpar_->waferPosY_[wafer];
1535  if (hgpar_->waferTypeT_[wafer] - 1 == HGCSiliconDetId::HGCalFine) {
1536  x += hgpar_->cellFineX_[cell];
1537  y += hgpar_->cellFineY_[cell];
1538  } else {
1539  x += hgpar_->cellCoarseX_[cell];
1540  y += hgpar_->cellCoarseY_[cell];
1541  }
1542  double rr = sqrt(x * x + y * y);
1543  bool result = ((rr >= hgpar_->rMinLayHex_[lay - 1]) && (rr <= hgpar_->rMaxLayHex_[lay - 1]) &&
1544  (wafer < (int)(hgpar_->waferPosX_.size())));
1545 #ifdef EDM_ML_DEBUG
1546  if (!result)
1547  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << wafer << ":" << cell << " Position " << x << ":" << y
1548  << ":" << rr << " Compare Limits " << hgpar_->rMinLayHex_[lay - 1] << ":"
1549  << hgpar_->rMaxLayHex_[lay - 1] << " Flag " << result;
1550 #endif
1551  return result;
1552 }

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 1554 of file HGCalDDDConstants.cc.

1554  {
1555  float x(0), y(0);
1556  int kndx = cellV * 100 + cellU;
1557  if (type == 0) {
1558  auto ktr = hgpar_->cellFineIndex_.find(kndx);
1559  if (ktr != hgpar_->cellFineIndex_.end()) {
1560  x = hgpar_->cellFineX_[ktr->second];
1561  y = hgpar_->cellFineY_[ktr->second];
1562  }
1563 #ifdef EDM_ML_DEBUG
1564  edm::LogVerbatim("HGCalGeom") << "Fine " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
1565  << (ktr != hgpar_->cellFineIndex_.end());
1566 #endif
1567  } else {
1568  auto ktr = hgpar_->cellCoarseIndex_.find(kndx);
1569  if (ktr != hgpar_->cellCoarseIndex_.end()) {
1570  x = hgpar_->cellCoarseX_[ktr->second];
1571  y = hgpar_->cellCoarseY_[ktr->second];
1572  }
1573 #ifdef EDM_ML_DEBUG
1574  edm::LogVerbatim("HGCalGeom") << "Coarse " << cellU << ":" << cellV << ":" << kndx << ":" << x << ":" << y << ":"
1575  << (ktr != hgpar_->cellCoarseIndex_.end());
1576 #endif
1577  }
1578  const auto& xy = waferPosition(lay, waferU, waferV, true, false);
1579  x += xy.first;
1580  y += xy.second;
1581 #ifdef EDM_ML_DEBUG
1582  edm::LogVerbatim("HGCalGeom") << "With wafer (" << waferU << "," << waferV << ") " << x << ":" << y;
1583 #endif
1584  double rr = sqrt(x * x + y * y);
1585  int ll = lay - hgpar_->firstLayer_;
1586  bool result = ((rr >= hgpar_->rMinLayHex_[ll]) && (rr <= hgpar_->rMaxLayHex_[ll]));
1587 #ifdef EDM_ML_DEBUG
1588  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << ll << ":" << waferU << ":" << waferV << ":" << cellU << ":"
1589  << cellV << " Position " << x << ":" << y << ":" << rr << " Compare Limits "
1590  << hgpar_->rMinLayHex_[ll] << ":" << hgpar_->rMaxLayHex_[ll] << " Flag " << result;
1591 #endif
1593  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
1594  auto partn = waferTypeRotation(lay, waferU, waferV, false, false);
1595  result = HGCalWaferMask::goodCell(cellU, cellV, N, partn.first, partn.second);
1596  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << waferU << ":" << waferV << ":" << cellU << ":" << cellV
1597  << " N " << N << " part " << partn.first << ":" << partn.second << " Result "
1598  << result;
1599  }
1600  return result;
1601 }

References HGCalParameters::cellCoarseIndex_, HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineIndex_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, HGCalParameters::firstLayer_, HGCalWaferMask::goodCell(), HGCalGeometryMode::Hexagon8File, hgpar_, mode_, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, mps_fire::result, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, findQualityFiles::rr, mathSSE::sqrt(), waferPosition(), waferTypeRotation(), x, geometryCSVtoXML::xy, and y.

Referenced by isValidHex8().

◆ isValidHex()

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

Definition at line 444 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCalParameters::copiesInLayers_, HGCSiliconDetId::HGCalFine, hgpar_, createfilelist::int, isValidCell(), layers(), maxCells(), mod(), mps_fire::result, findQualityFiles::size, HGCalParameters::waferCopy_, waferHexagon6(), 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 529 of file HGCalDDDConstants.cc.

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

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 486 of file HGCalDDDConstants.cc.

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

References fullAndPart_, hgpar_, HGCalParameters::typesInLayers_, HGCalTypes::WaferCornerMin, waferIn_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, 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 550 of file HGCalDDDConstants.cc.

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

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 559 of file HGCalDDDConstants.cc.

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

References HGCalParameters::firstLayer_, hgpar_, and tot_layers_.

Referenced by HGCalGeometry::neighborZ().

◆ layerFromIndex()

int HGCalDDDConstants::layerFromIndex ( int  index,
bool  reco 
) const
private

Definition at line 1510 of file HGCalDDDConstants.cc.

1510  {
1511  int ll(-1);
1512  if (waferHexagon6() && reco) {
1513  ll = static_cast<int>(std::find(hgpar_->depthLayerF_.begin(), hgpar_->depthLayerF_.end(), index) -
1514  hgpar_->depthLayerF_.begin());
1515  if (ll == static_cast<int>(hgpar_->depthLayerF_.size()))
1516  ll = -1;
1517  } else {
1518  ll = static_cast<int>(std::find(hgpar_->layerIndex_.begin(), hgpar_->layerIndex_.end(), index) -
1519  hgpar_->layerIndex_.begin());
1520  if (ll == static_cast<int>(hgpar_->layerIndex_.size()))
1521  ll = -1;
1522  }
1523 #ifdef EDM_ML_DEBUG
1524  edm::LogVerbatim("HGCalGeom") << "LayerFromIndex for " << index << ":" << reco << ":" << waferHexagon6() << " is"
1525  << ll << ":" << (ll + hgpar_->firstLayer_);
1526 #endif
1527  return ((ll < 0) ? ll : (ll + hgpar_->firstLayer_));
1528 }

References HGCalParameters::depthLayerF_, spr::find(), HGCalParameters::firstLayer_, hgpar_, HGCalParameters::layerIndex_, and waferHexagon6().

Referenced by waferIndex().

◆ layerIndex()

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

Definition at line 563 of file HGCalDDDConstants.cc.

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

References HGCalParameters::depthIndex_, HGCalParameters::depthLayerF_, HGCalParameters::firstLayer_, hgpar_, HGCalParameters::layerIndex_, and waferHexagon6().

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 576 of file HGCalDDDConstants.cc.

576  {
577  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
578 }

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

Referenced by HGCalDDDConstants().

◆ levelTop()

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

◆ locateCell() [1/4]

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

Definition at line 686 of file HGCalDDDConstants.cc.

686  {
687  int lay(id.layer()), iphi(id.iphi()), ir(id.iradiusAbs());
688  double phi = (iphi - 0.5) * hgpar_->scintCellSize(lay);
689  int type = (id.type() > 0) ? 1 : 0;
690  double r = (((ir + 1) < static_cast<int>(hgpar_->radiusLayer_[type].size()))
691  ? (0.5 * (hgpar_->radiusLayer_[type][ir] + hgpar_->radiusLayer_[type][ir - 1]))
692  : (1.5 * hgpar_->radiusLayer_[type][ir] - 0.5 * hgpar_->radiusLayer_[type][ir - 1]));
693  if (debug)
694  edm::LogVerbatim("HGCalGeom") << "LocateCell lay:ir:iphi:type " << lay << ":" << ir << ":" << iphi << ":" << type
695  << " r:phi " << r << ":" << convertRadToDeg(phi) << " x:y "
696  << (r * cos(phi) * id.zside()) << ":" << (r * sin(phi));
697  return std::make_pair(r * cos(phi) * id.zside(), r * sin(phi));
698 }

References angle_units::operators::convertRadToDeg(), funct::cos(), debug, hgpar_, LEDCalibrationChannels::iphi, phi, alignCSCRings::r, HGCalParameters::radiusLayer_, HGCalParameters::scintCellSize(), funct::sin(), and ecaldqm::zside().

◆ locateCell() [2/4]

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

Definition at line 662 of file HGCalDDDConstants.cc.

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

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() [3/4]

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

Definition at line 580 of file HGCalDDDConstants.cc.

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

References HGCalParameters::cellCoarseX_, HGCalParameters::cellCoarseY_, HGCalParameters::cellFineX_, HGCalParameters::cellFineY_, getIndex(), HGCSiliconDetId::HGCalFine, hgpar_, mps_fire::i, HGCalParameters::k_ScaleToDDD, waferHexagon6(), 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() [4/4]

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 611 of file HGCalDDDConstants.cc.

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

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 716 of file HGCalDDDConstants.cc.

716  {
717  float x(0), y(0);
718  const auto& indx = getIndex(lay, reco);
719  if (indx.first >= 0) {
720  int ir = std::abs(irad);
721  int type = hgpar_->scintType(lay);
722  double phi = (iphi - 0.5) * indx.second;
723  double z = hgpar_->zLayerHex_[indx.first];
724  double r = 0.5 * (hgpar_->radiusLayer_[type][ir - 1] + hgpar_->radiusLayer_[type][ir]);
725  std::pair<double, double> range = rangeR(z, true);
726 #ifdef EDM_ML_DEBUG
727  edm::LogVerbatim("HGCalGeom") << "locateCellTrap:: Input " << lay << ":" << irad << ":" << iphi << ":" << reco
728  << " IR " << ir << ":" << hgpar_->iradMinBH_[indx.first] << ":"
729  << hgpar_->iradMaxBH_[indx.first] << " Type " << type << " Z " << indx.first << ":"
730  << z << " phi " << phi << " R " << r << ":" << range.first << ":" << range.second;
731 #endif
732  r = std::max(range.first, std::min(r, range.second));
733  x = r * std::cos(phi);
734  y = r * std::sin(phi);
735  if (irad < 0)
736  x = -x;
737  }
738  if (!reco) {
741  }
742  return std::make_pair(x, y);
743 }

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 745 of file HGCalDDDConstants.cc.

745  {
746  bool mask(false);
747  if (corners > 2 && corners <= (int)(HGCalParameters::k_CornerSize)) {
748  if (waferHexagon8()) {
749  int N(0), layer(0), waferU(0), waferV(0), u(0), v(0);
750  if (detId.det() == DetId::Forward) {
751  HFNoseDetId id(detId);
752  N = getUVMax(id.type());
753  layer = id.layer();
754  waferU = id.waferU();
755  waferV = id.waferV();
756  u = id.cellU();
757  v = id.cellV();
758  } else {
759  HGCSiliconDetId id(detId);
760  N = getUVMax(id.type());
761  layer = id.layer();
762  waferU = id.waferU();
763  waferV = id.waferV();
764  u = id.cellU();
765  v = id.cellV();
766  }
767  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
768  auto itr = hgpar_->waferTypes_.find(wl);
769 #ifdef EDM_ML_DEBUG
770  edm::LogVerbatim("HGCalGeom") << "MaskCell: Layer " << layer << " Wafer " << waferU << ":" << waferV << " Index "
771  << wl << ":" << (itr != hgpar_->waferTypes_.end());
772 #endif
773  if (itr != hgpar_->waferTypes_.end()) {
774  if ((itr->second).second <= HGCalWaferMask::k_OffsetRotation)
775  mask = HGCalWaferMask::maskCell(u, v, N, (itr->second).first, (itr->second).second, corners);
776  else
777  mask = !(HGCalWaferMask::goodCell(
778  u, v, N, (itr->second).first, ((itr->second).second - HGCalWaferMask::k_OffsetRotation)));
779  }
780  }
781  }
782  return mask;
783 }

References DetId::det(), DetId::Forward, getUVMax(), HGCalWaferMask::goodCell(), hgpar_, triggerObjects_cff::id, HGCalParameters::k_CornerSize, HGCalWaferMask::k_OffsetRotation, HGCalWaferMask::maskCell(), N, edm::second(), findQualityFiles::v, waferHexagon8(), 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 785 of file HGCalDDDConstants.cc.

785  {
786  int cells(0);
787  for (unsigned int i = 0; i < layers(reco); ++i) {
788  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
789  if (cells < maxCells(lay, reco))
790  cells = maxCells(lay, reco);
791  }
792  return cells;
793 }

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 795 of file HGCalDDDConstants.cc.

795  {
796  const auto& index = getIndex(lay, reco);
797  if (index.first < 0)
798  return 0;
799  if (waferHexagon6()) {
800  unsigned int cells(0);
801  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
802  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
803  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCSiliconDetId::HGCalFine) ? (hgpar_->cellFineX_.size())
804  : (hgpar_->cellCoarseX_.size());
805  if (cell > cells)
806  cells = cell;
807  }
808  }
809  return (int)(cells);
810  } else if (waferHexagon8()) {
811  int cells(0);
812  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
813  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
817  : hgpar_->waferTypeL_[itr->second]);
819  cells = std::max(cells, 3 * N * N);
820  }
821  }
822  return cells;
823  } else if (tileTrapezoid()) {
824  return hgpar_->scintCells(index.first + hgpar_->firstLayer_);
825  } else {
826  return 0;
827  }
828 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, postprocess-scan-build::cells, HGCalParameters::defineFull_, HGCalParameters::firstLayer_, getIndex(), HGCSiliconDetId::HGCalCoarseThick, HGCSiliconDetId::HGCalFine, hgpar_, dqmdumpme::k, SiStripPI::max, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::scintCells(), tileTrapezoid(), HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, waferHexagon6(), waferHexagon8(), HGCalWaferIndex::waferIndex(), waferInLayerTest(), HGCalParameters::waferTypeL_, HGCalParameters::waferTypeT_, HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

◆ maxCellUV()

int HGCalDDDConstants::maxCellUV ( ) const
inline

Definition at line 89 of file HGCalDDDConstants.h.

89 { return (tileTrapezoid() ? hgpar_->nCellsFine_ : 2 * hgpar_->nCellsFine_); }

References hgpar_, HGCalParameters::nCellsFine_, and tileTrapezoid().

Referenced by HGCalTopology::HGCalTopology().

◆ 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 830 of file HGCalDDDConstants.cc.

830  {
831  int kymax(0);
832  const auto& index = getIndex(lay, reco);
833  int i = index.first;
834  if (i < 0)
835  return kymax;
836  if (waferHexagon6()) {
837  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
839  int ky = ((hgpar_->waferCopy_[k]) / 100) % 100;
840  if (ky > kymax)
841  kymax = ky;
842  }
843  }
844  } else if (waferHexagon8()) {
845  kymax = 1 + 2 * hgpar_->waferUVMaxLayer_[index.first];
846  }
847  return kymax;
848 }

References HGCalParameters::defineFull_, getIndex(), hgpar_, mps_fire::i, dqmdumpme::k, HGCalParameters::waferCopy_, waferHexagon6(), waferHexagon8(), 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 850 of file HGCalDDDConstants.cc.

850  {
851  // Modify u/v for transition of type1 to type2
852  return (((type1 == type2) || (type1 * type2 != 0)) ? uv : ((type1 == 0) ? (2 * uv + 1) / 3 : (3 * uv) / 2));
853 }

Referenced by HGCalTopology::neighbors().

◆ modules()

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

Definition at line 855 of file HGCalDDDConstants.cc.

855  {
856  if (getIndex(lay, reco).first < 0)
857  return 0;
858  else
859  return max_modules_layer_[(int)reco][lay];
860 }

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 862 of file HGCalDDDConstants.cc.

862  {
863  int nmod(0);
864  const auto& index = getIndex(lay, reco);
865  if (index.first < 0)
866  return nmod;
867  if (!tileTrapezoid()) {
868  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
869  if (waferInLayerTest(k, index.first, hgpar_->defineFull_))
870  ++nmod;
871  }
872  } else {
873  nmod = 1 + hgpar_->lastModule_[index.first] - hgpar_->firstModule_[index.first];
874  }
875  return nmod;
876 }

References HGCalParameters::defineFull_, HGCalParameters::firstModule_, getIndex(), hgpar_, dqmdumpme::k, HGCalParameters::lastModule_, tileTrapezoid(), 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 882 of file HGCalDDDConstants.cc.

882  {
883  int cells(0);
884  unsigned int nlayer = (reco) ? hgpar_->depth_.size() : hgpar_->layer_.size();
885  for (unsigned k = 0; k < nlayer; ++k) {
886  std::vector<int> ncells = numberCells(((reco) ? hgpar_->depth_[k] : hgpar_->layer_[k]), reco);
887  cells = std::accumulate(ncells.begin(), ncells.end(), cells);
888  }
889  return cells;
890 }

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 892 of file HGCalDDDConstants.cc.

892  {
893  const auto& index = getIndex(lay, reco);
894  int i = index.first;
895  std::vector<int> ncell;
896  if (i >= 0) {
897  if (waferHexagon6()) {
898  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
900  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCSiliconDetId::HGCalFine)
901  ? (hgpar_->cellFineX_.size())
902  : (hgpar_->cellCoarseX_.size());
903  ncell.emplace_back((int)(cell));
904  }
905  }
906  } else if (tileTrapezoid()) {
907  int nphi = hgpar_->scintCells(lay);
908  for (int k = hgpar_->firstModule_[i]; k <= hgpar_->lastModule_[i]; ++k)
909  ncell.emplace_back(nphi);
910  } else {
911  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
912  if (waferInLayerTest(k, index.first, hgpar_->defineFull_)) {
913  int cell = numberCellsHexagon(lay,
916  true);
917  ncell.emplace_back(cell);
918  }
919  }
920  }
921  }
922  return ncell;
923 }

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCalParameters::defineFull_, HGCalParameters::firstModule_, getIndex(), HGCSiliconDetId::HGCalFine, hgpar_, mps_fire::i, dqmdumpme::k, nphi, numberCellsHexagon(), HGCalParameters::scintCells(), tileTrapezoid(), HGCalParameters::waferCopy_, waferHexagon6(), 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 936 of file HGCalDDDConstants.cc.

936  {
937  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(lay, waferU, waferV));
938  int type =
940  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
941  if (flag)
942  return (3 * N * N);
943  else
944  return N;
945 }

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 925 of file HGCalDDDConstants.cc.

925  {
926  if (wafer >= 0 && wafer < (int)(hgpar_->waferTypeT_.size())) {
927  if (hgpar_->waferTypeT_[wafer] - 1 == HGCSiliconDetId::HGCalFine)
928  return (int)(hgpar_->cellFineX_.size());
929  else
930  return (int)(hgpar_->cellCoarseX_.size());
931  } else {
932  return 0;
933  }
934 }

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

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

◆ rangeR()

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

Definition at line 947 of file HGCalDDDConstants.cc.

947  {
948  double rmin(0), rmax(0), zz(0);
949  if (hgpar_->detectorType_ > 0) {
950  zz = (reco ? std::abs(z) : HGCalParameters::k_ScaleFromDDD * std::abs(z));
951  if (hgpar_->detectorType_ <= 2) {
953  } else {
954  rmin = HGCalGeomTools::radius(
956  }
957  if ((hgpar_->detectorType_ == 2) && (zz >= hgpar_->zLayerHex_[hgpar_->firstMixedLayer_ - 1])) {
958  rmax = HGCalGeomTools::radius(
960  } else {
962  }
963  }
964  if (!reco) {
967  }
968 #ifdef EDM_ML_DEBUG
969  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeR: " << z << ":" << zz << " R " << rmin << ":" << rmax;
970 #endif
971  return std::make_pair(rmin, rmax);
972 }

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 974 of file HGCalDDDConstants.cc.

974  {
975  double rmin(0), rmax(0);
976  const auto& index = getIndex(lay, reco);
977  if (index.first >= 0 && index.first < static_cast<int>(hgpar_->rMinLayHex_.size())) {
978  rmin = hgpar_->rMinLayHex_[index.first];
979  rmax = hgpar_->rMaxLayHex_[index.first];
980  }
981  if (!reco) {
984  }
985 #ifdef EDM_ML_DEBUG
986  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeR: " << lay << ":" << index.first << " R " << rmin << ":"
987  << rmax;
988 #endif
989  return std::make_pair(rmin, rmax);
990 }

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

◆ rangeZ()

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

Definition at line 992 of file HGCalDDDConstants.cc.

992  {
993  double zmin = (hgpar_->zLayerHex_[0] - hgpar_->waferThick_);
994  double zmax = (hgpar_->zLayerHex_[hgpar_->zLayerHex_.size() - 1] + hgpar_->waferThick_);
995 #ifdef EDM_ML_DEBUG
996  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants:rangeZ: " << zmin << ":" << zmax << ":" << hgpar_->waferThick_;
997 #endif
998  if (!reco) {
1001  }
1002  return std::make_pair(zmin, zmax);
1003 }

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 1005 of file HGCalDDDConstants.cc.

1005  {
1006  int row(0), col(0);
1007  if (wafer < (int)(hgpar_->waferCopy_.size())) {
1008  int copy = hgpar_->waferCopy_[wafer];
1011  ;
1012  }
1013  return std::make_pair(row, col);
1014 }

References cuy::col, filterCSVwithJSON::copy, HGCalTypes::getUnpackedU(), HGCalTypes::getUnpackedV(), 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 1016 of file HGCalDDDConstants.cc.

1016  {
1017  if (!waferHexagon6()) {
1018  return std::make_pair(cell, lay);
1019  } else {
1020  const auto& index = getIndex(lay, false);
1021  int i = index.first;
1022  if (i < 0) {
1023  edm::LogWarning("HGCalGeom") << "Wrong Layer # " << lay << " not in the list ***** ERROR *****";
1024  return std::make_pair(-1, -1);
1025  }
1026  if (mod >= (int)(hgpar_->waferTypeL_).size()) {
1027  edm::LogWarning("HGCalGeom") << "Invalid Wafer # " << mod << "should be < " << (hgpar_->waferTypeL_).size()
1028  << " ***** ERROR *****";
1029  return std::make_pair(-1, -1);
1030  }
1031  int depth(-1);
1032  int kx = cell;
1033  int type = hgpar_->waferTypeL_[mod];
1034  if (type == 1) {
1035  depth = hgpar_->layerGroup_[i];
1036  } else if (type == 2) {
1037  depth = hgpar_->layerGroupM_[i];
1038  } else {
1039  depth = hgpar_->layerGroupO_[i];
1040  }
1041  return std::make_pair(kx, depth);
1042  }
1043 }

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

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

◆ tileTrapezoid()

bool HGCalDDDConstants::tileTrapezoid ( ) const
inline

◆ volumes()

unsigned int HGCalDDDConstants::volumes ( ) const
inline

Definition at line 113 of file HGCalDDDConstants.h.

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

References hgpar_, and HGCalParameters::moduleLayR_.

◆ waferCount()

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

Definition at line 135 of file HGCalDDDConstants.h.

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

References waferMax_.

◆ waferFileIndex()

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

Definition at line 142 of file HGCalDDDConstants.h.

142  {
143  if (kk < hgpar_->waferInfoMap_.size()) {
144  auto itr = hgpar_->waferInfoMap_.begin();
145  std::advance(itr, kk);
146  return itr->first;
147  } else
148  return 0;
149  }

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 150 of file HGCalDDDConstants.h.

150  {
151  if (kk < hgpar_->waferInfoMap_.size()) {
152  auto itr = hgpar_->waferInfoMap_.begin();
153  std::advance(itr, kk);
154  return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient);
155  } else
156  return std::make_tuple(0, 0, 0);
157  }

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

◆ waferFileInfoExist()

bool HGCalDDDConstants::waferFileInfoExist ( int  kk) const
inline

Definition at line 165 of file HGCalDDDConstants.h.

165 { 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 158 of file HGCalDDDConstants.h.

158  {
159  auto itr = hgpar_->waferInfoMap_.find(kk);
160  if (itr != hgpar_->waferInfoMap_.end()) {
161  return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient);
162  } else
163  return std::make_tuple(0, 0, 0);
164  }

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

◆ waferFileSize()

unsigned int HGCalDDDConstants::waferFileSize ( ) const
inline

Definition at line 141 of file HGCalDDDConstants.h.

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

References hgpar_, and HGCalParameters::waferInfoMap_.

Referenced by waferType(), and waferTypeRotation().

◆ waferFromCopy()

int HGCalDDDConstants::waferFromCopy ( int  copy) const

Definition at line 1045 of file HGCalDDDConstants.cc.

1045  {
1046  const int ncopies = hgpar_->waferCopy_.size();
1047  int wafer(ncopies);
1048  bool result(false);
1049  for (int k = 0; k < ncopies; ++k) {
1050  if (copy == hgpar_->waferCopy_[k]) {
1051  wafer = k;
1052  result = true;
1053  break;
1054  }
1055  }
1056  if (!result) {
1057  wafer = -1;
1058 #ifdef EDM_ML_DEBUG
1059  edm::LogVerbatim("HGCalGeom") << "Cannot find " << copy << " in a list of " << ncopies << " members";
1060  for (int k = 0; k < ncopies; ++k)
1061  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << hgpar_->waferCopy_[k];
1062 #endif
1063  }
1064 #ifdef EDM_ML_DEBUG
1065  edm::LogVerbatim("HGCalGeom") << "WaferFromCopy " << copy << ":" << wafer << ":" << result;
1066 #endif
1067  return wafer;
1068 }

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 1112 of file HGCalDDDConstants.cc.

1121  {
1122  int ll = layer - hgpar_->firstLayer_;
1125  waferU = waferV = 1 + hgpar_->waferUVMax_;
1126  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
1127  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
1128  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
1129  if (dx <= rmax_ && dy <= hexside_) {
1130  if ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy))) {
1134  int index = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
1136  } else {
1137  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1139  : hgpar_->waferTypeL_[itr->second]);
1140  }
1141 #ifdef EDM_ML_DEBUG
1142  if (debug)
1143  edm::LogVerbatim("HGCalGeom") << "WaferFromPosition:: Input " << layer << ":" << ll << ":"
1144  << hgpar_->firstLayer_ << ":" << x << ":" << y << ":" << hgpar_->xLayerHex_[ll]
1145  << ":" << hgpar_->yLayerHex_[ll] << ":" << xx << ":" << yy << " compared with "
1146  << hgpar_->waferPosX_[k] << ":" << hgpar_->waferPosY_[k] << " difference " << dx
1147  << ":" << dy << ":" << dx * tan30deg_ << ":" << (hexside_ - dy)
1148  << " comparator " << rmax_ << ":" << hexside_ << " wafer " << waferU << ":"
1149  << waferV << ":" << celltype;
1150 #endif
1151  xx -= hgpar_->waferPosX_[k];
1152  yy -= hgpar_->waferPosY_[k];
1153  break;
1154  }
1155  }
1156  }
1157  if ((std::abs(waferU) <= hgpar_->waferUVMax_) && (celltype >= 0)) {
1158  cellHex(xx, yy, celltype, cellU, cellV, debug);
1159  wt = ((celltype < 2) ? (hgpar_->cellThickness_[celltype] / hgpar_->waferThick_) : 1.0);
1160  } else {
1161  cellU = cellV = 2 * hgpar_->nCellsFine_;
1162  wt = 1.0;
1163  celltype = -1;
1164  }
1165 #ifdef EDM_ML_DEBUG
1166  if (celltype < 0) {
1169  edm::LogVerbatim("HGCalGeom") << "waferFromPosition: Bad type for X " << x << ":" << x1 << ":" << xx << " Y " << y
1170  << ":" << y1 << ":" << yy << " Wafer " << waferU << ":" << waferV << " Cell " << cellU
1171  << ":" << cellV;
1172  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
1173  double dx = std::abs(x1 - hgpar_->waferPosX_[k]);
1174  double dy = std::abs(y1 - hgpar_->waferPosY_[k]);
1175  edm::LogVerbatim("HGCalGeom") << "Wafer [" << k << "] Position (" << hgpar_->waferPosX_[k] << ", "
1176  << hgpar_->waferPosY_[k] << ") difference " << dx << ":" << dy << ":"
1177  << dx * tan30deg_ << ":" << hexside_ - dy << " Paramerers " << rmax_ << ":"
1178  << hexside_;
1179  }
1180  }
1181 #endif
1182 }

References funct::abs(), cellHex(), HGCalParameters::cellThickness_, debug, PVValHelper::dx, PVValHelper::dy, HGCalParameters::firstLayer_, HGCalWaferType::getType(), HGCalGeometryMode::Hexagon8File, hexside_, HGCSiliconDetId::HGCalCoarseThick, hgpar_, dqmdumpme::k, HGCalParameters::k_ScaleFromDDD, mode_, HGCalParameters::nCellsFine_, rmax_, tan30deg_, HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, 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 1070 of file HGCalDDDConstants.cc.

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

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 1191 of file HGCalDDDConstants.cc.

1191  {
1192  const auto& indx = getIndex(lay, reco);
1193  if (indx.first < 0)
1194  return false;
1195  return waferInLayerTest(wafer, indx.first, false);
1196 }

References getIndex(), and waferInLayerTest().

◆ waferHexagon6()

bool HGCalDDDConstants::waferHexagon6 ( ) const
inline

◆ waferHexagon8()

bool HGCalDDDConstants::waferHexagon8 ( ) const
inline

◆ waferIndex()

int32_t HGCalDDDConstants::waferIndex ( int  wafer,
int  index 
) const
private

Definition at line 1603 of file HGCalDDDConstants.cc.

1603  {
1604  int layer = layerFromIndex(index, true);
1605  int waferU = HGCalWaferIndex::waferU(hgpar_->waferCopy_[wafer]);
1606  int waferV = HGCalWaferIndex::waferV(hgpar_->waferCopy_[wafer]);
1607  int indx = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
1608 #ifdef EDM_ML_DEBUG
1609  edm::LogVerbatim("HGCalGeom") << "WaferIndex for " << wafer << ":" << index << " (" << layer << ":" << waferU << ":"
1610  << waferV << ") " << indx;
1611 #endif
1612  return indx;
1613 }

References hgpar_, layerFromIndex(), HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

Referenced by waferInLayerTest().

◆ waferInLayer()

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

Definition at line 1184 of file HGCalDDDConstants.cc.

1184  {
1185  const auto& indx = getIndex(lay, reco);
1186  if (indx.first < 0)
1187  return false;
1188  return waferInLayerTest(wafer, indx.first, hgpar_->defineFull_);
1189 }

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 1615 of file HGCalDDDConstants.cc.

1615  {
1616  bool flag = (waferHexagon6()) ? true : false;
1617  double xpos = hgpar_->waferPosX_[wafer] + hgpar_->xLayerHex_[lay];
1618  double ypos = hgpar_->waferPosY_[wafer] + hgpar_->yLayerHex_[lay];
1619  std::pair<int, int> corner = HGCalGeomTools::waferCorner(
1620  xpos, ypos, rmax_, hexside_, hgpar_->rMinLayHex_[lay], hgpar_->rMaxLayHex_[lay], flag);
1621  bool in = (full ? (corner.first > 0) : (corner.first == (int)(HGCalParameters::k_CornerSize)));
1622  if (in && fullAndPart_) {
1623  int indx = waferIndex(wafer, lay);
1624  in = (hgpar_->waferInfoMap_.find(indx) != hgpar_->waferInfoMap_.end());
1625 #ifdef EDM_ML_DEBUG
1626  if (!in)
1627  edm::LogVerbatim("HGCalGeom") << "WaferInLayerTest: Layer " << lay << " wafer " << wafer << " index " << indx
1628  << "( " << HGCalWaferIndex::waferLayer(indx) << ", "
1629  << HGCalWaferIndex::waferU(indx) << ", " << HGCalWaferIndex::waferV(indx) << ") in "
1630  << in;
1631 #endif
1632  }
1633 #ifdef EDM_ML_DEBUG
1634  edm::LogVerbatim("HGCalGeom") << "WaferInLayerTest: Layer " << lay << " wafer " << wafer << " R-limits "
1635  << hgpar_->rMinLayHex_[lay] << ":" << hgpar_->rMaxLayHex_[lay] << " Corners "
1636  << corner.first << ":" << corner.second << " In " << in;
1637 #endif
1638  return in;
1639 }

References distTCMET_cfi::corner, RemoveAddSevLevel::flag, full, fullAndPart_, hexside_, hgpar_, recoMuon::in, HGCalParameters::k_CornerSize, rmax_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, HGCalGeomTools::waferCorner(), waferHexagon6(), waferIndex(), HGCalParameters::waferInfoMap_, HGCalWaferIndex::waferLayer(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalWaferIndex::waferU(), HGCalWaferIndex::waferV(), HGCalParameters::xLayerHex_, and HGCalParameters::yLayerHex_.

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

◆ waferMax()

int HGCalDDDConstants::waferMax ( ) const
inline

Definition at line 136 of file HGCalDDDConstants.h.

136 { return waferMax_[1]; }

References waferMax_.

◆ waferMin()

int HGCalDDDConstants::waferMin ( ) const
inline

Definition at line 137 of file HGCalDDDConstants.h.

137 { return waferMax_[0]; }

References waferMax_.

◆ waferParameters()

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

Definition at line 1198 of file HGCalDDDConstants.cc.

1198  {
1199  if (reco)
1200  return std::make_pair(rmax_, hexside_);
1201  else
1203 }

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 1218 of file HGCalDDDConstants.cc.

1219  {
1220  int ll = lay - hgpar_->firstLayer_;
1221  double x = hgpar_->xLayerHex_[ll];
1222  double y = hgpar_->yLayerHex_[ll];
1223 #ifdef EDM_ML_DEBUG
1224  if (debug)
1225  edm::LogVerbatim("HGCalGeom") << "Layer " << lay << ":" << ll << " Shift " << hgpar_->xLayerHex_[ll] << ":"
1226  << hgpar_->yLayerHex_[ll];
1227 #endif
1228  if (!reco) {
1231  }
1232 
1233  const auto& xy = waferPosition(waferU, waferV, reco);
1234  x += xy.first;
1235  y += xy.second;
1236 #ifdef EDM_ML_DEBUG
1237  if (debug)
1238  edm::LogVerbatim("HGCalGeom") << "With wafer " << x << ":" << y << ":" << xy.first << ":" << xy.second;
1239 #endif
1240  return std::make_pair(x, y);
1241 }

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 1205 of file HGCalDDDConstants.cc.

1205  {
1206  double xx(0), yy(0);
1207  if (wafer >= 0 && wafer < (int)(hgpar_->waferPosX_.size())) {
1208  xx = hgpar_->waferPosX_[wafer];
1209  yy = hgpar_->waferPosY_[wafer];
1210  }
1211  if (!reco) {
1214  }
1215  return std::make_pair(xx, yy);
1216 }

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 1641 of file HGCalDDDConstants.cc.

1641  {
1642  double xx(0), yy(0);
1643  int indx = HGCalWaferIndex::waferIndex(0, waferU, waferV);
1644  auto itr = hgpar_->wafersInLayers_.find(indx);
1645  if (itr != hgpar_->wafersInLayers_.end()) {
1646  xx = hgpar_->waferPosX_[itr->second];
1647  yy = hgpar_->waferPosY_[itr->second];
1648  }
1649  if (!reco) {
1652  }
1653  return std::make_pair(xx, yy);
1654 }

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 1396 of file HGCalDDDConstants.cc.

1396  {
1397  int wafer(0);
1398  if (!tileTrapezoid()) {
1399  for (unsigned int i = 0; i < layers(true); ++i) {
1400  int lay = hgpar_->depth_[i];
1401  wafer += modules(lay, true);
1402  }
1403  } else {
1404  wafer = (int)(hgpar_->moduleLayR_.size());
1405  }
1406  return wafer;
1407 }

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

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

◆ wafers() [2/2]

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

Definition at line 1409 of file HGCalDDDConstants.cc.

1409  {
1410  int wafer(0);
1411  if (!tileTrapezoid()) {
1412  auto itr = waferLayer_.find(layer);
1413  if (itr != waferLayer_.end()) {
1414  unsigned ity = (type > 0 && type <= 2) ? type : 0;
1415  wafer = (itr->second)[ity];
1416  }
1417  } else {
1418  const auto& index = getIndex(layer, true);
1419  wafer = 1 + hgpar_->lastModule_[index.first] - hgpar_->firstModule_[index.first];
1420  }
1421  return wafer;
1422 }

References HGCalParameters::firstModule_, getIndex(), hgpar_, HGCalParameters::lastModule_, tileTrapezoid(), 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 174 of file HGCalDDDConstants.h.

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

References hgpar_, and HGCalParameters::waferCopy_.

◆ waferType() [1/3]

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

Definition at line 1243 of file HGCalDDDConstants.cc.

1243  {
1244  int type(1);
1245  if (waferHexagon8()) {
1246  if (fromFile && (waferFileSize() > 0)) {
1247  int layer(0), waferU(0), waferV(0);
1248  if (id.det() != DetId::Forward) {
1249  HGCSiliconDetId hid(id);
1250  layer = hid.layer();
1251  waferU = hid.waferU();
1252  waferV = hid.waferV();
1253  } else {
1254  HFNoseDetId hid(id);
1255  layer = hid.layer();
1256  waferU = hid.waferU();
1257  waferV = hid.waferV();
1258  }
1259  auto itr = hgpar_->waferInfoMap_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1260  if (itr != hgpar_->waferInfoMap_.end())
1261  type = (itr->second).type;
1262  } else {
1263  type = ((id.det() != DetId::Forward) ? HGCSiliconDetId(id).type() : HFNoseDetId(id).type());
1264  }
1265  } else if (waferHexagon6()) {
1266  type = waferTypeL(HGCalDetId(id).wafer()) - 1;
1267  }
1268  return type;
1269 }

References DetId::Forward, hgpar_, HFNoseDetId::layer(), HGCSiliconDetId::layer(), HFNoseDetId::type(), HGCSiliconDetId::type(), waferFileSize(), waferHexagon6(), waferHexagon8(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, waferTypeL(), HFNoseDetId::waferU(), HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), and HFNoseDetId::waferV().

Referenced by assignCellHex(), cellThickness(), HGCalNumberingScheme::getUnitID(), 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 1290 of file HGCalDDDConstants.cc.

1290  {
1291  const auto& index = HGCalWaferIndex::waferIndex(id.layer(), id.waferU(), id.waferV());
1292  int type(-1), part(-1), orient(-1);
1293  if (fromFile && (waferFileSize() > 0)) {
1294  auto itr = hgpar_->waferInfoMap_.find(index);
1295  if (itr != hgpar_->waferInfoMap_.end()) {
1296  type = (itr->second).type;
1297  part = (itr->second).part;
1298  orient = (itr->second).orient;
1299  }
1300  } else {
1301  auto ktr = hgpar_->typesInLayers_.find(index);
1302  if (ktr != hgpar_->typesInLayers_.end())
1303  type = hgpar_->waferTypeL_[ktr->second];
1304  auto itr = hgpar_->waferTypes_.find(index);
1305  if (itr != hgpar_->waferTypes_.end()) {
1306  if ((itr->second).second < HGCalWaferMask::k_OffsetRotation) {
1307  orient = (itr->second).second;
1308  if ((itr->second).first == HGCalGeomTools::k_allCorners) {
1310  } else if ((itr->second).first == HGCalGeomTools::k_fiveCorners) {
1312  } else if ((itr->second).first == HGCalGeomTools::k_fourCorners) {
1314  } else if ((itr->second).first == HGCalGeomTools::k_threeCorners) {
1316  }
1317  } else {
1318  part = (itr->second).first;
1320  }
1321  } else {
1323  orient = 0;
1324  }
1325  }
1326  return std::make_tuple(type, part, orient);
1327 }

References dqmdumpme::first, hgpar_, HGCalGeomTools::k_allCorners, HGCalGeomTools::k_fiveCorners, HGCalGeomTools::k_fourCorners, HGCalWaferMask::k_OffsetRotation, HGCalGeomTools::k_threeCorners, hgcalPerformanceValidation::orient, 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 1271 of file HGCalDDDConstants.cc.

1271  {
1273  if (waferHexagon8()) {
1274  if (fromFile && (waferFileSize() > 0)) {
1275  auto itr = hgpar_->waferInfoMap_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1276  if (itr != hgpar_->waferInfoMap_.end())
1277  type = (itr->second).type;
1278  } else {
1279  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
1280  if (itr != hgpar_->typesInLayers_.end())
1281  type = hgpar_->waferTypeL_[itr->second];
1282  }
1283  } else if (waferHexagon6()) {
1284  if ((waferU >= 0) && (waferU < (int)(hgpar_->waferTypeL_.size())))
1285  type = (hgpar_->waferTypeL_[waferU] - 1);
1286  }
1287  return type;
1288 }

References HGCSiliconDetId::HGCalCoarseThick, hgpar_, createfilelist::int, HGCalParameters::typesInLayers_, waferFileSize(), waferHexagon6(), waferHexagon8(), HGCalWaferIndex::waferIndex(), HGCalParameters::waferInfoMap_, and HGCalParameters::waferTypeL_.

◆ waferTypeL()

int HGCalDDDConstants::waferTypeL ( int  wafer) const
inline

Definition at line 183 of file HGCalDDDConstants.h.

183  {
184  return ((wafer >= 0) && (wafer < (int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;
185  }

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 1329 of file HGCalDDDConstants.cc.

1330  {
1331  int type(HGCalTypes::WaferOut), rotn(0);
1332  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV);
1333  bool withinList(true);
1334  if (fromFile && (waferFileSize() > 0)) {
1335  auto itr = hgpar_->waferInfoMap_.find(wl);
1336  withinList = (itr != hgpar_->waferInfoMap_.end());
1337  if (withinList) {
1338  type = (itr->second).part;
1339  rotn = (itr->second).orient;
1340  }
1341  } else {
1342  auto itr = hgpar_->waferTypes_.find(wl);
1343  if (waferHexagon8()) {
1344  withinList = (itr != hgpar_->waferTypes_.end());
1345  if (withinList) {
1346  if ((itr->second).second < HGCalWaferMask::k_OffsetRotation) {
1347  rotn = (itr->second).second;
1348  if ((itr->second).first == HGCalGeomTools::k_allCorners) {
1350  } else if ((itr->second).first == HGCalGeomTools::k_fiveCorners) {
1352  } else if ((itr->second).first == HGCalGeomTools::k_fourCorners) {
1354  } else if ((itr->second).first == HGCalGeomTools::k_threeCorners) {
1356  }
1357  } else {
1358  type = (itr->second).first;
1359  rotn = ((itr->second).second - HGCalWaferMask::k_OffsetRotation);
1360  }
1361  } else {
1363  rotn = HGCalTypes::WaferCorner0;
1364  }
1365  }
1366  }
1367 #ifdef EDM_ML_DEBUG
1368  if (debug)
1369  edm::LogVerbatim("HGCalGeom") << "waferTypeRotation: Layer " << layer << " Wafer " << waferU << ":" << waferV
1370  << " Index " << std::hex << wl << std::dec << ":" << withinList << " Type " << type
1371  << " Rotation " << rotn;
1372 #endif
1373  return std::make_pair(type, rotn);
1374 }

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

Referenced by isValidCell8().

◆ waferTypeT()

int HGCalDDDConstants::waferTypeT ( int  wafer) const
inline

Definition at line 179 of file HGCalDDDConstants.h.

179  {
180  return ((wafer >= 0) && (wafer < (int)(hgpar_->waferTypeT_.size()))) ? hgpar_->waferTypeT_[wafer] : 0;
181  }

References hgpar_, and HGCalParameters::waferTypeT_.

Referenced by HGCalTriggerGeometryHexLayerBasedImp1::detIdWaferType(), and HGCalGeometry::getClosestCell().

◆ waferUVMax()

int HGCalDDDConstants::waferUVMax ( ) const
inline

Definition at line 191 of file HGCalDDDConstants.h.

191 { 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 1376 of file HGCalDDDConstants.cc.

1376  {
1377  bool type(false);
1378  if (waferHexagon8()) {
1379  int wl = HGCalWaferIndex::waferIndex(layer, waferU, waferV, false);
1380  type = (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
1381  } else if (waferHexagon6()) {
1382  int wl = HGCalWaferIndex::waferIndex(layer, waferU, 0, true);
1383  type = (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
1384  }
1385  return type;
1386 }

References hgpar_, waferHexagon6(), waferHexagon8(), 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 212 of file HGCalDDDConstants.h.

◆ fullAndPart_

bool HGCalDDDConstants::fullAndPart_
private

Definition at line 220 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), isValidHex8(), and waferInLayerTest().

◆ geomTools_

HGCalGeomTools HGCalDDDConstants::geomTools_
private

Definition at line 210 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 211 of file HGCalDDDConstants.h.

◆ max_modules_layer_

Simrecovecs HGCalDDDConstants::max_modules_layer_
private

Definition at line 223 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and modules().

◆ maxWafersPerLayer_

int32_t HGCalDDDConstants::maxWafersPerLayer_
private

Definition at line 224 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxModulesPerLayer().

◆ mode_

HGCalGeometryMode::GeometryMode HGCalDDDConstants::mode_
private

◆ modHalf_

int32_t HGCalDDDConstants::modHalf_
private

Definition at line 221 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxModules().

◆ rmax_

double HGCalDDDConstants::rmax_
private

◆ sqrt3_

const double HGCalDDDConstants::sqrt3_
private

Definition at line 217 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 222 of file HGCalDDDConstants.h.

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

◆ tot_wafers_

int32_t HGCalDDDConstants::tot_wafers_
private

Definition at line 221 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants().

◆ waferIn_

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

Definition at line 227 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and isValidHex8().

◆ waferLayer_

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

Definition at line 225 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and wafers().

◆ waferMax_

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

Definition at line 226 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:221
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:223
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:428
geometryCSVtoXML.zz
zz
Definition: geometryCSVtoXML.py:19
HGCalGeometryMode::TrapezoidFile
Definition: HGCalGeometryMode.h:33
HGCalDDDConstants::tan30deg_
constexpr static double tan30deg_
Definition: HGCalDDDConstants.h:216
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:1070
HGCalDDDConstants::maxWafersPerLayer_
int32_t maxWafersPerLayer_
Definition: HGCalDDDConstants.h:224
HGCalWaferMask::goodCell
static bool goodCell(int u, int v, int N, int type, int rotn)
Definition: HGCalWaferMask.cc:106
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:1424
HGCalDDDConstants::sqrt3_
const double sqrt3_
Definition: HGCalDDDConstants.h:217
HGCalDDDConstants::modulesInit
int modulesInit(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:862
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:227
HGCalDDDConstants::isValidCell
bool isValidCell(int layindex, int wafer, int cell) const
Definition: HGCalDDDConstants.cc:1530
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
angle_units::operators::convertRadToDeg
constexpr NumType convertRadToDeg(NumType radians)
Definition: angle_units.h:21
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
HGCalDDDConstants::waferHexagon8
bool waferHexagon8() const
Definition: HGCalDDDConstants.h:129
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:222
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:170
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
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
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
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
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:223
HGCSiliconDetId::HGCalCoarseThick
Definition: HGCSiliconDetId.h:24
HGCalDDDConstants::geomTools_
HGCalGeomTools geomTools_
Definition: HGCalDDDConstants.h:210
HGCalParameters::waferPosY_
std::vector< double > waferPosY_
Definition: HGCalParameters.h:113
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HGCalDDDConstants::layerFromIndex
int layerFromIndex(int index, bool reco) const
Definition: HGCalDDDConstants.cc:1510
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HGCalParameters::sensorSeparation_
double sensorSeparation_
Definition: HGCalParameters.h:140
HGCalDDDConstants::waferTypeRotation
std::pair< int, int > waferTypeRotation(int layer, int waferU, int waferV, bool fromFile=false, bool debug=false) const
Definition: HGCalDDDConstants.cc:1329
HGCalDDDConstants::isValidHex8
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
Definition: HGCalDDDConstants.cc:486
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:1243
HGCalDDDConstants::waferHexagon6
bool waferHexagon6() const
Definition: HGCalDDDConstants.h:126
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:31
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:1554
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HGCalDDDConstants::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalDDDConstants.h:219
trackingPlots.hp
hp
Definition: trackingPlots.py:1248
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:785
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:1184
HGCalParameters::waferUVMax_
int waferUVMax_
Definition: HGCalParameters.h:142
DDAxes::z
HGCalDDDConstants::layerIndex
int layerIndex(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:563
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
HGCalWaferType::getType
int getType(double xpos, double ypos, double zpos)
Definition: HGCalWaferType.cc:35
HGCalDDDConstants::waferFileSize
unsigned int waferFileSize() const
Definition: HGCalDDDConstants.h:141
HGCalDDDConstants::wafers
int wafers() const
Definition: HGCalDDDConstants.cc:1396
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:947
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
HGCalTypes::getUnpackedU
static int32_t getUnpackedU(int id)
Definition: HGCalTypes.cc:16
HGCSiliconDetId::HGCalFine
Definition: HGCSiliconDetId.h:24
HGCalParameters::cellSize_
std::vector< double > cellSize_
Definition: HGCalParameters.h:69
HGCalDDDConstants::tileTrapezoid
bool tileTrapezoid() const
Definition: HGCalDDDConstants.h:110
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
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
HGCalDDDConstants::hexside_
double hexside_
Definition: HGCalDDDConstants.h:218
HFNoseDetId::type
int type() const
get the type
Definition: HFNoseDetId.h:50
HGCalDDDConstants::waferLayer_
std::map< int, HGCWaferParam > waferLayer_
Definition: HGCalDDDConstants.h:225
HGCalDDDConstants::modHalf_
int32_t modHalf_
Definition: HGCalDDDConstants.h:221
HGCalDDDConstants::numberCells
int numberCells(bool reco) const
Definition: HGCalDDDConstants.cc:882
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:1493
HGCalParameters::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalParameters.h:131
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
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:30
recoMuon::in
Definition: RecoMuonEnumerators.h:6
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
HGCalTypes::getUnpackedV
static int32_t getUnpackedV(int id)
Definition: HGCalTypes.cc:22
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:561
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:49
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:70
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
HGCalParameters::layerOffset_
int layerOffset_
Definition: HGCalParameters.h:168
HGCalParameters::waferThick_
double waferThick_
Definition: HGCalParameters.h:139
HGCalDDDConstants::rmax_
double rmax_
Definition: HGCalDDDConstants.h:218
HGCalParameters::hgtrform::lay
int lay
Definition: HGCalParameters.h:47
HGCalTypes::CellType::TopCorner
HGCalDDDConstants::getTrForm
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Definition: HGCalDDDConstants.h:65
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
HGCalGeometryMode::Hexagon
Definition: HGCalGeometryMode.h:27
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:226
HGCalTypes::CellType::BottomRightCorner
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCalDDDConstants::tot_layers_
std::array< uint32_t, 2 > tot_layers_
Definition: HGCalDDDConstants.h:222
HGCalDDDConstants::numberCellsHexagon
int numberCellsHexagon(int wafer) const
Definition: HGCalDDDConstants.cc:925
HGCalParameters
Definition: HGCalParameters.h:13
HGCalWaferMask::k_OffsetRotation
static const int k_OffsetRotation
Definition: HGCalWaferMask.h:35
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:28
HGCalParameters::detectorType_
int detectorType_
Definition: HGCalParameters.h:66
HGCalDDDConstants::cellType
HGCalTypes::CellType cellType(int type, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:239
std
Definition: JetResolutionObject.h:76
HGCalParameters::waferMaskMode_
int waferMaskMode_
Definition: HGCalParameters.h:173
HGCalTypes::CellType::BottomLeftCorner
HGCalParameters::waferInfoMap_
waferInfo_map waferInfoMap_
Definition: HGCalParameters.h:175
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:640
HGCalParameters::slopeMin_
std::vector< double > slopeMin_
Definition: HGCalParameters.h:132
HGCalParameters::depthIndex_
std::vector< int > depthIndex_
Definition: HGCalParameters.h:102
hgcalPerformanceValidation.orient
orient
Definition: hgcalPerformanceValidation.py:640
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
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
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:1205
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
HGCalGeometryMode::Hexagon8File
Definition: HGCalGeometryMode.h:32
HGCalParameters::lastModule_
std::vector< int > lastModule_
Definition: HGCalParameters.h:161
HGCalDDDConstants::modules
int modules(int lay, bool reco) const
Definition: HGCalDDDConstants.cc:855
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:355
HGCalTypes::CellType::CentralType
HGCalGeometryMode::Hexagon8
Definition: HGCalGeometryMode.h:29
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HGCalDDDConstants::waferTypeL
int waferTypeL(int wafer) const
Definition: HGCalDDDConstants.h:183
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:311
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:66
HGCalDDDConstants::fullAndPart_
bool fullAndPart_
Definition: HGCalDDDConstants.h:220
HGCalDDDConstants::layersInit
unsigned int layersInit(bool reco) const
Definition: HGCalDDDConstants.cc:576
HGCalDDDConstants::locateCell
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
Definition: HGCalDDDConstants.cc:580
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
HGCalDDDConstants::waferIndex
int32_t waferIndex(int wafer, int index) const
Definition: HGCalDDDConstants.cc:1603
HGCalParameters::zFrontTop_
std::vector< double > zFrontTop_
Definition: HGCalParameters.h:163
HGCalParameters::hgtrap
Definition: HGCalParameters.h:41
edm::Log
Definition: MessageLogger.h:70
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:215
HGCalWaferMask::maskCell
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)
Definition: HGCalWaferMask.cc:9
HGCalTypes::CellType::BottomLeftEdge
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
RecoTauValidation_cfi.posY
posY
Definition: RecoTauValidation_cfi.py:289
HGCalWaferIndex::waferLayer
static int32_t waferLayer(const int32_t index)
Definition: HGCalWaferIndex.cc:35
HGCalDDDConstants::HGCWaferParam
std::array< int, 3 > HGCWaferParam
Definition: HGCalDDDConstants.h:214
HGCalDDDConstants::waferInLayerTest
bool waferInLayerTest(int wafer, int lay, bool full) const
Definition: HGCalDDDConstants.cc:1615
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
HGCalTypes::CellType::TopRightCorner
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
HGCalTypes::WaferCorner0
Definition: HGCalTypes.h:30
HGCalParameters::copiesInLayers_
layer_map copiesInLayers_
Definition: HGCalParameters.h:135