17 #include "CLHEP/Units/GlobalPhysicalConstants.h"
18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
22 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo info: Creating an instance";
33 zBend = nArgs[
"ZBend"];
38 width = nArgs[
"Width"];
39 thick = nArgs[
"Thick"];
44 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo debug: Parameters for creating "
45 << (
zposWheel.size()+2) <<
" axial cables and position"
46 <<
"ing " <<
angles.size() <<
" copies in Service volume"
47 <<
"\n zBend " <<
zBend
48 <<
" zEnd " <<
zEnd <<
" rMin " <<
rMin <<
" rMax "
49 <<
rMax <<
" Cable width " <<
width/CLHEP::deg
50 <<
" thickness " <<
thick <<
" with Angles";
51 for (
int i=0;
i<(int)(
angles.size());
i++)
64 matIn = sArgs[
"MaterialIn"];
65 matOut = sArgs[
"MaterialOut"];
68 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo debug: Parent " << parentName
69 <<
"\tChild " <<
childName <<
" NameSpace "
77 std::vector<DDName> logs;
86 std::vector<double> pconZ, pconRmin, pconRmax;
92 pconRmin.push_back(r);
93 pconRmax.push_back(
rMax);
97 pconRmin.push_back(r);
98 pconRmax.push_back(
rMax);
101 pconRmin.push_back(r);
102 pconRmax.push_back(
rMax);
105 pconRmin.push_back(r);
106 pconRmax.push_back(
rMax);
111 pconRmin.push_back(r);
112 pconRmax.push_back(
rMax);
119 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: "
121 <<
matIn <<
" from " << -0.5*
width/CLHEP::deg <<
" to "
122 << 0.5*
width/CLHEP::deg <<
" and with " << pconZ.size()
124 for (
int i = 0;
i <(int)(pconZ.size());
i++)
125 LogDebug(
"TIDGeom") <<
"\t[" <<
i <<
"]\tZ = " << pconZ[
i]
126 <<
"\tRmin = "<< pconRmin[
i] <<
"\tRmax = "
136 std::vector<double> pconZ, pconRmin, pconRmax;
139 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: Thk " << thk
140 <<
" Total " << thktot <<
" rMax " <<
rMax
141 <<
" rTop " <<
rTop <<
" dR " << r <<
" z " <<
z;
143 pconRmin.push_back(
rMax);
144 pconRmax.push_back(
rMax);
147 pconRmin.push_back(
rMax);
148 pconRmax.push_back(
rTop);
149 pconZ.push_back(
zBend);
150 pconRmin.push_back(
rMax);
151 pconRmax.push_back(
rTop);
158 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: "
160 <<
matIn <<
" from " << -0.5*
width/CLHEP::deg <<
" to "
161 << 0.5*
width/CLHEP::deg <<
" and with " << pconZ.size()
163 for (
int i = 0;
i < (int)(pconZ.size());
i++)
164 LogDebug(
"TIDGeom") <<
"\t[" <<
i <<
"]\tZ = " << pconZ[
i]
165 <<
"\tRmin = "<< pconRmin[
i] <<
"\tRmax = "
178 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: "
180 <<
matOut <<
" from " << -0.5*
width/CLHEP::deg <<
" to "
181 << 0.5*
width/CLHEP::deg <<
" with Rin " << r <<
" Rout "
189 double theta = 90.*CLHEP::deg;
190 for (
int i=0;
i<(int)(
angles.size());
i++) {
192 double phiy = phix + 90.*CLHEP::deg;
193 double phideg = phix/CLHEP::deg;
200 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: Creating a new "
201 <<
"rotation: " << rotstr <<
" "
202 << theta/CLHEP::deg <<
", " << phix/CLHEP::deg
203 <<
", " << theta/CLHEP::deg <<
", "
204 << phiy/CLHEP::deg <<
", 0, 0";
210 for (
int k=0;
k<(int)(logs.size());
k++) {
212 if (
k == ((
int)(logs.size())-1))
214 cpv.
position(logs[
k], mother,
i+1, tran, rotation);
215 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test " << logs[
k]
216 <<
" number " <<
i+1 <<
" positioned in "
217 << mother <<
" at " << tran <<
" with "
std::vector< double > zposWheel
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 position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
virtual ~DDTIDAxialCableAlgo()
DDName is used to identify DDD entities uniquely.
Geom::Theta< T > theta() const
static std::string & ns()
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
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::vector< double > angles
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
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)
void execute(DDCompactView &cpv)
std::vector< double > zposRing
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'