CMS 3D CMS Logo

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

#include <HGCalTBDDDConstants.h>

Public Member Functions

std::pair< int, int > assignCell (float x, float y, int lay, int subSec, bool reco) const
 
double cellSizeHex (int type) const
 
double cellThickness (int layer, int wafer) const
 
double distFromEdgeHex (double x, double y, double z) const
 
int firstLayer () const
 
HGCalGeometryMode::GeometryMode geomMode () const
 
int getLayer (double z, bool reco) const
 
HGCalTBParameters::hgtrap getModule (unsigned int k, bool hexType, bool reco) const
 
std::vector< HGCalTBParameters::hgtrapgetModules () const
 
const HGCalTBParametersgetParameter () const
 
HGCalTBParameters::hgtrform getTrForm (unsigned int k) const
 
unsigned int getTrFormN () const
 
std::vector< HGCalTBParameters::hgtrformgetTrForms () const
 
int getTypeHex (int layer, int wafer) const
 
 HGCalTBDDDConstants (const HGCalTBParameters *hp, const std::string &name)
 
bool isHalfCell (int waferType, int cell) const
 
bool isValidHex (int lay, int mod, int cell, bool reco) 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 layerType (int lay) const
 
int levelTop (int ind=0) const
 
std::pair< float, float > locateCell (int cell, int lay, int type, bool reco) const
 
std::pair< float, float > locateCellHex (int cell, int wafer, bool reco) const
 
int maxCells (bool reco) const
 
int maxCells (int lay, bool reco) 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 wafer) const
 
std::pair< double, double > rangeR (double z, bool reco) const
 
std::pair< double, double > rangeRLayer (int lay, bool reco) const
 
std::pair< double, double > rangeZ (bool reco) const
 
std::pair< int, int > rowColumnWafer (const int wafer) const
 
int sectors () const
 
std::pair< int, int > simToReco (int cell, int layer, int mod, bool half) const
 
unsigned int volumes () const
 
int waferCount (const int type) const
 
int waferFromCopy (int copy) 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 waferInLayer (int wafer, int lay, bool reco) const
 
GlobalPoint waferLocal2Global (HepGeom::Point3D< float > &loc, const DetId &id, bool useWafer, bool reco, bool debug) const
 
int waferMax () const
 
int waferMin () const
 
std::pair< double, double > waferParameters (bool reco) 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) const
 
int waferType (int layer, int wafer) const
 
std::tuple< int, int, int > waferType (HGCSiliconDetId const &id, bool fromFile=false) const
 
int waferTypeL (int wafer) const
 
int waferTypeT (int wafer) const
 
int waferUVMax () const
 
bool waferVirtual (int layer, int wafer) const
 
double waferZ (int layer, bool reco) const
 
 ~HGCalTBDDDConstants ()=default
 

Private Types

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

Private Member Functions

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
 
int layerFromIndex (int index, bool reco) const
 
int32_t waferIndex (int wafer, int index) const
 
bool waferInLayerTest (int wafer, int lay) const
 

Private Attributes

const float dPhiMin = 0.02
 
HGCalGeomTools geomTools_
 
double hexside_
 
double hexsideT_
 
const HGCalTBParametershgpar_
 
const double k_horizontalShift = 1.0
 
Simrecovecs max_modules_layer_
 
int32_t maxWafersPerLayer_
 
const HGCalGeometryMode::GeometryMode mode_
 
int32_t modHalf_
 
double rmax_
 
double rmaxT_
 
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

static constexpr 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 31 of file HGCalTBDDDConstants.h.

Member Typedef Documentation

◆ HGCWaferParam

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

Definition at line 138 of file HGCalTBDDDConstants.h.

◆ Simrecovecs

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

Definition at line 137 of file HGCalTBDDDConstants.h.

Constructor & Destructor Documentation

◆ HGCalTBDDDConstants()

HGCalTBDDDConstants::HGCalTBDDDConstants ( const HGCalTBParameters hp,
const std::string &  name 
)

Definition at line 20 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellSize_, funct::cos(), getIndex(), getTrForm(), getTrFormN(), hexside_, hexsideT_, hgpar_, mps_fire::i, HGCalTBParameters::k_ScaleFromDDD, HGCalTBParameters::hgtrform::lay, nano_mu_digi_cff::layer, layers(), layersInit(), SiStripPI::max, max_modules_layer_, maxCells(), maxWafersPerLayer_, mode_, modHalf_, modulesInit(), Skims_PA_cff::name, rmax_, rmaxT_, sectors(), HGCalTBParameters::sensorSeparation_, tan30deg_, tot_layers_, tot_wafers_, waferHexagon6(), waferInLayer(), waferLayer_, waferMax_, HGCalTBParameters::waferR_, wafers(), cms::cuda::wmax, and cms::cuda::wmin.

21  : hgpar_(hp), sqrt3_(std::sqrt(3.0)), mode_(hgpar_->mode_) {
22 #ifdef EDM_ML_DEBUG
23  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants::Mode " << mode_;
24 #endif
25  if (waferHexagon6()) {
28  hexside_ = 2.0 * rmax_ * tan30deg_;
29  hexsideT_ = 2.0 * rmaxT_ * tan30deg_;
30 #ifdef EDM_ML_DEBUG
31  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants::rmax_ " << rmax_ << ":" << rmaxT_ << ":" << hexside_ << ":"
32  << hexsideT_ << " CellSize "
35 #endif
36  }
37  // init maps and constants
38  modHalf_ = 0;
40  for (int simreco = 0; simreco < 2; ++simreco) {
41  tot_layers_[simreco] = layersInit((bool)simreco);
42  max_modules_layer_[simreco].resize(tot_layers_[simreco] + 1);
43  for (unsigned int layer = 1; layer <= tot_layers_[simreco]; ++layer) {
44  max_modules_layer_[simreco][layer] = modulesInit(layer, (bool)simreco);
45  if (simreco == 1) {
46  modHalf_ += max_modules_layer_[simreco][layer];
48 #ifdef EDM_ML_DEBUG
49  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants::Layer " << layer << " with "
50  << max_modules_layer_[simreco][layer] << ":" << modHalf_ << " modules in RECO";
51  } else {
52  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants::Layer " << layer << " with "
53  << max_modules_layer_[simreco][layer] << " modules in SIM";
54 #endif
55  }
56  }
57 #ifdef EDM_ML_DEBUG
58  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants::SimReco " << simreco << " with " << tot_layers_[simreco]
59  << " Layers";
60 #endif
61  }
62  tot_wafers_ = wafers();
63 
64 #ifdef EDM_ML_DEBUG
65  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants initialized for " << name << " with " << layers(false) << ":"
66  << layers(true) << " layers, " << wafers() << ":" << 2 * modHalf_
67  << " wafers with maximum " << maxWafersPerLayer_ << " per layer and "
68  << "maximum of " << maxCells(false) << ":" << maxCells(true) << " cells";
69 #endif
70  if (waferHexagon6()) {
71  int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
72  for (unsigned int i = 0; i < getTrFormN(); ++i) {
73  int lay0 = getTrForm(i).lay;
74  int wmin(9999999), wmax(-9999999), kount(0);
75  for (int wafer = 0; wafer < sectors(); ++wafer) {
76  bool waferIn = waferInLayer(wafer, lay0, true);
77  if (waferIn) {
78  if (wafer < wmin)
79  wmin = wafer;
80  if (wafer > wmax)
81  wmax = wafer;
82  ++kount;
83  }
84  }
85  if (wminT > wmin)
86  wminT = wmin;
87  if (wmaxT < wmax)
88  wmaxT = wmax;
89  if (kount1 < kount)
90  kount1 = kount;
91  kount2 += kount;
92 #ifdef EDM_ML_DEBUG
93  int lay1 = getIndex(lay0, true).first;
94  edm::LogVerbatim("HGCalGeom") << "Index " << i << " Layer " << lay0 << ":" << lay1 << " Wafer " << wmin << ":"
95  << wmax << ":" << kount;
96 #endif
97  HGCWaferParam a1{{wmin, wmax, kount}};
98  waferLayer_[lay0] = a1;
99  }
100  waferMax_ = std::array<int, 4>{{wminT, wmaxT, kount1, kount2}};
101 #ifdef EDM_ML_DEBUG
102  edm::LogVerbatim("HGCalGeom") << "Overall wafer statistics: " << wminT << ":" << wmaxT << ":" << kount1 << ":"
103  << kount2;
104 #endif
105  }
106 }
const HGCalGeometryMode::GeometryMode mode_
Log< level::Info, true > LogVerbatim
bool waferInLayer(int wafer, int lay, bool reco) const
static constexpr double k_ScaleFromDDD
std::array< uint32_t, 2 > tot_layers_
std::array< int, 4 > waferMax_
const HGCalTBParameters * hgpar_
std::pair< int, float > getIndex(int lay, bool reco) const
unsigned int layersInit(bool reco) const
std::map< int, HGCWaferParam > waferLayer_
T sqrt(T t)
Definition: SSEVec.h:23
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::array< int, 3 > HGCWaferParam
HGCalGeometryMode::GeometryMode mode_
unsigned int getTrFormN() const
static constexpr double tan30deg_
std::vector< double > cellSize_
unsigned int layers(bool reco) const
int maxCells(bool reco) const
int modulesInit(int lay, bool reco) const
__host__ __device__ V wmin
HGCalTBParameters::hgtrform getTrForm(unsigned int k) const
__host__ __device__ V V wmax

