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;
77 waferFull_ =
args.value<std::vector<std::string>>(
"WaferNamesFull");
78 waferPart_ =
args.value<std::vector<std::string>>(
"WaferNamesPartial");
82 unsigned int i1max =
static_cast<unsigned int>(
waferFull_.size());
83 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
84 std::ostringstream st1;
86 for (
unsigned int i =
i1;
i <
i2; ++
i)
90 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
91 i1max =
static_cast<unsigned int>(
waferPart_.size());
92 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
93 std::ostringstream st1;
95 for (
unsigned int i =
i1;
i <
i2; ++
i)
106 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
107 std::ostringstream st1;
109 for (
unsigned int i =
i1;
i <
i2; ++
i)
113 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Partial Modules:";
115 for (
unsigned int i1 = 0;
i1 < i1max;
i1 += 2) {
116 std::ostringstream st1;
118 for (
unsigned int i =
i1;
i <
i2; ++
i)
123 materials_ =
args.value<std::vector<std::string>>(
"MaterialNames");
124 names_ =
args.value<std::vector<std::string>>(
"VolumeNames");
125 thick_ =
args.value<std::vector<double>>(
"Thickness");
129 for (
unsigned int i = 0;
i <
names_.size(); ++
i)
138 for (
unsigned int i = 0;
i <
layers_.size(); ++
i)
140 <<
" with " <<
layers_[
i] <<
" layers";
157 edm::LogVerbatim(
"HGCalGeom") <<
"First copy number for layer type " <<
i <<
":" <<
ii <<
" with " 171 slopeB_ =
args.value<std::vector<double>>(
"SlopeBottom");
172 zFrontB_ =
args.value<std::vector<double>>(
"ZFrontBottom");
174 slopeT_ =
args.value<std::vector<double>>(
"SlopeTop");
175 zFrontT_ =
args.value<std::vector<double>>(
"ZFrontTop");
178 for (
unsigned int i = 0;
i <
slopeB_.size(); ++
i)
181 for (
unsigned int i = 0;
i <
slopeT_.size(); ++
i)
203 <<
" elements for cassette shifts";
205 for (
unsigned int j1 = 0; j1 < j1max; j1 += 6) {
206 std::ostringstream st1;
207 unsigned int j2 =
std::min((j1 + 6), j1max);
208 for (
unsigned int j = j1;
j < j2; ++
j)
216 edm::LogVerbatim(
"HGCalGeom") <<
"==>> Constructing DDHGCalSiliconRotatedCassette...";
222 for (
unsigned int i = 0;
i <
layers_.size();
i++) {
228 for (
int ly = laymin; ly < laymax; ++ly) {
238 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: Layer " << ly <<
":" <<
ii <<
" Front " 246 std::vector<double> pgonZ, pgonRin, pgonRout;
260 for (
unsigned int isec = 0; isec < pgonZ.size(); ++isec) {
263 pgonRout[isec] = rmax;
265 pgonRout[isec] = pgonRout[isec] *
cosAlpha_ - tol1;
268 ns.addSolidNS(ns.prepend(
name), solid);
270 ns.addVolumeNS(glog);
272 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << solid.name() <<
" polyhedra of " 275 <<
" sections and filled with " << matter.name();
276 for (
unsigned int k = 0;
k < pgonZ.size(); ++
k)
284 dd4hep::Solid solid = dd4hep::Tube(rins, routs, hthick, 0.0, 2._pi);
285 ns.addSolidNS(ns.prepend(
name), solid);
287 ns.addVolumeNS(glog);
289 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << solid.name() <<
" Tubs made of " 293 <<
", 0.0, 360.0 and position " << glog.name() <<
" number " <<
copy <<
":" 302 dd4hep::Rotation3D
rot;
312 mother.placeVolume(glog,
copy, dd4hep::Transform3D(
rot,
r1));
316 edm::LogVerbatim(
"HGCalGeom") <<
"DDHGCalSiliconRotatedCassette: " << glog.name() <<
" number " <<
copy 318 <<
") with " <<
rotName <<
" rotation";
329 <<
": thickness of all its components **** ERROR ****";
332 <<
" does not match with " <<
cms::convert2mm(thickTot) <<
" of the components";
339 <<
" different wafer copy numbers";
341 for (std::unordered_set<int>::const_iterator itr =
copies_.begin(); itr !=
copies_.end(); ++itr, ++
k) {
345 edm::LogVerbatim(
"HGCalGeom") <<
"<<== End of DDHGCalSiliconRotatedCassette construction...";
std::vector< double > slopeB_
Log< level::Info, true > LogVerbatim
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)
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_
void setParameter(int cassette, const std::vector< double > &shifts)