Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4CylinderGeom_Spacalv2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4CylinderGeom_Spacalv2.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 // $$Id: PHG4CylinderGeom_Spacalv2.h,v 1.3 2014/08/28 22:18:35 jinhuang Exp $$
4 
12 #ifndef G4DETECTORS_PHG4CYLINDERGEOMSPACALV2_H
13 #define G4DETECTORS_PHG4CYLINDERGEOMSPACALV2_H
14 
16 
17 #include <cmath>
18 #include <iostream> // for cout, ostream
19 
20 class PHParameters;
21 
23 {
24  public:
26 
28  {
29  }
30 
31  // from PHObject
32  void identify(std::ostream& os = std::cout) const override;
33 
34  // from TObject
35  void Print(Option_t* option = "") const override;
36 
37 // cppcheck-suppress virtualCallInConstructor
38  void SetDefault() override;
39 
41  void ImportParameters(const PHParameters& param) override;
42 
43  int get_azimuthal_n_sec() const override;
44 
45  virtual void set_azimuthal_n_sec(int azimuthalNSec);
46 
48  double
50  {
51  return azimuthal_tilt;
52  }
53 
55  void
56  set_azimuthal_tilt(double azimuthalTilt)
57  {
58  azimuthal_tilt = azimuthalTilt;
59  }
60 
61  bool is_azimuthal_seg_visible() const override;
62 
63  virtual void set_azimuthal_seg_visible(bool b = true);
64 
65  double get_polar_taper_ratio() const
66  {
67  return polar_taper_ratio;
68  }
69 
70  void
71  set_polar_taper_ratio(double polarTaperRatio)
72  {
73  polar_taper_ratio = polarTaperRatio;
74  }
75 
76  double get_half_polar_taper_angle() const;
77 
78  double
80 
81  double
82  get_sec_depth() const
83  {
84  const double available_depth = get_thickness() - (sqrt((get_radius()) * (get_radius()) + (get_sec_azimuthal_width() / 2) * (get_sec_azimuthal_width() / 2)) - get_radius()) - get_assembly_spacing();
85  if (available_depth < get_sec_azimuthal_width())
86  return NAN;
87  else
88  return sqrt(
89  available_depth * available_depth - get_sec_azimuthal_width() * get_sec_azimuthal_width());
90  }
91 
92  double
94  {
95  return get_sec_azimuthal_width() - 0.0001;
96  }
97 
98  double
100  {
102  }
103 
104  double get_assembly_spacing() const
105  {
106  return assembly_spacing;
107  }
108 
109  void
110  set_assembly_spacing(double assemblySpacing)
111  {
112  assembly_spacing = assemblySpacing;
113  }
114 
116  double
118 
120  double
122 
123  protected:
125 
131 
132  ClassDefOverride(PHG4CylinderGeom_Spacalv2, 2)
133 };
134 
135 #endif