129 DDRotation flipRot, tiltRot, phiRot, globalRot;
131 string rotstr =
"RTrackerRingAlgo";
135 string flipRotstr = rotstr +
"Flip";
138 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << flipRotstr <<
"\t90., 180., " 149 flipMatrix = flipRot.
matrix();
153 string tiltRotstr = rotstr +
"Tilt" + to_string(
tiltAngle / CLHEP::deg) +
"ZPlus";
156 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << tiltRotstr <<
"\t90., 90., " 166 tiltMatrix = tiltRot.
matrix();
168 tiltMatrix *= flipMatrix;
171 string tiltRotstr = rotstr +
"Tilt" + to_string(
tiltAngle / CLHEP::deg) +
"ZMinus";
174 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << tiltRotstr <<
"\t90., 90., " 184 tiltMatrix = tiltRot.
matrix();
186 tiltMatrix *= flipMatrix;
193 double theta = 90. * CLHEP::deg;
197 for (
int i = 0;
i <
n;
i++) {
200 double phiy = phix + 90. * CLHEP::deg;
201 double phideg = phix / CLHEP::deg;
203 string phiRotstr = rotstr +
"Phi" + to_string(phideg * 10.);
206 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << phiRotstr <<
"\t90., " 207 << phix / CLHEP::deg <<
", 90.," << phiy / CLHEP::deg <<
", 0., 0.";
210 phiRotMatrix = phiRot.
matrix();
214 string globalRotstr = rotstr +
"Phi" + to_string(phideg * 10.) +
"Tilt" + to_string(
tiltAngle / CLHEP::deg);
216 globalRotstr +=
"ZPlus";
218 globalRotstr +=
"Flip";
221 globalRotstr +=
"ZMinus";
223 globalRotstr +=
"Flip";
228 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new " 229 <<
"rotation: " << globalRotstr;
230 globalRotMatrix = phiRotMatrix * tiltMatrix;
236 double ypos =
radius *
sin(phi) + center[1];
237 double zpos = center[2];
242 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test " <<
child <<
" number " << copy <<
" positioned in " << mother
243 <<
" at " << tran <<
" with " << globalRot;
Sin< T >::type sin(const T &t)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
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 = ':'
ROOT::Math::Rotation3D DDRotation
DDRotationMatrix & matrix()