177 LogDebug(
"TIBGeom") <<
"==>> Constructing DDTIBLayerAlgo...";
186 rmin, rmax, 0, CLHEP::twopi);
188 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 190 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
191 <<
" with Rin " << rmin <<
" Rout " << rmax
192 <<
" ZHalf " << 0.5*
layerL;
204 rin, rout, 0, CLHEP::twopi);
205 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 207 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
208 <<
" with Rin " << rin <<
" Rout " << rout
209 <<
" ZHalf " << 0.5*
layerL;
212 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << layerIn.name()
213 <<
" number 1 positioned in " << layer.name()
214 <<
" at (0,0,0) with no rotation";
220 double phi = (
n+0.5)*dphi;
222 double phideg = phix/CLHEP::deg;
225 double theta = 90*CLHEP::deg;
226 double phiy = phix + 90.*CLHEP::deg;
227 std::string rotstr = idName + std::to_string(phideg*10.);
230 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new " 231 <<
"rotation: " << rotstr <<
"\t90., " 232 << phix/CLHEP::deg <<
", 90.," 233 << phiy/CLHEP::deg <<
", 0, 0";
239 cpv.
position(detIn, layerIn,
n+1, trdet, rotation);
240 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << detIn.name()
241 <<
" number " <<
n+1 <<
" positioned in " 242 << layerIn.name() <<
" at " << trdet <<
" with " 249 name = idName +
"Up";
251 rin, rout, 0, CLHEP::twopi);
252 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 254 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
255 <<
" with Rin " << rin <<
" Rout " << rout
256 <<
" ZHalf " << 0.5*
layerL;
259 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << layerOut.name()
260 <<
" number 1 positioned in " << layer.name()
261 <<
" at (0,0,0) with no rotation";
267 double phi = (
n+0.5)*dphi;
269 double phideg = phix/CLHEP::deg;
272 double theta = 90*CLHEP::deg;
273 double phiy = phix + 90.*CLHEP::deg;
274 std::string rotstr = idName + std::to_string(phideg*10.);
277 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new " 278 <<
"rotation: " << rotstr <<
"\t90., " 279 << phix/CLHEP::deg <<
", 90.," 280 << phiy/CLHEP::deg <<
", 0, 0";
286 cpv.
position(detOut, layerOut,
n+1, trdet, rotation);
287 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << detOut.name()
288 <<
" number " <<
n+1 <<
" positioned in " 289 << layerOut.name() <<
" at " << trdet <<
" with " 299 name = idName +
"Cylinder";
301 rin, rout, 0, CLHEP::twopi);
302 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 305 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
306 <<
" Rout " << rout <<
" ZHalf " << 0.5*
layerL;
311 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cylinder.name()
312 <<
" number 1 positioned in " << layer.name()
313 <<
" at (0,0,0) with no rotation";
319 name = idName +
"CylinderIn";
321 rin, rout, 0, CLHEP::twopi);
322 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 324 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
325 <<
" with Rin " << rin <<
" Rout " << rout
326 <<
" ZHalf " << 0.5*
layerL;
329 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cylinderIn.name()
330 <<
" number 1 positioned in " << cylinder.name()
331 <<
" at (0,0,0) with no rotation";
337 name = idName +
"Filler";
340 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 343 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
344 <<
" Rout " << rout <<
" ZHalf " <<
fillerDz;
348 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << cylinderFiller.name()
349 <<
" number 1" <<
" positioned in " 351 <<
" number 2" <<
" positioned in " 359 for (
int i = 0;
i < (
int)(
ribW.size());
i++) {
360 name = idName +
"Rib" + std::to_string(
i);
364 rin+0.5*CLHEP::mm, rout-0.5*CLHEP::mm,
366 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 368 <<
ribMat <<
" from " << -0.5*width/CLHEP::deg <<
" to " 369 << 0.5*width/CLHEP::deg <<
" with Rin " 370 << rin+0.5*CLHEP::mm <<
" Rout " 371 << rout-0.5*CLHEP::mm <<
" ZHalf " <<
dz;
374 double phideg = phix/CLHEP::deg;
377 double theta = 90*CLHEP::deg;
378 double phiy = phix + 90.*CLHEP::deg;
379 std::string rotstr = idName + std::to_string(phideg*10.);
382 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new " 383 <<
"rotation: " << rotstr <<
"\t90., " 384 << phix/CLHEP::deg <<
", 90.," << phiy/CLHEP::deg
391 cpv.
position(cylinderRib, cylinderIn, 1, tran, rotation);
392 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << cylinderRib.name()
393 <<
" number 1" <<
" positioned in " 394 << cylinderIn.name() <<
" at " << tran <<
" with " 405 name = idName +
"InnerMFRing";
407 rin, rout, 0, CLHEP::twopi);
409 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 412 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
413 <<
" Rout " << rout <<
" ZHalf " <<
MFRingDz;
418 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << inmfr.name()
419 <<
" number 1 and 2 positioned in " << layer.name()
420 <<
" at (0,0,+-" << 0.5*
layerL-MFRingDz <<
") with no rotation";
426 name = idName +
"OuterMFRing";
428 rin, rout, 0, CLHEP::twopi);
430 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 433 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
434 <<
" Rout " << rout <<
" ZHalf " <<
MFRingDz;
439 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << outmfr.name()
440 <<
" number 1 and 2 positioned in " << layer.name()
441 <<
" at (0,0,+-" << 0.5*
layerL-MFRingDz
442 <<
") with no rotation";
453 name = idName +
"CentRing1";
455 rin, rout, 0, CLHEP::twopi);
457 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 459 <<
centMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
460 <<
" with Rin " << rin <<
" Rout " << rout
461 <<
" ZHalf " << centDz;
465 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cent1.name()
466 <<
" positioned in " << layer.name()
467 <<
" at (0,0," << centZ <<
") with no rotation";
473 name = idName +
"CentRing2";
475 rin, rout, 0, CLHEP::twopi);
477 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 479 <<
centMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
480 <<
" with Rin " << rin <<
" Rout " << rout
481 <<
" ZHalf " << centDz;
485 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cent2.name()
486 <<
" positioned in " << layer.name()
487 <<
" at (0,0," << centZ <<
") with no rotation";
493 name = idName +
"DOHMCarrier";
498 double dohmCarrierZ = 0.5*
layerL-2.*MFRingDz-dohmCarrierDz;
501 dohmCarrierRin, dohmCarrierRout,
504 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 509 << dohmCarrierRin <<
" Rout " <<
MFRingOutR <<
" ZHalf " 520 double dohmR = 0.5*(dohmCarrierRin+dohmCarrierRout);
523 for (
int j = 0; j<4; j++) {
525 std::vector<double> dohmList;
529 int dohmCarrierReplica=0;
534 name = idName +
"DOHMCarrierFW";
537 rotstr = idName +
"FwUp";
539 dohmCarrierReplica = 1;
543 name = idName +
"DOHMCarrierFW";
546 rotstr = idName +
"FwDown";
548 180.*CLHEP::deg, 90.*CLHEP::deg,270.*CLHEP::deg, 0.,0.);
549 dohmCarrierReplica = 2;
553 name = idName +
"DOHMCarrierBW";
556 rotstr = idName +
"BwUp";
558 180.*CLHEP::deg, 90.*CLHEP::deg, 90.*CLHEP::deg,
559 180.*CLHEP::deg, 0.);
560 dohmCarrierReplica = 1;
564 name = idName +
"DOHMCarrierBW";
567 rotstr = idName +
"BwDown";
569 90.*CLHEP::deg, 270.*CLHEP::deg, 180.*CLHEP::deg, 0.);
570 dohmCarrierReplica = 2;
580 for (
int i = 0;
i < placeDohm*((
int)(dohmList.size()));
i++) {
582 double phi = (
std::abs(dohmList[
i])+0.5-1.)*dphi;
583 double phix = phi + 90*CLHEP::deg;
584 double phideg = phix/CLHEP::deg;
586 double theta = 90*CLHEP::deg;
587 double phiy = phix + 90.*CLHEP::deg;
591 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new " 592 <<
"rotation: " << rotstr <<
"\t" << theta
593 <<
", " << phix/CLHEP::deg <<
", " << theta
594 <<
", " << phiy/CLHEP::deg <<
", 0, 0";
609 dohmReplica = primReplica;
616 dohmReplica = auxReplica;
621 cpv.
position(dohm, dohmCarrier, dohmReplica, dohmTrasl, dohmRotation);
622 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << dohm.name()
623 <<
" replica " << dohmReplica <<
" positioned in " 624 << dohmCarrier.name() <<
" at " << dohmTrasl <<
" with " 630 cpv.
position(dohmCarrier,
parent(), dohmCarrierReplica, tran, rotation );
631 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " 632 << dohmCarrier.name() <<
" positioned in " <<
parent().name() <<
" at " 639 for (
int j = 0; j<4; j++) {
643 std::vector<double> pillarZ;
644 std::vector<double> pillarPhi;
645 double pillarDz=0, pillarDPhi=0, pillarRin=0, pillarRout=0;
649 name = idName +
"FWIntPillar";
658 name = idName +
"BWIntPillar";
667 name = idName +
"FWExtPillar";
676 name = idName +
"BWExtPillar";
688 pillarRin, pillarRout,
689 -pillarDPhi, 2.*pillarDPhi);
693 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " 695 << pillarMat <<
" from " 696 << -pillarDPhi <<
" to " 697 << pillarDPhi <<
" with Rin " 698 << pillarRin <<
" Rout " << pillarRout <<
" ZHalf " 703 int pillarReplica = 0;
704 for (
unsigned int i=0;
i<pillarZ.size();
i++) {
705 if( pillarPhi[
i]>0. ) {
711 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " 712 << Pillar.name() <<
" positioned in " 713 <<
parent().name() <<
" at " 714 << pillarTran <<
" with " << pillarRota
715 <<
" copy number " << pillarReplica;
std::vector< double > centRing2par
std::vector< double > bwIntPillarPhi
std::vector< double > dohmListFW
DDMaterial is used to define and access material information.
Sin< T >::type sin(const T &t)
std::vector< double > fwIntPillarPhi
Geom::Theta< T > theta() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
std::vector< double > fwIntPillarZ
DDName is used to identify DDD entities uniquely.
std::vector< double > bwExtPillarZ
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 > centRing1par
std::vector< double > fwExtPillarPhi
std::vector< double > bwIntPillarZ
std::vector< double > bwExtPillarPhi
std::vector< double > ribPhi
std::vector< double > dohmListBW
std::string pillarMaterial
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< double > ribW
const std::string & name() const
Returns the name.
std::vector< double > fwExtPillarZ
std::string dohmCarrierMaterial