Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CylinderGeomv4.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CylinderGeomv4.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_PHG4CYLINDERGEOMV4_H
4 #define G4DETECTORS_PHG4CYLINDERGEOMV4_H
5 
6 #include "PHG4CylinderGeom.h"
7 
8 #include <iostream> // for cout, ostream
9 
11 {
12  public:
13  PHG4CylinderGeomv4() = default;
14  PHG4CylinderGeomv4(const int lnsensors,
15  const int lnz,
16  const int nspc,
17  int nsc,
18  const int nstag,
19  const double lr,
20  const double rs,
21  const double szs,
22  const double sps,
23  const double sxo,
24  double syo,
25  const double szsp,
26  const double sys,
27  const double tck,
28  const double st)
29  : N_sensors_in_layer(lnsensors)
30  , layer(-1)
31  , layer_radius(lr)
32  , radius_stagger(rs)
33  , layer_NZ(lnz)
34  , segment_z_step(szs)
35  , segment_phi_step(sps)
36  , sensor_x_offset(sxo)
37  , sensor_y_offset(syo)
38  , N_strip_columns(nsc)
39  , N_strips_per_column(nspc)
40  , N_staggers(nstag)
41  , strip_z_spacing(szsp)
42  , strip_y_spacing(sys)
43  , thickness(tck)
44  , strip_tilt(st)
45  {
46  }
47 
48  ~PHG4CylinderGeomv4() override {}
49 
50  // from PHObject
51  void identify(std::ostream& os = std::cout) const override;
52 
53  void set_layer(const int i) override { layer = i; }
54  int get_layer() const override { return layer; }
55  double get_radius() const override { return layer_radius; }
56 
57  void find_segment_center(const int segment_z_bin, const int segment_phi_bin, double location[]) override;
58  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;
59 
60  double get_thickness() const override { return thickness; }
61  double get_strip_y_spacing() const override { return strip_y_spacing; }
62  double get_strip_z_spacing() const override { return strip_z_spacing; }
63  double get_strip_tilt() const override { return strip_tilt; }
64  int get_N_strip_columns() const override { return N_strip_columns; }
65  int get_N_strips_per_column() const override { return N_strips_per_column; }
66  int get_N_sensors_in_layer() const override { return N_sensors_in_layer; }
67 
68  // our own (not inherited from base class)
69  double get_sensor_x_offset() const { return sensor_x_offset; }
70  double get_sensor_y_offset() const { return sensor_y_offset; }
71 
72  protected:
74  int layer{-1};
75 
76  // finding the center of a sensor given ladder_segment_z and ladder_
77  double layer_radius{std::numeric_limits<double>::quiet_NaN()};
78  double radius_stagger{std::numeric_limits<double>::quiet_NaN()};
79  int layer_NZ{-1};
80  double segment_z_step{std::numeric_limits<double>::quiet_NaN()};
81  double segment_phi_step{std::numeric_limits<double>::quiet_NaN()};
82  double sensor_x_offset{std::numeric_limits<double>::quiet_NaN()};
83  double sensor_y_offset{std::numeric_limits<double>::quiet_NaN()};
84 
85  // navigation within a sensor
86  // double strip_x_offset;
87  // double strip_y_offset;
88  int N_strip_columns{-1};
90  int N_staggers{-1};
91  double strip_z_spacing{std::numeric_limits<double>::quiet_NaN()};
92  double strip_y_spacing{std::numeric_limits<double>::quiet_NaN()};
93  double thickness{std::numeric_limits<double>::quiet_NaN()};
94  double strip_tilt{std::numeric_limits<double>::quiet_NaN()};
95 
96  ClassDefOverride(PHG4CylinderGeomv4, 1)
97 };
98 
99 #endif