65 thick_ = nArgs[
"ModuleThickness"];
66 waferMode_ =
static_cast<int>(nArgs[
"WaferMode"]);
76 tags_ = vsArgs[
"Tags"];
81 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferPartialRotated: " <<
tags_.size() <<
" variations of wafer types";
82 for (
unsigned int k = 0;
k <
tags_.size(); ++
k) {
103 std::ostringstream st1;
104 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
110 senseType_ =
static_cast<int>(nArgs[
"SenseType"]);
120 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Executing DDHGCalWaferPartialRotated...";
127 for (
unsigned int k = 0;
k <
tags_.size(); ++
k) {
131 std::vector<std::pair<double, double> > wxy =
133 std::vector<double> xM, yM;
134 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
135 xM.emplace_back(wxy[
i].
first);
136 yM.emplace_back(wxy[
i].
second);
139 std::vector<double> zx(2, 0), zy(2, 0),
scale(2, 1.0);
145 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferPartialRotated: " << solid.
name() <<
" extruded polygon made of " 146 << matName <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" 147 <<
scale[0] <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" 150 for (
unsigned int j = 0;
j < xM.size(); ++
j)
155 std::vector<DDLogicalPart> glogs(
materials_.size());
156 std::vector<int> copyNumber(
materials_.size(), 1);
157 double zi(-0.5 *
thick_), thickTot(0.0);
158 for (
unsigned int l = 0;
l <
layers_.size();
l++) {
162 std::vector<double> xL, yL;
163 for (
unsigned int i0 = 0; i0 < (wxy.size() - 1); ++i0) {
164 xL.emplace_back(wxy[i0].
first);
165 yL.emplace_back(wxy[i0].
second);
173 if (copyNumber[
i] == 1) {
188 <<
" extruded polygon made of " << matN <<
" z|x|y|s (0) " <<
zw[0] <<
":" 189 << zx[0] <<
":" << zy[0] <<
":" <<
scale[0] <<
" z|x|y|s (1) " <<
zw[1] <<
":" 193 for (
unsigned int j = 0;
j < xL.size(); ++
j)
204 <<
"DDHGCalWaferPartialRotated: " << solid.
name() <<
" extruded polygon made of " << matN
205 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0] <<
" z|x|y|s (1) " 207 <<
" placement index " <<
placementIndex_[
m] <<
" and " << xL.size() <<
" edges";
208 for (
unsigned int j = 0;
j < xL.size(); ++
j)
218 <<
"DDHGCalWaferPartialRotated: " << glog.
name() <<
" number " <<
copy <<
" positioned in " 219 << glogs[
i].name() <<
" at " << tran <<
" with no rotation";
226 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferPartialRotated: " << glogs[
i].name() <<
" number " 227 << copyNumber[
i] <<
" positioned in " << glogM.
name() <<
" at " << tran0
228 <<
" with no rotation";
236 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" is smaller than " << thickTot
237 <<
": thickness of all its components **** ERROR ****";
239 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" does not match with " << thickTot
240 <<
" of the components";
Log< level::Info, true > LogVerbatim
std::vector< std::string > placementIndexTags_
std::vector< std::string > materials_
std::vector< int > layers_
std::vector< double > layerSizeOff_
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.
DDName is used to identify DDD entities uniquely.
~DDHGCalWaferPartialRotated() override=default
static std::string & ns()
Log< level::Error, false > LogError
Compact representation of the geometrical detector hierarchy.
static std::vector< std::pair< double, double > > waferXY(const int &part, const int &orient, const int &zside, const double &waferSize, const double &offset, const double &xpos, const double &ypos, const bool &v17)
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_
void execute(DDCompactView &cpv) override
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_
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
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)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
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
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
DDHGCalWaferPartialRotated()=default
std::vector< int > placementIndex_