◆ ~HGCalTBDDDConstants()

HGCalTBDDDConstants::~HGCalTBDDDConstants ( )
default

Member Function Documentation

◆ assignCell()

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

Definition at line 108 of file HGCalTBDDDConstants.cc.

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

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

108  {
109  const auto& index = getIndex(lay, reco);
110  if (index.first < 0)
111  return std::make_pair(-1, -1);
112  if (waferHexagon6()) {
113  float xx = (reco) ? x : HGCalTBParameters::k_ScaleFromDDD * x;
114  float yy = (reco) ? y : HGCalTBParameters::k_ScaleFromDDD * y;
115 
116  // First the wafer
117  int wafer = cellHex(xx, yy, rmax_, hgpar_->waferPosX_, hgpar_->waferPosY_);
118  if (wafer < 0 || wafer >= static_cast<int>(hgpar_->waferTypeT_.size())) {
119  edm::LogWarning("HGCalGeom") << "Wafer no. out of bound for " << wafer << ":" << (hgpar_->waferTypeT_).size()
120  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
121  << " ***** ERROR *****";
122  return std::make_pair(-1, -1);
123  } else {
124  // Now the cell
125  xx -= hgpar_->waferPosX_[wafer];
126  yy -= hgpar_->waferPosY_[wafer];
127  if (hgpar_->waferTypeT_[wafer] == 1)
128  return std::make_pair(wafer,
129  cellHex(xx,
130  yy,
133  hgpar_->cellFineY_));
134  else
135  return std::make_pair(wafer,
136  cellHex(xx,
137  yy,
140  hgpar_->cellCoarseY_));
141  }
142  } else {
143  return std::make_pair(-1, -1);
144  }
145 }
size
Write out results.
std::vector< double > cellFineX_
static constexpr double k_ScaleFromDDD
std::vector< double > cellCoarseY_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< double > waferPosX_
std::vector< int > waferTypeT_
std::vector< double > cellFineY_
std::vector< double > cellSize_
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
fixed size matrix
Log< level::Warning, false > LogWarning
std::vector< double > waferPosY_

◆ cellHex()

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

Definition at line 676 of file HGCalTBDDDConstants.cc.

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().

677  {
678  int num(0);
679  const double tol(0.00001);
680  double cellY = 2.0 * cellR * tan30deg_;
681  for (unsigned int k = 0; k < posX.size(); ++k) {
682  double dx = std::abs(xx - posX[k]);
683  double dy = std::abs(yy - posY[k]);
684  if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
685  double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) / tan30deg_);
686  if (dx <= (xmax + tol)) {
687  num = k;
688  break;
689  }
690  }
691  }
692  return num;
693 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr double tan30deg_

◆ cellSizeHex()

double HGCalTBDDDConstants::cellSizeHex ( int  type) const

Definition at line 147 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellSize_, hgpar_, and HGCalTBParameters::k_ScaleFromDDD.

147  {
148  int indx = (type == 1) ? 1 : 0;
149  double cell = 0.5 * HGCalTBParameters::k_ScaleFromDDD * hgpar_->cellSize_[indx];
150  return cell;
151 }
static constexpr double k_ScaleFromDDD
const HGCalTBParameters * hgpar_
std::vector< double > cellSize_

◆ cellThickness()

double HGCalTBDDDConstants::cellThickness ( int  layer,
int  wafer 
) const

Definition at line 153 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer, and waferType().

Referenced by HGCalTBAnalyzer::analyzeSimHits().

153  {
154  double thick(-1);
155  int type = waferType(layer, wafer);
156  if (type >= 0)
157  thick = 100.0 * (type + 1); // type = 1,2,3 for 100,200,300 micron
158  return thick;
159 }
int waferType(DetId const &id) const

◆ distFromEdgeHex()

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

Definition at line 161 of file HGCalTBDDDConstants.cc.

References funct::abs(), PVValHelper::dx, PVValHelper::dy, hexside_, hgpar_, dqmdumpme::k, HGCalTBParameters::k_ScaleFromDDD, HGCalTBParameters::k_ScaleToDDD, rmax_, sqrt3_, tan30deg_, HGCalTBParameters::waferPosX_, HGCalTBParameters::waferPosY_, x, geometryCSVtoXML::xx, y, geometryCSVtoXML::yy, and z.

161  {
162  // Assming the point is within a hexagonal plane of the wafer, calculate
163  // the shortest distance from the edge
164  if (z < 0)
165  x = -x;
166  double dist(0);
167  // Input x, y in Geant4 unit and transformed to CMSSW standard
170  int sizew = static_cast<int>(hgpar_->waferPosX_.size());
171  int wafer = sizew;
172  // Transform to the local coordinate frame of the wafer first
173  for (int k = 0; k < sizew; ++k) {
174  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
175  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
176  if ((dx <= rmax_) && (dy <= hexside_) && ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy)))) {
177  wafer = k;
178  xx -= hgpar_->waferPosX_[k];
179  yy -= hgpar_->waferPosY_[k];
180  break;
181  }
182  }
183  // Look at only one quarter (both x,y are positive)
184  if (wafer < sizew) {
185  if (std::abs(yy) < 0.5 * hexside_) {
186  dist = rmax_ - std::abs(xx);
187  } else {
188  dist = 0.5 * ((rmax_ - std::abs(xx)) - sqrt3_ * (std::abs(yy) - 0.5 * hexside_));
189  }
190  } else {
191  dist = 0;
192  }
194 #ifdef EDM_ML_DEBUG
195  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeHex: Local " << xx << ":" << yy << " wafer " << wafer << " flag "
196  << (wafer < sizew) << " Distance " << rmax_ << ":" << (rmax_ - std::abs(xx)) << ":"
197  << (std::abs(yy) - 0.5 * hexside_) << ":" << 0.5 * hexside_ << ":" << dist;
198 #endif
199  return dist;
200 }
Log< level::Info, true > LogVerbatim
static constexpr double k_ScaleFromDDD
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
std::vector< double > waferPosX_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr double tan30deg_
std::vector< double > waferPosY_

