CMS 3D CMS Logo

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

#include <HGCalDDDConstants.h>

Public Member Functions

std::pair< int, int > assignCell (float x, float y, int lay, int subSec, bool reco) const
 
std::array< int, 5 > assignCellHex (float x, float y, int lay, bool reco) const
 
std::array< int, 3 > assignCellTrap (float x, float y, float z, int lay, bool reco) const
 
bool cellInLayer (int waferU, int waferV, int cellU, int cellV, int lay, bool reco) const
 
double cellSizeHex (int type) const
 
double cellThickness (int layer, int waferU, int waferV) const
 
double distFromEdgeHex (double x, double y, double z) const
 
double distFromEdgeTrap (double x, double y, double z) const
 
void etaPhiFromPosition (const double x, const double y, const double z, const int layer, int &ieta, int &iphi, int &type, double &wt) const
 
int firstLayer () const
 
HGCalGeometryMode::GeometryMode geomMode () const
 
int getLayer (double z, bool reco) const
 
HGCalParameters::hgtrap getModule (unsigned int k, bool hexType, bool reco) const
 
std::vector< HGCalParameters::hgtrapgetModules () const
 
const HGCalParametersgetParameter () const
 
HGCalParameters::hgtrform getTrForm (unsigned int k) const
 
unsigned int getTrFormN () const
 
std::vector< HGCalParameters::hgtrformgetTrForms () const
 
int getTypeHex (int layer, int waferU, int waferV) const
 
int getTypeTrap (int layer) const
 
 HGCalDDDConstants (const HGCalParameters *hp, const std::string &name)
 
bool isHalfCell (int waferType, int cell) const
 
bool isValidHex (int lay, int mod, int cell, bool reco) const
 
bool isValidHex8 (int lay, int modU, int modV, int cellU, int cellV) const
 
bool isValidTrap (int lay, int ieta, int iphi) const
 
int layerIndex (int lay, bool reco) const
 
unsigned int layers (bool reco) const
 
unsigned int layersInit (bool reco) const
 
int levelTop (int ind=0) const
 
std::pair< float, float > locateCell (int cell, int lay, int type, bool reco) const
 
std::pair< float, float > locateCell (int lay, int waferU, int waferV, int cellU, int cellV, bool reco, bool all) const
 
std::pair< float, float > locateCellHex (int cell, int wafer, bool reco) const
 
std::pair< float, float > locateCellTrap (int lay, int ieta, int iphi, bool reco) const
 
int maxCells (bool reco) const
 
int maxCells (int lay, bool reco) const
 
int maxCellUV () const
 
int maxModules () const
 
int maxMoudlesPerLayer () const
 
int maxRows (int lay, bool reco) const
 
double minSlope () 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
 
int numberCellsHexagon (int lay, int waferU, int waferV, bool flag) const
 
std::pair< int, int > rowColumnWafer (const int wafer) const
 
int scintType (const float dPhi) 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
 
void waferFromPosition (const double x, const double y, const int layer, int &waferU, int &waferV, int &cellU, int &cellV, int &celltype, double &wt) const
 
bool waferFullInLayer (int wafer, int lay, bool reco) const
 
bool waferInLayer (int wafer, int lay, bool reco) const
 
int waferMax () const
 
int waferMin () const
 
std::pair< double, double > waferPosition (int wafer, bool reco) const
 
std::pair< double, double > waferPosition (int waferU, int waferV, 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 waferTypeL (int wafer) const
 
int waferTypeT (int wafer) const
 
int waferUVMax () const
 
double waferZ (int layer, bool reco) const
 
 ~HGCalDDDConstants ()
 

Private Types

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

Private Member Functions

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

Private Attributes

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

Static Private Attributes

static double tan30deg_ = 0.5773502693
 

Detailed Description

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

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

Definition at line 24 of file HGCalDDDConstants.h.

Member Typedef Documentation

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

Definition at line 138 of file HGCalDDDConstants.h.

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

Definition at line 137 of file HGCalDDDConstants.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file HGCalDDDConstants.cc.

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

23  : hgpar_(hp),
24  sqrt3_(std::sqrt(3.0)) {
25  mode_ = hgpar_->mode_;
31  std::cos(30.0*CLHEP::deg));
32  hexside_ = 2.0 * rmax_ * tan30deg_;
33 #ifdef EDM_ML_DEBUG
34  edm::LogVerbatim("HGCalGeom") << "rmax_ " << rmax_ << ":" << hexside_
35  << " CellSize " << 0.5*HGCalParameters::k_ScaleFromDDD*hgpar_->cellSize_[0]
37 #endif
38  }
39  // init maps and constants
40  modHalf_ = 0;
42  for (int simreco = 0; simreco < 2; ++simreco) {
43  tot_layers_[simreco] = layersInit((bool)simreco);
44  max_modules_layer_[simreco].resize(tot_layers_[simreco]+1);
45  for (unsigned int layer=1; layer <= tot_layers_[simreco]; ++layer) {
46  max_modules_layer_[simreco][layer] = modulesInit(layer,(bool)simreco);
47  if (simreco == 1) {
48  modHalf_ += max_modules_layer_[simreco][layer];
50  max_modules_layer_[simreco][layer]);
51 #ifdef EDM_ML_DEBUG
52  edm::LogVerbatim("HGCalGeom") << "Layer " << layer << " with "
53  << max_modules_layer_[simreco][layer]
54  << ":" << modHalf_ << " modules";
55 #endif
56  }
57  }
58  }
59  tot_wafers_ = wafers();
60 
61  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants initialized for "
62  << name << " with " << layers(false) << ":"
63  << layers(true) << " layers, " << wafers()
64  << ":" << 2*modHalf_ << " wafers with maximum "
65  << maxWafersPerLayer_ << " per layer and "
66  << "maximum of " << maxCells(false) << ":"
67  << maxCells(true) << " cells";
68 
73  int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
74  for (unsigned int i=0; i<getTrFormN(); ++i) {
75  int lay0 = getTrForm(i).lay;
76  int wmin(9999999), wmax(-9999999), kount(0);
77  for (int wafer=0; wafer<sectors(); ++wafer) {
78  bool waferIn = waferInLayer(wafer,lay0,true);
82  waferIn_[kndx] = waferIn;
83  }
84  if (waferIn) {
85  int waferU = (((mode_ == HGCalGeometryMode::Hexagon) ||
88  if (waferU < wmin) wmin = waferU;
89  if (waferU > wmax) wmax = waferU;
90  ++kount;
91  }
92  }
93  if (wminT > wmin) wminT = wmin;
94  if (wmaxT < wmax) wmaxT = wmax;
95  if (kount1 < kount) kount1= kount;
96  kount2 += kount;
97 #ifdef EDM_ML_DEBUG
98  int lay1 = getIndex(lay0,true).first;
99  edm::LogVerbatim("HGCalGeom") << "Index " << i << " Layer " << lay0
100  << ":" << lay1 << " Wafer " << wmin
101  << ":" << wmax << ":" << kount;
102 #endif
103  HGCWaferParam a1{ {wmin,wmax,kount} };
104  waferLayer_[lay0] = a1;
105  }
106  waferMax_ = std::array<int,4>{ {wminT,wmaxT,kount1,kount2} };
107 #ifdef EDM_ML_DEBUG
108  edm::LogVerbatim("HGCalGeom") << "Overall wafer statistics: " << wminT
109  << ":" << wmaxT << ":" << kount1 << ":"
110  << kount2;
111 #endif
112  }
113 }
std::array< uint32_t, 2 > tot_layers_
std::map< int, HGCWaferParam > waferLayer_
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Simrecovecs max_modules_layer_
unsigned int layersInit(bool reco) const
static int32_t waferV(const int32_t index)
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
std::array< int, 4 > waferMax_
int modulesInit(int lay, bool reco) const
HGCalGeometryMode::GeometryMode mode_
HGCalGeometryMode::GeometryMode mode_
unsigned int getTrFormN() const
unsigned int layers(bool reco) const
std::vector< double > cellSize_
T sqrt(T t)
Definition: SSEVec.h:18
std::pair< int, float > getIndex(int lay, bool reco) const
static double k_ScaleFromDDD
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::unordered_map< int32_t, bool > waferIn_
static int32_t waferU(const int32_t index)
int sectors() const
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
int maxCells(bool reco) const
static double tan30deg_
std::array< int, 3 > HGCWaferParam
bool waferInLayer(int wafer, int lay, bool reco) const
HGCalDDDConstants::~HGCalDDDConstants ( )

Definition at line 115 of file HGCalDDDConstants.cc.

115 {}

Member Function Documentation

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

Definition at line 117 of file HGCalDDDConstants.cc.

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

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

