10 #include "CLHEP/Units/GlobalSystemOfUnits.h" 21 const std::vector<std::string> & fvec =
val.strings();
23 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
30 throw cms::Exception(
"HGCalGeom") <<
"Failed to get "<< s <<
" tag";
37 const std::vector<std::string> & fvec =
val.strings();
39 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
46 throw cms::Exception(
"HGCalGeom") <<
"Failed to get "<< s <<
" tag";
60 <<
"names " << name <<
":" << namew <<
":" 61 << namec <<
":" << namet;
75 php.
mode_ = getGeometryMode(
"GeometryMode", sv);
90 attribute =
"OnlyForHGCalNumbering";
92 DDValue val2(attribute, value, 0.0);
98 mode = getGeometryWaferMode(
"WaferMode", sv2);
118 << php.
levelT_[1] <<
" ZSide Level " 124 attribute =
"OnlyForHGCalNumbering";
126 DDValue val2(attribute, value, 0.0);
132 mode = getGeometryWaferMode(
"WaferMode", sv2);
146 <<
" # of cells|size for fine/coarse " 200 }
else if (php.
mode_ == HGCalGeometryMode::Trapezoid) {
212 << php.
levelT_[1] <<
" first layers " 226 <<
" for HGCal " << name <<
":" << namew
229 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name
230 <<
":" << namew <<
":" << namec;
234 <<
" not found but needed.";
236 <<
" 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;
269 indtypes.emplace_back(
id);
278 cellIndex[
id] = ipos;
291 int id = indtypes[
k];
302 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)