16 #include "CLHEP/Units/GlobalPhysicalConstants.h" 17 #include "CLHEP/Units/GlobalSystemOfUnits.h" 20 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC info: Creating an instance";
33 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: Parent " << parentName <<
" NameSpace " <<
idNameSpace;
37 layRin = vArgs[
"RadiusLo"];
39 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: Disk Rmin " <<
rMin <<
"\tRMax " <<
rMax 40 <<
"\tSeparation of layers " <<
deltaR <<
" with " <<
layRin.size() <<
" layers at R =";
41 for (i = 0; i <
layRin.size(); i++)
48 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: SupportCylinder " 49 <<
"Thickness " <<
cylinderT <<
"\tSupportDisk " 53 cableT = nArgs[
"CableThick"];
55 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: Cable Thickness " <<
cableT <<
" with materials: ";
56 for (i = 0; i <
cableMat.size(); i++)
59 strucMat = vsArgs[
"StructureMaterial"];
60 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: " <<
strucMat.size() <<
" materials for open structure:";
61 for (i = 0; i <
strucMat.size(); i++)
65 LogDebug(
"TIBGeom") <<
"DDTIBRadCableAlgo_MTCC debug: " <<
layers.size() <<
" layers:";
66 for (i = 0; i <
layers.size(); i++)
71 LogDebug(
"TIBGeom") <<
"==>> Constructing DDTIBRadCableAlgo_MTCC...";
84 for (
unsigned int i = 0;
i <
layRin.size();
i++) {
87 for (
double layer :
layers) {
88 if (
i + 1 == (
unsigned int)layer) {
95 name =
"TIBSupportSideDisk" + std::to_string(
i);
100 <<
supportMat <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin <<
" Rout " 101 << rout <<
" ZHalf " <<
dz;
107 <<
" positioned in " << diskName <<
" at " << r1 <<
" with no rotation";
110 name =
"TIBOpenZone" + std::to_string(
i);
118 <<
strucMat[
i] <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin
119 <<
" Rout " << rout <<
" ZHalf " <<
dz;
127 <<
" positioned in " << diskName <<
" at " << r2 <<
" with no rotation";
130 name =
"TIBRadCable" + std::to_string(i);
132 std::vector<double> pgonZ;
133 pgonZ.emplace_back(-0.5 *
cableT);
134 pgonZ.emplace_back(
cableT * (rv /
rMax - 0.5));
135 pgonZ.emplace_back(0.5 *
cableT);
136 std::vector<double> pgonRmin;
137 pgonRmin.emplace_back(rv);
138 pgonRmin.emplace_back(rv);
139 pgonRmin.emplace_back(rv);
140 std::vector<double> pgonRmax;
141 pgonRmax.emplace_back(
rMax);
142 pgonRmax.emplace_back(
rMax);
143 pgonRmax.emplace_back(rv);
146 <<
cableMat[
i] <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" and with " << pgonZ.size()
148 for (
unsigned int ii = 0;
ii < pgonZ.size();
ii++)
150 <<
"\tZ = " << pgonZ[
ii] <<
"\tRmin = " << pgonRmin[
ii] <<
"\tRmax = " << pgonRmax[
ii];
152 LogDebug(
"TIBGeom") <<
" material cableName " << i <<
" " << cableName;
159 <<
" positioned in " << diskName <<
" at " << r3 <<
" with no rotation";
165 for (
double layer : layers) {
166 if (
i + 1 == (
unsigned int)layer) {
173 unsigned int i =
layRin.size();
176 name =
"TIBOpenZone" + std::to_string(i);
179 <<
strucMat[
i] <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin
180 <<
" Rout " << rout <<
" ZHalf " <<
dz;
188 <<
" positioned in " << diskName <<
" at " << r2 <<
" with no rotation";
191 LogDebug(
"TIBGeom") <<
"<<== End of DDTIBRadCableAlgo_MTCC construction ...";
std::vector< double > layers
DDMaterial is used to define and access material information.
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
void execute(DDCompactView &cpv) override
DDName is used to identify DDD entities uniquely.
~DDTIBRadCableAlgo_MTCC() override
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
std::vector< std::string > strucMat
U second(std::pair< T, U > const &p)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::vector< std::string > cableMat
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
std::vector< double > layRin
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::Rotation3D DDRotation