15 #include "CLHEP/Units/GlobalPhysicalConstants.h"
16 #include "CLHEP/Units/GlobalSystemOfUnits.h"
20 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo info: Creating an instance";
32 genMat = sArgs[
"GeneralMaterial"];
33 detectorN = (int)(nArgs[
"DetectorNumber"]);
36 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: Parent " << parentName
37 <<
" General Material " <<
genMat
43 dlTop = nArgs[
"DlTop"];
47 if (comp ==
"No" || comp ==
"NO" || comp ==
"no")
doComponents =
false;
50 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: ModuleThick "
53 <<
" dl(Bottom) " <<
dlBottom <<
" dl(Hybrid) "
105 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: Wafer Material "
117 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: Active Material "
122 <<
",0)\tactiveName[" << i <<
"] = " <<
activeName[
i]
131 <<
" Material " <<
hybridMat <<
" Height "
141 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: Pitch Adapter Material "
148 coolMat = sArgs[
"CoolInsertMaterial"];
152 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo debug: Cool Element Material "
159 LogDebug(
"TIDGeom") <<
"==>> Constructing DDTIDModuleAlgo...";
183 double dxbot = 0.5*
dlBottom + sidfr;
184 double dxtop = 0.5*
dlTop + sidfr;
185 double dxtopenv, dxbotenv;
197 double bl1 = dxbotenv;
198 double bl2 = dxtopenv;
204 h1, bl1, bl1, 0, h1, bl2, bl2, 0);
208 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
209 <<
" Trap made of " <<
genMat <<
" of dimensions " << dz
210 <<
", 0, 0, " << h1 <<
", " << bl1 <<
", " << bl1
211 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
224 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
225 <<
" Box made of " << matname <<
" of dimensions "
226 << dx <<
", " << dy <<
", " << dz;
238 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
239 <<
" Box made of " << matname <<
" of dimensions "
240 << dx <<
", " << dy <<
", " << dz;
251 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
252 <<
" Box made of " << matname <<
" of dimensions "
253 << dx <<
", " << dy <<
", " << dz;
277 dz = 0.5 * sideFrameHeight;
280 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
281 <<
" Trap made of " << matname <<
" of dimensions "
282 << dz <<
", 0, 0, " << h1 <<
", " << bbl1 <<
", "
283 << bbl1 <<
", 0, " << h1 <<
", " << bbl2 <<
", "
309 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
310 <<
" Trap made of " << matname <<
" of dimensions "
311 << dz <<
", 0, 0, " << h1 <<
", " << bbl1 <<
", "
312 << bbl1 <<
", 0, " << h1 <<
", " << bbl2 <<
", "
317 if (rotstr !=
"NULL") {
324 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test: " << holeFrame.name()
325 <<
" number 1 positioned in " << sideFrame.name()
326 <<
" at (0,0," << zpos <<
") with no rotation";
332 double kaptonExtraHeight=0;
338 kaptonExtraHeight = 0.5*fabs(kaptonExtraHeight);
349 kaptonExtraHeight = 0.5*fabs(kaptonExtraHeight);
356 dz = 0.5 * (kaptonHeight+kaptonExtraHeight);
363 DDSplit(kaptonUncutName).second);
370 DDSplit(kaptonCutName).second);
379 bbl2 = bbl1*0.000001;
380 double thet = atan((bbl1-bbl2)/(2*dz));
390 zpos = 0.5 * kaptonHeight - bbl2;
405 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
406 <<
" SUBTRACTION SOLID Trap made of " << matname
407 <<
" of dimensions " << dz <<
", 0, 0, " << h1
408 <<
", " << bbl1 <<
", " << bbl1 <<
", 0, " << h1
409 <<
", " << bbl2 <<
", " << bbl2 <<
", 0";
421 bbl1 = dxbot - kaptonWidth + kaptonOver*(dxtop-dxbot)/
fullHeight;
422 bbl2 = dxtop - kaptonWidth;
423 zpos = 0.5*(kaptonHeight-kaptonExtraHeight-dz);
430 bbl1 = dxbot - kaptonWidth;
431 bbl2 = dxtop - kaptonWidth - kaptonOver*(dxtop-dxbot)/
fullHeight;
432 zpos = -0.5*(kaptonHeight-kaptonExtraHeight-dz);
437 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
438 <<
" Trap made of " << matname <<
" of dimensions "
439 << dz <<
", 0, 0, " << h1 <<
", " << bbl1 <<
", "
440 << bbl1 <<
", 0, " << h1 <<
", " << bbl2 <<
", "
445 if (rotstr !=
"NULL") {
452 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test: " << holeKapton.name()
453 <<
" number 1 positioned in " << kapton.name()
454 <<
" at (0,0," << zpos <<
") with no rotation";
472 solid =
DDSolidFactory::trap(name, dz, 0,0, h1,bl1,bl1,0, h1,bl2,bl2,0);
473 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
474 <<
" Trap made of " << matname <<
" of dimensions "
475 << dz <<
", 0, 0, " << h1 <<
", " << bl1 <<
", "
476 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", "
495 solid =
DDSolidFactory::trap(name, dz, 0,0, h1,bl2,bl1,0, h1,bl2,bl1,0);
496 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
497 <<
" Trap made of " << matname <<
" of dimensions "
498 << dz <<
", 0, 0, " << h1 <<
", " << bl2 <<
", "
499 << bl1 <<
", 0, " << h1 <<
", " << bl2 <<
", "
503 if (rotstr !=
"NULL") {
510 cpv.
position(active, wafer, 1, tran, rot);
511 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test: " << active.name()
512 <<
" number 1 positioned in " << wafer.name()
513 <<
" at " << tran <<
" with " <<
rot;
530 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
531 <<
" Box made of " << matname <<
" of dimensions"
532 <<
" " << dx <<
", " << dy <<
", " << dz;
542 double thet = atan((bl1-bl2)/(2.*dz));
545 LogDebug(
"TIDGeom") <<
"DDTIDModuleAlgo test:\t" << solid.
name()
546 <<
" Trap made of " << matname <<
" of "
547 <<
"dimensions " << dz <<
", " << thet/CLHEP::deg
548 <<
", 0, " << h1 <<
", " << bl1 <<
", " << bl1
549 <<
", 0, " << h1 <<
", " << bl2 <<
", " << bl2
555 LogDebug(
"TIDGeom") <<
"<<== End of DDTIDModuleAlgo construction ...";
DDMaterial is used to define and access material information.
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.
std::vector< std::string > waferName
type of data representation of DDCompactView
std::vector< std::string > holeKaptonName
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
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)
void execute(DDCompactView &cpv)
std::vector< std::string > kaptonName
Cos< T >::type cos(const T &t)
std::vector< std::string > holeFrameRot
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< std::string > sideFrameName
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.
std::vector< double > waferThick
static DDSolid subtraction(const DDName &name, const DDSolid &a, const DDSolid &b, const DDTranslation &t, const DDRotation &r)
std::vector< std::string > holeFrameName
std::vector< double > backplaneThick
virtual ~DDTIDModuleAlgo()
std::vector< std::string > pitchName
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< std::string > activeName
std::vector< std::string > holeKaptonRot