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") << "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") << "rmax_ " << rmax_ << ":" << rmaxT_ << ":" << hexside_ << ":" << hexsideT_
32  << " CellSize " << 0.5 * HGCalTBParameters::k_ScaleFromDDD * hgpar_->cellSize_[0]
34 #endif
35  }
36  // init maps and constants
37  modHalf_ = 0;
39  for (int simreco = 0; simreco < 2; ++simreco) {
40  tot_layers_[simreco] = layersInit((bool)simreco);
41  max_modules_layer_[simreco].resize(tot_layers_[simreco] + 1);
42  for (unsigned int layer = 1; layer <= tot_layers_[simreco]; ++layer) {
43  max_modules_layer_[simreco][layer] = modulesInit(layer, (bool)simreco);
44  if (simreco == 1) {
45  modHalf_ += max_modules_layer_[simreco][layer];
47 #ifdef EDM_ML_DEBUG
48  edm::LogVerbatim("HGCalGeom") << "Layer " << layer << " with " << max_modules_layer_[simreco][layer] << ":"
49  << modHalf_ << " modules in RECO";
50  } else {
51  edm::LogVerbatim("HGCalGeom") << "Layer " << layer << " with " << max_modules_layer_[simreco][layer]
52  << " modules in SIM";
53 #endif
54  }
55  }
56 #ifdef EDM_ML_DEBUG
57  edm::LogVerbatim("HGCalGeom") << "SimReco " << simreco << " with " << tot_layers_[simreco] << " Layers";
58 #endif
59  }
60  tot_wafers_ = wafers();
61 
62 #ifdef EDM_ML_DEBUG
63  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants initialized for " << name << " with " << layers(false) << ":"
64  << layers(true) << " layers, " << wafers() << ":" << 2 * modHalf_
65  << " wafers with maximum " << maxWafersPerLayer_ << " per layer and "
66  << "maximum of " << maxCells(false) << ":" << maxCells(true) << " cells";
67 #endif
68  if (waferHexagon6()) {
69  int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
70  for (unsigned int i = 0; i < getTrFormN(); ++i) {
71  int lay0 = getTrForm(i).lay;
72  int wmin(9999999), wmax(-9999999), kount(0);
73  for (int wafer = 0; wafer < sectors(); ++wafer) {
74  bool waferIn = waferInLayer(wafer, lay0, true);
75  if (waferIn) {
76  if (wafer < wmin)
77  wmin = wafer;
78  if (wafer > wmax)
79  wmax = wafer;
80  ++kount;
81  }
82  }
83  if (wminT > wmin)
84  wminT = wmin;
85  if (wmaxT < wmax)
86  wmaxT = wmax;
87  if (kount1 < kount)
88  kount1 = kount;
89  kount2 += kount;
90 #ifdef EDM_ML_DEBUG
91  int lay1 = getIndex(lay0, true).first;
92  edm::LogVerbatim("HGCalGeom") << "Index " << i << " Layer " << lay0 << ":" << lay1 << " Wafer " << wmin << ":"
93  << wmax << ":" << kount;
94 #endif
95  HGCWaferParam a1{{wmin, wmax, kount}};
96  waferLayer_[lay0] = a1;
97  }
98  waferMax_ = std::array<int, 4>{{wminT, wmaxT, kount1, kount2}};
99 #ifdef EDM_ML_DEBUG
100  edm::LogVerbatim("HGCalGeom") << "Overall wafer statistics: " << wminT << ":" << wmaxT << ":" << kount1 << ":"
101  << kount2;
102 #endif
103  }
104 }
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:19
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 106 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().

106  {
107  const auto& index = getIndex(lay, reco);
108  if (index.first < 0)
109  return std::make_pair(-1, -1);
110  if (waferHexagon6()) {
111  float xx = (reco) ? x : HGCalTBParameters::k_ScaleFromDDD * x;
112  float yy = (reco) ? y : HGCalTBParameters::k_ScaleFromDDD * y;
113 
114  // First the wafer
115  int wafer = cellHex(xx, yy, rmax_, hgpar_->waferPosX_, hgpar_->waferPosY_);
116  if (wafer < 0 || wafer >= static_cast<int>(hgpar_->waferTypeT_.size())) {
117  edm::LogWarning("HGCalGeom") << "Wafer no. out of bound for " << wafer << ":" << (hgpar_->waferTypeT_).size()
118  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
119  << " ***** ERROR *****";
120  return std::make_pair(-1, -1);
121  } else {
122  // Now the cell
123  xx -= hgpar_->waferPosX_[wafer];
124  yy -= hgpar_->waferPosY_[wafer];
125  if (hgpar_->waferTypeT_[wafer] == 1)
126  return std::make_pair(wafer,
127  cellHex(xx,
128  yy,
131  hgpar_->cellFineY_));
132  else
133  return std::make_pair(wafer,
134  cellHex(xx,
135  yy,
138  hgpar_->cellCoarseY_));
139  }
140  } else {
141  return std::make_pair(-1, -1);
142  }
143 }
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 674 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().

