121 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Executing DDHGCalWaferPartialRotated...";
124 static constexpr
double tol = 0.00001;
125 static const double sqrt3 =
std::sqrt(3.0);
127 double R = 2.0 *
r / sqrt3;
131 for (
unsigned int k = 0;
k <
tags_.size(); ++
k) {
135 std::vector<std::pair<double, double> > wxy =
137 std::vector<double> xM, yM;
138 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
139 xM.emplace_back(wxy[
i].
first);
140 yM.emplace_back(wxy[
i].
second);
143 std::vector<double> zx(2, 0), zy(2, 0),
scale(2, 1.0);
149 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferPartialRotated: " << solid.
name() <<
" extruded polygon made of " 150 << matName <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" 151 <<
scale[0] <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" 154 for (
unsigned int j = 0;
j < xM.size(); ++
j)
160 std::vector<double> xL, yL;
161 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
162 xL.emplace_back(wxy[
i].
first);
163 yL.emplace_back(wxy[
i].
second);
165 std::vector<DDLogicalPart> glogs(
materials_.size());
166 std::vector<int> copyNumber(
materials_.size(), 1);
167 double zi(-0.5 *
thick_), thickTot(0.0);
168 for (
unsigned int l = 0;
l <
layers_.size();
l++) {
172 <<
" Copy " << copyNumber[
i];
175 if (copyNumber[
i] == 1) {
190 <<
" extruded polygon made of " << matN <<
" z|x|y|s (0) " <<
zw[0] <<
":" 191 << zx[0] <<
":" << zy[0] <<
":" <<
scale[0] <<
" z|x|y|s (1) " <<
zw[1] <<
":" 195 for (
unsigned int j = 0;
j < xL.size(); ++
j)
206 <<
"DDHGCalWaferPartialRotated: " << solid.
name() <<
" extruded polygon made of " << matN
207 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0] <<
" z|x|y|s (1) " 209 <<
" placement index " <<
placementIndex_[
m] <<
" and " << xL.size() <<
" edges";
210 for (
unsigned int j = 0;
j < xL.size(); ++
j)
220 <<
"DDHGCalWaferPartialRotated: " << glog.
name() <<
" number " <<
copy <<
" positioned in " 221 << glogs[
i].name() <<
" at " << tran <<
" with no rotation";
228 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferPartialRotated: " << glogs[
i].name() <<
" number " 229 << copyNumber[
i] <<
" positioned in " << glogM.
name() <<
" at " << tran0
230 <<
" with no rotation";
238 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" is smaller than " << thickTot
239 <<
": thickness of all its components **** ERROR ****";
241 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" does not match with " << thickTot
242 <<
" of the components";
Log< level::Info, true > LogVerbatim
std::vector< std::string > placementIndexTags_
std::vector< std::string > materials_
std::vector< int > layers_
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.
static std::vector< std::pair< double, double > > waferXY(int part, int orient, int zside, double delX, double delY, double xpos, double ypos)
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< std::string > layerNames_
static std::pair< int32_t, int32_t > cellOrient(int32_t placementIndex)
std::vector< int > layerType_
std::vector< std::string > tags_
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< double > layerThick_
std::vector< int > partialTypes_
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)
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
std::vector< int > placementIndex_