Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerGeomv1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerGeomv1.h
1 #ifndef CALOBASE_RAWTOWERGEOMV1_H
2 #define CALOBASE_RAWTOWERGEOMV1_H
3 
4 #include "RawTowerGeom.h"
5 
6 #include "RawTowerDefs.h"
7 
8 #include <cmath>
9 #include <iostream>
10 
12 {
13  public:
16  ~RawTowerGeomv1() override {}
17 
18  void identify(std::ostream& os = std::cout) const override;
19 
20  void set_id(RawTowerDefs::keytype key) override { _towerid = key; }
21  RawTowerDefs::keytype get_id() const override { return _towerid; }
22 
23  int get_bineta() const override { return RawTowerDefs::decode_index1(_towerid); }
24  int get_binphi() const override { return RawTowerDefs::decode_index2(_towerid); }
25  int get_column() const override { return RawTowerDefs::decode_index1(_towerid); }
26  int get_row() const override { return RawTowerDefs::decode_index2(_towerid); }
27 
28  void set_center_x(double x) override
29  {
30  _center_x = x;
31  return;
32  }
33  void set_center_y(double y) override
34  {
35  _center_y = y;
36  return;
37  }
38  void set_center_z(double z) override
39  {
40  _center_z = z;
41  return;
42  }
43 
44  double get_center_x() const override { return _center_x; }
45  double get_center_y() const override { return _center_y; }
46  double get_center_z() const override { return _center_z; }
47 
48  double get_center_radius() const override;
49  double get_eta() const override;
50  double get_phi() const override;
51  double get_theta() const override;
52 
53  protected:
54  RawTowerDefs::keytype _towerid = ~0; // 0xFFFFFF.. independant of type
55 
56  double _center_x = NAN;
57  double _center_y = NAN;
58  double _center_z = NAN;
59  ClassDefOverride(RawTowerGeomv1, 4)
60 };
61 
62 #endif