118  {
119  const auto & index = getIndex(lay, reco);
120  if (index.first < 0) return std::make_pair(-1,-1);
123  float xx = (reco) ? x : HGCalParameters::k_ScaleFromDDD*x;
124  float yy = (reco) ? y : HGCalParameters::k_ScaleFromDDD*y;
125 
126  //First the wafer
127  int wafer = cellHex(xx, yy, rmax_, hgpar_->waferPosX_, hgpar_->waferPosY_);
128  if (wafer < 0 || wafer >= (int)(hgpar_->waferTypeT_.size())) {
129  edm::LogWarning("HGCalGeom") << "Wafer no. out of bound for " << wafer
130  << ":" << (hgpar_->waferTypeT_).size()
131  << ":" << (hgpar_->waferPosX_).size()
132  << ":" << (hgpar_->waferPosY_).size()
133  << " ***** ERROR *****";
134  return std::make_pair(-1,-1);
135  } else {
136  // Now the cell
137  xx -= hgpar_->waferPosX_[wafer];
138  yy -= hgpar_->waferPosY_[wafer];
139  if (hgpar_->waferTypeT_[wafer] == 1)
140  return std::make_pair(wafer,cellHex(xx, yy,
143  else
144  return std::make_pair(wafer,cellHex(xx, yy,
147  }
148  } else {
149  return std::make_pair(-1,-1);
150  }
151 }
size
Write out results.
std::vector< double > waferPosY_
std::vector< double > cellFineY_
HGCalGeometryMode::GeometryMode mode_
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
std::vector< double > cellCoarseX_
std::vector< double > cellSize_
std::pair< int, float > getIndex(int lay, bool reco) const
static double k_ScaleFromDDD
std::vector< double > cellFineX_
fixed size matrix
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
std::array< int, 5 > HGCalDDDConstants::assignCellHex ( float  x,
float  y,
int  lay,
bool  reco 
) const

Definition at line 153 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometry::getClosestCell().

154  {
155  int waferU(0), waferV(0), waferType(-1), cellU(0), cellV(0);
158  double xx = (reco) ? HGCalParameters::k_ScaleToDDD*x : x;
159  double yy = (reco) ? HGCalParameters::k_ScaleToDDD*y : y;
160  double wt(1.0);
161  waferFromPosition(xx,yy,lay,waferU,waferV,cellU,cellV,waferType,wt);
162  }
163  return std::array<int,5>{ {waferU,waferV,waferType,cellU,cellV} };
164 }
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
HGCalGeometryMode::GeometryMode mode_
int waferType(DetId const &id) const
static double k_ScaleToDDD
std::array< int, 3 > HGCalDDDConstants::assignCellTrap ( float  x,
float  y,
float  z,
int  lay,
bool  reco 
) const

Definition at line 166 of file HGCalDDDConstants.cc.

References funct::abs(), PVValHelper::eta, HGCalParameters::etaMinBH_, getIndex(), hgpar_, createfilelist::int, HGCalParameters::k_ScaleToDDD, cmsBatch::log, M_PI, SiStripPI::max, min(), phi, alignCSCRings::r, scintType(), funct::sin(), mathSSE::sqrt(), funct::tan(), theta(), geometryCSVtoXML::xx, HGCalParameters::zLayerHex_, and geometryCSVtoXML::zz.

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

168  {
169 
170  int ieta(-1), iphi(-1), type(-1);
171  const auto & indx = getIndex(layer,reco);
172  if (indx.first < 0) return std::array<int,3>{ {ieta,iphi,type} };
173  double xx = (z > 0) ? x : -x;
174  double zz = (reco ? hgpar_->zLayerHex_[indx.first] :
176  double r = std::sqrt(x*x+y*y+zz*zz);
177  double theta = (r == 0. ? 0. : std::acos(std::max(std::min(zz/r,1.0),-1.0)));
178  double stheta= std::sin(theta);
179  double phi = (r*stheta == 0. ? 0. : std::atan2(y,xx));
180  if (phi < 0) phi += (2.0*M_PI);
181  double eta = (std::abs(stheta) == 1.? 0. : -std::log(std::abs(std::tan(0.5*theta))) );
182  ieta = 1 + (int)((std::abs(eta)-hgpar_->etaMinBH_)/indx.second);
183  iphi = 1 + (int)(phi/indx.second);
184  type = scintType(indx.second);
185 #ifdef EDM_ML_DEBUG
186  edm::LogVerbatim("HGCalGeom") << "assignCellTrap Input " << x << ":" << y
187  << ":" << z << ":" << layer << ":" << reco
188  << " x|z|r " << xx << ":" << zz << ":" << r
189  << " theta|phi " << theta << ":" << stheta
190  << ":" << phi << " o/p " << ieta << ":"
191  << iphi << ":" << type;
192 #endif
193  return std::array<int,3>{ {ieta,iphi,type} };
194 }
type
Definition: HCALResponse.h:21
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
T sqrt(T t)
Definition: SSEVec.h:18
std::pair< int, float > getIndex(int lay, bool reco) const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
int scintType(const float dPhi) const
std::vector< double > zLayerHex_
#define M_PI
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
int HGCalDDDConstants::cellHex ( double  xx,
double  yy,
const double &  cellR,
const std::vector< double > &  posX,
const std::vector< double > &  posY 
) const
private

Definition at line 1023 of file HGCalDDDConstants.cc.

References funct::abs(), PVValHelper::dx, PVValHelper::dy, gen::k, pileupDistInMC::num, tan30deg_, and TrackerOfflineValidation_Dqm_cff::xmax.

Referenced by assignCell(), waferFromPosition(), and waferUVMax().

1026  {
1027  int num(0);
1028  const double tol(0.00001);
1029  double cellY = 2.0*cellR*tan30deg_;
1030  for (unsigned int k=0; k<posX.size(); ++k) {
1031  double dx = std::abs(xx - posX[k]);
1032  double dy = std::abs(yy - posY[k]);
1033  if (dx <= (cellR+tol) && dy <= (cellY+tol)) {
1034  double xmax = (dy<=0.5*cellY) ? cellR : (cellR-(dy-0.5*cellY)/tan30deg_);
1035  if (dx <= (xmax+tol)) {
1036  num = k;
1037  break;
1038  }
1039  }
1040  }
1041  return num;
1042 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
static double tan30deg_
void HGCalDDDConstants::cellHex ( double  xloc,
double  yloc,
int  cellType,
int &  cellU,
int &  cellV 
) const
private

Definition at line 1044 of file HGCalDDDConstants.cc.

References funct::abs(), runEdmFileComparison::found, hgpar_, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, rmax_, edm::shift, and sqrt3_.

1045  {
1046  int N = (cellType == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
1047  double Rc = 2*rmax_/(3*N);
1048  double rc = 0.5*Rc*sqrt3_;
1049  double v0 = ((xloc/Rc -1.0)/1.5);
1050  int cv0 = (v0 > 0) ? (N + (int)(v0+0.5)) : (N - (int)(-v0+0.5));
1051  double u0 = (0.5*yloc/rc+0.5*cv0);
1052  int cu0 = (u0 > 0) ? (N/2 + (int)(u0+0.5)) : (N/2 - (int)(-u0+0.5));
1053  bool found(false);
1054  static const int shift[3] = {0,1,-1};
1055  for (int i1=0; i1<3; ++i1) {
1056  cellU = cu0 + shift[i1];
1057  for (int i2=0; i2<3; ++i2) {
1058  cellV = cv0 + shift[i2];
1059  double xc = (1.5*(cellV-N)+1.0)*Rc;
1060  double yc = (2*cellU-cellV-N)*rc;
1061  if (((std::abs(xloc-xc) <= rc) && (std::abs(yloc-yc) <= 0.5*Rc)) ||
1062  ((std::abs(yloc-yc) <= Rc) &&
1063  (std::abs(xloc-xc) <= sqrt3_*std::abs(yloc-yc-Rc)))) {
1064  found = true; break;
1065  }
1066  }
1067  if (found) break;
1068  }
1069  if (!found) { cellU = cu0; cellV = cv0; }
1070 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define N
Definition: blowfish.cc:9
static unsigned int const shift
const HGCalParameters * hgpar_
bool HGCalDDDConstants::cellInLayer ( int  waferU,
int  waferV,
int  cellU,
int  cellV,
int  lay,
bool  reco 
) const

Definition at line 196 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometry::newCell().

197  {
198  const auto & indx = getIndex(lay,true);
199  if (indx.first >= 0) {
204  const auto & xy = ((mode_ == HGCalGeometryMode::Hexagon8) ||
206  locateCell(lay, waferU, waferV, cellU, cellV, reco, true) :
207  locateCell(cellU, lay, waferU, reco);
208  double rpos = sqrt(xy.first*xy.first + xy.second*xy.second);
209  return ((rpos >= hgpar_->rMinLayHex_[indx.first]) &&
210  (rpos <= hgpar_->rMaxLayHex_[indx.first]));
211  } else {
212  return true;
213  }
214  } else {
215  return false;
216  }
217 }
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
HGCalGeometryMode::GeometryMode mode_
T sqrt(T t)
Definition: SSEVec.h:18
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< double > rMinLayHex_
fixed size matrix
const HGCalParameters * hgpar_
double HGCalDDDConstants::cellSizeHex ( int  type) const

Definition at line 238 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), and hgcal::RecHitTools::getRadiusToSide().

238  {
239  int indx = (((mode_ == HGCalGeometryMode::Hexagon8) ||
241  ((type >= 1) ? 1 : 0) : ((type == 1) ? 0 : 1));
242  double cell = (0.5*HGCalParameters::k_ScaleFromDDD*hgpar_->cellSize_[indx]);
243  return cell;
244 }
type
Definition: HCALResponse.h:21
HGCalGeometryMode::GeometryMode mode_
std::vector< double > cellSize_
static double k_ScaleFromDDD
const HGCalParameters * hgpar_
double HGCalDDDConstants::cellThickness ( int  layer,
int  waferU,
int  waferV 
) const

Definition at line 219 of file HGCalDDDConstants.cc.

References HGCalParameters::cellThickness_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, maxType, minType, mode_, HGCalParameters::typesInLayers_, HGCalWaferIndex::waferIndex(), and HGCalParameters::waferTypeL_.

Referenced by hgcal::RecHitTools::getSiThickness().

220  {
221 
222  double thick(-1);
225  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer,waferU,waferV));
226  int type = ((itr == hgpar_->typesInLayers_.end() ? maxType :
227  hgpar_->waferTypeL_[itr->second]));
228  thick = 10000.0*hgpar_->cellThickness_[type];
229  } else if ((mode_ == HGCalGeometryMode::Hexagon) ||
231  int type = (((waferU>=0)&&(waferU<(int)(hgpar_->waferTypeL_.size()))) ?
232  hgpar_->waferTypeL_[waferU] : minType);
233  thick = 100.0*type;
234  }
235  return thick;
236 }
type
Definition: HCALResponse.h:21
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
HGCalGeometryMode::GeometryMode mode_
static const int maxType
std::vector< double > cellThickness_
wafer_map typesInLayers_
static const int minType
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
double HGCalDDDConstants::distFromEdgeHex ( double  x,
double  y,
double  z 
) const

Definition at line 246 of file HGCalDDDConstants.cc.

References funct::abs(), PVValHelper::dx, PVValHelper::dy, hexside_, hgpar_, createfilelist::int, gen::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::k_ScaleToDDD, rmax_, sqrt3_, tan30deg_, HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, x, geometryCSVtoXML::xx, y, and geometryCSVtoXML::yy.

Referenced by HGCalSD::isItinFidVolume().

246  {
247 
248  if (z < 0) x = -x;
249  double dist(0);
250  //Input x, y in Geant4 unit and transformed to CMSSW standard
253  int sizew = (int)(hgpar_->waferPosX_.size());
254  int wafer = sizew;
255  for (int k=0; k<sizew; ++k) {
256  double dx = std::abs(xx-hgpar_->waferPosX_[k]);
257  double dy = std::abs(yy-hgpar_->waferPosY_[k]);
258  if (dx <= rmax_ && dy <= hexside_ &&
259  ((dy <= 0.5*hexside_) || (dx*tan30deg_ <= (hexside_-dy)))) {
260  wafer = k;
261  xx -= hgpar_->waferPosX_[k];
262  yy -= hgpar_->waferPosY_[k];
263  break;
264  }
265  }
266  if (wafer < sizew) {
267  if (std::abs(yy) < 0.5*hexside_) {
268  dist = rmax_ - std::abs(xx);
269  } else {
270  dist = 0.5*((rmax_-std::abs(xx))-sqrt3_*(std::abs(yy)-0.5*hexside_));
271  }
272  } else {
273  dist = 0;
274  }
276 #ifdef EDM_ML_DEBUG
277  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeHex: Local " << xx << ":"
278  << yy << " wafer " << wafer << " flag "
279  << (wafer < sizew) << " Distance " << rmax_
280  << ":" << (rmax_-std::abs(xx)) << ":"
281  << (std::abs(yy)-0.5*hexside_) << ":"
282  << 0.5*hexside_ << ":" << dist;
283 #endif
284  return dist;
285 }
std::vector< double > waferPosY_
static double k_ScaleFromDDD
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
static double k_ScaleToDDD
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
static double tan30deg_
double HGCalDDDConstants::distFromEdgeTrap ( double  x,
double  y,
double  z 
) const

Definition at line 287 of file HGCalDDDConstants.cc.

References funct::abs(), HGCalParameters::dPhiEtaBH_, PVValHelper::eta, HGCalParameters::etaMinBH_, getLayer(), hgpar_, createfilelist::int, HGCalParameters::k_ScaleToDDD, layerIndex(), cmsBatch::log, M_PI, SiStripPI::max, min(), phi, alignCSCRings::r, findQualityFiles::rr, funct::sin(), mathSSE::sqrt(), funct::tan(), theta(), geometryCSVtoXML::xx, HGCalParameters::zLayerHex_, and geometryCSVtoXML::zz.

Referenced by HGCScintSD::isItinFidVolume().

287  {
288 
289  int lay = getLayer(z,false);
290  double xx = (z < 0) ? -x : x;
291  int indx = layerIndex(lay,false);
293  double r = std::sqrt(x*x+y*y+zz*zz);
294  double theta = (r == 0. ? 0. : std::acos(std::max(std::min(zz/r,1.0),-1.0)));
295  double stheta= std::sin(theta);
296  double phi = (r*stheta == 0. ? 0. : std::atan2(y,xx));
297  if (phi < 0) phi += (2.0*M_PI);
298  double eta = (std::abs(stheta) == 1.0 ? 0. : -std::log(std::abs(std::tan(0.5*theta))) );
299  double cell = hgpar_->dPhiEtaBH_[indx];
300  int ieta = 1 + (int)((std::abs(eta)-hgpar_->etaMinBH_)/cell);
301  int iphi = 1 + (int)(phi/cell);
302  double rr = std::sqrt(x*x+y*y);
303  double dphi = std::max(0.0,(0.5*cell-std::abs(phi-(iphi-0.5)*cell)));
304  double dist = ((eta > hgpar_->etaMinBH_+(ieta-0.5)*cell) ?
305  (rr - zz/std::sinh(hgpar_->etaMinBH_+ieta*cell)) :
306  (zz/std::sinh(hgpar_->etaMinBH_+(ieta-1)*cell) - rr));
307 #ifdef EDM_ML_DEBUG
308  edm::LogVerbatim("HGCalGeom") << "DistFromEdgeTrap: Global " << x << ":"
309  << y << ":" << z << " Layer " << lay
310  << " Index " << indx << " xx|zz " << xx << ":"
311  << zz << " Eta " << eta << ":"<< ieta << ":"
312  << (hgpar_->etaMinBH_+(ieta-0.5)*cell)
313  << " Phi " << phi << ":" << iphi << ":"
314  << (iphi-0.5)*cell << " cell " << cell << " R "
315  << rr << " Dphi " << dphi << " Dist " << dist
316  << ":" << rr*dphi << ":"
317  << rr-zz/std::sinh(hgpar_->etaMinBH_+ieta*cell)
318  << ":" << zz/std::sinh(hgpar_->etaMinBH_+(ieta-1)*cell)-rr;
319 #endif
320  return std::min(rr*dphi,dist);
321 }
int getLayer(double z, bool reco) const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
int layerIndex(int lay, bool reco) const
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< double > zLayerHex_
#define M_PI
static double k_ScaleToDDD
const HGCalParameters * hgpar_
std::vector< double > dPhiEtaBH_
void HGCalDDDConstants::etaPhiFromPosition ( const double  x,
const double  y,
const double  z,
const int  layer,
int &  ieta,
int &  iphi,
int &  type,
double &  wt 
) const
int HGCalDDDConstants::firstLayer ( ) const
inline

Definition at line 47 of file HGCalDDDConstants.h.

References HGCalParameters::firstLayer_, and hgpar_.

Referenced by HGCalTopology::HGCalTopology().

47 {return hgpar_->firstLayer_;}
const HGCalParameters * hgpar_
HGCalGeometryMode::GeometryMode HGCalDDDConstants::geomMode ( ) const
inline
std::pair< int, float > HGCalDDDConstants::getIndex ( int  lay,
bool  reco 
) const
private

Definition at line 1072 of file HGCalDDDConstants.cc.

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

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

1072  {
1073 
1074  int indx = layerIndex(lay,reco);
1075  if (indx<0) return std::make_pair(-1,0);
1076  float cell(0);
1077  if ((mode_ == HGCalGeometryMode::Hexagon) ||
1079  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1080  } else {
1083  cell = (reco ? hgpar_->moduleCellR_[0] : hgpar_->moduleCellS_[0]);
1084  } else {
1085  cell = hgpar_->dPhiEtaBH_[indx];
1086  }
1087  }
1088  return std::make_pair(indx,cell);
1089 }
std::vector< double > moduleCellR_
HGCalGeometryMode::GeometryMode mode_
int layerIndex(int lay, bool reco) const
std::vector< double > moduleCellS_
fixed size matrix
const HGCalParameters * hgpar_
std::vector< double > dPhiEtaBH_
int HGCalDDDConstants::getLayer ( double  z,
bool  reco 
) const

Definition at line 323 of file HGCalDDDConstants.cc.

References funct::abs(), HGCalParameters::firstLayer_, HGCalGeometryMode::Hexagon, HGCalGeometryMode::HexagonFull, hgpar_, gen::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::layerGroup_, layerIndex(), mode_, trackingPlots::reco, HGCalParameters::zLayerHex_, and geometryCSVtoXML::zz.

Referenced by distFromEdgeTrap(), geomMode(), and HGCalGeometry::getClosestCell().

323  {
324 
325  unsigned int k = 0;
326  double zz = (reco ? std::abs(z) :
327  HGCalParameters::k_ScaleFromDDD*std::abs(z));
328  const auto& zLayerHex = hgpar_->zLayerHex_;
329  std::find_if(zLayerHex.begin()+1,zLayerHex.end(),[&k,&zz,&zLayerHex](double zLayer){ ++k; return zz < 0.5*(zLayerHex[k-1]+zLayerHex[k]);});
330  int lay = k;
331  if (((mode_ == HGCalGeometryMode::Hexagon) ||
333  int indx = layerIndex(lay,false);
334  if (indx >= 0) lay = hgpar_->layerGroup_[indx];
335  } else {
336  lay += (hgpar_->firstLayer_ - 1);
337  }
338  return lay;
339 }
HGCalGeometryMode::GeometryMode mode_
int layerIndex(int lay, bool reco) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > zLayerHex_
int k[5][pyjets_maxn]
std::vector< int > layerGroup_
fixed size matrix
const HGCalParameters * hgpar_
HGCalParameters::hgtrap HGCalDDDConstants::getModule ( unsigned int  k,
bool  hexType,
bool  reco 
) const

Definition at line 341 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), geomMode(), and HGCalGeometry::getSummary().

343  {
344 
346  if (hexType) {
347  if (indx >= hgpar_->waferTypeL_.size())
348  edm::LogWarning("HGCalGeom") << "Wafer no. out bound for index " << indx
349  << ":" << (hgpar_->waferTypeL_).size()
350  << ":" << (hgpar_->waferPosX_).size()
351  << ":" << (hgpar_->waferPosY_).size()
352  << " ***** ERROR *****";
353  unsigned int type = (indx < hgpar_->waferTypeL_.size()) ?
354  hgpar_->waferTypeL_[indx] : 3;
355  if (type > 0) --type;
356  mytr = hgpar_->getModule(type, reco);
357  } else {
358  mytr = hgpar_->getModule(indx,reco);
359  }
360  return mytr;
361 }
size
Write out results.
std::vector< double > waferPosY_
type
Definition: HCALResponse.h:21
hgtrap getModule(unsigned int k, bool reco) const
fixed size matrix
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
std::vector< int > waferTypeL_
std::vector< HGCalParameters::hgtrap > HGCalDDDConstants::getModules ( ) const

Definition at line 363 of file HGCalDDDConstants.cc.

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

Referenced by geomMode().

363  {
364 
365  std::vector<HGCalParameters::hgtrap> mytrs;
366  for (unsigned int k=0; k<hgpar_->moduleLayR_.size(); ++k)
367  mytrs.emplace_back(hgpar_->getModule(k,true));
368  return mytrs;
369 }
std::vector< int > moduleLayR_
hgtrap getModule(unsigned int k, bool reco) const
int k[5][pyjets_maxn]
const HGCalParameters * hgpar_
const HGCalParameters* HGCalDDDConstants::getParameter ( ) const
inline

Definition at line 52 of file HGCalDDDConstants.h.

References hgpar_.

Referenced by HGCalGeometryLoader::build(), and HGCalGeometry::getSummary().

52 {return hgpar_;}
const HGCalParameters * hgpar_
HGCalParameters::hgtrform HGCalDDDConstants::getTrForm ( unsigned int  k) const
inline

Definition at line 53 of file HGCalDDDConstants.h.

References HGCalParameters::getTrForm(), and hgpar_.

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

53 {return hgpar_->getTrForm(k);}
hgtrform getTrForm(unsigned int k) const
int k[5][pyjets_maxn]
const HGCalParameters * hgpar_
unsigned int HGCalDDDConstants::getTrFormN ( ) const
inline
std::vector< HGCalParameters::hgtrform > HGCalDDDConstants::getTrForms ( ) const

Definition at line 371 of file HGCalDDDConstants.cc.

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

Referenced by HGCalTrackCollectionProducer::beginLuminosityBlock(), and getTrFormN().

371  {
372 
373  std::vector<HGCalParameters::hgtrform> mytrs;
374  for (unsigned int k=0; k<hgpar_->trformIndex_.size(); ++k)
375  mytrs.emplace_back(hgpar_->getTrForm(k));
376  return mytrs;
377 }
std::vector< uint32_t > trformIndex_
hgtrform getTrForm(unsigned int k) const
int k[5][pyjets_maxn]
const HGCalParameters * hgpar_
int HGCalDDDConstants::getTypeHex ( int  layer,
int  waferU,
int  waferV 
) const

Definition at line 389 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), and getTrFormN().

389  {
390 
393  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer,waferU,waferV));
394  return ((itr == hgpar_->typesInLayers_.end() ? 2 :
395  hgpar_->waferTypeL_[itr->second]));
396  } else {
397  return -1;
398  }
399 }
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
HGCalGeometryMode::GeometryMode mode_
wafer_map typesInLayers_
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
int HGCalDDDConstants::getTypeTrap ( int  layer) const

Definition at line 379 of file HGCalDDDConstants.cc.

References hgpar_, layerIndex(), mode_, HGCalParameters::nCellsFine_, HGCalParameters::nPhiBinBH_, and HGCalGeometryMode::Trapezoid.

Referenced by HGCalGeometryLoader::build(), and getTrFormN().

379  {
380 
382  return ((hgpar_->nPhiBinBH_[layerIndex(layer,true)] == hgpar_->nCellsFine_)
383  ? 0 : 1);
384  } else {
385  return -1;
386  }
387 }
HGCalGeometryMode::GeometryMode mode_
int layerIndex(int lay, bool reco) const
std::vector< int > nPhiBinBH_
const HGCalParameters * hgpar_
bool HGCalDDDConstants::isHalfCell ( int  waferType,
int  cell 
) const

Definition at line 401 of file HGCalDDDConstants.cc.

References HGCalParameters::cellCoarseHalf_, HGCalParameters::cellFineHalf_, and hgpar_.

Referenced by getTrFormN(), and hgcal::RecHitTools::isHalfCell().

401  {
402  if (waferType < 1 || cell < 0) return false;
403  return waferType == 2 ? hgpar_->cellCoarseHalf_[cell] : hgpar_->cellFineHalf_[cell];
404 }
std::vector< bool > cellCoarseHalf_
std::vector< bool > cellFineHalf_
int waferType(DetId const &id) const
const HGCalParameters * hgpar_
bool HGCalDDDConstants::isValidCell ( int  layindex,
int  wafer,
int  cell 
) const
private

