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;
91 pconRmin.push_back(r);
92 pconRmax.push_back(
rMax);
96 pconRmin.push_back(r);
97 pconRmax.push_back(
rMax);
100 pconRmin.push_back(r);
101 pconRmax.push_back(
rMax);
104 pconRmin.push_back(r);
105 pconRmax.push_back(
rMax);
110 pconRmin.push_back(r);
111 pconRmax.push_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;
142 pconRmin.push_back(
rMax);
143 pconRmax.push_back(
rMax);
146 pconRmin.push_back(
rMax);
147 pconRmax.push_back(
rTop);
148 pconZ.push_back(
zBend);
149 pconRmin.push_back(
rMax);
150 pconRmax.push_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)
Geom::Theta< T > theta() const
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.
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
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 = ':'