◆ firstLayer()

int HGCalTBDDDConstants::firstLayer ( ) const
inline

Definition at line 40 of file HGCalTBDDDConstants.h.

References HGCalTBParameters::firstLayer_, and hgpar_.

Referenced by HGCalTBTopology::HGCalTBTopology(), and HGCalTBGeometry::neighborZ().

40 { return hgpar_->firstLayer_; }
const HGCalTBParameters * hgpar_

◆ geomMode()

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

Definition at line 41 of file HGCalTBDDDConstants.h.

References mode_.

Referenced by HGCNumberingScheme::getUnitID(), HGCalTBTopology::HGCalTBTopology(), and HGCSD::update().

41 { return mode_; }
const HGCalGeometryMode::GeometryMode mode_

◆ getIndex()

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

Definition at line 695 of file HGCalTBDDDConstants.cc.

References hgpar_, layerIndex(), HGCalTBParameters::moduleCellR_, HGCalTBParameters::moduleCellS_, and waferHexagon6().

Referenced by assignCell(), HGCalTBDDDConstants(), locateCell(), maxCells(), maxRows(), modules(), modulesInit(), numberCells(), rangeRLayer(), waferFullInLayer(), waferInLayer(), and waferZ().

695  {
696  int indx = layerIndex(lay, reco);
697  if (indx < 0)
698  return std::make_pair(-1, 0);
699  float cell(0);
700  if (waferHexagon6()) {
701  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
702  }
703  return std::make_pair(indx, cell);
704 }
std::vector< double > moduleCellR_
const HGCalTBParameters * hgpar_
int layerIndex(int lay, bool reco) const
fixed size matrix
std::vector< double > moduleCellS_

◆ getLayer()

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

Definition at line 202 of file HGCalTBDDDConstants.cc.

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

202  {
203  // Get the layer # from the gloabl z coordinate
204  unsigned int k = 0;
205  double zz = (reco ? std::abs(z) : HGCalTBParameters::k_ScaleFromDDD * std::abs(z));
206  const auto& zLayerHex = hgpar_->zLayerHex_;
207  auto itr = std::find_if(zLayerHex.begin() + 1, zLayerHex.end(), [&k, &zz, &zLayerHex](double zLayer) {
208  ++k;
209  return zz < 0.5 * (zLayerHex[k - 1] + zLayerHex[k]);
210  });
211  int lay = (itr == zLayerHex.end()) ? static_cast<int>(zLayerHex.size()) : k;
212  if (waferHexagon6() && reco) {
213  int indx = layerIndex(lay, false);
214  if (indx >= 0)
215  lay = hgpar_->layerGroupO_[indx];
216  } else {
217  lay += (hgpar_->firstLayer_ - 1);
218  }
219  return lay;
220 }
const HGCalTBParameters * hgpar_
std::vector< double > zLayerHex_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int layerIndex(int lay, bool reco) const
fixed size matrix
std::vector< int > layerGroupO_

◆ getModule()

HGCalTBParameters::hgtrap HGCalTBDDDConstants::getModule ( unsigned int  k,
bool  hexType,
bool  reco 
) const

Definition at line 222 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBGeometry::getSummary().

222  {
224  if (hexType) {
225  if (indx >= hgpar_->waferTypeL_.size())
226  edm::LogWarning("HGCalGeom") << "Wafer no. out bound for index " << indx << ":" << (hgpar_->waferTypeL_).size()
227  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
228  << " ***** ERROR *****";
229  unsigned int type =
230  ((indx < hgpar_->waferTypeL_.size()) ? hgpar_->waferTypeL_[indx] - 1 : HGCalTBParameters::HGCalCoarseThick);
231  mytr = hgpar_->getModule(type, reco);
232  } else {
233  mytr = hgpar_->getModule(indx, reco);
234  }
235  return mytr;
236 }
size
Write out results.
std::vector< int > waferTypeL_
const HGCalTBParameters * hgpar_
std::vector< double > waferPosX_
fixed size matrix
std::vector< double > waferPosY_
hgtrap getModule(unsigned int k, bool reco) const

◆ getModules()

std::vector< HGCalTBParameters::hgtrap > HGCalTBDDDConstants::getModules ( ) const

Definition at line 238 of file HGCalTBDDDConstants.cc.

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

238  {
239  std::vector<HGCalTBParameters::hgtrap> mytrs;
240  for (unsigned int k = 0; k < hgpar_->moduleLayR_.size(); ++k)
241  mytrs.emplace_back(hgpar_->getModule(k, true));
242  return mytrs;
243 }
std::vector< int > moduleLayR_
const HGCalTBParameters * hgpar_
hgtrap getModule(unsigned int k, bool reco) const

◆ getParameter()

const HGCalTBParameters* HGCalTBDDDConstants::getParameter ( ) const
inline

Definition at line 45 of file HGCalTBDDDConstants.h.

References hgpar_.

45 { return hgpar_; }
const HGCalTBParameters * hgpar_

◆ getTrForm()

HGCalTBParameters::hgtrform HGCalTBDDDConstants::getTrForm ( unsigned int  k) const
inline

Definition at line 46 of file HGCalTBDDDConstants.h.

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

Referenced by HGCalTBGeometry::getSummary(), and HGCalTBDDDConstants().

46 { return hgpar_->getTrForm(k); }
const HGCalTBParameters * hgpar_
hgtrform getTrForm(unsigned int k) const

◆ getTrFormN()

unsigned int HGCalTBDDDConstants::getTrFormN ( ) const
inline

Definition at line 47 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::trformIndex_.

Referenced by HGCalTBGeometry::getSummary(), and HGCalTBDDDConstants().

47 { return hgpar_->trformIndex_.size(); }
const HGCalTBParameters * hgpar_
std::vector< uint32_t > trformIndex_

◆ getTrForms()

std::vector< HGCalTBParameters::hgtrform > HGCalTBDDDConstants::getTrForms ( ) const

Definition at line 245 of file HGCalTBDDDConstants.cc.

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

245  {
246  std::vector<HGCalTBParameters::hgtrform> mytrs;
247  for (unsigned int k = 0; k < hgpar_->trformIndex_.size(); ++k)
248  mytrs.emplace_back(hgpar_->getTrForm(k));
249  return mytrs;
250 }
const HGCalTBParameters * hgpar_
hgtrform getTrForm(unsigned int k) const
std::vector< uint32_t > trformIndex_

◆ getTypeHex()

int HGCalTBDDDConstants::getTypeHex ( int  layer,
int  wafer 
) const
inline

Definition at line 49 of file HGCalTBDDDConstants.h.

49 { return -1; }

◆ isHalfCell()

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

Definition at line 252 of file HGCalTBDDDConstants.cc.

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

252  {
253  if (waferType < 1 || cell < 0)
254  return false;
255  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
256 }
std::vector< bool > cellCoarseHalf_
const HGCalTBParameters * hgpar_
std::vector< bool > cellFineHalf_
int waferType(DetId const &id) const

◆ isValidCell()

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

Definition at line 721 of file HGCalTBDDDConstants.cc.

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

Referenced by isValidHex().

721  {
722  // Calculate the position of the cell
723  // Works for options HGCalHexagon/HGCalHexagonFull
724  double x = hgpar_->waferPosX_[wafer];
725  double y = hgpar_->waferPosY_[wafer];
726  if (hgpar_->waferTypeT_[wafer] - 1 == HGCalTBParameters::HGCalFine) {
727  x += hgpar_->cellFineX_[cell];
728  y += hgpar_->cellFineY_[cell];
729  } else {
730  x += hgpar_->cellCoarseX_[cell];
731  y += hgpar_->cellCoarseY_[cell];
732  }
733  double rr = sqrt(x * x + y * y);
734  bool result = ((rr >= hgpar_->rMinLayHex_[lay - 1]) && (rr <= hgpar_->rMaxLayHex_[lay - 1]) &&
735  (wafer < static_cast<int>(hgpar_->waferPosX_.size())));
736 #ifdef EDM_ML_DEBUG
737  if (!result)
738  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << wafer << ":" << cell << " Position " << x << ":" << y
739  << ":" << rr << " Compare Limits " << hgpar_->rMinLayHex_[lay - 1] << ":"
740  << hgpar_->rMaxLayHex_[lay - 1] << " Flag " << result;
741 #endif
742  return result;
743 }
Log< level::Info, true > LogVerbatim
std::vector< double > cellFineX_
std::vector< double > rMaxLayHex_
std::vector< double > cellCoarseY_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::vector< double > waferPosX_
std::vector< int > waferTypeT_
T sqrt(T t)
Definition: SSEVec.h:23
std::vector< double > rMinLayHex_
std::vector< double > cellFineY_
std::vector< double > waferPosY_

◆ isValidHex()

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

Definition at line 258 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellFineX_, HGCalTBParameters::copiesInLayers_, HGCalTBParameters::HGCalFine, hgpar_, isValidCell(), layers(), maxCells(), mod(), mps_fire::result, findQualityFiles::size, HGCalTBParameters::waferCopy_, waferHexagon6(), and HGCalTBParameters::waferTypeT_.

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

258  {
259  // Check validity for a layer|wafer|cell of pre-TDR version
260  bool result(false), resultMod(false);
261  int cellmax(0);
262  if (waferHexagon6()) {
263  int32_t copyNumber = hgpar_->waferCopy_[mod];
264  result = ((lay > 0 && lay <= static_cast<int>(layers(reco))));
265  if (result) {
266  const int32_t lay_idx = reco ? (lay - 1) * 3 + 1 : lay;
267  const auto& the_modules = hgpar_->copiesInLayers_[lay_idx];
268  auto moditr = the_modules.find(copyNumber);
269  result = resultMod = (moditr != the_modules.end());
270 #ifdef EDM_ML_DEBUG
271  if (!result)
272  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants: Layer " << lay << ":" << lay_idx << " Copy "
273  << copyNumber << ":" << mod << " Flag " << result;
274 #endif
275  if (result) {
276  if (moditr->second >= 0) {
277  if (mod >= static_cast<int>(hgpar_->waferTypeT_.size()))
278  edm::LogWarning("HGCalGeom") << "Module no. out of bound for " << mod << " to be compared with "
279  << (hgpar_->waferTypeT_).size() << " ***** ERROR *****";
280  cellmax = ((hgpar_->waferTypeT_[mod] - 1 == HGCalTBParameters::HGCalFine)
281  ? static_cast<int>(hgpar_->cellFineX_.size())
282  : static_cast<int>(hgpar_->cellCoarseX_.size()));
283  result = (cell >= 0 && cell <= cellmax);
284  } else {
285  result = isValidCell(lay_idx, mod, cell);
286  }
287  }
288  }
289  }
290 
291 #ifdef EDM_ML_DEBUG
292  if (!result)
293  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants: Layer " << lay << ":"
294  << (lay > 0 && (lay <= static_cast<int>(layers(reco)))) << " Module " << mod << ":"
295  << resultMod << " Cell " << cell << ":" << cellmax << ":"
296  << (cell >= 0 && cell <= cellmax) << ":" << maxCells(reco);
297 #endif
298  return result;
299 }
size
Write out results.
Log< level::Info, true > LogVerbatim
std::vector< double > cellFineX_
std::vector< int > waferCopy_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::vector< int > waferTypeT_
bool isValidCell(int layindex, int wafer, int cell) const
fixed size matrix
unsigned int layers(bool reco) const
int maxCells(bool reco) const
Log< level::Warning, false > LogWarning
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ lastLayer()

int HGCalTBDDDConstants::lastLayer ( bool  reco) const

Definition at line 301 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::firstLayer_, hgpar_, and tot_layers_.

Referenced by HGCalTBGeometry::neighborZ().

301  {
302  return (hgpar_->firstLayer_ + tot_layers_[static_cast<int>(reco)] - 1);
303 }
std::array< uint32_t, 2 > tot_layers_
const HGCalTBParameters * hgpar_
fixed size matrix

◆ layerFromIndex()

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

Definition at line 706 of file HGCalTBDDDConstants.cc.

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

Referenced by waferIndex().

706  {
707  int ll(-1);
708  if (waferHexagon6() && reco) {
709  ll = static_cast<int>(std::find(hgpar_->depthLayerF_.begin(), hgpar_->depthLayerF_.end(), index) -
710  hgpar_->depthLayerF_.begin());
711  if (ll == static_cast<int>(hgpar_->depthLayerF_.size()))
712  ll = -1;
713  }
714 #ifdef EDM_ML_DEBUG
715  edm::LogVerbatim("HGCalGeom") << "LayerFromIndex for " << index << ":" << reco << ":" << waferHexagon6() << " is"
716  << ll << ":" << (ll + hgpar_->firstLayer_);
717 #endif
718  return ((ll < 0) ? ll : (ll + hgpar_->firstLayer_));
719 }
Log< level::Info, true > LogVerbatim
const HGCalTBParameters * hgpar_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
fixed size matrix
std::vector< int > depthLayerF_

◆ layerIndex()

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

Definition at line 305 of file HGCalTBDDDConstants.cc.

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

Referenced by getIndex(), and getLayer().

305  {
306  int ll = lay - hgpar_->firstLayer_;
307  if (ll < 0 || ll >= static_cast<int>(hgpar_->layerIndex_.size()))
308  return -1;
309  if (waferHexagon6()) {
310  if (reco && ll >= static_cast<int>(hgpar_->depthIndex_.size()))
311  return -1;
312  return (reco ? hgpar_->depthLayerF_[ll] : hgpar_->layerIndex_[ll]);
313  }
314  return -1;
315 }
const HGCalTBParameters * hgpar_
std::vector< int > layerIndex_
std::vector< int > depthIndex_
fixed size matrix
std::vector< int > depthLayerF_

◆ layers()

unsigned int HGCalTBDDDConstants::layers ( bool  reco) const

◆ layersInit()

unsigned int HGCalTBDDDConstants::layersInit ( bool  reco) const

Definition at line 319 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBDDDConstants().

319  {
320  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
321 }
const HGCalTBParameters * hgpar_
std::vector< int > layerIndex_
std::vector< int > depthIndex_
fixed size matrix

◆ layerType()

int HGCalTBDDDConstants::layerType ( int  lay) const
inline

