148 LogDebug(
"TIBGeom") <<
"==>> Constructing DDTIBLayerAlgo_MTCC...";
156 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test DeltaR (Detector Tilt) " << redgd1 <<
", " << redgd2
157 <<
" DeltaR (Cable+Cool) " << redgc1 <<
", " << redgc2;
165 <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rmin <<
" Rout " << rmax
166 <<
" ZHalf " << 0.5 *
layerL;
176 <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin <<
" Rout " << rout
177 <<
" ZHalf " << 0.5 *
layerL;
180 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test: " << layerIn.name() <<
" number 1 positioned in " << layer.name()
181 <<
" at (0,0,0) with no rotation";
192 double phideg = phix / CLHEP::deg;
195 double theta = 90 * CLHEP::deg;
196 double phiy = phix + 90. * CLHEP::deg;
197 std::string rotstr = idName + std::to_string(phideg * 10.);
200 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test: Creating a new " 201 <<
"rotation: " << rotstr <<
"\t90., " << phix / CLHEP::deg <<
", 90.," 202 << phiy / CLHEP::deg <<
", 0, 0";
210 if (
n + 1 == (
int)
i) {
218 cpv.
position(emptyDetIn, layerIn,
n + 1, trdet, rotation);
219 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << emptyDetIn.name() <<
" number " <<
n + 1
220 <<
" positioned in " << layerIn.name() <<
" at " << trdet <<
" with " <<
rotation;
225 cpv.
position(emptyCabIn, layerIn,
n + 1, trcab, rotation);
226 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << emptyCabIn.name() <<
" number " <<
n + 1
227 <<
" positioned in " << layerIn.name() <<
" at " << trcab <<
" with " <<
rotation;
231 cpv.
position(detIn, layerIn,
n + 1, trdet, rotation);
232 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << detIn.name() <<
" number " <<
n + 1 <<
" positioned in " 233 << layerIn.name() <<
" at " << trdet <<
" with " <<
rotation;
235 cpv.
position(cabIn, layerIn,
n + 1, trcab, rotation);
236 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << cabIn.name() <<
" number " <<
n + 1 <<
" positioned in " 237 << layerIn.name() <<
" at " << trcab <<
" with " <<
rotation;
247 name = idName +
"Up";
250 <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin <<
" Rout " << rout
251 <<
" ZHalf " << 0.5 *
layerL;
254 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test: " << layerOut.name() <<
" number 1 positioned in " << layer.name()
255 <<
" at (0,0,0) with no rotation";
266 double phideg = phix / CLHEP::deg;
269 double theta = 90 * CLHEP::deg;
270 double phiy = phix + 90. * CLHEP::deg;
271 std::string rotstr = idName + std::to_string(phideg * 10.);
274 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test: Creating a new " 275 <<
"rotation: " << rotstr <<
"\t90., " << phix / CLHEP::deg <<
", 90.," 276 << phiy / CLHEP::deg <<
", 0, 0";
284 if (
n + 1 == (
int)
i) {
292 cpv.
position(emptyDetOut, layerOut,
n + 1, trdet, rotation);
293 LogDebug(
"TIBGeom") <<
"DDTIBLayer test " << emptyDetOut.name() <<
" number " <<
n + 1 <<
" positioned in " 294 << layerOut.name() <<
" at " << trdet <<
" with " <<
rotation;
299 cpv.
position(emptyCabOut, layerOut,
n + 1, trcab, rotation);
300 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << emptyCabOut.name() <<
" number " <<
n + 1
301 <<
" positioned in " << layerOut.name() <<
" at " << trcab <<
" with " <<
rotation;
305 cpv.
position(detOut, layerOut,
n + 1, trdet, rotation);
306 LogDebug(
"TIBGeom") <<
"DDTIBLayer test " << detOut.name() <<
" number " <<
n + 1 <<
" positioned in " 307 << layerOut.name() <<
" at " << trdet <<
" with " <<
rotation;
309 cpv.
position(cabOut, layerOut,
n + 1, trcab, rotation);
310 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << cabOut.name() <<
" number " <<
n + 1 <<
" positioned in " 311 << layerOut.name() <<
" at " << trcab <<
" with " <<
rotation;
320 double phidiff = fabs(phiMax - phiMin);
324 name = idName +
"Cylinder";
327 <<
" from " << phiMin / CLHEP::deg <<
" to " << (phiMin +
phidiff) / CLHEP::deg <<
" with Rin " 328 << rin <<
" Rout " << rout <<
" ZHalf " << 0.25 *
layerL;
332 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test: " << cylinder.name() <<
" number 1 positioned in " << layer.name()
333 <<
" at (0,0," << 0.25 *
layerL <<
") with no rotation";
336 name = idName +
"CylinderIn";
339 <<
" from " << phiMin / CLHEP::deg <<
" to " << (phiMin +
phidiff) / CLHEP::deg
340 << phidiff / CLHEP::deg <<
" with Rin " << rin <<
" Rout " << rout <<
" ZHalf " << 0.5 *
layerL;
343 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test: " << cylinderIn.name() <<
" number 1 positioned in " 344 << cylinder.name() <<
" at (0,0," << -0.25 *
layerL <<
") with no rotation";
345 name = idName +
"CylinderInSup";
348 <<
" from " << phiMin / CLHEP::deg <<
" to " << (phiMin +
phidiff) / CLHEP::deg <<
" with Rin " 349 << rin <<
" Rout " << rout <<
" ZHalf " << 0.5 *
supportW;
353 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo_MTCC test: " << cylinderSup.name() <<
" number 1 positioned in " 354 << cylinderIn.name() <<
" at (0,0,0) with no rotation";
356 for (
unsigned int i = 0;
i <
ribW.size();
i++) {
357 name = idName +
"Rib" + std::to_string(
i);
362 <<
" from " << -0.5 * width / CLHEP::deg <<
" to " << 0.5 * width / CLHEP::deg <<
" with Rin " 363 << rin <<
" Rout " << rout <<
" ZHalf " <<
dz;
366 double phideg = phix / CLHEP::deg;
367 if (phideg >= phiMin / CLHEP::deg && phideg < phiMax / CLHEP::deg) {
370 double theta = 90 * CLHEP::deg;
371 double phiy = phix + 90. * CLHEP::deg;
372 std::string rotstr = idName + std::to_string(phideg * 10.);
375 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test: Creating a new " 376 <<
"rotation: " << rotstr <<
"\t90., " << phix / CLHEP::deg <<
", 90.," 377 << phiy / CLHEP::deg <<
", 0, 0";
382 cpv.
position(cylinderRib, cylinderIn, 1, tran, rotation);
383 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << cylinderRib.name() <<
" number 1 positioned in " 384 << cylinderIn.name() <<
" at " << tran <<
" with " <<
rotation;
390 double dphi_dohm = CLHEP::twopi / ((double)
dohmN);
395 name = idName +
"DOHMCarrier_lo";
396 double rin_lo = rout_dohm;
401 << +0.5 * (dphi_dohm) / CLHEP::deg <<
" with Rin " << rin_lo <<
" Rout " << rout_lo <<
" ZHalf " 404 std::string name_lo_r = name +
"_PRIM_AUX" +
"_lo" +
"_r";
405 std::string name_lo_l = name +
"_PRIM_AUX" +
"_lo" +
"_l";
408 name_lo_r = name +
"_PRIM" +
"_lo" +
"_r";
409 name_lo_l = name +
"_PRIM" +
"_lo" +
"_l";
413 name = idName +
"DOHMCarrier_up";
414 double rin_up = rout_lo + 2. *
dohmAuxT;
419 << +0.5 * (dphi_dohm) / CLHEP::deg <<
" with Rin " << rin_up <<
" Rout " << rout_up <<
" ZHalf " 422 std::string name_up_r = name +
"_PRIM_AUX" +
"_up" +
"_r";
423 std::string name_up_l = name +
"_PRIM_AUX" +
"_up" +
"_l";
426 name_up_r = name +
"_PRIM" +
"_up" +
"_r";
427 name_up_l = name +
"_PRIM" +
"_up" +
"_l";
431 for (
unsigned int i = 0;
i < (
unsigned int)
dohmN;
i++) {
442 }
else if ((
unsigned int)
dohmList[
i] == 1) {
451 dohmCarrier_lo_r = dohmCarrierPrim_lo_r;
452 dohmCarrier_lo_l = dohmCarrierPrim_lo_l;
453 dohmCarrier_up_r = dohmCarrierPrim_up_r;
454 dohmCarrier_up_l = dohmCarrierPrim_up_l;
457 dohmCarrier_lo_r = dohmCarrierPrimAux_lo_r;
458 dohmCarrier_lo_l = dohmCarrierPrimAux_lo_l;
459 dohmCarrier_up_r = dohmCarrierPrimAux_up_r;
460 dohmCarrier_up_l = dohmCarrierPrimAux_up_l;
465 double phix = ((double)
i + 0.5) * dphi_dohm;
466 double phideg = phix / CLHEP::deg;
470 double theta = 90 * CLHEP::deg;
471 double phiy = phix + 90. * CLHEP::deg;
472 std::string rotstr = idName + std::to_string(phideg * 10.);
475 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test: Creating a new " 476 <<
"rotation: " << rotstr <<
"\t90., " << phix / CLHEP::deg <<
", 90.," 477 << phiy / CLHEP::deg <<
", 0, 0";
484 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCarrier_lo_r.
name() <<
" z+ number " <<
i + 1
485 <<
" positioned in " <<
parent().name() <<
" at " << tran <<
" with " <<
rotation;
488 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCarrier_up_r.
name() <<
" z+ number " <<
i + 1
489 <<
" positioned in " <<
parent().name() <<
" at " << tran <<
" with " <<
rotation;
499 name = idName +
"DOHM_PRIM";
504 name = idName +
"DOHM_PRIM_Cable";
511 <<
dohmCableMaterial <<
" of dimensions " << dx_cable <<
", " << dy_cable <<
", " << dz_cable;
515 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmPrim.name() <<
" z+ number " << 1 <<
" positioned in " 516 << dohmCarrierPrim_lo_r.name() <<
" at " << tran <<
" with no rotation";
519 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCablePrim.name() <<
" copy number " << 1 <<
" positioned in " 520 << dohmCarrierPrim_lo_r.name() <<
" at " << tran <<
" with no rotation";
523 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCablePrim.name() <<
" copy number " << 2 <<
" positioned in " 524 << dohmCarrierPrim_lo_r.name() <<
" at " << tran <<
" with no rotation";
530 name = idName +
"DOHM_PRIM";
535 name = idName +
"DOHM_PRIM_Cable";
542 <<
dohmCableMaterial <<
" of dimensions " << dx_cable <<
", " << dy_cable <<
", " << dz_cable;
546 name = idName +
"DOHM_AUX";
550 <<
" of dimensions " << dx <<
", " << dy <<
", " <<
dz;
551 name = idName +
"DOHM_AUX_Cable";
555 <<
dohmCableMaterial <<
" of dimensions " << dx_cable <<
", " << dy_cable <<
", " << dz_cable;
559 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmAux.name() <<
" z+ number " << 1 <<
" positioned in " 560 << dohmCarrierPrimAux_lo_r.name() <<
" at " << tran <<
" with no rotation";
563 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCablePrim.name() <<
" copy number " << 1 <<
" positioned in " 564 << dohmCarrierPrimAux_lo_r.name() <<
" at " << tran <<
" with no rotation";
567 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCablePrim.name() <<
" copy number " << 2 <<
" positioned in " 568 << dohmCarrierPrimAux_lo_r.name() <<
" at " << tran <<
" with no rotation";
571 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmAux.name() <<
" z+ number " << 1 <<
" positioned in " 572 << dohmCarrierPrimAux_lo_r.name() <<
" at (0,0,0) with no rotation";
575 LogDebug(
"TIBGeom") <<
"DDTIBLayer_MTCC test " << dohmCableAux.name() <<
" copy number " << 1 <<
" positioned in " 576 << dohmCarrierPrimAux_lo_r.name() <<
" at " << tran <<
" with no rotation";
std::string dohmCarrierMaterial
DDMaterial is used to define and access material information.
std::vector< double > stringUpList
std::vector< double > dohmList
Sin< T >::type sin(const T &t)
std::vector< double > ribW
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
double phidiff(double phi)
Normalized difference in azimuthal angles to a range between .
std::string dohmPrimMaterial
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
std::vector< double > ribPhi
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
std::string dohmAuxMaterial
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::string emptyCoolCableUp
std::vector< double > stringLoList
std::string dohmCableMaterial
std::string emptyDetectorLo
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::Rotation3D DDRotation
std::string emptyCoolCableLo
const std::string & name() const
Returns the name.
std::string emptyDetectorUp