Definition at line 1091 of file HGCalDDDConstants.cc.

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

Referenced by isValidHex(), and waferUVMax().

1091  {
1092 
1093  // Calculate the position of the cell
1094  // Works for options HGCalHexagon/HGCalHexagonFull
1095  double x = hgpar_->waferPosX_[wafer];
1096  double y = hgpar_->waferPosY_[wafer];
1097  if (hgpar_->waferTypeT_[wafer] == 1) {
1098  x += hgpar_->cellFineX_[cell];
1099  y += hgpar_->cellFineY_[cell];
1100  } else {
1101  x += hgpar_->cellCoarseX_[cell];
1102  y += hgpar_->cellCoarseY_[cell];
1103  }
1104  double rr = sqrt(x*x+y*y);
1105  bool result = ((rr >= hgpar_->rMinLayHex_[lay-1]) &&
1106  (rr <= hgpar_->rMaxLayHex_[lay-1]) &&
1107  (wafer < (int)(hgpar_->waferPosX_.size())));
1108 #ifdef EDM_ML_DEBUG
1109  if (!result)
1110  edm::LogVerbatim("HGCalGeom") << "Input " << lay << ":" << wafer << ":"
1111  << cell << " Position " << x << ":" << y
1112  << ":" << rr << " Compare Limits "
1113  << hgpar_->rMinLayHex_[lay-1] << ":"
1114  << hgpar_->rMaxLayHex_[lay-1]
1115  << " Flag " << result;
1116 #endif
1117  return result;
1118 }
std::vector< double > waferPosY_
std::vector< double > cellFineY_
std::vector< double > cellCoarseX_
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< double > rMinLayHex_
std::vector< double > rMaxLayHex_
std::vector< double > cellFineX_
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
bool HGCalDDDConstants::isValidHex ( int  lay,
int  mod,
int  cell,
bool  reco 
) const

Definition at line 406 of file HGCalDDDConstants.cc.

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

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

407  {
408 
409  bool result(false), resultMod(false);
410  int cellmax(0);
413  int32_t copyNumber = hgpar_->waferCopy_[mod];
414  result = ((lay > 0 && lay <= (int)(layers(reco))));
415  if (result) {
416  const int32_t lay_idx = reco ? (lay-1)*3 + 1 : lay;
417  const auto& the_modules = hgpar_->copiesInLayers_[lay_idx];
418  auto moditr = the_modules.find(copyNumber);
419  result = resultMod = (moditr != the_modules.end());
420 #ifdef EDM_ML_DEBUG
421  if (!result)
422  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants: Layer " << lay
423  << ":" << lay_idx << " Copy "
424  << copyNumber << ":" << mod
425  << " Flag " << result;
426 #endif
427  if (result) {
428  if (moditr->second >= 0) {
429  if (mod >= (int)(hgpar_->waferTypeT_.size()))
430  edm::LogWarning("HGCalGeom") << "Module no. out of bound for "
431  << mod << " to be compared with "
432  << (hgpar_->waferTypeT_).size()
433  << " ***** ERROR *****";
434  cellmax = (hgpar_->waferTypeT_[mod]==1) ?
435  (int)(hgpar_->cellFineX_.size()) : (int)(hgpar_->cellCoarseX_.size());
436  result = (cell >=0 && cell <= cellmax);
437  } else {
438  result = isValidCell(lay_idx, mod, cell);
439  }
440  }
441  }
442  }
443 
444 #ifdef EDM_ML_DEBUG
445  if (!result)
446  edm::LogVerbatim("HGCalGeom") << "HGCalDDDConstants: Layer " << lay << ":"
447  << (lay > 0 && (lay <= (int)(layers(reco))))
448  << " Module " << mod << ":" << resultMod
449  << " Cell " << cell << ":" << cellmax << ":"
450  << (cell >=0 && cell <= cellmax)
451  << ":" << maxCells(reco);
452 #endif
453  return result;
454 }
size
Write out results.
layer_map copiesInLayers_
HGCalGeometryMode::GeometryMode mode_
std::vector< double > cellCoarseX_
unsigned int layers(bool reco) const
bool isValidCell(int layindex, int wafer, int cell) const
std::vector< double > cellFineX_
fixed size matrix
std::vector< int > waferCopy_
std::vector< int > waferTypeT_
const HGCalParameters * hgpar_
int maxCells(bool reco) const
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
bool HGCalDDDConstants::isValidHex8 ( int  lay,
int  modU,
int  modV,
int  cellU,
int  cellV 
) const

Definition at line 456 of file HGCalDDDConstants.cc.

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

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

457  {
458  int indx = HGCalWaferIndex::waferIndex(layer,modU,modV);
459  auto itr = hgpar_->typesInLayers_.find(indx);
460  if (itr == hgpar_->typesInLayers_.end()) return false;
461  auto jtr = waferIn_.find(indx);
462  if (!(jtr->second)) return false;
463  int N = ((hgpar_->waferTypeL_[itr->second] == 0) ? hgpar_->nCellsFine_ :
465  if ((cellU >= 0) && (cellU < 2*N) && (cellV >= 0) && (cellV < 2*N)) {
466  return (((cellV-cellU) < N) && ((cellU-cellV) <= N));
467  } else {
468  return false;
469  }
470 }
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
std::unordered_map< int32_t, bool > waferIn_
#define N
Definition: blowfish.cc:9
wafer_map typesInLayers_
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
bool HGCalDDDConstants::isValidTrap ( int  lay,
int  ieta,
int  iphi 
) const

Definition at line 472 of file HGCalDDDConstants.cc.

References HGCalParameters::firstModule_, getIndex(), hgpar_, HGCalParameters::iEtaMinBH_, and HGCalParameters::lastModule_.

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

472  {
473  const auto & indx = getIndex(layer,true);
474  if (indx.first < 0) return false;
475  return ((ieta >= hgpar_->iEtaMinBH_[indx.first]) &&
476  (ieta <= (hgpar_->iEtaMinBH_[indx.first]+
477  hgpar_->lastModule_[indx.first]-
478  hgpar_->firstModule_[indx.first])) &&
479  (iphi > 0) && (iphi <= hgpar_->nPhiBinBH_[indx.first]));
480 }
std::vector< int > iEtaMinBH_
std::vector< int > firstModule_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< int > lastModule_
const HGCalParameters * hgpar_
int HGCalDDDConstants::layerIndex ( int  lay,
bool  reco 
) const

Definition at line 486 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), distFromEdgeTrap(), getIndex(), getLayer(), HGCalGeometry::getSummary(), getTrFormN(), and getTypeTrap().

