15 #include "CLHEP/Units/GlobalPhysicalConstants.h"
16 #include "CLHEP/Units/GlobalSystemOfUnits.h"
78 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo info: Creating an instance";
90 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Parent " << parentName <<
" NameSpace " <<
idNameSpace;
97 cableM = vsArgs[
"CableMaterial"];
98 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Disk Half width " <<
diskDz <<
"\tRMax " <<
rMax
99 <<
"\tCable Thickness " <<
cableT <<
"\tRadii of disk position and cable materials:";
100 for (
int i = 0;
i < (int)(
rodRin.size());
i++)
103 connW = nArgs[
"ConnW"];
104 connT = nArgs[
"ConnT"];
105 connM = vsArgs[
"ConnMaterial"];
106 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Connector Width = " <<
connW <<
"\tThickness = " <<
connT
108 for (
int i = 0;
i < (int)(
connM.size());
i++)
120 coolM1 = sArgs[
"CoolMaterial1"];
121 coolM2 = sArgs[
"CoolMaterial2"];
124 <<
"\t Material = " <<
coolM1 <<
"\t Radial positions:";
125 for (
int i = 0;
i < (int)(
coolR1.size());
i++)
127 for (
int i = 0;
i < (int)(
coolR2.size());
i++)
131 <<
"\t Material = " <<
coolM2 <<
"\t Radial positions:";
132 for (
int i = 0;
i < (int)(coolR1.size());
i++)
133 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR1[
i];
134 for (
int i = 0;
i < (int)(coolR2.size());
i++)
135 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR2[
i];
137 names = vsArgs[
"RingName"];
138 for (
int i = 0;
i < (int)(
names.size());
i++)
139 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: names[" <<
i <<
"] = " <<
names[
i];
143 LogDebug(
"TOBGeom") <<
"==>> Constructing DDTOBRadCableAlgo...";
147 for (
int i = 0;
i < (int)(
names.size());
i++) {
150 double dz, rin, rout;
153 name =
"TOBCoolingManifold" +
names[
i] +
"a";
162 DDMaterial coolManifoldMatter_a(coolManifoldName_a);
168 <<
" positioned in " << diskName <<
" at " << r1 <<
" with no rotation";
170 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"a";
178 DDMaterial coolManifoldFluidMatter_a(coolManifoldFluidName_a);
182 <<
" positioned in " << coolManifoldName_a <<
" with no translation and no rotation";
184 name =
"TOBCoolingManifold" +
names[
i] +
"r";
193 DDMaterial coolManifoldMatter_r(coolManifoldName_r);
199 <<
" positioned in " << diskName <<
" at " << r1 <<
" with no rotation";
201 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"r";
209 DDMaterial coolManifoldFluidMatter_r(coolManifoldFluidName_r);
213 <<
" positioned in " << coolManifoldName_r <<
" with no translation and no rotation";
216 name =
"TOBConn" +
names[
i];
222 <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" with Rin " << rin <<
" Rout " << rout
231 <<
" positioned in " << diskName <<
" at " << r2 <<
" with no rotation";
234 name =
"TOBRadServices" +
names[
i];
237 vector<double> pgonZ;
238 pgonZ.emplace_back(-0.5 *
cableT);
239 pgonZ.emplace_back(
cableT * (rin /
rMax - 0.5));
240 pgonZ.emplace_back(0.5 *
cableT);
241 vector<double> pgonRmin;
242 pgonRmin.emplace_back(rin);
243 pgonRmin.emplace_back(rin);
244 pgonRmin.emplace_back(rin);
245 vector<double> pgonRmax;
246 pgonRmax.emplace_back(rout);
247 pgonRmax.emplace_back(rout);
248 pgonRmax.emplace_back(rout);
251 <<
" from 0 to " << CLHEP::twopi / CLHEP::deg <<
" and with " << pgonZ.size() <<
" sections";
252 for (
int ii = 0;
ii < (int)(pgonZ.size());
ii++)
253 LogDebug(
"TOBGeom") <<
"\t[" <<
ii <<
"]\tZ = " << pgonZ[
ii] <<
"\tRmin = " << pgonRmin[
ii]
254 <<
"\tRmax = " << pgonRmax[
ii];
262 <<
" positioned in " << diskName <<
" at " << r3 <<
" with no rotation";
265 LogDebug(
"TOBGeom") <<
"<<== End of DDTOBRadCableAlgo construction ...";
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
static AlgebraicMatrix initialize()
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
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 initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
const std::string names[nVars_]
A DDSolid represents the shape of a part.
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
void execute(DDCompactView &cpv) override
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
~DDTOBRadCableAlgo() override
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation