39 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Creating an instance";
41 static constexpr double tol1 = 0.01 * dd4hep::mm;
42 static constexpr double tol2 = 0.00001 * dd4hep::mm;
78 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
79 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
83 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
84 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
85 std::ostringstream st1;
87 for (
unsigned int i =
i1;
i <
i2; ++
i)
91 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
92 i1max =
static_cast<unsigned int>(
waferPart_.size());
93 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
94 std::ostringstream st1;
96 for (
unsigned int i =
i1;
i <
i2; ++
i)
107 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
108 std::ostringstream st1;
110 for (
unsigned int i =
i1;
i <
i2; ++
i)
114 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
116 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
117 std::ostringstream st1;
119 for (
unsigned int i =
i1;
i <
i2; ++
i)
124 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
125 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
126 thick_ =
args.value<std::vector<double>>(
"Thickness");
130 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
139 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
141 <<
" with " <<
layers_[
i] <<
" layers";
158 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 172 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
173 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
175 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
176 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
179 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
182 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
204 <<
" elements for cassette shifts";
206 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
207 std::ostringstream st1;
208 unsigned int j2 =
std::min((j1 + 6), j1max);
209 for (
unsigned int j = j1;
j < j2; ++
j)
217 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalSiliconRotatedCassette...";
223 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
229 for (
int ly = laymin; ly < laymax; ++ly) {
239 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Front " 247 std::vector<double> pgonZ, pgonRin, pgonRout;
261 for (
unsigned int isec = 0;
isec < pgonZ.size(); ++
isec) {
264 pgonRout[
isec] = rmax;
269 ns.addSolidNS(ns.prepend(
name), solid);
271 ns.addVolumeNS(glog);
273 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << solid.name() <<
" polyhedra of " 276 <<
" sections and filled with " << matter.name();
277 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
285 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
286 ns.addSolidNS(ns.prepend(
name), solid);
288 ns.addVolumeNS(glog);
290 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << solid.name() <<
" Tubs made of " 294 <<
", 0.0, 360.0 and position " << glog.name() <<
" number " <<
copy <<
":" 306 dd4hep::Rotation3D
rot;
316 mother.placeVolume(glog,
copy, dd4hep::Transform3D(
rot,
r1));
320 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << glog.name() <<
" number " <<
copy 322 <<
") with " <<
rotName <<
" rotation";
333 <<
": thickness of all its components **** ERROR ****";
336 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
343 <<
" different wafer copy numbers";
345 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
349 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalSiliconRotatedCassette construction...";
std::vector< double > slopeB_
Log< level::Info, true > LogVerbatim
void positionPassive2(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, int layer, int absType)
std::vector< int > waferProperty_
std::vector< std::string > waferFull_
int32_t waferU(const int32_t index)
std::vector< double > thick_
int32_t waferLayer(const int32_t index)
std::vector< int > layerOrient_
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
std::vector< int > layerType_
std::unordered_set< int > copies_
std::vector< int > waferIndex_
std::vector< int > layerSense_
void positionPassive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, int layer, int absType)
Log< level::Error, false > LogError
std::vector< double > zFrontT_
int32_t waferOrient(const int32_t property)
static std::string to_string(const XMLCh *ch)
std::vector< std::string > waferPart_
static const std::string & rotName(const T &rot, const cms::DDParsingContext &context)
std::vector< int > waferLayerStart_
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
std::vector< std::string > passivePart_
std::vector< double > cassetteShift_
int32_t waferThick(const int32_t property)
void setParameter(int cassette, const std::vector< double > &shifts, bool both=true)
std::vector< double > slopeT_
std::vector< double > zFrontB_
static constexpr int32_t WaferCenterR
std::vector< double > rMaxFront_
std::vector< std::string > names_
std::vector< double > rMinFront_
std::vector< int > layers_
std::vector< std::string > passiveFull_
int32_t waferPartial(const int32_t property)
std::vector< int > copyNumber_
int32_t waferV(const int32_t index)
void positionSensitive(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, int layer)
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< std::string > materials_
std::vector< double > layerThick_