18 const std::vector<std::string>& fvec =
val.strings();
20 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
28 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag";
35 const std::vector<std::string>& fvec =
val.strings();
37 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
45 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag";
57 <<
"HGCalParametersFromDD::build called with " 58 <<
"names " << name <<
":" << namew <<
":" << namec <<
":" << namet;
72 php.
mode_ = getGeometryMode(
"GeometryMode", sv);
87 attribute =
"OnlyForHGCalNumbering";
89 DDValue val2(attribute, value, 0.0);
95 mode = getGeometryWaferMode(
"WaferMode", sv2);
116 <<
" ZSide Level " << php.
levelZSide_ <<
" first layers " 120 attribute =
"OnlyForHGCalNumbering";
122 DDValue val2(attribute, value, 0.0);
128 mode = getGeometryWaferMode(
"WaferMode", sv2);
134 getDDDValue(
"WaferThickness", sv2);
136 getDDDValue(
"SensorSeparation", sv2);
149 <<
" # of cells|size for fine/coarse " << php.
nCellsFine_ <<
":" 156 for (
int k = 0;
k < 2; ++
k) getCellPosition(php,
k);
199 }
else if (php.
mode_ == HGCalGeometryMode::Trapezoid) {
226 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name
227 <<
":" << namew <<
":" << namec;
229 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name
230 <<
":" << namew <<
":" << namec;
234 <<
" Attribute " << val <<
" not found but needed.";
236 <<
"Attribute " << val <<
" not found but needed.";
240 <<
" with flag " <<
ok;
255 std::vector<int> indtypes;
259 double r = 0.5 *
R *
sqrt(3.0);
262 for (
int u = 0; u < 2 *
N; ++u) {
263 for (
int v = 0;
v < 2 *
N; ++
v) {
264 if (((
v - u) < N) && (u -
v) <= N) {
265 double yp = (u - 0.5 *
v - n2) * 2 * r;
266 double xp = (1.5 * (
v -
N) + 1.0) *
R;
267 int id =
v * 100 + u;
269 indtypes.emplace_back(
id);
278 cellIndex[
id] = ipos;
290 <<
"CellPosition for type " << type <<
" for " 293 int id = indtypes[
k];
300 <<
"CellPosition for type " << type <<
" for " << php.
cellFineX_.size()
303 int id = indtypes[
k];
316 const std::vector<double>& fvec = val.
doubles();
318 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
322 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag";
330 const std::vector<double>& fvec = val.
doubles();
332 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
336 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag";
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
T parseString(const std::string &value)
bool build(const DDCompactView *, HGCalParameters &, const std::string &, const std::string &, const std::string &, const std::string &)
void loadSpecParsHexagon(const DDFilteredView &, HGCalParameters &, const DDCompactView *, const std::string &, const std::string &)
std::vector< double > cellFineY_
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
HGCalGeometryMode::GeometryMode mode_
void loadSpecParsHexagon8(const DDFilteredView &, HGCalParameters &)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< double > cellCoarseX_
void loadCellTrapezoid(HGCalParameters &php)
std::vector< double > cellSize_
void loadCellParsHexagon(const DDCompactView *cpv, HGCalParameters &php)
static double k_ScaleFromDDD
Cos< T >::type cos(const T &t)
void loadSpecParsTrapezoid(const DDFilteredView &, HGCalParameters &)
void loadGeometryHexagon8(const DDFilteredView &, HGCalParameters &, int)
void loadWaferHexagon(HGCalParameters &php)
std::unordered_map< int32_t, int32_t > wafer_map
static double k_ScaleToDDD
double getDDDValue(const char *s, const DDsvalues_type &sv)
wafer_map cellCoarseIndex_
DDsvalues_type mergedSpecifics() const
std::vector< double > cellFineX_
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
bool firstChild()
set the current node to the first child ...
std::vector< int > levelT_
std::vector< double > cellCoarseY_
std::vector< double > getDDDArray(const char *s, const DDsvalues_type &sv)
void loadWaferHexagon8(HGCalParameters &php)
void loadGeometryHexagon(const DDFilteredView &, HGCalParameters &, const std::string &, const DDCompactView *, const std::string &, const std::string &, HGCalGeometryMode::WaferMode)
void getCellPosition(HGCalParameters &php, int type)