19 #include "CLHEP/Units/GlobalPhysicalConstants.h" 20 #include "CLHEP/Units/GlobalSystemOfUnits.h" 24 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo info: Creating an instance";
36 genMat = sArgs[
"GeneralMaterial"];
40 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Parent " << parentName
41 <<
" NameSpace " <<
idNameSpace <<
" General Material " 47 dlTop = nArgs[
"DlTop"];
56 <<
" Detector Tilt " <<
detTilt/CLHEP::deg <<
" Height " 59 <<
" rPos " <<
rPos <<
" standrad rotation " 75 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Top Frame Material " 96 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug : Side Frame Material " 107 LogDebug(
"TECGeom") <<
" Supplies Box" <<
i <<
"'s Width: " 110 <<
" Supplies Box" <<
i <<
"'s y Position: " 118 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Wafer Material " 122 <<
" positioned with rotation" <<
" matrix:" 131 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Active Material " 144 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Hybrid Material " 155 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Pitch Adapter Material " 157 <<
" Thickness " <<
pitchThick <<
" position with " 165 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Bridge Material " 176 LogDebug(
"TECGeom") <<
"FALTBOOT DDTECModuleAlgo debug : Si-Reenforcement Material " 180 LogDebug(
"TECGeom") <<
" SiReenforcement" <<
i <<
"'s Width: " 183 <<
" SiReenforcement" <<
i <<
"'s y Position: " 198 LogDebug(
"TECGeom") <<
"This is a normal module, in ring "<<
ringNo<<
"!";
200 LogDebug(
"TECGeom") <<
"This is a stereo module, in ring "<<
ringNo<<
"!";
206 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: stereo Top Frame 2nd Part left Heigt " 222 int copyNr,
double x,
double y,
double z,
229 if (rotstr !=
"NULL") {
230 rotns =
DDSplit(rotName).second;
236 cpv.
position(toPos, mother, copyNr, tran, rot);
237 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << toPos.
name()
238 <<
" positioned in "<< mother.
name()
239 <<
" at " << tran <<
" with " <<
rot;
263 LogDebug(
"TECGeom") <<
"==>> Constructing DDTECModuleAlgo...";
269 double xpos, ypos, zpos;
283 idName = parentName.
name();
284 LogDebug(
"TECGeom") <<
"==>> " << idName <<
" parent " << parentName <<
" namespace " <<
idNameSpace;
301 dxdif = dxtop - dxbot;
305 name = idName +
"SideFrameLeft";
316 bl1, 0, h1, bl2, bl2, 0);
317 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
318 <<
" Trap made of " << matname <<
" of dimensions " 319 << dz <<
", "<<thet<<
", 0, " << h1 <<
", " << bl1 <<
", " 320 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
326 zpos = topFrameEndZ -
dz;
330 xpos -= 2*
tan(fabs(thet)) *
dz;
342 name = idName +
"SideFrameRight";
352 bl1, 0, h1, bl2, bl2, 0);
353 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
354 <<
" Trap made of " << matname <<
" of dimensions " 355 << dz <<
", "<<thet<<
", 0, " << h1 <<
", " << bl1 <<
", " 356 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
362 zpos = topFrameEndZ -
dz ;
365 xpos += 2*
tan(fabs(thet)) *
dz;
378 name = idName +
"SuppliesBox" + std::to_string(
i);
390 bl1, 0, h1, bl2, bl2, 0);
391 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
392 <<
" Trap made of " << matname <<
" of dimensions " 393 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 394 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
402 xpos += 2*fabs(
tan(thet))* siFrSuppBoxYPos[
i];
414 name = idName +
"Hybrid";
421 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
422 <<
" Box made of " << matname <<
" of dimensions " 423 << dx <<
", " << dy <<
", " <<
dz;
430 doPos(hybrid,0,ypos,zpos,
"NULL", cpv);
433 name = idName + tag +
"Wafer";
441 bl1, 0, h1, bl2, bl2, 0);
442 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
443 <<
" Trap made of " << matname <<
" of dimensions " 444 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 445 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 456 name = idName + tag +
"Active";
464 tmp = bl2; bl2 =bl1; bl1 =
tmp;
467 bl1, 0, h1, bl2, bl1, 0);
468 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
469 <<
" Trap made of " << matname <<
" of dimensions " 470 << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " 471 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 478 name = idName + tag +
"Inactive";
490 tmp = bl2; bl2 =bl1; bl1 =
tmp;
493 bl1, 0, h1, bl2, bl1, 0);
494 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
495 <<
" Trap made of " << matname <<
" of dimensions " 496 << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " 497 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 501 doPos(inactive,active, 1, ypos,0,0,
"NULL", cpv);
504 name = idName +
"PA";
513 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
514 <<
" Box made of " << matname <<
" of dimensions " 515 << dx <<
", " << dy <<
", " <<
dz;
521 double thet = atan((bl1-bl2)/(2.*dz));
523 bl1, bl1, 0, h1, bl2, bl2, 0);
524 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
525 <<
" Trap made of " << matname
526 <<
" of dimensions " << dz <<
", " << thet/CLHEP::deg
527 <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
528 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
539 else doPos(
pa, xpos, ypos,zpos,
"NULL", cpv);
541 name = idName +
"TopFrame";
555 bl1,0, h1, bl2, bl2, 0);
556 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
557 <<
" Trap made of " << matname <<
" of dimensions " 558 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 559 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
564 name = idName +
"TopFrame2";
570 double thet = atan((bl1-bl2)/(2.*dz));
573 bl1, bl1, 0, h1, bl2, bl2, 0);
574 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
575 <<
" Trap made of " << matname <<
" of dimensions " 576 << dz <<
", " << thet/CLHEP::deg <<
", 0, " << h1
577 <<
", " << bl1 <<
", " << bl1 <<
", 0, " << h1
578 <<
", " << bl2 <<
", " << bl2 <<
", 0";
588 doPos(topFrame, 0,ypos,zpos,
"NULL", cpv);
598 name = idName +
"SiReenforce" + std::to_string(
i);
607 bl1, 0, h1, bl2, bl2, 0);
608 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
609 <<
" Trap made of " << matname <<
" of dimensions " 610 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 611 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
632 name = idName +
"Bridge";
640 bl1, 0, h1, bl2, bl2, 0);
641 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
642 <<
" Trap made of " << matname <<
" of dimensions " 643 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 644 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
648 name = idName +
"BridgeGap";
653 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
654 <<
" Box made of " << matname <<
" of dimensions " 655 << bl1 <<
", " << h1 <<
", " <<
dz;
658 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << bridgeGap.name()
659 <<
" number 1 positioned in " << bridge.name()
660 <<
" at (0,0,0) with no rotation";
663 LogDebug(
"TECGeom") <<
"<<== End of DDTECModuleAlgo construction ...";
std::vector< double > siFrSuppBoxHeight
double sideFrameLWidthLow
DDMaterial is used to define and access material information.
std::vector< double > siFrSuppBoxWidth
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
type of data representation of DDCompactView
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
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)
std::string siReenforceMat
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::string siFrSuppBoxMat
std::vector< double > siReenforceYPos
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
~DDTECModuleAlgo() override
void execute(DDCompactView &cpv) override
double sideFrameRWidthLow
std::vector< double > siReenforceWidth
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::vector< double > siFrSuppBoxYPos
void doPos(const DDLogicalPart &toPos, const DDLogicalPart &mother, int copyNr, double x, double y, double z, const std::string &rotName, DDCompactView &cpv)
std::vector< std::vector< double > > tmp
std::vector< double > siReenforceHeight
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
const std::string & name() const
Returns the name.