File indexing completed on 2025-08-05 08:16:21
0001 #ifndef CALOBASE_RAWTOWERGEOMCONTAINER_CYLINDERV1_H
0002 #define CALOBASE_RAWTOWERGEOMCONTAINER_CYLINDERV1_H
0003
0004 #include "RawTowerGeomContainerv1.h"
0005
0006 #include "RawTowerDefs.h"
0007
0008 #include <iostream>
0009 #include <limits>
0010 #include <utility>
0011 #include <vector>
0012
0013
0014
0015
0016 class RawTowerGeomContainer_Cylinderv1 : public RawTowerGeomContainerv1
0017 {
0018 public:
0019 RawTowerGeomContainer_Cylinderv1(
0020 RawTowerDefs::CalorimeterId caloid = RawTowerDefs::NONE);
0021 ~RawTowerGeomContainer_Cylinderv1() override { Reset(); }
0022
0023 void
0024 identify(std::ostream& os = std::cout) const override;
0025
0026
0027 void Reset() override;
0028
0029 double
0030 get_radius() const override
0031 {
0032 return radius;
0033 }
0034
0035 double
0036 get_thickness() const override
0037 {
0038 return thickness;
0039 }
0040
0041 int get_phibins() const override
0042 {
0043 return phi_bound_map.size();
0044 }
0045 int get_etabins() const override
0046 {
0047 return eta_bound_map.size();
0048 }
0049
0050 std::pair<double, double>
0051 get_phibounds(const int ibin) const override;
0052 std::pair<double, double>
0053 get_etabounds(const int ibin) const override;
0054
0055 double
0056 get_etacenter(const int ibin) const override;
0057
0058 double
0059 get_phicenter(const int ibin) const override;
0060
0061 int get_etabin(const double eta) const override;
0062 int get_phibin(const double phi) const override;
0063
0064 void
0065 set_radius(const double r) override
0066 {
0067 radius = r;
0068 }
0069 void
0070 set_thickness(const double t) override
0071 {
0072 thickness = t;
0073 }
0074 void
0075 set_phibins(const int i) override;
0076 void
0077 set_etabins(const int i) override;
0078
0079 void
0080 set_etabounds(const int ibin, const std::pair<double, double>& bounds) override;
0081 void
0082 set_phibounds(const int ibin, const std::pair<double, double>& bounds) override;
0083
0084 protected:
0085 double radius{std::numeric_limits<double>::signaling_NaN()};
0086 double thickness{std::numeric_limits<double>::signaling_NaN()};
0087
0088 typedef std::pair<double, double> bound_t;
0089 typedef std::vector<bound_t> bound_map_t;
0090
0091 bound_map_t eta_bound_map;
0092 bound_map_t phi_bound_map;
0093
0094 ClassDefOverride(RawTowerGeomContainer_Cylinderv1, 1)
0095 };
0096
0097 #endif