675  {
676  int num(0);
677  const double tol(0.00001);
678  double cellY = 2.0 * cellR * tan30deg_;
679  for (unsigned int k = 0; k < posX.size(); ++k) {
680  double dx = std::abs(xx - posX[k]);
681  double dy = std::abs(yy - posY[k]);
682  if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
683  double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) / tan30deg_);
684  if (dx <= (xmax + tol)) {
685  num = k;
686  break;
687  }
688  }
689  }
690  return num;
691 }
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 145 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBGeometryLoader::build().

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

◆ cellThickness()

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

Definition at line 151 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer, and waferType().

Referenced by HGCalTBAnalyzer::analyzeSimHits().

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

◆ distFromEdgeHex()

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

Definition at line 159 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.

159  {
160  // Assming the point is within a hexagonal plane of the wafer, calculate
161  // the shortest distance from the edge
162  if (z < 0)
163  x = -x;
164  double dist(0);
165  // Input x, y in Geant4 unit and transformed to CMSSW standard
168  int sizew = static_cast<int>(hgpar_->waferPosX_.size());
169  int wafer = sizew;
170  // Transform to the local coordinate frame of the wafer first
171  for (int k = 0; k < sizew; ++k) {
172  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
173  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
174  if ((dx <= rmax_) && (dy <= hexside_) && ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy)))) {
175  wafer = k;
176  xx -= hgpar_->waferPosX_[k];
177  yy -= hgpar_->waferPosY_[k];
178  break;
179  }
180  }
181  // Look at only one quarter (both x,y are positive)
182  if (wafer < sizew) {
183  if (std::abs(yy) < 0.5 * hexside_) {
184  dist = rmax_ - std::abs(xx);
185  } else {
186  dist = 0.5 * ((rmax_ - std::abs(xx)) - sqrt3_ * (std::abs(yy) - 0.5 * hexside_));
187  }
188  } else {
189  dist = 0;
190  }
192 #ifdef EDM_ML_DEBUG
193  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeHex: Local " << xx << ":" << yy << " wafer " << wafer << " flag "
194  << (wafer < sizew) << " Distance " << rmax_ << ":" << (rmax_ - std::abs(xx)) << ":"
195  << (std::abs(yy) - 0.5 * hexside_) << ":" << 0.5 * hexside_ << ":" << dist;
196 #endif
197  return dist;
198 }
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 693 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().

693  {
694  int indx = layerIndex(lay, reco);
695  if (indx < 0)
696  return std::make_pair(-1, 0);
697  float cell(0);
698  if (waferHexagon6()) {
699  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
700  }
701  return std::make_pair(indx, cell);
702 }
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 200 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.

200  {
201  // Get the layer # from the gloabl z coordinate
202  unsigned int k = 0;
203  double zz = (reco ? std::abs(z) : HGCalTBParameters::k_ScaleFromDDD * std::abs(z));
204  const auto& zLayerHex = hgpar_->zLayerHex_;
205  auto itr = std::find_if(zLayerHex.begin() + 1, zLayerHex.end(), [&k, &zz, &zLayerHex](double zLayer) {
206  ++k;
207  return zz < 0.5 * (zLayerHex[k - 1] + zLayerHex[k]);
208  });
209  int lay = (itr == zLayerHex.end()) ? static_cast<int>(zLayerHex.size()) : k;
210  if (waferHexagon6() && reco) {
211  int indx = layerIndex(lay, false);
212  if (indx >= 0)
213  lay = hgpar_->layerGroupO_[indx];
214  } else {
215  lay += (hgpar_->firstLayer_ - 1);
216  }
217  return lay;
218 }
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 220 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBGeometryLoader::build(), and HGCalTBGeometry::getSummary().

