CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDPixFwdBlades.h
Go to the documentation of this file.
1 #ifndef DDPixFwdBlades_h
2 #define DDPixFwdBlades_h
3 
4 /*
5 
6 == CMS Forward Pixels Geometry ==
7 
8  @version 3.02.01 May 30, 2006
9  @created Dmitry Onoprienko
10 
11 == ALGORITHM DESCRIPTION: ==
12 
13  Algorithm for placing one-per-blade components
14  Also computes parameters necessary for defining the "nipple" geometry.
15 
16 == Parameters : ==
17 
18  "Endcap" - +1 if placing the child volume into +Z disk, -1 if placing into -Z disk.
19  "Child" - name of a child volume being places (should be in the form "file:volume")
20  In no child name is given, the algorithm simply calculates Nipple parameters.
21  "ChildRotation" - rotation of the child volume with respect to the "blade frame". [OPTIONAL]
22  "ChildTranslation" - vector defining translation of the child volume with respect to the
23  "blade frame". [OPTIONAL]
24  "FlagString" - string of 24 characters, used to indicate blades into which the child volume
25  should be placed. [OPTIONAL]
26  "FlagSelector" - 1 character string, key to interpreting "FlagString".
27  Positions in "BladeFlag" that have this character will get the child volume.
28 
29  If "Child" parameter is omitted, the algorithm computes rotation needed for describing
30  coolant "nipples" but does not do any placements.
31 
32  If "Child" is "PixelForwardNippleZPlus" or "PixelForwardNippleZMinus" and no rotation or translation
33  is supplied, correct rotations and translations are automatically computed.
34 
35  Blade frame: origin on the axis of the blade at a distance "ancorRadius" from the beam line
36  (it therefore coincides with the ancor point of a blade).
37  Y along blade axis pointing away from beam line, Z perpendicular to blade plane and pointing away from IP.
38  (That assumes the axes of ZPlus disk are aligned with CMS global reference frame, and ZMinus disk
39  is rotated around Y by 180 degrees.)
40 
41 == Example of use : ==
42 
43 <Algorithm name="track:DDPixFwdBlades">
44  <rParent name="pixfwdDisk:PixelForwardDiskZMinus"/>
45  <Numeric name="Endcap" value="-1." />
46  <String name="Child" value="pixfwdPanel:PixelForwardPanel4Left"/>
47  <Vector name="ChildTranslation" type="numeric" nEntries="3"> 0., -[pixfwdPanel:AncorY], [zPanel] </Vector>
48  <String name="ChildRotation" value="pixfwdCommon:Y180"/>
49  <String name="FlagString" value="LRRRRLRRRRRRLRRRRLRRRRRR" /> <!-- Panel Layout ZMinus 4 -->
50  <String name="FlagSelector" value="L" />
51 </Algorithm>
52 
53 */
54 
55 #include <map>
56 #include <string>
57 #include <vector>
61 #include "CLHEP/Vector/ThreeVector.h"
62 #include "CLHEP/Vector/Rotation.h"
63 
64 class DDPixFwdBlades : public DDAlgorithm {
65 
66 public:
67 
68  // Constructors & Destructor : --------------------------------------------------------
69 
70  DDPixFwdBlades();
71  virtual ~DDPixFwdBlades();
72 
73  // Initialization & Execution : -------------------------------------------------------
74 
75  void initialize(const DDNumericArguments & nArgs,
76  const DDVectorArguments & vArgs,
77  const DDMapArguments & mArgs,
78  const DDStringArguments & sArgs,
79  const DDStringVectorArguments & vsArgs);
80 
81  void execute(DDCompactView& cpv);
82 
83  // -------------------------------------------------------------------------------------
84 
85 private:
86 
87  // -- Input geometry parameters : -----------------------------------------------------
88 
89  int nBlades; // Number of blades
90  double bladeAngle; // Angle of blade rotation around axis perpendicular to beam
91  double zPlane; // Common shift in Z for all blades (with respect to disk center plane)
92  double bladeZShift; // Shift in Z between the axes of two adjacent blades
93 
94  double ancorRadius; // Distance from beam line to ancor point defining center of "blade frame"
95 
96  // Coordinates of Nipple ancor points J and K in "blade frame" :
97 
98  double jX;
99  double jY;
100  double jZ;
101  double kX;
102  double kY;
103  double kZ;
104 
105  // -- Algorithm parameters : ----------------------------------------------------------
106 
107  double endcap; // +1 for Z Plus endcap disks, -1 for Z Minus endcap disks
108 
109  std::string flagString; // String of flags
110  std::string flagSelector; // Character that means "yes" in flagString
111 
112  std::string childName; // Child volume name
113 
114  std::vector<double> childTranslationVector; // Child translation with respect to "blade frame"
115  std::string childRotationName; // Child rotation with respect to "blade frame"
116 
117  // -------------------------------------------------------------------------------------
118 
119  std::string idNameSpace; //Namespace of this and ALL sub-parts
120 
121  std::map<std::string, int> copyNumbers;
122 
123  CLHEP::HepRotation* nippleRotationZPlus;
124  CLHEP::HepRotation* nippleRotationZMinus;
126 
127  // -- Helper functions : --------------------------------------------------------------
128 
129  int issueCopyNumber();
130 
131  void computeNippleParameters(double endcap);
132 
133  // -------------------------------------------------------------------------------------
134 
135 };
136 
137 #endif
void execute(DDCompactView &cpv)
std::map< std::string, int > copyNumbers
double nippleTranslationZ
std::string idNameSpace
virtual ~DDPixFwdBlades()
void computeNippleParameters(double endcap)
type of data representation of DDCompactView
Definition: DDCompactView.h:76
std::vector< double > childTranslationVector
double nippleTranslationX
CLHEP::HepRotation * nippleRotationZMinus
CLHEP::HepRotation * nippleRotationZPlus
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
std::string childName
std::string flagString
double nippleTranslationY
std::string flagSelector
std::string childRotationName