61 thick_ = nArgs[
"ModuleThickness"];
70 tags_ = vsArgs[
"Tags"];
75 for (
unsigned int k = 0;
k <
tags_.size(); ++
k)
91 std::ostringstream st1;
92 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
98 senseType_ =
static_cast<int>(nArgs[
"SenseType"]);
99 posSense_ =
static_cast<int>(nArgs[
"PosSensitive"]);
108 static constexpr
double tol = 0.00001;
109 static const double sqrt3 =
std::sqrt(3.0);
111 double R = 2.0 *
r / sqrt3;
115 for (
unsigned int k = 0;
k <
tags_.size(); ++
k) {
118 std::vector<std::pair<double, double> > wxy =
120 std::vector<double> xM, yM;
121 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
122 xM.emplace_back(wxy[
i].
first);
123 yM.emplace_back(wxy[
i].
second);
126 std::vector<double> zx(2, 0), zy(2, 0),
scale(2, 1.0);
132 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matName
133 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
134 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
136 << xM.size() <<
" edges";
137 for (
unsigned int j = 0;
j < xM.size(); ++
j)
143 std::vector<double> xL, yL;
144 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
145 xL.emplace_back(wxy[
i].
first);
146 yL.emplace_back(wxy[
i].
second);
148 std::vector<DDLogicalPart> glogs(
materials_.size());
149 std::vector<int> copyNumber(
materials_.size(), 1);
150 double zi(-0.5 *
thick_), thickTot(0.0);
151 for (
unsigned int l = 0;
l <
layers_.size();
l++) {
158 if (copyNumber[
i] == 1) {
172 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matN
173 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
174 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
176 <<
" and " << xL.size() <<
" edges";
177 for (
unsigned int j = 0;
j < xL.size(); ++
j)
187 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matN
188 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
189 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
191 <<
" and " << xL.size() <<
" edges";
192 for (
unsigned int j = 0;
j < xL.size(); ++
j)
201 << glogs[
i].name() <<
" at " << tran <<
" with no rotation";
208 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << glogs[
i].name() <<
" number " << copyNumber[
i]
209 <<
" positioned in " << glogM.
name() <<
" at " << tran0 <<
" with no rotation";
217 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" is smaller than " << thickTot
218 <<
": thickness of all its components **** ERROR ****";
220 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" does not match with " << thickTot
221 <<
" of the components";
Log< level::Info, true > LogVerbatim
std::vector< int > orientations_
std::vector< int > layerType_
std::vector< int > partialTypes_
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
std::vector< std::string > tags_
std::vector< std::string > layerNames_
DDMaterial is used to define and access material information.
void execute(DDCompactView &cpv) override
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.
static std::string & ns()
Log< level::Error, false > LogError
Compact representation of the geometrical detector hierarchy.
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 > materials_
std::vector< int > layers_
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
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)
std::vector< double > layerThick_
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
#define DEFINE_EDM_PLUGIN(factory, type, name)
Log< level::Warning, false > LogWarning
~DDHGCalWaferP() override=default
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation