ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RawTowerGeomContainer.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RawTowerGeomContainer.h
1 #ifndef CALOBASE_RAWTOWERGEOMCONTAINER_H
2 #define CALOBASE_RAWTOWERGEOMCONTAINER_H
3 
4 #include "RawTowerDefs.h"
5 
6 #include <phool/PHObject.h>
7 #include <phool/phool.h>
8 
9 #include <cmath>
10 #include <cstddef>
11 #include <iostream>
12 #include <map>
13 #include <type_traits>
14 #include <utility>
15 
16 
17 class RawTowerGeom;
18 
23 {
24  public:
25  typedef std::map<RawTowerDefs::keytype, RawTowerGeom *> Map;
26  typedef Map::iterator Iterator;
27  typedef Map::const_iterator ConstIterator;
28  typedef std::pair<Iterator, Iterator> Range;
29  typedef std::pair<ConstIterator, ConstIterator> ConstRange;
30 
32  ~RawTowerGeomContainer() override {}
33 
34  void identify(std::ostream &os = std::cout) const override;
35 
37  virtual void set_calorimeter_id(RawTowerDefs::CalorimeterId) { PHOOL_VIRTUAL_WARN("set_calorimeter_id()"); }
39  {
40  PHOOL_VIRTUAL_WARN("get_calorimeter_id()");
41  return RawTowerDefs::NONE;
42  }
43 
47  {
48  PHOOL_VIRTUAL_WARN("get_tower_geometry()");
49  return NULL;
50  }
51 
53  virtual ConstRange get_tower_geometries(void) const;
54  virtual Range get_tower_geometries(void);
55 
56  virtual unsigned int size() const
57  {
58  PHOOL_VIRTUAL_WARN("size()");
59  return 0;
60  }
61 
69  virtual double get_radius() const
70  {
71  PHOOL_VIRTUAL_WARN("get_radius()");
72  return NAN;
73  }
74  virtual double get_thickness() const
75  {
76  PHOOL_VIRTUAL_WARN("get_thickness()");
77  return NAN;
78  }
79  virtual int get_phibins() const
80  {
81  PHOOL_VIRTUAL_WARN("get_phibins()");
82  return -1;
83  }
84  // virtual double get_phistep() const {PHOOL_VIRTUAL_WARN("get_phistep()"); return NAN;}
85  // virtual double get_phimin() const {PHOOL_VIRTUAL_WARN("get_phimin()"); return NAN;}
86  virtual int get_etabins() const
87  {
88  PHOOL_VIRTUAL_WARN("get_etabins()");
89  return -1;
90  }
91  // virtual double get_etastep() const {PHOOL_VIRTUAL_WARN("get_etastep()"); return NAN;}
92  // virtual double get_etamin() const {PHOOL_VIRTUAL_WARN("get_etamin()"); return NAN;}
93 
94  virtual std::pair<double, double> get_phibounds(const int /*ibin*/) const
95  {
96  PHOOL_VIRTUAL_WARN("get_phibounds(const int)");
97  return std::make_pair(NAN, NAN);
98  }
99  virtual std::pair<double, double> get_etabounds(const int /*ibin*/) const
100  {
101  PHOOL_VIRTUAL_WARN("get_etabounds(const int)");
102  return std::make_pair(NAN, NAN);
103  }
104  virtual double get_etacenter(const int /*ibin*/) const
105  {
106  PHOOL_VIRTUAL_WARN("get_etacenter(const int)");
107  return NAN;
108  }
109  virtual double get_phicenter(const int /*ibin*/) const
110  {
111  PHOOL_VIRTUAL_WARN("get_phicenter(const int)");
112  return NAN;
113  }
114 
115  virtual int get_etabin(const double /*eta*/) const
116  {
117  PHOOL_VIRTUAL_WARN("get_etabin(const double)");
118  return -1;
119  }
120  virtual int get_phibin(const double /*phi*/) const
121  {
122  PHOOL_VIRTUAL_WARN("get_phibin(const double)");
123  return -1;
124  }
125 
126  virtual void set_radius(const double) { PHOOL_VIRTUAL_WARN("set_radius(const double)"); }
127  virtual void set_thickness(const double) { PHOOL_VIRTUAL_WARN("set_thickness(const double)"); }
128  virtual void set_phibins(const int) { PHOOL_VIRTUAL_WARN("set_phibins(const int)"); }
129  // virtual void set_phistep(const double phi) {PHOOL_VIRTUAL_WARN("set_phistep(const double)");}
130  // virtual void set_phimin(const double phi) {PHOOL_VIRTUAL_WARN("set_phimin(const double)");}
131  virtual void set_etabins(const int) { PHOOL_VIRTUAL_WARN("set_etabins(const int)"); }
132  // virtual void set_etamin(const double z) {PHOOL_VIRTUAL_WARN("set_etamin(const double)");}
133  // virtual void set_etastep(const double z) {PHOOL_VIRTUAL_WARN("set_etastep(const double)");}
134  virtual void set_etabounds(const int /*ibin*/, const std::pair<double, double> &/*bounds*/) { PHOOL_VIRTUAL_WARN("set_etabounds(const int ibin, const std::pair<double, double> & bounds)"); }
135  virtual void set_phibounds(const int /*ibin*/, const std::pair<double, double> &/*bounds*/) { PHOOL_VIRTUAL_WARN("set_etabounds(const int ibin, const std::pair<double, double> & bounds)"); }
136 
139  protected:
142 
143  ClassDefOverride(RawTowerGeomContainer, 2)
144 };
145 
146 #endif