486  {
487  int ll = lay - hgpar_->firstLayer_;
488  if (ll<0 || ll>=(int)(hgpar_->layerIndex_.size())) return -1;
491  if (reco && ll>=(int)(hgpar_->depthIndex_.size())) return -1;
492  return (reco ? hgpar_->depthLayerF_[ll] : hgpar_->layerIndex_[ll]);
493  } else {
494  return (hgpar_->layerIndex_[ll]);
495  }
496 }
std::vector< int > depthLayerF_
HGCalGeometryMode::GeometryMode mode_
std::vector< int > layerIndex_
fixed size matrix
std::vector< int > depthIndex_
const HGCalParameters * hgpar_
unsigned int HGCalDDDConstants::layers ( bool  reco) const
unsigned int HGCalDDDConstants::layersInit ( bool  reco) const

Definition at line 498 of file HGCalDDDConstants.cc.

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

Referenced by getTrFormN(), and HGCalDDDConstants().

498  {
499  return (reco ? hgpar_->depthIndex_.size() : hgpar_->layerIndex_.size());
500 }
std::vector< int > layerIndex_
fixed size matrix
std::vector< int > depthIndex_
const HGCalParameters * hgpar_
int HGCalDDDConstants::levelTop ( int  ind = 0) const
inline

Definition at line 73 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::levelT_.

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

73 {return hgpar_->levelT_[ind];}
std::vector< int > levelT_
const HGCalParameters * hgpar_
std::pair< float, float > HGCalDDDConstants::locateCell ( int  cell,
int  lay,
int  type,
bool  reco 
) const

Definition at line 502 of file HGCalDDDConstants.cc.

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

Referenced by HGCalSimHitValidation::analyzeHits(), HGCalTBAnalyzer::analyzeSimHits(), cellInLayer(), HGCalGeometry::getCorners(), HGCNumberingScheme::getLocalCoords(), HGCalGeometry::getPosition(), and getTrFormN().

503  {
504  // type refers to wafer # for hexagon cell
505  float x(999999.), y(999999.);
506  const auto & index = getIndex(lay, reco);
507  int i = index.first;
508  if (i < 0) return std::make_pair(x,y);
511  x = hgpar_->waferPosX_[type];
512  y = hgpar_->waferPosY_[type];
513  if (hgpar_->waferTypeT_[type] == 1) {
514  x += hgpar_->cellFineX_[cell];
515  y += hgpar_->cellFineY_[cell];
516  } else {
517  x += hgpar_->cellCoarseX_[cell];
518  y += hgpar_->cellCoarseY_[cell];
519  }
520  if (!reco) {
523  }
524  }
525  return std::make_pair(x,y);
526 }
std::vector< double > waferPosY_
type
Definition: HCALResponse.h:21
std::vector< double > cellFineY_
HGCalGeometryMode::GeometryMode mode_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
static double k_ScaleToDDD
std::vector< double > cellFineX_
fixed size matrix
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
std::pair< float, float > HGCalDDDConstants::locateCell ( int  lay,
int  waferU,
int  waferV,
int  cellU,
int  cellV,
bool  reco,
bool  all 
) const

Definition at line 528 of file HGCalDDDConstants.cc.

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

531  {
532 
533  float x(0), y(0);
534  int indx = HGCalWaferIndex::waferIndex(lay,waferU,waferV);
535  auto itr = hgpar_->typesInLayers_.find(indx);
536  int type = ((itr == hgpar_->typesInLayers_.end()) ? 2 :
537  hgpar_->waferTypeL_[itr->second]);
538  int kndx = cellV*100 + cellU;
539  if (type == 0) {
540  auto ktr = hgpar_->cellFineIndex_.find(kndx);
541  if (ktr != hgpar_->cellFineIndex_.end()) {
542  x = hgpar_->cellFineX_[ktr->second];
543  y = hgpar_->cellFineY_[ktr->second];
544  }
545  } else {
546  auto ktr = hgpar_->cellCoarseIndex_.find(kndx);
547  if (ktr != hgpar_->cellCoarseIndex_.end()) {
548  x = hgpar_->cellCoarseX_[ktr->second];
549  y = hgpar_->cellCoarseY_[ktr->second];
550  }
551  }
552  if (!reco) {
555  }
556  if (all) {
557  const auto & xy = waferPosition(waferU, waferV, reco);
558  x += xy.first;
559  y += xy.second;
560  }
561  return std::make_pair(x,y);
562 }
type
Definition: HCALResponse.h:21
wafer_map cellFineIndex_
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
std::vector< double > cellFineY_
std::vector< double > cellCoarseX_
static double k_ScaleToDDD
wafer_map cellCoarseIndex_
std::vector< double > cellFineX_
wafer_map typesInLayers_
fixed size matrix
std::pair< double, double > waferPosition(int wafer, bool reco) const
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
std::pair< float, float > HGCalDDDConstants::locateCellHex ( int  cell,
int  wafer,
bool  reco 
) const

Definition at line 564 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometry::getCorners(), HGCalGeometry::getPosition(), and getTrFormN().

565  {
566  float x(0), y(0);
567  if (hgpar_->waferTypeT_[wafer] == 1) {
568  x = hgpar_->cellFineX_[cell];
569  y = hgpar_->cellFineY_[cell];
570  } else {
571  x = hgpar_->cellCoarseX_[cell];
572  y = hgpar_->cellCoarseY_[cell];
573  }
574  if (!reco) {
577  }
578  return std::make_pair(x,y);
579 }
std::vector< double > cellFineY_
std::vector< double > cellCoarseX_
static double k_ScaleToDDD
std::vector< double > cellFineX_
fixed size matrix
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::pair< float, float > HGCalDDDConstants::locateCellTrap ( int  lay,
int  ieta,
int  iphi,
bool  reco 
) const

Definition at line 581 of file HGCalDDDConstants.cc.

References funct::abs(), funct::cos(), PVValHelper::eta, HGCalParameters::etaMinBH_, JetChargeProducer_cfi::exp, getIndex(), hgpar_, HGCalParameters::k_ScaleToDDD, phi, alignCSCRings::r, funct::sin(), funct::tan(), x, y, z, and HGCalParameters::zLayerHex_.

Referenced by HGCalSimHitValidation::analyzeHits(), HGCalGeometryLoader::build(), HGCalGeometry::getCorners(), and getTrFormN().

582  {
583 
584  float x(0), y(0);
585  const auto & indx = getIndex(lay,reco);
586  if (indx.first >= 0) {
587  ieta = std::abs(ieta);
588  double eta = hgpar_->etaMinBH_ + (ieta-0.5)*indx.second;
589  double phi = (iphi-0.5)*indx.second;
590  double z = hgpar_->zLayerHex_[indx.first];
591  double r = z*std::tan(2.0*std::atan(std::exp(-eta)));
592  x = r*std::cos(phi);
593  y = r*std::sin(phi);
594  }
595  if (!reco) {
598  }
599  return std::make_pair(x,y);
600 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::pair< int, float > getIndex(int lay, bool reco) const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > zLayerHex_
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
int HGCalDDDConstants::maxCells ( bool  reco) const

Definition at line 602 of file HGCalDDDConstants.cc.

References HGCalParameters::depth_, hgpar_, mps_fire::i, HGCalParameters::layer_, and layers().

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

602  {
603 
604  int cells(0);
605  for (unsigned int i = 0; i<layers(reco); ++i) {
606  int lay = reco ? hgpar_->depth_[i] : hgpar_->layer_[i];
607  if (cells < maxCells(lay, reco)) cells = maxCells(lay, reco);
608  }
609  return cells;
610 }
std::vector< int > layer_
std::vector< int > depth_
unsigned int layers(bool reco) const
fixed size matrix
const HGCalParameters * hgpar_
int maxCells(bool reco) const
int HGCalDDDConstants::maxCells ( int  lay,
bool  reco 
) const

Definition at line 612 of file HGCalDDDConstants.cc.

References HGCalParameters::cellCoarseX_, HGCalParameters::cellFineX_, HGCalParameters::defineFull_, getIndex(), HGCalGeometryMode::Hexagon, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, HGCalGeometryMode::HexagonFull, hgpar_, gen::k, SiStripPI::max, mode_, N, HGCalParameters::nCellsCoarse_, HGCalParameters::nCellsFine_, HGCalParameters::nPhiBinBH_, HGCalGeometryMode::Trapezoid, HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), waferInLayerTest(), HGCalParameters::waferTypeL_, HGCalParameters::waferTypeT_, HGCalWaferIndex::waferU(), and HGCalWaferIndex::waferV().