Definition at line 56 of file HGCalTBDDDConstants.h.

References HGCalTypes::WaferCenter.

56 { return HGCalTypes::WaferCenter; }
static constexpr int32_t WaferCenter
Definition: HGCalTypes.h:21

◆ levelTop()

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

Definition at line 59 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::levelT_.

Referenced by HGCSD::update().

59 { return hgpar_->levelT_[ind]; }
const HGCalTBParameters * hgpar_
std::vector< int > levelT_

◆ locateCell()

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

Definition at line 323 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellCoarseY_, HGCalTBParameters::cellFineX_, HGCalTBParameters::cellFineY_, getIndex(), HGCalTBParameters::HGCalFine, hgpar_, mps_fire::i, HGCalTBParameters::k_ScaleToDDD, waferHexagon6(), HGCalTBParameters::waferPosX_, HGCalTBParameters::waferPosY_, HGCalTBParameters::waferTypeT_, x, and y.

Referenced by HGCalTBAnalyzer::analyzeSimHits(), and HGCNumberingScheme::getLocalCoords().

323  {
324  // type refers to wafer # for hexagon cell
325  float x(999999.), y(999999.);
326  const auto& index = getIndex(lay, reco);
327  int i = index.first;
328  if (i < 0)
329  return std::make_pair(x, y);
330  if (waferHexagon6()) {
331  x = hgpar_->waferPosX_[type];
332  y = hgpar_->waferPosY_[type];
333 #ifdef EDM_ML_DEBUG
334  float x0(x), y0(y);
335 #endif
337  x += hgpar_->cellFineX_[cell];
338  y += hgpar_->cellFineY_[cell];
339  } else {
340  x += hgpar_->cellCoarseX_[cell];
341  y += hgpar_->cellCoarseY_[cell];
342  }
343 #ifdef EDM_ML_DEBUG
344  edm::LogVerbatim("HGCalGeom") << "LocateCell (Wafer) " << x0 << ":" << y0 << " Final " << x << ":" << y;
345 #endif
346  if (!reco) {
349  }
350  }
351  return std::make_pair(x, y);
352 }
Log< level::Info, true > LogVerbatim
std::vector< double > cellFineX_
std::vector< double > cellCoarseY_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
static constexpr double k_ScaleToDDD
std::vector< double > waferPosX_
std::vector< int > waferTypeT_
std::vector< double > cellFineY_
fixed size matrix
std::vector< double > waferPosY_

◆ locateCellHex()

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

Definition at line 354 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellCoarseY_, HGCalTBParameters::cellFineX_, HGCalTBParameters::cellFineY_, HGCalTBParameters::HGCalFine, hgpar_, HGCalTBParameters::k_ScaleToDDD, HGCalTBParameters::waferTypeT_, x, and y.

Referenced by HGCalTBGeometry::get8Corners(), HGCalTBGeometry::getCorners(), HGCalTBGeometry::getNewCorners(), and HGCalTBGeometry::getPosition().

354  {
355  float x(0), y(0);
356  if (hgpar_->waferTypeT_[wafer] - 1 == HGCalTBParameters::HGCalFine) {
357  x = hgpar_->cellFineX_[cell];
358  y = hgpar_->cellFineY_[cell];
359  } else {
360  x = hgpar_->cellCoarseX_[cell];
361  y = hgpar_->cellCoarseY_[cell];
362  }
363  if (!reco) {
366  }
367  return std::make_pair(x, y);
368 }
std::vector< double > cellFineX_
std::vector< double > cellCoarseY_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
static constexpr double k_ScaleToDDD
std::vector< int > waferTypeT_
std::vector< double > cellFineY_
fixed size matrix

◆ maxCells() [1/2]

int HGCalTBDDDConstants::maxCells ( bool  reco) const

Definition at line 370 of file HGCalTBDDDConstants.cc.

References hgcalTBTopologyTester_cfi::cells, HGCalTBParameters::depth_, hgpar_, mps_fire::i, HGCalTBParameters::layer_, and layers().

Referenced by HGCalTBDDDConstants(), HGCalTBTopology::HGCalTBTopology(), and isValidHex().

370  {
371  int cells(0);
372  for (unsigned int i = 0; i < layers(reco); ++i) {
373  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
374  if (cells < maxCells(lay, reco))
375  cells = maxCells(lay, reco);
376  }
377  return cells;
378 }
std::vector< int > layer_
const HGCalTBParameters * hgpar_
std::vector< int > depth_
fixed size matrix
unsigned int layers(bool reco) const
int maxCells(bool reco) const

◆ maxCells() [2/2]

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

Definition at line 380 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellFineX_, hgcalTBTopologyTester_cfi::cells, getIndex(), HGCalTBParameters::HGCalFine, hgpar_, dqmdumpme::k, waferHexagon6(), waferInLayerTest(), and HGCalTBParameters::waferTypeT_.

380  {
381  const auto& index = getIndex(lay, reco);
382  if ((index.first < 0) || (!waferHexagon6()))
383  return 0;
384  unsigned int cells(0);
385  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
386  if (waferInLayerTest(k, index.first)) {
387  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCalTBParameters::HGCalFine) ? (hgpar_->cellFineX_.size())
388  : (hgpar_->cellCoarseX_.size());
389  if (cell > cells)
390  cells = cell;
391  }
392  }
393  return static_cast<int>(cells);
394 }
std::vector< double > cellFineX_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< int > waferTypeT_
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ maxModules()

int HGCalTBDDDConstants::maxModules ( ) const
inline

Definition at line 62 of file HGCalTBDDDConstants.h.

References modHalf_.

62 { return modHalf_; }

◆ maxModulesPerLayer()

int HGCalTBDDDConstants::maxModulesPerLayer ( ) const
inline

Definition at line 63 of file HGCalTBDDDConstants.h.

References maxWafersPerLayer_.

63 { return maxWafersPerLayer_; }

◆ maxRows()

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

Definition at line 396 of file HGCalTBDDDConstants.cc.

References getIndex(), hgpar_, mps_fire::i, dqmdumpme::k, HGCalTBParameters::waferCopy_, waferHexagon6(), and waferInLayerTest().

396  {
397  int kymax(0);
398  const auto& index = getIndex(lay, reco);
399  int i = index.first;
400  if ((i >= 0) && waferHexagon6()) {
401  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
402  if (waferInLayerTest(k, i)) {
403  int ky = ((hgpar_->waferCopy_[k]) / 100) % 100;
404  if (ky > kymax)
405  kymax = ky;
406  }
407  }
408  }
409  return kymax;
410 }
std::vector< int > waferCopy_
const HGCalTBParameters * hgpar_
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ minSlope()

double HGCalTBDDDConstants::minSlope ( ) const
inline

Definition at line 65 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::slopeMin_.

Referenced by HGCSD::update().

65 { return hgpar_->slopeMin_[0]; }
const HGCalTBParameters * hgpar_
std::vector< double > slopeMin_

◆ modifyUV()

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

Definition at line 412 of file HGCalTBDDDConstants.cc.

412  {
413  // Modify u/v for transition of type1 to type2
414  return (((type1 == type2) || (type1 * type2 != 0)) ? uv : ((type1 == 0) ? (2 * uv + 1) / 3 : (3 * uv) / 2));
415 }

◆ modules()

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

Definition at line 417 of file HGCalTBDDDConstants.cc.

References dqmdumpme::first, getIndex(), max_modules_layer_, and dt_dqm_sourceclient_common_cff::reco.

