Analysis Software
Documentation for sPHENIX simulation 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 class RawTowerGeom;
17 
22 {
23  public:
24  typedef std::map<RawTowerDefs::keytype, RawTowerGeom *> Map;
25  typedef Map::iterator Iterator;
26  typedef Map::const_iterator ConstIterator;
27  typedef std::pair<Iterator, Iterator> Range;
28  typedef std::pair<ConstIterator, ConstIterator> ConstRange;
29 
31  ~RawTowerGeomContainer() override {}
32 
33  void identify(std::ostream &os = std::cout) const override;
34 
36  virtual void set_calorimeter_id(RawTowerDefs::CalorimeterId) { PHOOL_VIRTUAL_WARN("set_calorimeter_id()"); }
38  {
39  PHOOL_VIRTUAL_WARN("get_calorimeter_id()");
40  return RawTowerDefs::NONE;
41  }
42 
46  {
47  PHOOL_VIRTUAL_WARN("get_tower_geometry()");
48  return NULL;
49  }
50 
52  virtual ConstRange get_tower_geometries(void) const;
53  virtual Range get_tower_geometries(void);
54 
55  virtual unsigned int size() const
56  {
57  PHOOL_VIRTUAL_WARN("size()");
58  return 0;
59  }
60 
68  virtual double get_radius() const
69  {
70  PHOOL_VIRTUAL_WARN("get_radius()");
71  return NAN;
72  }
73  virtual double get_thickness() const
74  {
75  PHOOL_VIRTUAL_WARN("get_thickness()");
76  return NAN;
77  }
78  virtual int get_phibins() const
79  {
80  PHOOL_VIRTUAL_WARN("get_phibins()");
81  return -1;
82  }
83  // virtual double get_phistep() const {PHOOL_VIRTUAL_WARN("get_phistep()"); return NAN;}
84  // virtual double get_phimin() const {PHOOL_VIRTUAL_WARN("get_phimin()"); return NAN;}
85  virtual int get_etabins() const
86  {
87  PHOOL_VIRTUAL_WARN("get_etabins()");
88  return -1;
89  }
90  // virtual double get_etastep() const {PHOOL_VIRTUAL_WARN("get_etastep()"); return NAN;}
91  // virtual double get_etamin() const {PHOOL_VIRTUAL_WARN("get_etamin()"); return NAN;}
92 
93  virtual std::pair<double, double> get_phibounds(const int /*ibin*/) const
94  {
95  PHOOL_VIRTUAL_WARN("get_phibounds(const int)");
96  return std::make_pair(NAN, NAN);
97  }
98  virtual std::pair<double, double> get_etabounds(const int /*ibin*/) const
99  {
100  PHOOL_VIRTUAL_WARN("get_etabounds(const int)");
101  return std::make_pair(NAN, NAN);
102  }
103  virtual double get_etacenter(const int /*ibin*/) const
104  {
105  PHOOL_VIRTUAL_WARN("get_etacenter(const int)");
106  return NAN;
107  }
108  virtual double get_phicenter(const int /*ibin*/) const
109  {
110  PHOOL_VIRTUAL_WARN("get_phicenter(const int)");
111  return NAN;
112  }
113 
114  virtual int get_etabin(const double /*eta*/) const
115  {
116  PHOOL_VIRTUAL_WARN("get_etabin(const double)");
117  return -1;
118  }
119  virtual int get_phibin(const double /*phi*/) const
120  {
121  PHOOL_VIRTUAL_WARN("get_phibin(const double)");
122  return -1;
123  }
124 
125  virtual void set_radius(const double) { PHOOL_VIRTUAL_WARN("set_radius(const double)"); }
126  virtual void set_thickness(const double) { PHOOL_VIRTUAL_WARN("set_thickness(const double)"); }
127  virtual void set_phibins(const int) { PHOOL_VIRTUAL_WARN("set_phibins(const int)"); }
128  // virtual void set_phistep(const double phi) {PHOOL_VIRTUAL_WARN("set_phistep(const double)");}
129  // virtual void set_phimin(const double phi) {PHOOL_VIRTUAL_WARN("set_phimin(const double)");}
130  virtual void set_etabins(const int) { PHOOL_VIRTUAL_WARN("set_etabins(const int)"); }
131  // virtual void set_etamin(const double z) {PHOOL_VIRTUAL_WARN("set_etamin(const double)");}
132  // virtual void set_etastep(const double z) {PHOOL_VIRTUAL_WARN("set_etastep(const double)");}
133  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)"); }
134  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)"); }
135 
138  protected:
141 
142  ClassDefOverride(RawTowerGeomContainer, 2)
143 };
144 
145 #endif