612  {
613 
614  const auto & index = getIndex(lay, reco);
615  if (index.first < 0) return 0;
618  unsigned int cells(0);
619  for (unsigned int k=0; k<hgpar_->waferTypeT_.size(); ++k) {
620  if (waferInLayerTest(k,index.first,hgpar_->defineFull_)) {
621  unsigned int cell = (hgpar_->waferTypeT_[k]==1) ?
622  (hgpar_->cellFineX_.size()) : (hgpar_->cellCoarseX_.size());
623  if (cell > cells) cells = cell;
624  }
625  }
626  return (int)(cells);
627  } else if ((mode_ == HGCalGeometryMode::Hexagon8) ||
629  int cells(0);
630  for (unsigned int k=0; k<hgpar_->waferCopy_.size(); ++k) {
631  if (waferInLayerTest(k,index.first,hgpar_->defineFull_)) {
633  int type = ((itr == hgpar_->typesInLayers_.end()) ? 2 :
634  hgpar_->waferTypeL_[itr->second]);
635  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
636  cells = std::max(cells,3*N*N);
637  }
638  }
639  return cells;
640  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
641  return hgpar_->nPhiBinBH_[index.first];
642  } else {
643  return 0;
644  }
645 }
type
Definition: HCALResponse.h:21
static int32_t waferV(const int32_t index)
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
bool waferInLayerTest(int wafer, int lay, bool full) const
HGCalGeometryMode::GeometryMode mode_
std::vector< int > nPhiBinBH_
std::vector< double > cellCoarseX_
std::pair< int, float > getIndex(int lay, bool reco) const
static int32_t waferU(const int32_t index)
int k[5][pyjets_maxn]
#define N
Definition: blowfish.cc:9
std::vector< double > cellFineX_
wafer_map typesInLayers_
fixed size matrix
std::vector< int > waferCopy_
std::vector< int > waferTypeT_
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
int HGCalDDDConstants::maxCellUV ( ) const
inline
int HGCalDDDConstants::maxModules ( ) const
inline

Definition at line 79 of file HGCalDDDConstants.h.

References modHalf_.

79 {return modHalf_;}
int HGCalDDDConstants::maxMoudlesPerLayer ( ) const
inline

Definition at line 80 of file HGCalDDDConstants.h.

References maxRows(), and maxWafersPerLayer_.

80 {return maxWafersPerLayer_;}
int HGCalDDDConstants::maxRows ( int  lay,
bool  reco 
) const

Definition at line 647 of file HGCalDDDConstants.cc.

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

Referenced by maxMoudlesPerLayer().

647  {
648 
649  int kymax(0);
650  const auto & index = getIndex(lay, reco);
651  int i = index.first;
652  if (i < 0) return kymax;
655  for (unsigned int k=0; k<hgpar_->waferCopy_.size(); ++k) {
657  int ky = ((hgpar_->waferCopy_[k])/100)%100;
658  if (ky > kymax) kymax = ky;
659  }
660  }
661  } else if ((mode_ == HGCalGeometryMode::Hexagon8) ||
663  kymax = 1+2*hgpar_->waferUVMaxLayer_[index.first];
664  }
665  return kymax;
666 }
bool waferInLayerTest(int wafer, int lay, bool full) const
HGCalGeometryMode::GeometryMode mode_
std::vector< int > waferUVMaxLayer_
std::pair< int, float > getIndex(int lay, bool reco) const
int k[5][pyjets_maxn]
fixed size matrix
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
double HGCalDDDConstants::minSlope ( ) const
inline
int HGCalDDDConstants::modules ( int  lay,
bool  reco 
) const

Definition at line 668 of file HGCalDDDConstants.cc.

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

Referenced by minSlope(), and wafers().

668  {
669  if (getIndex(lay,reco).first < 0) return 0;
670  else return max_modules_layer_[(int)reco][lay];
671 }
Simrecovecs max_modules_layer_
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
int HGCalDDDConstants::modulesInit ( int  lay,
bool  reco 
) const

Definition at line 673 of file HGCalDDDConstants.cc.

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

Referenced by HGCalDDDConstants(), and minSlope().

673  {
674  int nmod(0);
675  const auto & index = getIndex(lay, reco);
676  if (index.first < 0) return nmod;
678  for (unsigned int k=0; k<hgpar_->waferPosX_.size(); ++k) {
679  if (waferInLayerTest(k,index.first,hgpar_->defineFull_)) ++nmod;
680  }
681  } else {
682  nmod = 1+hgpar_->lastModule_[index.first]-hgpar_->firstModule_[index.first];
683  }
684  return nmod;
685 }
bool waferInLayerTest(int wafer, int lay, bool full) const
HGCalGeometryMode::GeometryMode mode_
std::vector< int > firstModule_
std::pair< int, float > getIndex(int lay, bool reco) const
int k[5][pyjets_maxn]
std::vector< int > lastModule_
fixed size matrix
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
double HGCalDDDConstants::mouseBite ( bool  reco) const

Definition at line 687 of file HGCalDDDConstants.cc.

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

Referenced by minSlope(), and HGCalSD::update().

687  {
688 
690 }
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
int HGCalDDDConstants::numberCells ( bool  reco) const

Definition at line 692 of file HGCalDDDConstants.cc.

References HGCalParameters::depth_, hgpar_, gen::k, HGCalParameters::layer_, and trackingPlots::reco.

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

692  {
693 
694  int cells(0);
695  unsigned int nlayer = (reco) ? hgpar_->depth_.size() : hgpar_->layer_.size();
696  for (unsigned k=0; k<nlayer; ++k) {
697  std::vector<int> ncells = numberCells(((reco) ? hgpar_->depth_[k] : hgpar_->layer_[k]), reco);
698  cells = std::accumulate(ncells.begin(),ncells.end(),cells);
699  }
700  return cells;
701 }
std::vector< int > layer_
std::vector< int > depth_
int k[5][pyjets_maxn]
int numberCells(bool reco) const
fixed size matrix
const HGCalParameters * hgpar_
std::vector< int > HGCalDDDConstants::numberCells ( int  lay,
bool  reco 
) const

Definition at line 703 of file HGCalDDDConstants.cc.

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

703  {
704 
705  const auto & index = getIndex(lay, reco);
706  int i = index.first;
707  std::vector<int> ncell;
708  if (i >= 0) {
711  for (unsigned int k=0; k<hgpar_->waferTypeT_.size(); ++k) {
713  unsigned int cell = (hgpar_->waferTypeT_[k]==1) ?
714  (hgpar_->cellFineX_.size()) : (hgpar_->cellCoarseX_.size());
715  ncell.emplace_back((int)(cell));
716  }
717  }
718  } else if (mode_ == HGCalGeometryMode::Trapezoid) {
719  int nphi = hgpar_->nPhiBinBH_[i];
720  for (int k=hgpar_->firstModule_[i]; k<=hgpar_->lastModule_[i]; ++k)
721  ncell.emplace_back(nphi);
722  } else {
723  for (unsigned int k=0; k<hgpar_->waferCopy_.size(); ++k) {
724  if (waferInLayerTest(k,index.first,hgpar_->defineFull_)) {
725  int cell = numberCellsHexagon(lay,
728  true);
729  ncell.emplace_back(cell);
730  }
731  }
732  }
733  }
734  return ncell;
735 }
static int32_t waferV(const int32_t index)
bool waferInLayerTest(int wafer, int lay, bool full) const
HGCalGeometryMode::GeometryMode mode_
std::vector< int > nPhiBinBH_
std::vector< double > cellCoarseX_
std::vector< int > firstModule_
int numberCellsHexagon(int wafer) const
std::pair< int, float > getIndex(int lay, bool reco) const
static int32_t waferU(const int32_t index)
int k[5][pyjets_maxn]
std::vector< double > cellFineX_
fixed size matrix
std::vector< int > waferCopy_
std::vector< int > waferTypeT_
const HGCalParameters * hgpar_
int HGCalDDDConstants::numberCellsHexagon ( int  wafer) const

Definition at line 737 of file HGCalDDDConstants.cc.

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

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

737  {
738 
739  if (wafer >= 0 && wafer < (int)(hgpar_->waferTypeT_.size())) {
740  if (hgpar_->waferTypeT_[wafer]==1)
741  return (int)(hgpar_->cellFineX_.size());
742  else
743  return (int)(hgpar_->cellCoarseX_.size());
744  } else {
745  return 0;
746  }
747 }
std::vector< double > cellCoarseX_
std::vector< double > cellFineX_
std::vector< int > waferTypeT_
const HGCalParameters * hgpar_
int HGCalDDDConstants::numberCellsHexagon ( int  lay,
int  waferU,
int  waferV,
bool  flag 
) const

Definition at line 749 of file HGCalDDDConstants.cc.

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

750  {
751  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(lay,waferU,waferV));
752  int type = ((itr == hgpar_->typesInLayers_.end()) ? 2 :
753  hgpar_->waferTypeL_[itr->second]);
754  int N = (type == 0) ? hgpar_->nCellsFine_ : hgpar_->nCellsCoarse_;
755  if (flag) return (3*N*N);
756  else return N;
757 }
type
Definition: HCALResponse.h:21
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
#define N
Definition: blowfish.cc:9
wafer_map typesInLayers_
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
std::pair< int, int > HGCalDDDConstants::rowColumnWafer ( const int  wafer) const

Definition at line 759 of file HGCalDDDConstants.cc.

References cuy::col, popcon2dropbox::copy(), hgpar_, and HGCalParameters::waferCopy_.

Referenced by minSlope().

759  {
760  int row(0), col(0);
761  if (wafer < (int)(hgpar_->waferCopy_.size())) {
762  int copy = hgpar_->waferCopy_[wafer];
763  col = copy%100;
764  if ((copy/10000)%10 != 0) col = -col;
765  row = (copy/100)%100;
766  if ((copy/100000)%10 != 0) row = -row;
767  }
768  return std::make_pair(row,col);
769 }
def copy(args, dbName)
std::vector< int > waferCopy_
col
Definition: cuy.py:1009
const HGCalParameters * hgpar_
int HGCalDDDConstants::scintType ( const float  dPhi) const
inline

Definition at line 92 of file HGCalDDDConstants.h.

References dPhiMin.

Referenced by assignCellTrap().

93  { return ((dPhi < dPhiMin) ? 0 : 1); }
int HGCalDDDConstants::sectors ( ) const
inline
std::pair< int, int > HGCalDDDConstants::simToReco ( int  cell,
int  layer,
int  mod,
bool  half 
) const

