EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CylinderGeomIntt.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CylinderGeomIntt.h
1 #ifndef INTT_CYLINDERGEOMINTT_H
2 #define INTT_CYLINDERGEOMINTT_H
3 
5 
6 #include <cmath>
7 #include <iostream>
8 
9 #include <TVector3.h>
10 
12 {
13  public:
16  const int layer,
17  const double strip_x,
18  const double strip_y,
19  const double strip_z0,
20  const double strip_z1,
21  const int nstrips_z_sensor0,
22  const int nstrips_z_sensor1,
23  const int nstrips_phi_cell,
24  const int nladders_layer,
25  const double ladder_z0,
26  const double ladder_z1,
27  const double sensor_radius,
28  const double strip_x_offset,
29  const double offsetphi,
30  const double offsetrot)
31  : m_Layer(layer)
32  , m_NStripsPhiCell(nstrips_phi_cell)
33  , m_StripX(strip_x)
34  , m_StripY(strip_y)
35  , m_SensorRadius(sensor_radius)
36  , m_StripXOffset(strip_x_offset)
37  , m_OffsetPhi(offsetphi)
38  , m_OffsetRot(offsetrot)
39  {
40  // Type-A
41  m_StripZ[0] = strip_z0;
42  m_LadderZ[0] = ladder_z0;
43  m_NStripsZSensor[0] = nstrips_z_sensor0;
44 
45  // Type-B
46  m_StripZ[1] = strip_z1;
47  m_LadderZ[1] = ladder_z1;
48  m_NStripsZSensor[1] = nstrips_z_sensor1;
49 
50  m_dPhi = 2. * M_PI / nladders_layer;
51  }
52 
53 // from PHObject
54  void identify(std::ostream &os = std::cout) const override;
55 
56 // overridden from base class
57  double get_thickness() const override
58  {
59  return m_StripX;
60  }
61 
62  double get_strip_y_spacing() const override
63  {
64  return m_StripY;
65  }
66 
67  double get_strip_z_spacing() const override
68  {
69  return m_StripZ[0];
70  }
71 
72  double get_strip_tilt() const override
73  {
74  return 0.;
75  }
76 
77 
78  void set_layer(const int i) override
79  {
80  m_Layer = i;
81  }
82 
83  int get_layer() const override
84  {
85  return m_Layer;
86  }
87 
88  double get_radius() const override
89  {
90  return m_SensorRadius;
91  }
92 
93 // our own
94  void find_segment_center(const int segment_z_bin, const int segment_phi_bin, double location[]) override;
95  void find_strip_center(const int segment_z_bin, const int segment_phi_bin, const int strip_column, const int strip_index, double location[]) override;
96  void find_strip_index_values(const int segment_z_bin, const double ypos, const double zpos, int &strip_y_index, int &strip_z_index) override;
97 
98  bool load_geometry();
99  void find_strip_center_localcoords(const int segment_z_bin, const int strip_y_index, const int strip_z_index, double location[]);
100  void find_indices_from_segment_center(int &segment_z_bin, int &segment_phi_bin, double location[]);
101  TVector3 get_local_from_world_coords(const int segment_z_bin, const int segment_phi_bin, TVector3 world);
102  void find_indices_from_world_location(int &segment_z_bin, int &segment_phi_bin, double location[]);
103 
104  double get_strip_phi_tilt() const
105  {
106  return m_OffsetRot;
107  }
108 
109  protected:
110  int m_Layer;
113  double m_StripX;
114  double m_StripY;
117  double m_OffsetPhi;
118  double m_OffsetRot;
119  double m_dPhi;
120 
121  double m_StripZ[2];
122  double m_LadderZ[2];
123 
124  ClassDefOverride(CylinderGeomIntt, 1)
125 };
126 
127 #endif