11 #include "CLHEP/Units/GlobalSystemOfUnits.h" 22 const std::vector<std::string> & fvec =
val.strings();
24 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
31 throw cms::Exception(
"HGCalGeom") <<
"Failed to get "<< s <<
" tag";
38 const std::vector<std::string> & fvec =
val.strings();
40 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
47 throw cms::Exception(
"HGCalGeom") <<
"Failed to get "<< s <<
" tag";
61 <<
"names " << name <<
":" << namew <<
":" 76 php.
mode_ = getGeometryMode(
"GeometryMode", sv);
88 attribute =
"OnlyForHGCalNumbering";
90 DDValue val2(attribute, value, 0.0);
96 mode = getGeometryWaferMode(
"WaferMode", sv2);
112 attribute =
"OnlyForHGCalNumbering";
114 DDValue val2(attribute, value, 0.0);
120 mode = getGeometryWaferMode(
"WaferMode", sv2);
135 <<
" # of cells|size for fine/coarse " 191 }
else if (php.
mode_ == HGCalGeometryMode::Trapezoid) {
201 << php.
levelT_[1] <<
" EtaMinBH " 214 <<
" for HGCal " << name <<
":" << namew
217 <<
"Unknown Geometry type " << php.
mode_ <<
" for HGCal " << name
218 <<
":" << namew <<
":" << namec;
222 <<
" not found but needed.";
224 <<
" not found but needed.";
228 <<
" with flag " <<
ok;
243 std::vector<int> indtypes;
247 double r = 0.5*
R*
sqrt(3.0);
250 for (
int u=0; u<2*
N; ++u) {
251 for (
int v=0;
v<2*
N; ++
v) {
252 if (((
v-u) < N) && (u-
v) <= N) {
253 double yp = (u-0.5*
v-n2)*2*r;
254 double xp = (1.5*(
v-
N)+1.0)*
R;
257 indtypes.emplace_back(
id);
266 cellIndex[
id] = ipos;
279 int id = indtypes[
k];
290 int id = indtypes[
k];
304 const std::vector<double> & fvec = val.
doubles();
306 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
310 throw cms::Exception(
"HGCalGeom") <<
"Failed to get "<< s <<
" tag";
318 const std::vector<double> & fvec = val.
doubles();
320 throw cms::Exception(
"HGCalGeom") <<
"Failed to get " << s <<
" tag.";
324 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)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
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_
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)