18 #include "CLHEP/Units/GlobalPhysicalConstants.h" 19 #include "CLHEP/Units/GlobalSystemOfUnits.h" 23 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo info: Creating an instance";
35 genMat = sArgs[
"GeneralMaterial"];
39 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Parent " << parentName
40 <<
" NameSpace " <<
idNameSpace <<
" General Material " 46 dlTop = nArgs[
"DlTop"];
55 <<
" Detector Tilt " <<
detTilt/CLHEP::deg <<
" Height " 58 <<
" rPos " <<
rPos <<
" standrad rotation " 74 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Top Frame Material " 95 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug : Side Frame Material " 106 LogDebug(
"TECGeom") <<
" Supplies Box" <<
i <<
"'s Width: " 109 <<
" Supplies Box" <<
i <<
"'s y Position: " 117 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Wafer Material " 121 <<
" positioned with rotation" <<
" matrix:" 130 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Active Material " 143 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Hybrid Material " 154 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Pitch Adapter Material " 156 <<
" Thickness " <<
pitchThick <<
" position with " 164 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Bridge Material " 175 LogDebug(
"TECGeom") <<
"FALTBOOT DDTECModuleAlgo debug : Si-Reenforcement Material " 179 LogDebug(
"TECGeom") <<
" SiReenforcement" <<
i <<
"'s Width: " 182 <<
" SiReenforcement" <<
i <<
"'s y Position: " 197 LogDebug(
"TECGeom") <<
"This is a normal module, in ring "<<
ringNo<<
"!";
199 LogDebug(
"TECGeom") <<
"This is a stereo module, in ring "<<
ringNo<<
"!";
205 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: stereo Top Frame 2nd Part left Heigt " 221 int copyNr,
double x,
double y,
double z,
228 if (rotstr !=
"NULL") {
229 rotns =
DDSplit(rotName).second;
235 cpv.
position(toPos, mother, copyNr, tran, rot);
236 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << toPos.
name()
237 <<
" positioned in "<< mother.
name()
238 <<
" at " << tran <<
" with " <<
rot;
262 LogDebug(
"TECGeom") <<
"==>> Constructing DDTECModuleAlgo...";
268 double xpos, ypos, zpos;
282 idName = parentName.
name();
283 LogDebug(
"TECGeom") <<
"==>> " << idName <<
" parent " << parentName <<
" namespace " <<
idNameSpace;
300 dxdif = dxtop - dxbot;
304 name = idName +
"SideFrameLeft";
315 bl1, 0, h1, bl2, bl2, 0);
316 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
317 <<
" Trap made of " << matname <<
" of dimensions " 318 << dz <<
", "<<thet<<
", 0, " << h1 <<
", " << bl1 <<
", " 319 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
325 zpos = topFrameEndZ -
dz;
329 xpos -= 2*
tan(fabs(thet)) *
dz;
341 name = idName +
"SideFrameRight";
351 bl1, 0, h1, bl2, bl2, 0);
352 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
353 <<
" Trap made of " << matname <<
" of dimensions " 354 << dz <<
", "<<thet<<
", 0, " << h1 <<
", " << bl1 <<
", " 355 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
361 zpos = topFrameEndZ -
dz ;
364 xpos += 2*
tan(fabs(thet)) *
dz;
377 name = idName +
"SuppliesBox" + std::to_string(
i);
389 bl1, 0, h1, bl2, bl2, 0);
390 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
391 <<
" Trap made of " << matname <<
" of dimensions " 392 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 393 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
401 xpos += 2*fabs(
tan(thet))* siFrSuppBoxYPos[
i];
413 name = idName +
"Hybrid";
420 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
421 <<
" Box made of " << matname <<
" of dimensions " 422 << dx <<
", " << dy <<
", " <<
dz;
429 doPos(hybrid,0,ypos,zpos,
"NULL", cpv);
432 name = idName + tag +
"Wafer";
440 bl1, 0, h1, bl2, bl2, 0);
441 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
442 <<
" Trap made of " << matname <<
" of dimensions " 443 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 444 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 455 name = idName + tag +
"Active";
463 tmp = bl2; bl2 =bl1; bl1 =
tmp;
466 bl1, 0, h1, bl2, bl1, 0);
467 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
468 <<
" Trap made of " << matname <<
" of dimensions " 469 << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " 470 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 477 name = idName + tag +
"Inactive";
489 tmp = bl2; bl2 =bl1; bl1 =
tmp;
492 bl1, 0, h1, bl2, bl1, 0);
493 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
494 <<
" Trap made of " << matname <<
" of dimensions " 495 << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", " 496 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " 500 doPos(inactive,active, 1, ypos,0,0,
"NULL", cpv);
503 name = idName +
"PA";
512 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
513 <<
" Box made of " << matname <<
" of dimensions " 514 << dx <<
", " << dy <<
", " <<
dz;
520 double thet = atan((bl1-bl2)/(2.*dz));
522 bl1, bl1, 0, h1, bl2, bl2, 0);
523 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
524 <<
" Trap made of " << matname
525 <<
" of dimensions " << dz <<
", " << thet/CLHEP::deg
526 <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
527 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
538 else doPos(
pa, xpos, ypos,zpos,
"NULL", cpv);
540 name = idName +
"TopFrame";
554 bl1,0, h1, bl2, bl2, 0);
555 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
556 <<
" Trap made of " << matname <<
" of dimensions " 557 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 558 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
563 name = idName +
"TopFrame2";
569 double thet = atan((bl1-bl2)/(2.*dz));
572 bl1, bl1, 0, h1, bl2, bl2, 0);
573 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
574 <<
" Trap made of " << matname <<
" of dimensions " 575 << dz <<
", " << thet/CLHEP::deg <<
", 0, " << h1
576 <<
", " << bl1 <<
", " << bl1 <<
", 0, " << h1
577 <<
", " << bl2 <<
", " << bl2 <<
", 0";
587 doPos(topFrame, 0,ypos,zpos,
"NULL", cpv);
597 name = idName +
"SiReenforce" + std::to_string(
i);
606 bl1, 0, h1, bl2, bl2, 0);
607 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
608 <<
" Trap made of " << matname <<
" of dimensions " 609 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 610 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
631 name = idName +
"Bridge";
639 bl1, 0, h1, bl2, bl2, 0);
640 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
641 <<
" Trap made of " << matname <<
" of dimensions " 642 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " 643 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
647 name = idName +
"BridgeGap";
652 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
653 <<
" Box made of " << matname <<
" of dimensions " 654 << bl1 <<
", " << h1 <<
", " <<
dz;
657 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << bridgeGap.name()
658 <<
" number 1 positioned in " << bridge.name()
659 <<
" at (0,0,0) with no rotation";
662 LogDebug(
"TECGeom") <<
"<<== End of DDTECModuleAlgo construction ...";
std::vector< double > siFrSuppBoxHeight
virtual ~DDTECModuleAlgo()
void doPos(DDLogicalPart toPos, DDLogicalPart mother, int copyNr, double x, double y, double z, std::string rotName, DDCompactView &cpv)
double sideFrameLWidthLow
DDMaterial is used to define and access material information.
std::vector< double > siFrSuppBoxWidth
Sin< T >::type sin(const T &t)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
type of data representation of DDCompactView
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
void execute(DDCompactView &cpv)
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.
double sideFrameRWidthLow
std::vector< double > siReenforceWidth
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
std::vector< double > siFrSuppBoxYPos
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.