16 #include "CLHEP/Units/GlobalPhysicalConstants.h"
17 #include "CLHEP/Units/GlobalSystemOfUnits.h"
21 rodRin(0),rodRout(0),cableM(0),connM(0),
22 coolR1(0),coolR2(0),coolRin(0),coolRout1(0),coolRout2(0),
23 coolStartPhi1(0),coolDeltaPhi1(0),
24 coolStartPhi2(0),coolDeltaPhi2(0),
26 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo info: Creating an instance";
39 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Parent " << parentName
47 cableM = vsArgs[
"CableMaterial"];
48 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Disk Half width " <<
diskDz
49 <<
"\tRMax " <<
rMax <<
"\tCable Thickness " <<
cableT
50 <<
"\tRadii of disk position and cable materials:";
51 for (
int i=0;
i<(int)(
rodRin.size());
i++)
55 connW = nArgs[
"ConnW"];
56 connT = nArgs[
"ConnT"];
57 connM = vsArgs[
"ConnMaterial"];
58 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Connector Width = "
61 for (
int i=0;
i<(int)(
connM.size());
i++)
73 coolM1 = sArgs[
"CoolMaterial1"];
74 coolM2 = sArgs[
"CoolMaterial2"];
75 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Cool Manifold Torus Rin = " <<
coolRin
78 <<
"\t Material = " <<
coolM1
79 <<
"\t Radial positions:";
80 for (
int i=0;
i<(int)(
coolR1.size());
i++)
82 for (
int i=0;
i<(int)(
coolR2.size());
i++)
84 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: Cooling Fluid Torus Rin = " <<
coolRin
87 <<
"\t Material = " <<
coolM2
88 <<
"\t Radial positions:";
89 for (
int i=0;
i<(int)(coolR1.size());
i++)
90 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR1[
i];
91 for (
int i=0;
i<(int)(coolR2.size());
i++)
92 LogDebug(
"TOBGeom") <<
"\t[" <<
i <<
"]\tR = " << coolR2[
i];
94 names = vsArgs[
"RingName"];
95 for (
int i=0;
i<(int)(
names.size());
i++)
96 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo debug: names[" <<
i
102 LogDebug(
"TOBGeom") <<
"==>> Constructing DDTOBRadCableAlgo...";
106 for (
int i=0;
i<(int)(
names.size());
i++) {
110 double dz, rin, rout;
113 name =
"TOBCoolingManifold" +
names[
i] +
"a";
117 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
122 <<
" R torus " <<
coolR1[i];
124 DDMaterial coolManifoldMatter_a(coolManifoldName_a);
126 coolManifoldMatter_a, solid);
130 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
132 <<
" positioned in " << diskName <<
" at " << r1
133 <<
" with no rotation";
135 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"a";
138 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
143 <<
" R torus " <<
coolR1[i];
146 DDMaterial coolManifoldFluidMatter_a(coolManifoldFluidName_a);
148 coolManifoldFluidMatter_a, solid);
151 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
153 <<
" positioned in " << coolManifoldName_a
154 <<
" with no translation and no rotation";
156 name =
"TOBCoolingManifold" +
names[
i] +
"r";
161 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
166 <<
" R torus " <<
coolR2[i];
168 DDMaterial coolManifoldMatter_r(coolManifoldName_r);
170 coolManifoldMatter_r, solid);
174 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
176 <<
" positioned in " << diskName <<
" at " << r1
177 <<
" with no rotation";
179 name =
"TOBCoolingManifoldFluid" +
names[
i] +
"r";
182 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
187 <<
" R torus " <<
coolR2[i];
190 DDMaterial coolManifoldFluidMatter_r(coolManifoldFluidName_r);
192 coolManifoldFluidMatter_r, solid);
195 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
197 <<
" positioned in " << coolManifoldName_r
198 <<
" with no translation and no rotation";
201 name =
"TOBConn" +
names[
i];
206 rout, 0, CLHEP::twopi);
207 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
209 <<
connM[
i] <<
" from 0 to " << CLHEP::twopi/CLHEP::deg
210 <<
" with Rin " << rin <<
" Rout " << rout
218 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
220 <<
" positioned in " << diskName <<
" at " << r2
221 <<
" with no rotation";
224 name =
"TOBRadServices" +
names[
i];
227 std::vector<double> pgonZ;
228 pgonZ.push_back(-0.5*
cableT);
230 pgonZ.push_back(0.5*
cableT);
231 std::vector<double> pgonRmin;
232 pgonRmin.push_back(rin);
233 pgonRmin.push_back(rin);
234 pgonRmin.push_back(rin);
235 std::vector<double> pgonRmax;
236 pgonRmax.push_back(rout);
237 pgonRmax.push_back(rout);
238 pgonRmax.push_back(rout);
240 pgonZ, pgonRmin, pgonRmax);
241 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
244 << CLHEP::twopi/CLHEP::deg <<
" and with "
245 << pgonZ.size() <<
" sections";
246 for (
int ii = 0;
ii < (int)(pgonZ.size());
ii++)
247 LogDebug(
"TOBGeom") <<
"\t[" <<
ii <<
"]\tZ = " << pgonZ[
ii]
248 <<
"\tRmin = " << pgonRmin[
ii] <<
"\tRmax = "
256 LogDebug(
"TOBGeom") <<
"DDTOBRadCableAlgo test: "
258 <<
" positioned in " << diskName <<
" at " << r3
259 <<
" with no rotation";
263 LogDebug(
"TOBGeom") <<
"<<== End of DDTOBRadCableAlgo construction ...";
static DDSolid torus(const DDName &name, double rMin, double rMax, double rTorus, double startPhi, double deltaPhi)
static const HistoName names[]
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)
std::vector< double > rodRout
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< double > coolR2
static std::string & ns()
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
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)
void execute(DDCompactView &cpv)
std::vector< double > rodRin
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)
std::vector< std::string > names
std::vector< double > coolR1
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< std::string > connM
virtual ~DDTOBRadCableAlgo()
std::vector< std::string > cableM