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";
131 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 145 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
146 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
148 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
149 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
152 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
155 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
177 <<
" elements for cassette shifts";
179 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
180 std::ostringstream st1;
181 unsigned int j2 =
std::min((j1 + 6), j1max);
182 for (
unsigned int j = j1;
j < j2; ++
j)
187 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: NameSpace " << ns.name();
192 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalSiliconRotatedModule...";
198 for (
unsigned int i = 0;
i <
layers_.size(); ++
i) {
204 for (
int ly = laymin; ly < laymax; ++ly) {
214 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: Layer " << ly <<
":" <<
ii <<
" Front " 224 std::vector<double> pgonZ, pgonRin, pgonRout;
238 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
241 pgonRout[isec] = rmax;
243 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
246 ns.addSolidNS(ns.prepend(
name), solid);
248 ns.addVolumeNS(glog);
250 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << solid.name() <<
" polyhedra of " 253 <<
" sections and filled with " << matter.name();
254 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
263 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
264 ns.addSolidNS(ns.prepend(
name), solid);
266 ns.addVolumeNS(glog);
269 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << solid.name() <<
" Tubs made of " 273 <<
", 0.0, 360.0 and position " << glog.name() <<
" number " <<
copy <<
":" 280 dd4hep::Rotation3D
rot;
290 mother.placeVolume(glog,
copy, dd4hep::Transform3D(
rot,
r1));
294 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedModule: " << glog.name() <<
" number " <<
copy 296 <<
") with " <<
rotName <<
" rotation";
307 <<
": thickness of all its components **** ERROR ****";
310 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
317 <<
" different wafer copy numbers";
319 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
323 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalSiliconRotatedModule construction...";
Log< level::Info, true > LogVerbatim
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::vector< int > layerOrient_
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< 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_
static constexpr int32_t WaferCenterR
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
static int32_t layerType(int type)
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_