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();
156 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << tiltRotstr <<
"\t90., 90., " 166 tiltMatrix = tiltRot.
matrix();
168 tiltMatrix *= flipMatrix;
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();
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;
242 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test " <<
child <<
" number " <<
copy <<
" positioned in " << mother
243 <<
" at " << tran <<
" with " << globalRot;
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Cos< T >::type cos(const T &t)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
DDRotationMatrix & matrix()