417  {
418  if (getIndex(lay, reco).first < 0)
419  return 0;
420  else
421  return max_modules_layer_[static_cast<int>(reco)][lay];
422 }
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix

◆ modulesInit()

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

Definition at line 424 of file HGCalTBDDDConstants.cc.

References getIndex(), hgpar_, dqmdumpme::k, waferInLayerTest(), and HGCalTBParameters::waferPosX_.

Referenced by HGCalTBDDDConstants().

424  {
425  int nmod(0);
426  const auto& index = getIndex(lay, reco);
427  if (index.first < 0)
428  return nmod;
429  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
430  if (waferInLayerTest(k, index.first))
431  ++nmod;
432  }
433  return nmod;
434 }
const HGCalTBParameters * hgpar_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< double > waferPosX_
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ mouseBite()

double HGCalTBDDDConstants::mouseBite ( bool  reco) const

Definition at line 436 of file HGCalTBDDDConstants.cc.

References hgpar_, HGCalTBParameters::k_ScaleToDDD, and HGCalTBParameters::mouseBite_.

436  {
438 }
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
fixed size matrix

◆ numberCells() [1/2]

int HGCalTBDDDConstants::numberCells ( bool  reco) const

Definition at line 440 of file HGCalTBDDDConstants.cc.

References hgcalTBTopologyTester_cfi::cells, HGCalTBParameters::depth_, hgpar_, dqmdumpme::k, HGCalTBParameters::layer_, and dt_dqm_sourceclient_common_cff::reco.

440  {
441  int cells(0);
442  unsigned int nlayer = (reco) ? hgpar_->depth_.size() : hgpar_->layer_.size();
443  for (unsigned k = 0; k < nlayer; ++k) {
444  std::vector<int> ncells = numberCells(((reco) ? hgpar_->depth_[k] : hgpar_->layer_[k]), reco);
445  cells = std::accumulate(ncells.begin(), ncells.end(), cells);
446  }
447  return cells;
448 }
std::vector< int > layer_
const HGCalTBParameters * hgpar_
std::vector< int > depth_
fixed size matrix
int numberCells(bool reco) const

◆ numberCells() [2/2]

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

Definition at line 450 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellFineX_, getIndex(), HGCalTBParameters::HGCalFine, hgpar_, mps_fire::i, dqmdumpme::k, waferHexagon6(), waferInLayerTest(), and HGCalTBParameters::waferTypeT_.

450  {
451  const auto& index = getIndex(lay, reco);
452  int i = index.first;
453  std::vector<int> ncell;
454  if ((i >= 0) && (waferHexagon6())) {
455  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
456  if (waferInLayerTest(k, i)) {
457  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCalTBParameters::HGCalFine)
458  ? (hgpar_->cellFineX_.size())
459  : (hgpar_->cellCoarseX_.size());
460  ncell.emplace_back(static_cast<int>(cell));
461  }
462  }
463  }
464  return ncell;
465 }
std::vector< double > cellFineX_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< int > waferTypeT_
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ numberCellsHexagon()

int HGCalTBDDDConstants::numberCellsHexagon ( int  wafer) const

Definition at line 467 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::cellCoarseX_, HGCalTBParameters::cellFineX_, hgpar_, and HGCalTBParameters::waferTypeT_.

Referenced by HGCalTBGeometry::newCell().

467  {
468  if (wafer >= 0 && wafer < static_cast<int>(hgpar_->waferTypeT_.size())) {
469  if (hgpar_->waferTypeT_[wafer] - 1 == 0)
470  return static_cast<int>(hgpar_->cellFineX_.size());
471  else
472  return static_cast<int>(hgpar_->cellCoarseX_.size());
473  } else {
474  return 0;
475  }
476 }
std::vector< double > cellFineX_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::vector< int > waferTypeT_

◆ rangeR()

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

Definition at line 478 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::k_ScaleToDDD, and z.

Referenced by HGCalTBGeometry::neighborZ().

478  {
479  double rmin(0), rmax(0);
480  if (!reco) {
483  }
484 #ifdef EDM_ML_DEBUG
485  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeR: " << z << ":0"
486  << " R " << rmin << ":" << rmax;
487 #endif
488  return std::make_pair(rmin, rmax);
489 }
Log< level::Info, true > LogVerbatim
static constexpr double k_ScaleToDDD
fixed size matrix

◆ rangeRLayer()

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

Definition at line 491 of file HGCalTBDDDConstants.cc.

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

491  {
492  double rmin(0), rmax(0);
493  const auto& index = getIndex(lay, reco);
494  if (index.first >= 0 && index.first < static_cast<int>(hgpar_->rMinLayHex_.size())) {
495  rmin = hgpar_->rMinLayHex_[index.first];
496  rmax = hgpar_->rMaxLayHex_[index.first];
497  }
498  if (!reco) {
501  }
502 #ifdef EDM_ML_DEBUG
503  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeR: " << lay << ":" << index.first << " R " << rmin << ":"
504  << rmax;
505 #endif
506  return std::make_pair(rmin, rmax);
507 }
Log< level::Info, true > LogVerbatim
std::vector< double > rMaxLayHex_
const HGCalTBParameters * hgpar_
std::pair< int, float > getIndex(int lay, bool reco) const
static constexpr double k_ScaleToDDD
std::vector< double > rMinLayHex_
fixed size matrix

◆ rangeZ()

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

Definition at line 509 of file HGCalTBDDDConstants.cc.

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

509  {
510  double zmin = (hgpar_->zLayerHex_[0] - hgpar_->waferThick_);
511  double zmax = (hgpar_->zLayerHex_[hgpar_->zLayerHex_.size() - 1] + hgpar_->waferThick_);
512 #ifdef EDM_ML_DEBUG
513  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeZ: " << zmin << ":" << zmax << ":" << hgpar_->waferThick_;
514 #endif
515  if (!reco) {
518  }
519  return std::make_pair(zmin, zmax);
520 }
Log< level::Info, true > LogVerbatim
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
std::vector< double > zLayerHex_
fixed size matrix

◆ rowColumnWafer()

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

Definition at line 522 of file HGCalTBDDDConstants.cc.

References cuy::col, filterCSVwithJSON::copy, HGCalTypes::getUnpackedU(), HGCalTypes::getUnpackedV(), hgpar_, and HGCalTBParameters::waferCopy_.

522  {
523  int row(0), col(0);
524  if (wafer < static_cast<int>(hgpar_->waferCopy_.size())) {
525  int copy = hgpar_->waferCopy_[wafer];
528  }
529  return std::make_pair(row, col);
530 }
static int32_t getUnpackedU(int id)
Definition: HGCalTypes.cc:16
std::vector< int > waferCopy_
static int32_t getUnpackedV(int id)
Definition: HGCalTypes.cc:22
const HGCalTBParameters * hgpar_
col
Definition: cuy.py:1009

◆ sectors()

int HGCalTBDDDConstants::sectors ( ) const
inline

◆ simToReco()

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

Definition at line 532 of file HGCalTBDDDConstants.cc.

Referenced by HGCalTimingAnalyzer::analyzeSimHits(), and HGCalTBAnalyzer::analyzeSimHits().

532  {
533  return std::make_pair(cell, lay);
534 }

◆ volumes()

unsigned int HGCalTBDDDConstants::volumes ( ) const
inline

Definition at line 79 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::moduleLayR_.

79 { return hgpar_->moduleLayR_.size(); }
std::vector< int > moduleLayR_
const HGCalTBParameters * hgpar_

