40 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Creating an instance";
42 static constexpr double tol1 = 0.01 * dd4hep::mm;
58 <<
" PlaceOffset: " <<
placeOffset_ <<
"; number of cells along phi " 84 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
85 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
87 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
91 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
94 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
98 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
99 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
103 <<
" partial modules\nDDHGCalMixRotatedFineCassette:Full Modules:";
104 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
105 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
106 std::ostringstream st1;
108 for (
unsigned int i =
i1;
i <
i2; ++
i)
112 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Partial Modules:";
113 i1max =
static_cast<unsigned int>(
waferPart_.size());
114 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
115 std::ostringstream st1;
117 for (
unsigned int i =
i1;
i <
i2; ++
i)
128 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
129 std::ostringstream st1;
131 for (
unsigned int i =
i1;
i <
i2; ++
i)
135 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
137 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
138 std::ostringstream st1;
140 for (
unsigned int i =
i1;
i <
i2; ++
i)
145 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
146 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
147 thick_ =
args.value<std::vector<double>>(
"Thickness");
151 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
159 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
178 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 193 namesTop_ =
args.value<std::vector<std::string>>(
"TopVolumeNames");
201 std::ostringstream st0;
205 <<
" types of volumes in the top part; " <<
coverTopLayers_ <<
" covers of Type " 206 <<
coverTypeTop_ <<
" with initial copy numbers: " << st0.str();
232 <<
" elements for cassette shifts";
234 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
235 std::ostringstream st1;
236 unsigned int j2 =
std::min((j1 + 6), j1max);
237 for (
unsigned int j = j1;
j < j2; ++
j)
281 std::vector<double> retract =
args.value<std::vector<double>>(
"ScintRetract");
284 double phi = (2 *
k + 1) * dphi;
290 for (
unsigned int j1 = 0; j1 < j2max; j1 += 6) {
291 std::ostringstream st1;
292 unsigned int j2 =
std::min((j1 + 6), j2max);
293 for (
unsigned int j = j1;
j < j2; ++
j)
306 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalMixRotatedFineCassette...";
313 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
319 bool fine = (
i < fineLayers) ?
true :
false;
320 for (
int ly = laymin; ly < laymax; ++ly) {
330 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: Layer " << ly <<
":" <<
ii <<
" Front " 338 std::vector<double> pgonZ, pgonRin, pgonRout;
353 for (
unsigned int isec = 0;
isec < pgonZ.size(); ++
isec) {
356 pgonRout[
isec] = rmax;
361 ns.addSolidNS(ns.prepend(
name), solid);
363 ns.addVolumeNS(glog);
365 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << solid.name() <<
" polyhedra of " 368 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
376 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
377 ns.addSolidNS(ns.prepend(
name), solid);
379 ns.addVolumeNS(glog);
381 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << solid.name() <<
" Tubs made of " 385 <<
", 0.0, 360.0 and positioned in: " << glog.name() <<
" number " <<
copy;
390 mother.placeVolume(glog,
copy,
r1);
393 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalMixRotatedFineCassette: " << glog.name() <<
" number " <<
copy 395 <<
") with no rotation";
406 <<
": thickness of all its components **** ERROR ****";
409 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
415 <<
" different wafer copy numbers";
417 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
421 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalMixRotatedFineCassette construction...";
Log< level::Info, true > LogVerbatim
std::vector< double > tileCoarseRMax_
std::vector< double > tileCoarseRMin_
std::vector< std::string > namesTop_
static constexpr double tol2_
std::vector< std::string > waferFull_
std::vector< int > layerTypeTop_
std::vector< double > rMaxFront_
std::vector< double > zFrontB_
int32_t waferU(const int32_t index)
std::vector< int > tileFineLayerStart_
int32_t waferLayer(const int32_t index)
std::vector< int > tileFineIndex_
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
Sin< T >::type sin(const T &t)
std::vector< int > waferIndex_
std::vector< double > slopeB_
std::vector< double > cassetteShiftScnt_
std::unordered_set< int > copies_
std::vector< int > waferLayerStart_
std::vector< int > tileFinePhis_
Log< level::Error, false > LogError
std::vector< int > tileCoarsePhis_
std::vector< std::string > waferPart_
int32_t waferOrient(const int32_t property)
std::vector< double > layerThick_
void setParameterScint(const std::vector< double > &shifts)
std::vector< std::string > names_
static std::string to_string(const XMLCh *ch)
std::vector< int > copyNumberTop_
std::vector< int > tileCoarseIndex_
std::vector< int > layerType_
Cos< T >::type cos(const T &t)
void positionMix(cms::DDParsingContext &ctxt, xml_h e, const dd4hep::Volume &glog, const std::string &nameM, int copyM, double thick, const dd4hep::Material &matter, int absType, bool fine)
Abs< T >::type abs(const T &t)
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< int > tileCoarseLayerStart_
std::vector< std::string > passivePart_
std::tuple< int32_t, int32_t, int32_t > tileUnpack(int32_t index)
std::vector< int > waferProperty_
std::vector< int > copyNumber_
std::vector< int > layerSense_
std::vector< std::string > passiveFull_
std::vector< double > tileFineRMin_
int32_t waferPartial(const int32_t property)
std::vector< double > layerThickTop_
std::vector< double > slopeT_
std::vector< double > thick_
int32_t waferV(const int32_t index)
std::vector< std::string > materialTop_
std::vector< int > layers_
std::vector< int > layerOrient_
std::vector< double > tileFineRMax_
Log< level::Warning, false > LogWarning
static int32_t layerType(int type)
std::vector< int > copyNumberCoverTop_
std::vector< std::string > materials_
std::vector< double > rMinFront_
std::vector< double > zFrontT_