220  {
222  if (hexType) {
223  if (indx >= hgpar_->waferTypeL_.size())
224  edm::LogWarning("HGCalGeom") << "Wafer no. out bound for index " << indx << ":" << (hgpar_->waferTypeL_).size()
225  << ":" << (hgpar_->waferPosX_).size() << ":" << (hgpar_->waferPosY_).size()
226  << " ***** ERROR *****";
227  unsigned int type =
228  ((indx < hgpar_->waferTypeL_.size()) ? hgpar_->waferTypeL_[indx] - 1 : HGCalTBParameters::HGCalCoarseThick);
229  mytr = hgpar_->getModule(type, reco);
230  } else {
231  mytr = hgpar_->getModule(indx, reco);
232  }
233  return mytr;
234 }
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 236 of file HGCalTBDDDConstants.cc.

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

236  {
237  std::vector<HGCalTBParameters::hgtrap> mytrs;
238  for (unsigned int k = 0; k < hgpar_->moduleLayR_.size(); ++k)
239  mytrs.emplace_back(hgpar_->getModule(k, true));
240  return mytrs;
241 }
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 HGCalTBGeometryLoader::build(), 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 HGCalTBGeometryLoader::build(), 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 243 of file HGCalTBDDDConstants.cc.

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

243  {
244  std::vector<HGCalTBParameters::hgtrform> mytrs;
245  for (unsigned int k = 0; k < hgpar_->trformIndex_.size(); ++k)
246  mytrs.emplace_back(hgpar_->getTrForm(k));
247  return mytrs;
248 }
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 250 of file HGCalTBDDDConstants.cc.

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

250  {
251  if (waferType < 1 || cell < 0)
252  return false;
253  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
254 }
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 719 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().

719  {
720  // Calculate the position of the cell
721  // Works for options HGCalHexagon/HGCalHexagonFull
722  double x = hgpar_->waferPosX_[wafer];
723  double y = hgpar_->waferPosY_[wafer];
724  if (hgpar_->waferTypeT_[wafer] - 1 == HGCalTBParameters::HGCalFine) {
725  x += hgpar_->cellFineX_[cell];
726  y += hgpar_->cellFineY_[cell];
727  } else {
728  x += hgpar_->cellCoarseX_[cell];
729  y += hgpar_->cellCoarseY_[cell];
730  }
731  double rr = sqrt(x * x + y * y);
732  bool result = ((rr >= hgpar_->rMinLayHex_[lay - 1]) && (rr <= hgpar_->rMaxLayHex_[lay - 1]) &&
733  (wafer < static_cast<int>(hgpar_->waferPosX_.size())));
734 #ifdef EDM_ML_DEBUG
735  if (!result)
736  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << wafer << ":" << cell << " Position " << x << ":" << y
737  << ":" << rr << " Compare Limits " << hgpar_->rMinLayHex_[lay - 1] << ":"
738  << hgpar_->rMaxLayHex_[lay - 1] << " Flag " << result;
739 #endif
740  return result;
741 }
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:19
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 256 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().

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

References HGCalTBParameters::firstLayer_, hgpar_, and tot_layers_.

Referenced by HGCalTBGeometry::neighborZ().

299  {
300  return (hgpar_->firstLayer_ + tot_layers_[static_cast<int>(reco)] - 1);
301 }
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 704 of file HGCalTBDDDConstants.cc.

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

Referenced by waferIndex().

704  {
705  int ll(-1);
706  if (waferHexagon6() && reco) {
707  ll = static_cast<int>(std::find(hgpar_->depthLayerF_.begin(), hgpar_->depthLayerF_.end(), index) -
708  hgpar_->depthLayerF_.begin());
709  if (ll == static_cast<int>(hgpar_->depthLayerF_.size()))
710  ll = -1;
711  }
712 #ifdef EDM_ML_DEBUG
713  edm::LogVerbatim("HGCalGeom") << "LayerFromIndex for " << index << ":" << reco << ":" << waferHexagon6() << " is"
714  << ll << ":" << (ll + hgpar_->firstLayer_);
715 #endif
716  return ((ll < 0) ? ll : (ll + hgpar_->firstLayer_));
717 }
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 303 of file HGCalTBDDDConstants.cc.

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

Referenced by getIndex(), and getLayer().

303  {
304  int ll = lay - hgpar_->firstLayer_;
305  if (ll < 0 || ll >= static_cast<int>(hgpar_->layerIndex_.size()))
306  return -1;
307  if (waferHexagon6()) {
308  if (reco && ll >= static_cast<int>(hgpar_->depthIndex_.size()))
309  return -1;
310  return (reco ? hgpar_->depthLayerF_[ll] : hgpar_->layerIndex_[ll]);
311  }
312  return -1;
313 }
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 317 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBDDDConstants().

317  {
318  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
319 }
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 321 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().

321  {
322  // type refers to wafer # for hexagon cell
323  float x(999999.), y(999999.);
324  const auto& index = getIndex(lay, reco);
325  int i = index.first;
326  if (i < 0)
327  return std::make_pair(x, y);
328  if (waferHexagon6()) {
329  x = hgpar_->waferPosX_[type];
330  y = hgpar_->waferPosY_[type];
331 #ifdef EDM_ML_DEBUG
332  float x0(x), y0(y);
333 #endif
335  x += hgpar_->cellFineX_[cell];
336  y += hgpar_->cellFineY_[cell];
337  } else {
338  x += hgpar_->cellCoarseX_[cell];
339  y += hgpar_->cellCoarseY_[cell];
340  }
341 #ifdef EDM_ML_DEBUG
342  edm::LogVerbatim("HGCalGeom") << "LocateCell (Wafer) " << x0 << ":" << y0 << " Final " << x << ":" << y;
343 #endif
344  if (!reco) {
347  }
348  }
349  return std::make_pair(x, y);
350 }
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 352 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().

352  {
353  float x(0), y(0);
354  if (hgpar_->waferTypeT_[wafer] - 1 == HGCalTBParameters::HGCalFine) {
355  x = hgpar_->cellFineX_[cell];
356  y = hgpar_->cellFineY_[cell];
357  } else {
358  x = hgpar_->cellCoarseX_[cell];
359  y = hgpar_->cellCoarseY_[cell];
360  }
361  if (!reco) {
364  }
365  return std::make_pair(x, y);
366 }
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 368 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().

368  {
369  int cells(0);
370  for (unsigned int i = 0; i < layers(reco); ++i) {
371  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
372  if (cells < maxCells(lay, reco))
373  cells = maxCells(lay, reco);
374  }
375  return cells;
376 }
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 378 of file HGCalTBDDDConstants.cc.

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

378  {
379  const auto& index = getIndex(lay, reco);
380  if ((index.first < 0) || (!waferHexagon6()))
381  return 0;
382  unsigned int cells(0);
383  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
384  if (waferInLayerTest(k, index.first)) {
385  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCalTBParameters::HGCalFine) ? (hgpar_->cellFineX_.size())
386  : (hgpar_->cellCoarseX_.size());
387  if (cell > cells)
388  cells = cell;
389  }
390  }
391  return static_cast<int>(cells);
392 }
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 394 of file HGCalTBDDDConstants.cc.

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

394  {
395  int kymax(0);
396  const auto& index = getIndex(lay, reco);
397  int i = index.first;
398  if ((i >= 0) && waferHexagon6()) {
399  for (unsigned int k = 0; k < hgpar_->waferCopy_.size(); ++k) {
400  if (waferInLayerTest(k, i)) {
401  int ky = ((hgpar_->waferCopy_[k]) / 100) % 100;
402  if (ky > kymax)
403  kymax = ky;
404  }
405  }
406  }
407  return kymax;
408 }
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 410 of file HGCalTBDDDConstants.cc.

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

◆ modules()

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

Definition at line 415 of file HGCalTBDDDConstants.cc.

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

415  {
416  if (getIndex(lay, reco).first < 0)
417  return 0;
418  else
419  return max_modules_layer_[static_cast<int>(reco)][lay];
420 }
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 422 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBDDDConstants().

422  {
423  int nmod(0);
424  const auto& index = getIndex(lay, reco);
425  if (index.first < 0)
426  return nmod;
427  for (unsigned int k = 0; k < hgpar_->waferPosX_.size(); ++k) {
428  if (waferInLayerTest(k, index.first))
429  ++nmod;
430  }
431  return nmod;
432 }
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 434 of file HGCalTBDDDConstants.cc.

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

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

◆ numberCells() [1/2]

int HGCalTBDDDConstants::numberCells ( bool  reco) const

Definition at line 438 of file HGCalTBDDDConstants.cc.

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