◆ waferCount()

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

Definition at line 87 of file HGCalTBDDDConstants.h.

References waferMax_.

87 { return ((type == 0) ? waferMax_[2] : waferMax_[3]); }
std::array< int, 4 > waferMax_

◆ waferFromCopy()

int HGCalTBDDDConstants::waferFromCopy ( int  copy) const

Definition at line 536 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCNumberingScheme::getUnitID().

536  {
537  const int ncopies = hgpar_->waferCopy_.size();
538  int wafer(ncopies);
539  bool result(false);
540  for (int k = 0; k < ncopies; ++k) {
541  if (copy == hgpar_->waferCopy_[k]) {
542  wafer = k;
543  result = true;
544  break;
545  }
546  }
547  if (!result) {
548  wafer = -1;
549 #ifdef EDM_ML_DEBUG
550  edm::LogVerbatim("HGCalGeom") << "Cannot find " << copy << " in a list of " << ncopies << " members";
551  for (int k = 0; k < ncopies; ++k)
552  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << hgpar_->waferCopy_[k];
553 #endif
554  }
555 #ifdef EDM_ML_DEBUG
556  edm::LogVerbatim("HGCalGeom") << "WaferFromCopy " << copy << ":" << wafer << ":" << result;
557 #endif
558  return wafer;
559 }
Log< level::Info, true > LogVerbatim
std::vector< int > waferCopy_
const HGCalTBParameters * hgpar_

◆ waferFromPosition()

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

Definition at line 561 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCNumberingScheme::getUnitID().

561  {
562  // Input x, y in Geant4 unit and transformed to CMSSW standard
565  int size_ = static_cast<int>(hgpar_->waferCopy_.size());
566  wafer = size_;
567  for (int k = 0; k < size_; ++k) {
568  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
569  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
570  if (dx <= rmax_ && dy <= hexside_) {
571  if ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy))) {
572  wafer = k;
573  celltyp = hgpar_->waferTypeT_[k];
574  xx -= hgpar_->waferPosX_[k];
575  yy -= hgpar_->waferPosY_[k];
576  break;
577  }
578  }
579  }
580  if (wafer < size_) {
581  if (celltyp - 1 == HGCalTBParameters::HGCalFine)
582  icell = cellHex(xx,
583  yy,
586  hgpar_->cellFineY_);
587  else
588  icell = cellHex(xx,
589  yy,
593  } else {
594  wafer = -1;
595 #ifdef EDM_ML_DEBUG
596  edm::LogWarning("HGCalGeom") << "Cannot get wafer type corresponding to " << x << ":" << y << " " << xx << ":"
597  << yy;
598 #endif
599  }
600 #ifdef EDM_ML_DEBUG
601  edm::LogVerbatim("HGCalGeom") << "Position " << x << ":" << y << " Wafer " << wafer << ":" << size_ << " XX " << xx
602  << ":" << yy << " Cell " << icell << " Type " << celltyp;
603 #endif
604 }
Log< level::Info, true > LogVerbatim
std::vector< double > cellFineX_
std::vector< int > waferCopy_
static constexpr double k_ScaleFromDDD
std::vector< double > cellCoarseY_
const HGCalTBParameters * hgpar_
std::vector< double > cellCoarseX_
std::vector< double > waferPosX_
std::vector< int > waferTypeT_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static constexpr double tan30deg_
std::vector< double > cellFineY_
std::vector< double > cellSize_
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
Log< level::Warning, false > LogWarning
std::vector< double > waferPosY_

◆ waferFullInLayer()

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

Definition at line 613 of file HGCalTBDDDConstants.cc.

References getIndex(), and waferInLayerTest().

613  {
614  const auto& indx = getIndex(lay, reco);
615  if (indx.first < 0)
616  return false;
617  return waferInLayerTest(wafer, indx.first);
618 }
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ waferHexagon6()

bool HGCalTBDDDConstants::waferHexagon6 ( ) const
inline

◆ waferIndex()

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

Definition at line 745 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer, layerFromIndex(), and HGCalWaferIndex::waferIndex().

745  {
746  int layer = layerFromIndex(index, true);
747  int indx = HGCalWaferIndex::waferIndex(layer, wafer, 0);
748 #ifdef EDM_ML_DEBUG
749  edm::LogVerbatim("HGCalGeom") << "WaferIndex for " << wafer << ":" << index << " (" << layer << ") " << indx;
750 #endif
751  return indx;
752 }
Log< level::Info, true > LogVerbatim
int layerFromIndex(int index, bool reco) const
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)

◆ waferInLayer()

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

Definition at line 606 of file HGCalTBDDDConstants.cc.

References getIndex(), and waferInLayerTest().

Referenced by HGCalTBGeometry::getSummary(), and HGCalTBDDDConstants().

606  {
607  const auto& indx = getIndex(lay, reco);
608  if (indx.first < 0)
609  return false;
610  return waferInLayerTest(wafer, indx.first);
611 }
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
bool waferInLayerTest(int wafer, int lay) const

◆ waferInLayerTest()

bool HGCalTBDDDConstants::waferInLayerTest ( int  wafer,
int  lay 
) const
inlineprivate

Definition at line 132 of file HGCalTBDDDConstants.h.

References waferHexagon6().

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

132 { return waferHexagon6(); }

◆ waferLocal2Global()

GlobalPoint HGCalTBDDDConstants::waferLocal2Global ( HepGeom::Point3D< float > &  loc,
const DetId id,
bool  useWafer,
bool  reco,
bool  debug 
) const

◆ waferMax()

int HGCalTBDDDConstants::waferMax ( ) const
inline

Definition at line 88 of file HGCalTBDDDConstants.h.

References waferMax_.

88 { return waferMax_[1]; }
std::array< int, 4 > waferMax_

◆ waferMin()

int HGCalTBDDDConstants::waferMin ( ) const
inline

Definition at line 89 of file HGCalTBDDDConstants.h.

References waferMax_.

89 { return waferMax_[0]; }
std::array< int, 4 > waferMax_

◆ waferParameters()

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

Definition at line 620 of file HGCalTBDDDConstants.cc.

References hexside_, HGCalTBParameters::k_ScaleToDDD, and rmax_.

620  {
621  if (reco)
622  return std::make_pair(rmax_, hexside_);
623  else
625 }
static constexpr double k_ScaleToDDD
fixed size matrix

◆ waferPosition()

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

Definition at line 627 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCMouseBite::exclude().

627  {
628  double xx(0), yy(0);
629  if (wafer >= 0 && wafer < static_cast<int>(hgpar_->waferPosX_.size())) {
630  xx = hgpar_->waferPosX_[wafer];
631  yy = hgpar_->waferPosY_[wafer];
632  }
633  if (!reco) {
636  }
637  return std::make_pair(xx, yy);
638 }
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
std::vector< double > waferPosX_
fixed size matrix
std::vector< double > waferPosY_

◆ wafers() [1/2]

int HGCalTBDDDConstants::wafers ( ) const

Definition at line 640 of file HGCalTBDDDConstants.cc.

References hgpar_, and HGCalTBParameters::moduleLayR_.

Referenced by HGCalTBTopology::allGeomModules(), and HGCalTBDDDConstants().

640 { return static_cast<int>(hgpar_->moduleLayR_.size()); }
std::vector< int > moduleLayR_
const HGCalTBParameters * hgpar_

◆ wafers() [2/2]

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

Definition at line 642 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer, and waferLayer_.

642  {
643  int wafer(0);
644  auto itr = waferLayer_.find(layer);
645  if (itr != waferLayer_.end()) {
646  unsigned ity = (type > 0 && type <= 2) ? type : 0;
647  wafer = (itr->second)[ity];
648  }
649  return wafer;
650 }
std::map< int, HGCWaferParam > waferLayer_

◆ waferSepar()

double HGCalTBDDDConstants::waferSepar ( bool  reco) const
inline

Definition at line 94 of file HGCalTBDDDConstants.h.

References hgpar_, HGCalTBParameters::k_ScaleToDDD, and HGCalTBParameters::sensorSeparation_.

94  {
96  }
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
fixed size matrix

◆ waferSize()

double HGCalTBDDDConstants::waferSize ( bool  reco) const
inline

Definition at line 97 of file HGCalTBDDDConstants.h.

References hgpar_, HGCalTBParameters::k_ScaleToDDD, and HGCalTBParameters::waferSize_.

97  {
99  }
const HGCalTBParameters * hgpar_
static constexpr double k_ScaleToDDD
fixed size matrix

◆ waferToCopy()

int HGCalTBDDDConstants::waferToCopy ( int  wafer) const
inline

Definition at line 102 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::waferCopy_.

102  {
103  return ((wafer >= 0) && (wafer < static_cast<int>(hgpar_->waferCopy_.size())))
104  ? hgpar_->waferCopy_[wafer]
105  : static_cast<int>(hgpar_->waferCopy_.size());
106  }
std::vector< int > waferCopy_
const HGCalTBParameters * hgpar_

◆ waferType() [1/3]

int HGCalTBDDDConstants::waferType ( DetId const &  id) const

Definition at line 652 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer.

Referenced by cellThickness(), and isHalfCell().

652  {
653  return waferType(HGCalDetId(id).layer(), HGCalDetId(id).wafer());
654 }
int waferType(DetId const &id) const

◆ waferType() [2/3]

int HGCalTBDDDConstants::waferType ( int  layer,
int  wafer 
) const

Definition at line 656 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::HGCalCoarseThick, hgpar_, and HGCalTBParameters::waferTypeL_.

656  {
658  if ((wafer >= 0) && (wafer < static_cast<int>(hgpar_->waferTypeL_.size())))
659  type = (hgpar_->waferTypeL_[wafer] - 1);
660  return type;
661 }
std::vector< int > waferTypeL_
const HGCalTBParameters * hgpar_

◆ waferType() [3/3]

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

◆ waferTypeL()

int HGCalTBDDDConstants::waferTypeL ( int  wafer) const
inline

Definition at line 112 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::waferTypeL_.

Referenced by HGCalTBAnalyzer::analyzeRecHits().

112  {
113  return ((wafer >= 0) && (wafer < static_cast<int>(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;
114  }
std::vector< int > waferTypeL_
const HGCalTBParameters * hgpar_

◆ waferTypeT()

int HGCalTBDDDConstants::waferTypeT ( int  wafer) const
inline

Definition at line 108 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::waferTypeT_.

Referenced by HGCalTBGeometry::getClosestCell().

108  {
109  return ((wafer >= 0) && (wafer < static_cast<int>(hgpar_->waferTypeT_.size()))) ? hgpar_->waferTypeT_[wafer] : 0;
110  }
const HGCalTBParameters * hgpar_
std::vector< int > waferTypeT_

◆ waferUVMax()

int HGCalTBDDDConstants::waferUVMax ( ) const
inline

Definition at line 118 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::waferUVMax_.

118 { return hgpar_->waferUVMax_; }
const HGCalTBParameters * hgpar_

◆ waferVirtual()

bool HGCalTBDDDConstants::waferVirtual ( int  layer,
int  wafer 
) const

Definition at line 663 of file HGCalTBDDDConstants.cc.

References hgpar_, nano_mu_digi_cff::layer, HGCalWaferIndex::waferIndex(), HGCalTBParameters::waferTypes_, and LaserClient_cfi::wl.

663  {
664  int wl = HGCalWaferIndex::waferIndex(layer, wafer, 0, true);
665  return (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
666 }
const HGCalTBParameters * hgpar_
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)

◆ waferZ()

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

Definition at line 668 of file HGCalTBDDDConstants.cc.

References getIndex(), hgpar_, HGCalTBParameters::k_ScaleToDDD, and HGCalTBParameters::zLayerHex_.

Referenced by HGCalTBAnalyzer::analyzeRecHits(), HGCalTBAnalyzer::analyzeSimHits(), and HGCalTBGeometry::neighborZ().

668  {
669  const auto& index = getIndex(lay, reco);
670  if (index.first < 0)
671  return 0;
672  else
674 }
const HGCalTBParameters * hgpar_
std::pair< int, float > getIndex(int lay, bool reco) const
static constexpr double k_ScaleToDDD
std::vector< double > zLayerHex_
fixed size matrix

Member Data Documentation

◆ dPhiMin

const float HGCalTBDDDConstants::dPhiMin = 0.02
private

Definition at line 136 of file HGCalTBDDDConstants.h.

◆ geomTools_

HGCalGeomTools HGCalTBDDDConstants::geomTools_
private

Definition at line 134 of file HGCalTBDDDConstants.h.

◆ hexside_

double HGCalTBDDDConstants::hexside_
private

◆ hexsideT_

double HGCalTBDDDConstants::hexsideT_
private

Definition at line 144 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants().

◆ hgpar_

const HGCalTBParameters* HGCalTBDDDConstants::hgpar_
private

◆ k_horizontalShift

const double HGCalTBDDDConstants::k_horizontalShift = 1.0
private

Definition at line 135 of file HGCalTBDDDConstants.h.

◆ max_modules_layer_

Simrecovecs HGCalTBDDDConstants::max_modules_layer_
private

Definition at line 147 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants(), and modules().

◆ maxWafersPerLayer_

int32_t HGCalTBDDDConstants::maxWafersPerLayer_
private

Definition at line 148 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants(), and maxModulesPerLayer().

◆ mode_

const HGCalGeometryMode::GeometryMode HGCalTBDDDConstants::mode_
private

Definition at line 142 of file HGCalTBDDDConstants.h.

Referenced by geomMode(), HGCalTBDDDConstants(), and waferHexagon6().

◆ modHalf_

int32_t HGCalTBDDDConstants::modHalf_
private

Definition at line 145 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants(), and maxModules().

◆ rmax_

double HGCalTBDDDConstants::rmax_
private

◆ rmaxT_

double HGCalTBDDDConstants::rmaxT_
private

Definition at line 144 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants().

◆ sqrt3_

const double HGCalTBDDDConstants::sqrt3_
private

Definition at line 141 of file HGCalTBDDDConstants.h.

Referenced by distFromEdgeHex().

◆ tan30deg_

constexpr double HGCalTBDDDConstants::tan30deg_ = 0.5773502693
staticprivate

◆ tot_layers_

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

Definition at line 146 of file HGCalTBDDDConstants.h.

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

◆ tot_wafers_

int32_t HGCalTBDDDConstants::tot_wafers_
private

Definition at line 145 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants().

◆ waferIn_

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

Definition at line 151 of file HGCalTBDDDConstants.h.

◆ waferLayer_

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

Definition at line 149 of file HGCalTBDDDConstants.h.

Referenced by HGCalTBDDDConstants(), and wafers().

◆ waferMax_

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

Definition at line 150 of file HGCalTBDDDConstants.h.

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