108 static const double sqrt3 =
std::sqrt(3.0);
110 double RM2 = rM / sqrt3;
112 double r = 0.5 *
R * sqrt3;
114 double R2 =
r2 / sqrt3;
117 std::vector<double> xM = {rM, 0, -rM, -rM, 0, rM};
118 std::vector<double> yM = {RM2, 2 * RM2, RM2, -RM2, -2 * RM2, -RM2};
120 std::vector<double> zx(2, 0), zy(2, 0),
scale(2, 1.0);
127 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferF: " << solid.
name() <<
" extruded polygon made of " << matName
128 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
129 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
130 <<
" and " << xM.size() <<
" edges";
131 for (
unsigned int k = 0;
k < xM.size(); ++
k)
136 std::vector<double> xL = {
r2, 0, -
r2, -
r2, 0,
r2};
137 std::vector<double> yL = {R2, 2 * R2, R2, -R2, -2 * R2, -R2};
138 std::vector<DDLogicalPart> glogs(
materials_.size());
139 double zi(-0.5 *
thick_), thickTot(0.0);
140 for (
unsigned int l = 0;
l <
layers_.size();
l++) {
155 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferF: " << solid.
name() <<
" extruded polygon made of " << matN
156 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
157 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
158 <<
" and " << xL.size() <<
" edges";
159 for (
unsigned int k = 0;
k < xL.size(); ++
k)
168 <<
" positioned in " << glogM.
name() <<
" at " << tran0 <<
" with no rotation";
175 double y0 = (
cellType_ >= 3) ? 0.5 : 0.0;
180 for (
int u = 0; u < 2 *
nCells_; ++u) {
186 double yp = (u - 0.5 *
v - n2 + y0) * 2 *
r;
187 double xp = (1.5 * (
v -
nCells_) + x0) *
R;
189 if ((u == 0) && (
v == 0))
191 else if ((u == 0) && (
v ==
nCells_ - voff))
199 else if ((u == (
nCells_ - uoff)) && (
v == 0))
203 else if ((
v - u) == (
nCells_ - voff))
207 else if (u == (2 *
nCells_ - 1))
209 else if ((u -
v) == (
nCells_ - uoff))
220 <<
"DDHGCalWaferF: " <<
cellNames_[cell] <<
" number " <<
copy <<
" positioned in " << glogs[
i].name()
221 <<
" at " << tran <<
" with no rotation";
229 edm::LogVerbatim(
"HGCalGeom") <<
"\nDDHGCalWaferF::Counter : " <<
counter <<
"\n===============================\n";
233 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" is smaller than " << thickTot
234 <<
": thickness of all its components **** ERROR ****";
236 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" does not match with " << thickTot
237 <<
" of the components";
Log< level::Info, true > LogVerbatim
static int32_t packCellTypeUV(int type, int u, int v)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
DDMaterial is used to define and access material information.
std::vector< int > layerType_
DDName is used to identify DDD entities uniquely.
Log< level::Error, false > LogError
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
std::vector< double > layerThick_
std::vector< int > layers_
std::vector< std::string > materials_
std::vector< std::string > cellNames_
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< int > copyNumber_
static DDSolid extrudedpolygon(const DDName &name, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::vector< double > &zx, const std::vector< double > &zy, const std::vector< double > &zscale)
static std::atomic< unsigned int > counter
std::vector< std::string > layerNames_
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Log< level::Warning, false > LogWarning
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation