|
|
Go to the documentation of this file.
68 thick_ = nArgs[
"ModuleThickness"];
75 tags_ = vsArgs[
"Tags"];
80 for (
unsigned int k = 0;
k <
tags_.size(); ++
k)
96 std::ostringstream st1;
97 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
103 senseType_ = static_cast<int>(nArgs[
"SenseType"]);
104 posSense_ = static_cast<int>(nArgs[
"PosSensitive"]);
117 static constexpr
double tol = 0.00001;
118 static const double sqrt3 =
std::sqrt(3.0);
120 double RM = 2.0 * rM / sqrt3;
122 double R = 2.0 *
r / sqrt3;
126 for (
unsigned int k = 0;
k <
tags_.size(); ++
k) {
129 std::vector<std::pair<double, double> > wxy =
131 std::vector<double> xM, yM;
132 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
133 xM.emplace_back(wxy[
i].
first);
134 yM.emplace_back(wxy[
i].
second);
137 std::vector<double> zx(2, 0), zy(2, 0),
scale(2, 1.0);
143 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matName
144 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
145 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
147 << xM.size() <<
" edges";
148 for (
unsigned int j = 0;
j < xM.size(); ++
j)
154 std::vector<double> xL, yL;
155 for (
unsigned int i = 0;
i < (wxy.size() - 1); ++
i) {
156 xL.emplace_back(wxy[
i].
first);
157 yL.emplace_back(wxy[
i].
second);
159 std::vector<DDLogicalPart> glogs(
materials_.size());
160 std::vector<int> copyNumber(
materials_.size(), 1);
161 double zi(-0.5 *
thick_), thickTot(0.0);
162 for (
unsigned int l = 0;
l <
layers_.size();
l++) {
169 if (copyNumber[
i] == 1) {
178 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matN
179 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
180 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
182 <<
" and " << xL.size() <<
" edges";
183 for (
unsigned int j = 0;
j < xL.size(); ++
j)
193 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << solid.
name() <<
" extruded polygon made of " << matN
194 <<
" z|x|y|s (0) " <<
zw[0] <<
":" << zx[0] <<
":" << zy[0] <<
":" <<
scale[0]
195 <<
" z|x|y|s (1) " <<
zw[1] <<
":" << zx[1] <<
":" << zy[1] <<
":" <<
scale[1]
197 <<
" and " << xL.size() <<
" edges";
198 for (
unsigned int j = 0;
j < xL.size(); ++
j)
207 << glogs[
i].name() <<
" at " << tran <<
" with no rotation";
214 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalWaferP: " << glogs[
i].name() <<
" number " << copyNumber[
i]
215 <<
" positioned in " << glogM.
name() <<
" at " << tran0 <<
" with no rotation";
223 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" is smaller than " << thickTot
224 <<
": thickness of all its components **** ERROR ****";
226 edm::LogWarning(
"HGCalGeom") <<
"Thickness of the partition " <<
thick_ <<
" does not match with " << thickTot
227 <<
" of the components";
std::vector< std::string > materials_
DDName is used to identify DDD entities uniquely.
static std::vector< std::pair< double, double > > waferXY(int part, int orient, int zside, double delX, double delY, double xpos, double ypos)
~DDHGCalWaferP() override
U second(std::pair< T, U > const &p)
Log< level::Warning, false > LogWarning
DDMaterial is used to define and access material information.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
std::vector< int > orientations_
std::vector< std::string > layerNames_
Compact representation of the geometrical detector hierarchy.
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::string > tags_
std::vector< int > layers_
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< int > layerType_
A DDLogicalPart aggregates information concerning material, solid and sensitveness ....
Log< level::Error, false > LogError
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
void execute(DDCompactView &cpv) override
Log< level::Info, true > LogVerbatim
static std::string & ns()
std::vector< int > partialTypes_
std::vector< double > layerThick_
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
auto zw(V v) -> Vec2< typename std::remove_reference< decltype(v[0])>::type >
Abs< T >::type abs(const T &t)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)