438  {
439  int cells(0);
440  unsigned int nlayer = (reco) ? hgpar_->depth_.size() : hgpar_->layer_.size();
441  for (unsigned k = 0; k < nlayer; ++k) {
442  std::vector<int> ncells = numberCells(((reco) ? hgpar_->depth_[k] : hgpar_->layer_[k]), reco);
443  cells = std::accumulate(ncells.begin(), ncells.end(), cells);
444  }
445  return cells;
446 }
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 448 of file HGCalTBDDDConstants.cc.

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

448  {
449  const auto& index = getIndex(lay, reco);
450  int i = index.first;
451  std::vector<int> ncell;
452  if ((i >= 0) && (waferHexagon6())) {
453  for (unsigned int k = 0; k < hgpar_->waferTypeT_.size(); ++k) {
454  if (waferInLayerTest(k, i)) {
455  unsigned int cell = (hgpar_->waferTypeT_[k] - 1 == HGCalTBParameters::HGCalFine)
456  ? (hgpar_->cellFineX_.size())
457  : (hgpar_->cellCoarseX_.size());
458  ncell.emplace_back(static_cast<int>(cell));
459  }
460  }
461  }
462  return ncell;
463 }
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 465 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBGeometry::newCell().

465  {
466  if (wafer >= 0 && wafer < static_cast<int>(hgpar_->waferTypeT_.size())) {
467  if (hgpar_->waferTypeT_[wafer] - 1 == 0)
468  return static_cast<int>(hgpar_->cellFineX_.size());
469  else
470  return static_cast<int>(hgpar_->cellCoarseX_.size());
471  } else {
472  return 0;
473  }
474 }
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 476 of file HGCalTBDDDConstants.cc.

References HGCalTBParameters::k_ScaleToDDD, and z.

Referenced by HGCalTBGeometry::neighborZ().

476  {
477  double rmin(0), rmax(0);
478  if (!reco) {
481  }
482 #ifdef EDM_ML_DEBUG
483  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeR: " << z << ":0"
484  << " R " << rmin << ":" << rmax;
485 #endif
486  return std::make_pair(rmin, rmax);
487 }
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 489 of file HGCalTBDDDConstants.cc.

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

489  {
490  double rmin(0), rmax(0);
491  const auto& index = getIndex(lay, reco);
492  if (index.first >= 0 && index.first < static_cast<int>(hgpar_->rMinLayHex_.size())) {
493  rmin = hgpar_->rMinLayHex_[index.first];
494  rmax = hgpar_->rMaxLayHex_[index.first];
495  }
496  if (!reco) {
499  }
500 #ifdef EDM_ML_DEBUG
501  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeR: " << lay << ":" << index.first << " R " << rmin << ":"
502  << rmax;
503 #endif
504  return std::make_pair(rmin, rmax);
505 }
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 507 of file HGCalTBDDDConstants.cc.

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

507  {
508  double zmin = (hgpar_->zLayerHex_[0] - hgpar_->waferThick_);
509  double zmax = (hgpar_->zLayerHex_[hgpar_->zLayerHex_.size() - 1] + hgpar_->waferThick_);
510 #ifdef EDM_ML_DEBUG
511  edm::LogVerbatim("HGCalGeom") << "HGCalTBDDDConstants:rangeZ: " << zmin << ":" << zmax << ":" << hgpar_->waferThick_;
512 #endif
513  if (!reco) {
516  }
517  return std::make_pair(zmin, zmax);
518 }
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 520 of file HGCalTBDDDConstants.cc.

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

520  {
521  int row(0), col(0);
522  if (wafer < static_cast<int>(hgpar_->waferCopy_.size())) {
523  int copy = hgpar_->waferCopy_[wafer];
526  }
527  return std::make_pair(row, col);
528 }
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 530 of file HGCalTBDDDConstants.cc.

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

530  {
531  return std::make_pair(cell, lay);
532 }

◆ volumes()

unsigned int HGCalTBDDDConstants::volumes ( ) const
inline

Definition at line 79 of file HGCalTBDDDConstants.h.

References hgpar_, and HGCalTBParameters::moduleLayR_.

Referenced by HGCalTBGeometryLoader::build().

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 534 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCNumberingScheme::getUnitID().

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

559  {
560  // Input x, y in Geant4 unit and transformed to CMSSW standard
563  int size_ = static_cast<int>(hgpar_->waferCopy_.size());
564  wafer = size_;
565  for (int k = 0; k < size_; ++k) {
566  double dx = std::abs(xx - hgpar_->waferPosX_[k]);
567  double dy = std::abs(yy - hgpar_->waferPosY_[k]);
568  if (dx <= rmax_ && dy <= hexside_) {
569  if ((dy <= 0.5 * hexside_) || (dx * tan30deg_ <= (hexside_ - dy))) {
570  wafer = k;
571  celltyp = hgpar_->waferTypeT_[k];
572  xx -= hgpar_->waferPosX_[k];
573  yy -= hgpar_->waferPosY_[k];
574  break;
575  }
576  }
577  }
578  if (wafer < size_) {
579  if (celltyp - 1 == HGCalTBParameters::HGCalFine)
580  icell = cellHex(xx,
581  yy,
584  hgpar_->cellFineY_);
585  else
586  icell = cellHex(xx,
587  yy,
591  } else {
592  wafer = -1;
593 #ifdef EDM_ML_DEBUG
594  edm::LogWarning("HGCalGeom") << "Cannot get wafer type corresponding to " << x << ":" << y << " " << xx << ":"
595  << yy;
596 #endif
597  }
598 #ifdef EDM_ML_DEBUG
599  edm::LogVerbatim("HGCalGeom") << "Position " << x << ":" << y << " Wafer " << wafer << ":" << size_ << " XX " << xx
600  << ":" << yy << " Cell " << icell << " Type " << celltyp;
601 #endif
602 }
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 611 of file HGCalTBDDDConstants.cc.

References getIndex(), and waferInLayerTest().

611  {
612  const auto& indx = getIndex(lay, reco);
613  if (indx.first < 0)
614  return false;
615  return waferInLayerTest(wafer, indx.first);
616 }
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 743 of file HGCalTBDDDConstants.cc.

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

743  {
744  int layer = layerFromIndex(index, true);
745  int indx = HGCalWaferIndex::waferIndex(layer, wafer, 0);
746 #ifdef EDM_ML_DEBUG
747  edm::LogVerbatim("HGCalGeom") << "WaferIndex for " << wafer << ":" << index << " (" << layer << ") " << indx;
748 #endif
749  return indx;
750 }
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 604 of file HGCalTBDDDConstants.cc.

References getIndex(), and waferInLayerTest().

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

604  {
605  const auto& indx = getIndex(lay, reco);
606  if (indx.first < 0)
607  return false;
608  return waferInLayerTest(wafer, indx.first);
609 }
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 618 of file HGCalTBDDDConstants.cc.

References hexside_, HGCalTBParameters::k_ScaleToDDD, and rmax_.

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

◆ waferPosition()

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

Definition at line 625 of file HGCalTBDDDConstants.cc.

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

Referenced by HGCalTBGeometryLoader::build(), and HGCMouseBite::exclude().

625  {
626  double xx(0), yy(0);
627  if (wafer >= 0 && wafer < static_cast<int>(hgpar_->waferPosX_.size())) {
628  xx = hgpar_->waferPosX_[wafer];
629  yy = hgpar_->waferPosY_[wafer];
630  }
631  if (!reco) {
634  }
635  return std::make_pair(xx, yy);
636 }
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 638 of file HGCalTBDDDConstants.cc.

References hgpar_, and HGCalTBParameters::moduleLayR_.

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

638 { 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 640 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer, and waferLayer_.

640  {
641  int wafer(0);
642  auto itr = waferLayer_.find(layer);
643  if (itr != waferLayer_.end()) {
644  unsigned ity = (type > 0 && type <= 2) ? type : 0;
645  wafer = (itr->second)[ity];
646  }
647  return wafer;
648 }
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 650 of file HGCalTBDDDConstants.cc.

References nano_mu_digi_cff::layer.

Referenced by cellThickness(), and isHalfCell().

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

◆ waferType() [2/3]

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

Definition at line 654 of file HGCalTBDDDConstants.cc.

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

654  {
656  if ((wafer >= 0) && (wafer < static_cast<int>(hgpar_->waferTypeL_.size())))
657  type = (hgpar_->waferTypeL_[wafer] - 1);
658  return type;
659 }
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 HGCalTBGeometryLoader::build(), and 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 661 of file HGCalTBDDDConstants.cc.

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

661  {
662  int wl = HGCalWaferIndex::waferIndex(layer, wafer, 0, true);
663  return (hgpar_->waferTypes_.find(wl) != hgpar_->waferTypes_.end());
664 }
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 666 of file HGCalTBDDDConstants.cc.

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

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

666  {
667  const auto& index = getIndex(lay, reco);
668  if (index.first < 0)
669  return 0;
670  else
672 }
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().