39 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: Creating an instance";
41 static constexpr
double tol1 = 0.01 * dd4hep::mm;
42 static constexpr
double tol2 = 0.00001 * dd4hep::mm;
74 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
75 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
78 <<
waferPart_.size() <<
" partial modules\nDDHGCalSiliconRotatedModule:Full Modules:";
79 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
80 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
81 std::ostringstream st1;
83 for (
unsigned int i =
i1;
i <
i2; ++
i)
87 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: Partial Modules:";
88 i1max =
static_cast<unsigned int>(
waferPart_.size());
89 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
90 std::ostringstream st1;
92 for (
unsigned int i =
i1;
i <
i2; ++
i)
97 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
98 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
99 thick_ =
args.value<std::vector<double>>(
"Thickness");
103 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
112 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
114 <<
" with " <<
layers_[
i] <<
" layers";
129 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 143 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
144 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
146 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
147 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
150 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
153 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
175 <<
" elements for cassette shifts";
177 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
178 std::ostringstream st1;
179 unsigned int j2 =
std::min((j1 + 6), j1max);
180 for (
unsigned int j = j1;
j < j2; ++
j)
185 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: NameSpace " << ns.name();
190 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalSiliconRotatedModule...";
196 for (
unsigned int i = 0;
i <
layers_.size(); ++
i) {
202 for (
int ly = laymin; ly < laymax; ++ly) {
212 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: Layer " << ly <<
":" <<
ii <<
" Front " 222 std::vector<double> pgonZ, pgonRin, pgonRout;
236 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
239 pgonRout[isec] = rmax;
241 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
244 ns.addSolidNS(ns.prepend(
name), solid);
246 ns.addVolumeNS(glog);
248 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << solid.name() <<
" polyhedra of " 251 <<
" sections and filled with " << matter.name();
252 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
261 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
262 ns.addSolidNS(ns.prepend(
name), solid);
264 ns.addVolumeNS(glog);
267 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << solid.name() <<
" Tubs made of " 271 <<
", 0.0, 360.0 and position " << glog.name() <<
" number " <<
copy <<
":" 278 dd4hep::Rotation3D
rot;
288 mother.placeVolume(glog,
copy, dd4hep::Transform3D(
rot,
r1));
292 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << glog.name() <<
" number " <<
copy 294 <<
") with " <<
rotName <<
" rotation";
305 <<
": thickness of all its components **** ERROR ****";
308 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
315 <<
" different wafer copy numbers";
317 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
321 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalSiliconRotatedModule construction...";
Log< level::Info, true > LogVerbatim
static constexpr int32_t WaferCenteredRotated
std::vector< double > slopeT_
std::vector< double > thick_
std::vector< double > layerThick_
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
std::vector< int > layerSense_
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< double > rMinFront_
std::string to_string(const V &value)
std::vector< std::string > materials_
Log< level::Error, false > LogError
std::vector< int > layers_
int32_t waferOrient(const int32_t property)
std::vector< int > waferIndex_
std::vector< int > copyNumber_
static const std::string & rotName(const T &rot, const cms::DDParsingContext &context)
std::unordered_set< int > copies_
std::vector< int > layerTypes_
std::vector< double > zFrontB_
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< std::string > waferFull_
int32_t waferThick(const int32_t property)
std::vector< double > slopeB_
std::vector< int > waferLayerStart_
std::vector< double > zFrontT_
int32_t waferPartial(const int32_t property)
int32_t waferV(const int32_t index)
std::vector< std::string > names_
std::vector< int > layerType_
std::vector< int > waferProperty_
Log< level::Warning, false > LogWarning
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, int layer)
std::vector< double > rMaxFront_
std::vector< double > cassetteShift_
void setParameter(int cassette, const std::vector< double > &shifts)
std::vector< std::string > waferPart_