17 #include "CLHEP/Units/GlobalPhysicalConstants.h"
18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
22 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo info: Creating an instance";
34 genMat = sArgs[
"GeneralMaterial"];
38 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Parent " << parentName
39 <<
" NameSpace " <<
idNameSpace <<
" General Material "
41 ringNo = (int)nArgs[
"RingNo"];
45 dlTop = nArgs[
"DlTop"];
54 <<
" Detector Tilt " <<
detTilt/CLHEP::deg <<
" Height "
57 <<
" rPos " <<
rPos <<
" standrad rotation "
73 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Top Frame Material "
94 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug : Side Frame Material "
105 LogDebug(
"TECGeom") <<
" Supplies Box" <<
i <<
"'s Width: "
108 <<
" Supplies Box" <<
i <<
"'s y Position: "
116 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Wafer Material "
120 <<
" positioned with rotation" <<
" matrix:"
129 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Active Material "
142 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Hybrid Material "
153 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Pitch Adapter Material "
155 <<
" Thickness " <<
pitchThick <<
" position with "
163 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: Bridge Material "
174 LogDebug(
"TECGeom") <<
"FALTBOOT DDTECModuleAlgo debug : Si-Reenforcement Material "
178 LogDebug(
"TECGeom") <<
" SiReenforcement" <<
i <<
"'s Width: "
181 <<
" SiReenforcement" <<
i <<
"'s y Position: "
194 isStereo = (int)nArgs[
"isStereo"] == 1;
196 LogDebug(
"TECGeom") <<
"This is a normal module, in ring "<<
ringNo<<
"!";
198 LogDebug(
"TECGeom") <<
"This is a stereo module, in ring "<<
ringNo<<
"!";
204 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo debug: stereo Top Frame 2nd Part left Heigt "
220 int copyNr,
double x,
double y,
double z,
225 std::string rotstr =
DDSplit(rotName).first;
227 if (rotstr !=
"NULL") {
228 rotns =
DDSplit(rotName).second;
234 cpv.
position(toPos, mother, copyNr, tran, rot);
235 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << toPos.
name()
236 <<
" positioned in "<< mother.
name()
237 <<
" at " << tran <<
" with " <<
rot;
261 LogDebug(
"TECGeom") <<
"==>> Constructing DDTECModuleAlgo...";
267 double xpos, ypos, zpos;
276 std::string
tag(
"Rphi");
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;
378 name = idName +
"SuppliesBox"+buf;
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);
600 name = idName +
"SiReenforce"+buf;
609 bl1, 0, h1, bl2, bl2, 0);
610 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
611 <<
" Trap made of " << matname <<
" of dimensions "
612 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", "
613 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
634 name = idName +
"Bridge";
642 bl1, 0, h1, bl2, bl2, 0);
643 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
644 <<
" Trap made of " << matname <<
" of dimensions "
645 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", "
646 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
650 name = idName +
"BridgeGap";
655 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test:\t" << solid.
name()
656 <<
" Box made of " << matname <<
" of dimensions "
657 << bl1 <<
", " << h1 <<
", " << dz;
660 LogDebug(
"TECGeom") <<
"DDTECModuleAlgo test: " << bridgeGap.name()
661 <<
" number 1 positioned in " << bridge.name()
662 <<
" at (0,0,0) with no rotation";
665 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.