Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-10-17 08:19:26

0001 #ifndef CALOBASE_RAWCLUSTERV2_H
0002 #define CALOBASE_RAWCLUSTERV2_H
0003 
0004 #include "RawClusterv1.h"
0005 
0006 #include <iostream>
0007 #include <limits>
0008 
0009 class RawCluster;
0010 
0011 class RawClusterv2 : public RawClusterv1
0012 {
0013  public:
0014   RawClusterv2() = default;
0015   ~RawClusterv2() override = default;
0016 
0017   // ---- new API: tower-space CoG, in TOWER UNITS ----
0018   void set_tower_cog(float xr, float yr, float xc, float yc) override { _x_raw = xr; _y_raw = yr; _x_corr = xc; _y_corr = yc; }
0019 
0020   float x_tower_raw()  const override { return _x_raw;  }
0021   float y_tower_raw()  const override { return _y_raw;  }
0022   float x_tower_corr() const override { return _x_corr; }
0023   float y_tower_corr() const override { return _y_corr; }
0024 
0025   // Optional: clone into the same dynamic type
0026   RawCluster* CloneMe() const override { return new RawClusterv2(*this); }
0027 
0028   void Reset() override;
0029 
0030   void identify(std::ostream& os = std::cout) const override;
0031 
0032  private:
0033   float _x_raw = std::numeric_limits<float>::quiet_NaN();
0034   float _y_raw = std::numeric_limits<float>::quiet_NaN();
0035   float _x_corr = std::numeric_limits<float>::quiet_NaN();
0036   float _y_corr = std::numeric_limits<float>::quiet_NaN();
0037 
0038   ClassDefOverride(RawClusterv2, 1)
0039 };
0040 
0041 #endif