CMS 3D CMS Logo

DDTrackerRingAlgo.h
Go to the documentation of this file.
1 #ifndef DD_TrackerRingAlgo_h
2 #define DD_TrackerRingAlgo_h
3 
4 /*
5  Tilts and positions n copies of a module at prescribed phi values
6  within a ring. The module can also be flipped if requested.
7 
8  (radius, Phi, Z) refers to the cylindrical coordinates in the global frame of reference.
9 
10  A module's tilt angle is defined with respect to the global frame of reference's Z axis.
11  Example, in the outer tracker : For a straight barrel module, tiltAngle = 0°.
12  For a module in the endcaps, tiltAngle = 90°.
13  tiltAngle ∈ [0, 90°].
14  Please note that parameter tiltAngle has to be set regardless of any sign consideration,
15  to the absolute value of the module's tilt angle.
16 
17  == Example of use : ==
18 
19  <Algorithm name="track:DDTrackerRingAlgo">
20  <rParent name="tracker:Ring5Layer1Plus"/>
21  <String name="ChildName" value="tracker:BModule5Layer1"/>
22  <Numeric name="N" value="9"/>
23  <Numeric name="StartCopyNo" value="1"/>
24  <Numeric name="IncrCopyNo" value="2"/>
25  <Numeric name="RangeAngle" value="360*deg"/>
26  <Numeric name="StartAngle" value="90*deg"/>
27  <Numeric name="Radius" value="247"/>
28  <Vector name="Center" type="numeric" nEntries="3">0,0,-5.45415</Vector>
29  <Numeric name="IsZPlus" value="1"/>
30  <Numeric name="TiltAngle" value="47*deg"/>
31  <Numeric name="IsFlipped" value="1"/>
32  </Algorithm>
33 */
34 
35 #include <map>
36 #include <string>
37 #include <vector>
40 
41 class DDTrackerRingAlgo : public DDAlgorithm {
42 
43 public:
44  // Constructor and Destructor
46  ~DDTrackerRingAlgo() override;
47 
48  void initialize(const DDNumericArguments & nArgs,
49  const DDVectorArguments & vArgs,
50  const DDMapArguments & mArgs,
51  const DDStringArguments & sArgs,
52  const DDStringVectorArguments & vsArgs) override;
53 
54  void execute(DDCompactView& cpv) override;
55 
56 private:
57 
58  int n; //Number of copies
59  int startCopyNo; //Start Copy number
60  int incrCopyNo; //Increment in Copy number
61  double rangeAngle; //Range in Phi angle
62  double startAngle; //Start Phi angle
63  double radius; //Radius
64  std::vector<double> center; //Phi values
65  bool isZPlus; //Is Z positive ?
66  double tiltAngle; //Module's tilt angle (absolute value)
67  bool isFlipped; //Is the module flipped ?
68  double delta; //Increment in Phi
69 
70  std::string idNameSpace; //Namespace of this and ALL sub-parts
71  std::string childName; //Child name
72 };
73 
74 #endif
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::string idNameSpace
void execute(DDCompactView &cpv) override
~DDTrackerRingAlgo() override
std::vector< double > center