Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CylinderGeom_Mvtx.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CylinderGeom_Mvtx.h
1 #ifndef MVTX_CYLINDERGEOMMVTX_H
2 #define MVTX_CYLINDERGEOMMVTX_H
3 
5 
6 #include <trackbase/TrkrDefs.h>
8 
9 #include <TVector3.h>
10 
11 #include <iostream>
12 
14 {
15  public:
17  int layer,
18  int in_Nstaves,
19  double in_layer_nominal_radius,
20  double in_phistep,
21  double in_phitilt,
22  double in_phi0
23  );
24 
28  /*int layer*/ 0,
29  /*int in_Nstaves*/ 0,
30  /*double in_layer_nominal_radius*/ 3,
31  /*double in_phistep*/ 0,
32  /*double in_phitilt*/ 0,
33  /*double in_phi0*/ 0)
34  {
35  }
36 
37  ~CylinderGeom_Mvtx() override {}
38 
39  // from PHObject
40  void identify(std::ostream& os = std::cout) const override;
41 
42  // from base class
43  void set_layer(const int i) override { layer = i; }
44  int get_layer() const override { return layer; }
45  double get_radius() const override { return layer_radius; }
46 
47  double get_pixel_x() const override { return pixel_x; } // pitch
48  double get_pixel_z() const override { return pixel_z; } // length
49  double get_pixel_thickness() const override { return pixel_thickness; }
50 
51 // our own - no override
55 
56  void get_sensor_indices_from_world_coords(std::vector<double> &world, unsigned int &stave, unsigned int &chip);
57 
58  bool get_pixel_from_local_coords(TVector3 sensor_local, int& iRow, int& iCol);
59  int get_pixel_from_local_coords(TVector3 sensor_local);
60 
61  TVector3 get_local_coords_from_pixel(int NXZ);
62  TVector3 get_local_coords_from_pixel(int iRow, int iCol);
63 
64  int get_pixel_X_from_pixel_number(int NXZ);
65 
66  int get_pixel_Z_from_pixel_number(int NXZ);
67 
68  int get_pixel_number_from_xbin_zbin(int xbin, int zbin); // obsolete
69 
70  double get_stave_phi_tilt() const { return stave_phi_tilt; }
71  double get_stave_phi_0() const { return stave_phi_0; }
72 
73  int get_ladder_phi_index(int stave, int /*half_stave*/, int /*chip*/) {return stave; }
74  int get_ladder_z_index(int /*module*/, int chip) { return chip; }
75 
76  void find_sensor_center(Surface surface, ActsGeometry* tGeometry, double location[]);
77 
78  int get_N_staves() const { return N_staves; }
79  int get_N_half_staves() const { return N_half_staves; }
80 
81  int get_NZ() const;
82  int get_NX() const;
83 
84  protected:
85  int layer;
86  int N_staves;
88 
89  // finding the center of a stave
90  double layer_radius;
93  double stave_phi_0;
94 
95  // for all layers
96  double loc_sensor_in_chip[3];
97 
98  // inner barrel layers stave construction
102 
103  double pixel_x;
104  double pixel_z;
106 
107  ClassDefOverride(CylinderGeom_Mvtx, 2)
108 };
109 
110 #endif