16 #include "CLHEP/Units/GlobalPhysicalConstants.h" 17 #include "CLHEP/Units/GlobalSystemOfUnits.h" 21 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo info: Creating an instance";
32 zBend = nArgs[
"ZBend"];
37 width = nArgs[
"Width"];
38 thick = nArgs[
"Thick"];
43 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo debug: Parameters for creating " 44 << (
zposWheel.size()+2) <<
" axial cables and position" 45 <<
"ing " <<
angles.size() <<
" copies in Service volume" 46 <<
"\n zBend " <<
zBend 47 <<
" zEnd " <<
zEnd <<
" rMin " <<
rMin <<
" rMax " 48 <<
rMax <<
" Cable width " <<
width/CLHEP::deg
49 <<
" thickness " <<
thick <<
" with Angles";
63 matIn = sArgs[
"MaterialIn"];
64 matOut = sArgs[
"MaterialOut"];
67 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo debug: Parent " << parentName
68 <<
"\tChild " <<
childName <<
" NameSpace " 76 std::vector<DDName> logs;
85 std::vector<double> pconZ, pconRmin, pconRmax;
90 pconZ.emplace_back(z);
91 pconRmin.emplace_back(r);
92 pconRmax.emplace_back(
rMax);
95 pconZ.emplace_back(z);
96 pconRmin.emplace_back(r);
97 pconRmax.emplace_back(
rMax);
99 pconZ.emplace_back(z);
100 pconRmin.emplace_back(r);
101 pconRmax.emplace_back(
rMax);
103 pconZ.emplace_back(z);
104 pconRmin.emplace_back(r);
105 pconRmax.emplace_back(
rMax);
109 pconZ.emplace_back(z);
110 pconRmin.emplace_back(r);
111 pconRmax.emplace_back(
rMax);
118 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: " 120 <<
matIn <<
" from " << -0.5*
width/CLHEP::deg <<
" to " 121 << 0.5*
width/CLHEP::deg <<
" and with " << pconZ.size()
123 for (
int i = 0;
i <(
int)(pconZ.size());
i++)
124 LogDebug(
"TIDGeom") <<
"\t[" <<
i <<
"]\tZ = " << pconZ[
i]
125 <<
"\tRmin = "<< pconRmin[
i] <<
"\tRmax = " 135 std::vector<double> pconZ, pconRmin, pconRmax;
138 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: Thk " << thk
139 <<
" Total " << thktot <<
" rMax " <<
rMax 140 <<
" rTop " <<
rTop <<
" dR " << r <<
" z " <<
z;
141 pconZ.emplace_back(z);
142 pconRmin.emplace_back(
rMax);
143 pconRmax.emplace_back(
rMax);
145 pconZ.emplace_back(z);
146 pconRmin.emplace_back(
rMax);
147 pconRmax.emplace_back(
rTop);
148 pconZ.emplace_back(
zBend);
149 pconRmin.emplace_back(
rMax);
150 pconRmax.emplace_back(
rTop);
157 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: " 159 <<
matIn <<
" from " << -0.5*
width/CLHEP::deg <<
" to " 160 << 0.5*
width/CLHEP::deg <<
" and with " << pconZ.size()
162 for (
int i = 0;
i < (
int)(pconZ.size());
i++)
163 LogDebug(
"TIDGeom") <<
"\t[" <<
i <<
"]\tZ = " << pconZ[
i]
164 <<
"\tRmin = "<< pconRmin[
i] <<
"\tRmax = " 177 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: " 179 <<
matOut <<
" from " << -0.5*
width/CLHEP::deg <<
" to " 180 << 0.5*
width/CLHEP::deg <<
" with Rin " << r <<
" Rout " 188 double theta = 90.*CLHEP::deg;
191 double phiy = phix + 90.*CLHEP::deg;
192 double phideg = phix/CLHEP::deg;
199 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test: Creating a new " 200 <<
"rotation: " << rotstr <<
" " 201 << theta/CLHEP::deg <<
", " << phix/CLHEP::deg
202 <<
", " << theta/CLHEP::deg <<
", " 203 << phiy/CLHEP::deg <<
", 0, 0";
209 for (
int k=0;
k<(
int)(logs.size());
k++) {
211 if (
k == ((
int)(logs.size())-1))
213 cpv.
position(logs[
k], mother,
i+1, tran, rotation);
214 LogDebug(
"TIDGeom") <<
"DDTIDAxialCableAlgo test " << logs[
k]
215 <<
" number " <<
i+1 <<
" positioned in " 216 << 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 execute(DDCompactView &cpv) override
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static std::string & ns()
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
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)
~DDTIDAxialCableAlgo() override
std::vector< double > zposRing
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 = ':'