178 LogDebug(
"TIBGeom") <<
"==>> Constructing DDTIBLayerAlgo...";
181 const std::string &idName = parentName.
name();
187 rmin, rmax, 0, CLHEP::twopi);
189 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
191 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
192 <<
" with Rin " << rmin <<
" Rout " << rmax
193 <<
" ZHalf " << 0.5*
layerL;
203 std::string
name = idName +
"Down";
205 rin, rout, 0, CLHEP::twopi);
206 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
208 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
209 <<
" with Rin " << rin <<
" Rout " << rout
210 <<
" ZHalf " << 0.5*
layerL;
213 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << layerIn.name()
214 <<
" number 1 positioned in " << layer.name()
215 <<
" at (0,0,0) with no rotation";
221 double phi = (
n+0.5)*dphi;
223 double phideg = phix/CLHEP::deg;
226 double theta = 90*CLHEP::deg;
227 double phiy = phix + 90.*CLHEP::deg;
231 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new "
232 <<
"rotation: " << rotstr <<
"\t90., "
233 << phix/CLHEP::deg <<
", 90.,"
234 << phiy/CLHEP::deg <<
", 0, 0";
240 cpv.
position(detIn, layerIn,
n+1, trdet, rotation);
241 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << detIn.name()
242 <<
" number " <<
n+1 <<
" positioned in "
243 << layerIn.name() <<
" at " << trdet <<
" with "
250 name = idName +
"Up";
252 rin, rout, 0, CLHEP::twopi);
253 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
255 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
256 <<
" with Rin " << rin <<
" Rout " << rout
257 <<
" ZHalf " << 0.5*
layerL;
260 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << layerOut.name()
261 <<
" number 1 positioned in " << layer.name()
262 <<
" at (0,0,0) with no rotation";
268 double phi = (
n+0.5)*dphi;
270 double phideg = phix/CLHEP::deg;
273 double theta = 90*CLHEP::deg;
274 double phiy = phix + 90.*CLHEP::deg;
278 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new "
279 <<
"rotation: " << rotstr <<
"\t90., "
280 << phix/CLHEP::deg <<
", 90.,"
281 << phiy/CLHEP::deg <<
", 0, 0";
287 cpv.
position(detOut, layerOut,
n+1, trdet, rotation);
288 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << detOut.name()
289 <<
" number " <<
n+1 <<
" positioned in "
290 << layerOut.name() <<
" at " << trdet <<
" with "
300 name = idName +
"Cylinder";
302 rin, rout, 0, CLHEP::twopi);
303 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
306 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
307 <<
" Rout " << rout <<
" ZHalf " << 0.5*
layerL;
312 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cylinder.name()
313 <<
" number 1 positioned in " << layer.name()
314 <<
" at (0,0,0) with no rotation";
320 name = idName +
"CylinderIn";
322 rin, rout, 0, CLHEP::twopi);
323 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
325 <<
genMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
326 <<
" with Rin " << rin <<
" Rout " << rout
327 <<
" ZHalf " << 0.5*
layerL;
330 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cylinderIn.name()
331 <<
" number 1 positioned in " << cylinder.name()
332 <<
" at (0,0,0) with no rotation";
338 name = idName +
"Filler";
341 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
344 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
345 <<
" Rout " << rout <<
" ZHalf " <<
fillerDz;
349 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << cylinderFiller.name()
350 <<
" number 1" <<
" positioned in "
352 <<
" number 2" <<
" positioned in "
360 for (
int i = 0;
i < (int)(
ribW.size());
i++) {
365 rin+0.5*CLHEP::mm, rout-0.5*CLHEP::mm,
367 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
369 <<
ribMat <<
" from " << -0.5*width/CLHEP::deg <<
" to "
370 << 0.5*width/CLHEP::deg <<
" with Rin "
371 << rin+0.5*CLHEP::mm <<
" Rout "
372 << rout-0.5*CLHEP::mm <<
" ZHalf " << dz;
375 double phideg = phix/CLHEP::deg;
378 double theta = 90*CLHEP::deg;
379 double phiy = phix + 90.*CLHEP::deg;
383 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new "
384 <<
"rotation: " << rotstr <<
"\t90., "
385 << phix/CLHEP::deg <<
", 90.," << phiy/CLHEP::deg
392 cpv.
position(cylinderRib, cylinderIn, 1, tran, rotation);
393 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << cylinderRib.name()
394 <<
" number 1" <<
" positioned in "
395 << cylinderIn.name() <<
" at " << tran <<
" with "
406 name = idName +
"InnerMFRing";
408 rin, rout, 0, CLHEP::twopi);
410 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
413 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
414 <<
" Rout " << rout <<
" ZHalf " <<
MFRingDz;
419 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << inmfr.name()
420 <<
" number 1 and 2 positioned in " << layer.name()
421 <<
" at (0,0,+-" << 0.5*
layerL-MFRingDz <<
") with no rotation";
427 name = idName +
"OuterMFRing";
429 rin, rout, 0, CLHEP::twopi);
431 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
434 << CLHEP::twopi/CLHEP::deg <<
" with Rin " << rin
435 <<
" Rout " << rout <<
" ZHalf " <<
MFRingDz;
440 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << outmfr.name()
441 <<
" number 1 and 2 positioned in " << layer.name()
442 <<
" at (0,0,+-" << 0.5*
layerL-MFRingDz
443 <<
") with no rotation";
454 name = idName +
"CentRing1";
456 rin, rout, 0, CLHEP::twopi);
458 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
460 <<
centMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
461 <<
" with Rin " << rin <<
" Rout " << rout
462 <<
" ZHalf " << centDz;
466 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cent1.name()
467 <<
" positioned in " << layer.name()
468 <<
" at (0,0," << centZ <<
") with no rotation";
474 name = idName +
"CentRing2";
476 rin, rout, 0, CLHEP::twopi);
478 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
480 <<
centMat <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
481 <<
" with Rin " << rin <<
" Rout " << rout
482 <<
" ZHalf " << centDz;
486 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: " << cent2.name()
487 <<
" positioned in " << layer.name()
488 <<
" at (0,0," << centZ <<
") with no rotation";
494 name = idName +
"DOHMCarrier";
499 double dohmCarrierZ = 0.5*
layerL-2.*MFRingDz-dohmCarrierDz;
502 dohmCarrierRin, dohmCarrierRout,
505 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
510 << dohmCarrierRin <<
" Rout " <<
MFRingOutR <<
" ZHalf "
521 double dohmR = 0.5*(dohmCarrierRin+dohmCarrierRout);
524 for (
int j = 0;
j<4;
j++) {
526 std::vector<double> dohmList;
530 int dohmCarrierReplica=0;
535 name = idName +
"DOHMCarrierFW";
538 rotstr = idName +
"FwUp";
540 dohmCarrierReplica = 1;
544 name = idName +
"DOHMCarrierFW";
547 rotstr = idName +
"FwDown";
549 180.*CLHEP::deg, 90.*CLHEP::deg,270.*CLHEP::deg, 0.,0.);
550 dohmCarrierReplica = 2;
554 name = idName +
"DOHMCarrierBW";
557 rotstr = idName +
"BwUp";
559 180.*CLHEP::deg, 90.*CLHEP::deg, 90.*CLHEP::deg,
560 180.*CLHEP::deg, 0.);
561 dohmCarrierReplica = 1;
565 name = idName +
"DOHMCarrierBW";
568 rotstr = idName +
"BwDown";
570 90.*CLHEP::deg, 270.*CLHEP::deg, 180.*CLHEP::deg, 0.);
571 dohmCarrierReplica = 2;
581 for (
int i = 0;
i < placeDohm*((int)(dohmList.size()));
i++) {
583 double phi = (
std::abs(dohmList[
i])+0.5-1.)*dphi;
584 double phix = phi + 90*CLHEP::deg;
585 double phideg = phix/CLHEP::deg;
587 double theta = 90*CLHEP::deg;
588 double phiy = phix + 90.*CLHEP::deg;
592 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: Creating a new "
593 <<
"rotation: " << rotstr <<
"\t" << theta
594 <<
", " << phix/CLHEP::deg <<
", " << theta
595 <<
", " << phiy/CLHEP::deg <<
", 0, 0";
601 std::string dohmName;
610 dohmReplica = primReplica;
617 dohmReplica = auxReplica;
622 cpv.
position(dohm, dohmCarrier, dohmReplica, dohmTrasl, dohmRotation);
623 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test " << dohm.name()
624 <<
" replica " << dohmReplica <<
" positioned in "
625 << dohmCarrier.name() <<
" at " << dohmTrasl <<
" with "
631 cpv.
position(dohmCarrier,
parent(), dohmCarrierReplica, tran, rotation );
632 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test "
633 << dohmCarrier.name() <<
" positioned in " <<
parent().name() <<
" at "
640 for (
int j = 0;
j<4;
j++) {
644 std::vector<double> pillarZ;
645 std::vector<double> pillarPhi;
646 double pillarDz=0, pillarDPhi=0, pillarRin=0, pillarRout=0;
650 name = idName +
"FWIntPillar";
659 name = idName +
"BWIntPillar";
668 name = idName +
"FWExtPillar";
677 name = idName +
"BWExtPillar";
689 pillarRin, pillarRout,
690 -pillarDPhi, 2.*pillarDPhi);
694 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test: "
696 << pillarMat <<
" from "
697 << -pillarDPhi <<
" to "
698 << pillarDPhi <<
" with Rin "
699 << pillarRin <<
" Rout " << pillarRout <<
" ZHalf "
704 int pillarReplica = 0;
705 for (
unsigned int i=0;
i<pillarZ.size();
i++) {
706 if( pillarPhi[
i]>0. ) {
712 LogDebug(
"TIBGeom") <<
"DDTIBLayerAlgo test "
713 << Pillar.name() <<
" positioned in "
714 <<
parent().name() <<
" at "
715 << pillarTran <<
" with " << pillarRota
716 <<
" 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::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
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)
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