Go to the source code of this file.
Definition at line 11 of file DDTrackerPhiAlgo.cc.
References writedatasetfile::args, cms::DDAlgoArguments::childName(), funct::cos(), cms::DDAlgoArguments::find(), mps_fire::i, createfilelist::int, LogDebug, cms::makeRotation3D(), cms::DDNamespace::name(), cms::DDAlgoArguments::parentName(), CosmicsPD_Skims::radius, makeMuonMisalignmentScenario::rot, funct::sin(), theta(), cms::DDAlgoArguments::value(), and cms::DDNamespace::volume().
16 int startcn =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 1;
17 int incrcn =
args.find(
"IncrCopyNo") ?
args.value<
int>(
"IncrCopyNo") : 1;
18 vector<double>
phi =
args.value<vector<double> >(
"Phi");
19 vector<double> zpos =
args.value<vector<double> >(
"ZPos");
20 int numcopies =
args.find(
"NumCopies") ?
args.value<
int>(
"NumCopies") :
int(phi.size());
22 double tilt =
args.value<
double>(
"Tilt");
24 if (numcopies !=
int(phi.size())) {
25 LogDebug(
"TrackerGeom") <<
"error: Parameter " 26 <<
"NumCopies does not agree with the size " 27 <<
"of the Phi vector. It was adjusted to " 28 <<
"be the size of the Phi vector and may " 29 <<
"lead to crashes or errors.";
31 LogDebug(
"TrackerGeom") <<
"debug: Parameters for position" 33 <<
" Radius " << radius <<
" Tilt " << tilt <<
" Copies " << phi.size() <<
" at";
34 for (
int i = 0;
i < (
int)(phi.size());
i++)
35 LogDebug(
"TrackerGeom") <<
"\t[" <<
i <<
"] phi = " << phi[
i] <<
" z = " << zpos[
i];
36 LogDebug(
"TrackerGeom") <<
"debug: Parent " << mother.name() <<
"\tChild " << child.name() <<
" NameSpace " 39 double theta = 90._deg;
41 for (
int i = 0;
i < numcopies; ++
i) {
42 double phix = phi[
i] + tilt;
43 double phiy = phix + 90._deg;
44 double xpos = radius *
cos(phi[
i]);
45 double ypos = radius *
sin(phi[
i]);
47 Position tran(xpos, ypos, zpos[
i]);
48 mother.placeVolume(child, ci, Transform3D(rot, tran));
49 LogDebug(
"TrackerGeom") <<
"test: " << child.name() <<
" number " << ci <<
" positioned in " << mother.name()
50 <<
" at " << tran <<
" with " <<
rot;
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
dd4hep::Rotation3D makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
Cos< T >::type cos(const T &t)
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_track_DDTrackerPhiAlgo |
|
|
) |
| |