Definition at line 771 of file HGCalDDDConstants.cc.

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

Referenced by HGCalTimingAnalyzer::analyzeSimHits(), HGCalTBAnalyzer::analyzeSimHits(), CaloParticleDebugger::fillSimHits(), CaloTruthAccumulator::fillSimHits(), HGCalTriggerBackend::HGCalTriggerSimCluster< FECODEC, DATA >::run(), sectors(), HGCalTriggerNtupleHGCTriggerCells::simhits(), and HGCalTriggerNtupleHGCDigis::simhits().

772  {
773 
776  return std::make_pair(cell,lay);
777  } else {
778  const auto & index = getIndex(lay, false);
779  int i = index.first;
780  if (i < 0) {
781  edm::LogWarning("HGCalGeom") << "Wrong Layer # " << lay
782  << " not in the list ***** ERROR *****";
783  return std::make_pair(-1,-1);
784  }
785  if (mod >= (int)(hgpar_->waferTypeL_).size()) {
786  edm::LogWarning("HGCalGeom") << "Invalid Wafer # " << mod
787  << "should be < "
788  << (hgpar_->waferTypeL_).size()
789  << " ***** ERROR *****";
790  return std::make_pair(-1,-1);
791  }
792  int depth(-1);
793  int kx = cell;
794  int type = hgpar_->waferTypeL_[mod];
795  if (type == 1) {
797  } else if (type == 2) {
799  } else {
801  }
802  return std::make_pair(kx,depth);
803  }
804 }
size
Write out results.
type
Definition: HCALResponse.h:21
std::vector< int > layerGroupM_
HGCalGeometryMode::GeometryMode mode_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< int > layerGroup_
std::vector< int > layerGroupO_
const HGCalParameters * hgpar_
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
std::vector< int > waferTypeL_
unsigned int HGCalDDDConstants::volumes ( ) const
inline
int HGCalDDDConstants::waferCount ( const int  type) const
inline

Definition at line 107 of file HGCalDDDConstants.h.

References waferMax_.

107 {return ((type == 0) ? waferMax_[2] : waferMax_[3]);}
type
Definition: HCALResponse.h:21
std::array< int, 4 > waferMax_
int HGCalDDDConstants::waferFromCopy ( int  copy) const

Definition at line 806 of file HGCalDDDConstants.cc.

References hgpar_, gen::k, mps_fire::result, and HGCalParameters::waferCopy_.

Referenced by HGCNumberingScheme::getUnitID(), and volumes().

806  {
807  const int ncopies = hgpar_->waferCopy_.size();
808  int wafer(ncopies);
809  bool result(false);
810  for (int k=0; k<ncopies; ++k) {
811  if (copy == hgpar_->waferCopy_[k]) {
812  wafer = k;
813  result = true;
814  break;
815  }
816  }
817  if (!result) {
818  wafer = -1;
819 #ifdef EDM_ML_DEBUG
820  edm::LogVerbatim("HGCalGeom") << "Cannot find " << copy << " in a list of "
821  << ncopies << " members";
822  for (int k=0; k<ncopies; ++k)
823  edm::LogVerbatim("HGCalGeom") << "[" << k << "] " << hgpar_->waferCopy_[k];
824 #endif
825  }
826  return wafer;
827 }
def copy(args, dbName)
int k[5][pyjets_maxn]
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
void HGCalDDDConstants::waferFromPosition ( const double  x,
const double  y,
int &  wafer,
int &  icell,
int &  celltyp 
) const

Definition at line 829 of file HGCalDDDConstants.cc.

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

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

831  {
832  //Input x, y in Geant4 unit and transformed to CMSSW standard
835  int size_ = (int)(hgpar_->waferCopy_.size());
836  wafer = size_;
837  for (int k=0; k<size_; ++k) {
838  double dx = std::abs(xx-hgpar_->waferPosX_[k]);
839  double dy = std::abs(yy-hgpar_->waferPosY_[k]);
840  if (dx <= rmax_ && dy <= hexside_) {
841  if ((dy <= 0.5*hexside_) || (dx*tan30deg_ <= (hexside_-dy))) {
842  wafer = k;
843  celltyp = hgpar_->waferTypeT_[k];
844  xx -= hgpar_->waferPosX_[k];
845  yy -= hgpar_->waferPosY_[k];
846  break;
847  }
848  }
849  }
850  if (wafer < size_) {
851  if (celltyp == 1)
852  icell = cellHex(xx, yy, 0.5*HGCalParameters::k_ScaleFromDDD*hgpar_->cellSize_[0],
854  else
857  } else {
858  wafer = -1;
859 #ifdef EDM_ML_DEBUG
860  edm::LogWarning("HGCalGeom") << "Cannot get wafer type corresponding to "
861  << x << ":" << y << " " << xx << ":" << yy;
862 #endif
863  }
864 #ifdef EDM_ML_DEBUG
865  edm::LogVerbatim("HGCalGeom") << "Position " << x << ":" << y << " Wafer "
866  << wafer << ":" << size_ << " XX " << xx << ":"
867  << yy << " Cell " << icell << " Type " << celltyp;
868 #endif
869 }
std::vector< double > waferPosY_
std::vector< double > cellFineY_
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
std::vector< double > cellCoarseX_
std::vector< double > cellSize_
static double k_ScaleFromDDD
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int k[5][pyjets_maxn]
std::vector< double > cellFineX_
std::vector< int > waferCopy_
std::vector< int > waferTypeT_
std::vector< double > cellCoarseY_
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
static double tan30deg_
void HGCalDDDConstants::waferFromPosition ( const double  x,
const double  y,
const int  layer,
int &  waferU,
int &  waferV,
int &  cellU,
int &  cellV,
int &  celltype,
double &  wt 
) const

Definition at line 871 of file HGCalDDDConstants.cc.

References funct::abs(), cellHex(), HGCalParameters::cellThickness_, PVValHelper::dx, PVValHelper::dy, hexside_, hgpar_, gen::k, HGCalParameters::k_ScaleFromDDD, HGCalParameters::nCellsFine_, rmax_, tan30deg_, HGCalParameters::typesInLayers_, HGCalParameters::waferCopy_, HGCalWaferIndex::waferIndex(), HGCalParameters::waferPosX_, HGCalParameters::waferPosY_, HGCalParameters::waferThick_, HGCalParameters::waferTypeL_, HGCalWaferIndex::waferU(), HGCalParameters::waferUVMax_, HGCalWaferIndex::waferV(), globals_cff::x1, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

874  {
875 
878  waferU = waferV = 1+hgpar_->waferUVMax_;
879  for (unsigned int k=0; k<hgpar_->waferPosX_.size(); ++k) {
880  double dx = std::abs(xx-hgpar_->waferPosX_[k]);
881  double dy = std::abs(yy-hgpar_->waferPosY_[k]);
882  if (dx <= rmax_ && dy <= hexside_) {
883  if ((dy <= 0.5*hexside_) || (dx*tan30deg_ <= (hexside_-dy))) {
886  auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer,waferU,waferV));
887  celltype = ((itr == hgpar_->typesInLayers_.end()) ? 2 :
888  hgpar_->waferTypeL_[itr->second]);
889  xx -= hgpar_->waferPosX_[k];
890  yy -= hgpar_->waferPosY_[k];
891  break;
892  }
893  }
894  }
895  if (std::abs(waferU) <= hgpar_->waferUVMax_) {
896  cellHex(xx, yy, celltype, cellU, cellV);
897  wt = ((celltype < 2) ?
898  (hgpar_->cellThickness_[celltype]/hgpar_->waferThick_) : 1.0);
899  } else {
900  cellU = cellV = 2*hgpar_->nCellsFine_;
901  wt = 1.0;
902  celltype =-1;
903  }
904 #ifdef EDM_ML_DEBUG
905  if (celltype < 0) {
908  edm::LogVerbatim("HGCalGeom") << "waferFromPosition: Bad type for X "
909  << x << ":" << x1 << ":" << xx << " Y " << y
910  << ":" << y1 << ":" << yy << " Wafer "
911  << waferU << ":" << waferV << " Cell "
912  << cellU << ":" << cellV;
913  for (unsigned int k=0; k<hgpar_->waferPosX_.size(); ++k) {
914  double dx = std::abs(x1-hgpar_->waferPosX_[k]);
915  double dy = std::abs(y1-hgpar_->waferPosY_[k]);
916  edm::LogVerbatim("HGCalGeom") << "Wafer [" << k << "] Position ("
917  << hgpar_->waferPosX_[k] << ", "
918  << hgpar_->waferPosY_[k] << ") difference "
919  << dx << ":" << dy << ":" << dx*tan30deg_
920  << ":" << hexside_-dy << " Paramerers "
921  << rmax_ << ":" << hexside_;
922  }
923  }
924 #endif
925 }
std::vector< double > waferPosY_
static int32_t waferV(const int32_t index)
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
static double k_ScaleFromDDD
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static int32_t waferU(const int32_t index)
int k[5][pyjets_maxn]
std::vector< double > cellThickness_
wafer_map typesInLayers_
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
std::vector< int > waferTypeL_
static double tan30deg_
bool HGCalDDDConstants::waferFullInLayer ( int  wafer,
int  lay,
bool  reco 
) const

Definition at line 934 of file HGCalDDDConstants.cc.

References getIndex(), and waferInLayerTest().

Referenced by volumes().

934  {
935  const auto & indx = getIndex(lay, reco);
936  if (indx.first < 0) return false;
937  return waferInLayerTest(wafer,indx.first,false);
938 }
bool waferInLayerTest(int wafer, int lay, bool full) const
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
bool HGCalDDDConstants::waferInLayer ( int  wafer,
int  lay,
bool  reco 
) const

Definition at line 927 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), HGCalGeometry::getSummary(), HGCalDDDConstants(), and volumes().

927  {
928 
929  const auto & indx = getIndex(lay, reco);
930  if (indx.first < 0) return false;
931  return waferInLayerTest(wafer,indx.first,hgpar_->defineFull_);
932 }
bool waferInLayerTest(int wafer, int lay, bool full) const
std::pair< int, float > getIndex(int lay, bool reco) const
fixed size matrix
const HGCalParameters * hgpar_
bool HGCalDDDConstants::waferInLayerTest ( int  wafer,
int  lay,
bool  full 
) const
private

Definition at line 1120 of file HGCalDDDConstants.cc.

References hexside_, hgpar_, recoMuon::in, gen::k, HGCalParameters::k_CornerSize, rmax_, HGCalParameters::rMaxLayHex_, HGCalParameters::rMinLayHex_, mathSSE::sqrt(), HGCalParameters::waferPosX_, and HGCalParameters::waferPosY_.

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

1120  {
1121 
1122  const double waferX = hgpar_->waferPosX_[wafer];
1123  const double waferY = hgpar_->waferPosY_[wafer];
1125  xc[0] = waferX+rmax_; yc[0] = waferY-0.5*hexside_;
1126  xc[1] = waferX+rmax_; yc[1] = waferY+0.5*hexside_;
1127  xc[2] = waferX; yc[2] = waferY+hexside_;
1128  xc[3] = waferX-rmax_; yc[3] = waferY+0.5*hexside_;
1129  xc[4] = waferX+rmax_; yc[4] = waferY-0.5*hexside_;
1130  xc[5] = waferX; yc[5] = waferY-hexside_;
1131  bool cornerOne(false), cornerAll(true);
1132  for (unsigned int k=0; k<HGCalParameters::k_CornerSize; ++k) {
1133  double rpos = std::sqrt(xc[k]*xc[k]+yc[k]*yc[k]);
1134  if ((rpos >= hgpar_->rMinLayHex_[lay]) &&
1135  (rpos <= hgpar_->rMaxLayHex_[lay])) cornerOne = true;
1136  else cornerAll = false;
1137  }
1138  bool in = full ? cornerOne : cornerAll;
1139 #ifdef EDM_ML_DEBUG
1140  edm::LogVerbatim("HGCalGeom") << "WaferInLayerTest: Layer " << lay
1141  << " wafer " << wafer << " R-limits "
1142  << hgpar_->rMinLayHex_[lay] << ":"
1143  << hgpar_->rMaxLayHex_[lay] << " Corners "
1144  << cornerOne << ":" << cornerAll << " In "
1145  << in;
1146 #endif
1147  return in;
1148 }
std::vector< double > waferPosY_
T sqrt(T t)
Definition: SSEVec.h:18
Definition: GenABIO.cc:180
std::vector< double > rMinLayHex_
int k[5][pyjets_maxn]
std::vector< double > rMaxLayHex_
static uint32_t k_CornerSize
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
int HGCalDDDConstants::waferMax ( ) const
inline

Definition at line 108 of file HGCalDDDConstants.h.

References waferMax_.

108 {return waferMax_[1];}
std::array< int, 4 > waferMax_
int HGCalDDDConstants::waferMin ( ) const
inline

Definition at line 109 of file HGCalDDDConstants.h.

References waferMax_, and waferPosition().

109 {return waferMax_[0];}
std::array< int, 4 > waferMax_
std::pair< double, double > HGCalDDDConstants::waferPosition ( int  wafer,
bool  reco 
) const

Definition at line 940 of file HGCalDDDConstants.cc.

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

Referenced by HGCalGeometryLoader::build(), HGCMouseBite::exclude(), locateCell(), and waferMin().

941  {
942 
943  double xx(0), yy(0);
944  if (wafer >= 0 && wafer < (int)(hgpar_->waferPosX_.size())) {
945  xx = hgpar_->waferPosX_[wafer];
946  yy = hgpar_->waferPosY_[wafer];
947  }
948  if (!reco) {
951  }
952  return std::make_pair(xx,yy);
953 }
std::vector< double > waferPosY_
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
std::pair< double, double > HGCalDDDConstants::waferPosition ( int  waferU,
int  waferV,
bool  reco 
) const

Definition at line 955 of file HGCalDDDConstants.cc.

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

957  {
958 
959  double xx(0), yy(0);
960  int indx = HGCalWaferIndex::waferIndex(0,waferU,waferV);
961  auto itr = hgpar_->wafersInLayers_.find(indx);
962  if (itr != hgpar_->wafersInLayers_.end()) {
963  xx = hgpar_->waferPosX_[itr->second];
964  yy = hgpar_->waferPosY_[itr->second];
965  }
966  if (!reco) {
969  }
970  return std::make_pair(xx,yy);
971 }
std::vector< double > waferPosY_
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV)
wafer_map wafersInLayers_
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
int HGCalDDDConstants::wafers ( ) const

Definition at line 993 of file HGCalDDDConstants.cc.

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

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

993  {
994 
995  int wafer(0);
997  for (unsigned int i = 0; i<layers(true); ++i) {
998  int lay = hgpar_->depth_[i];
999  wafer += modules(lay, true);
1000  }
1001  } else {
1002  wafer = (int)(hgpar_->moduleLayR_.size());
1003  }
1004  return wafer;
1005 }
std::vector< int > depth_
std::vector< int > moduleLayR_
HGCalGeometryMode::GeometryMode mode_
int modules(int lay, bool reco) const
unsigned int layers(bool reco) const
const HGCalParameters * hgpar_
int HGCalDDDConstants::wafers ( int  layer,
int  type 
) const

Definition at line 1007 of file HGCalDDDConstants.cc.

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

1007  {
1008 
1009  int wafer(0);
1011  auto itr = waferLayer_.find(layer);
1012  if (itr != waferLayer_.end()) {
1013  unsigned ity = (type > 0 && type <= 2) ? type : 0;
1014  wafer = (itr->second)[ity];
1015  }
1016  } else {
1017  const auto & index = getIndex(layer, true);
1018  wafer = 1+hgpar_->lastModule_[index.first]-hgpar_->firstModule_[index.first];
1019  }
1020  return wafer;
1021 }
type
Definition: HCALResponse.h:21
std::map< int, HGCWaferParam > waferLayer_
HGCalGeometryMode::GeometryMode mode_
std::vector< int > firstModule_
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< int > lastModule_
const HGCalParameters * hgpar_
double HGCalDDDConstants::waferSepar ( bool  reco) const
inline
double HGCalDDDConstants::waferSize ( bool  reco) const
inline

Definition at line 113 of file HGCalDDDConstants.h.

References hgpar_, HGCalParameters::k_ScaleToDDD, wafers(), and HGCalParameters::waferSize_.

Referenced by HGCalSD::update().

static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_
int HGCalDDDConstants::waferToCopy ( int  wafer) const
inline

Definition at line 116 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::waferCopy_.

116 {return ((wafer>=0)&&(wafer< (int)(hgpar_->waferCopy_.size()))) ? hgpar_->waferCopy_[wafer] : (int)(hgpar_->waferCopy_.size());}
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
int HGCalDDDConstants::waferType ( DetId const &  id) const
int HGCalDDDConstants::waferTypeL ( int  wafer) const
inline

Definition at line 120 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::waferTypeL_.

Referenced by HGCalTriggerNtupleHGCTriggerCells::fill(), HGCalTriggerCellThresholdCodecImpl::triggerCellSums(), HGCalTriggerCellBestChoiceCodecImpl::triggerCellSums(), and waferType().

120 {return ((wafer>=0)&&(wafer<(int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;}
const HGCalParameters * hgpar_
std::vector< int > waferTypeL_
int HGCalDDDConstants::waferTypeT ( int  wafer) const
inline
int HGCalDDDConstants::waferUVMax ( ) const
inline
double HGCalDDDConstants::waferZ ( int  layer,
bool  reco 
) const

Definition at line 986 of file HGCalDDDConstants.cc.

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

Referenced by HGCalSimHitValidation::analyzeHits(), HGCalTBAnalyzer::analyzeRecHits(), HGCalTBAnalyzer::analyzeSimHits(), HGCalTriggerTools::getLayerZ(), and waferUVMax().

986  {
987  const auto & index = getIndex(lay, reco);
988  if (index.first < 0) return 0;
989  else return (reco ? hgpar_->zLayerHex_[index.first] :
991 }
std::pair< int, float > getIndex(int lay, bool reco) const
std::vector< double > zLayerHex_
static double k_ScaleToDDD
fixed size matrix
const HGCalParameters * hgpar_

Member Data Documentation

const float HGCalDDDConstants::dPhiMin = 0.02
private

Definition at line 136 of file HGCalDDDConstants.h.

Referenced by scintType().

double HGCalDDDConstants::hexside_
private
const HGCalParameters* HGCalDDDConstants::hgpar_
private
const double HGCalDDDConstants::k_horizontalShift = 1.0
private

Definition at line 135 of file HGCalDDDConstants.h.

Simrecovecs HGCalDDDConstants::max_modules_layer_
private

Definition at line 146 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and modules().

int32_t HGCalDDDConstants::maxWafersPerLayer_
private

Definition at line 147 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxMoudlesPerLayer().

HGCalGeometryMode::GeometryMode HGCalDDDConstants::mode_
private
int32_t HGCalDDDConstants::modHalf_
private

Definition at line 144 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and maxModules().

double HGCalDDDConstants::rmax_
private
const double HGCalDDDConstants::sqrt3_
private

Definition at line 141 of file HGCalDDDConstants.h.

Referenced by cellHex(), and distFromEdgeHex().

double HGCalDDDConstants::tan30deg_ = 0.5773502693
staticprivate
std::array<uint32_t,2> HGCalDDDConstants::tot_layers_
private

Definition at line 145 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and layers().

int32_t HGCalDDDConstants::tot_wafers_
private

Definition at line 144 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants().

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

Definition at line 150 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and isValidHex8().

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

Definition at line 148 of file HGCalDDDConstants.h.

Referenced by HGCalDDDConstants(), and wafers().

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

Definition at line 149 of file HGCalDDDConstants.h.

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