Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:19:52

0001 #ifndef CALOBASE_PHOTONCLUSTERV1_H
0002 #define CALOBASE_PHOTONCLUSTERV1_H
0003 
0004 #include "RawClusterv1.h"
0005 
0006 #include <map>
0007 #include <string>
0008 
0009 //! PhotonClusterv1 - extends RawClusterv1 with photon-ID helpers
0010 class PhotonClusterv1 : public RawClusterv1
0011 {
0012  public:
0013   PhotonClusterv1() = default;
0014 
0015   ~PhotonClusterv1() override = default;
0016 
0017 
0018   explicit PhotonClusterv1(const RawCluster & rc);
0019 
0020   //! Copy constructor
0021   PhotonClusterv1(const PhotonClusterv1& other) = default;
0022 
0023   //! Assignment operator
0024   PhotonClusterv1& operator=(const PhotonClusterv1& other) = default;
0025 
0026   void Reset() override;
0027   PHObject* CloneMe() const override { return new PhotonClusterv1(*this); }
0028   void identify(std::ostream& os = std::cout) const override;
0029   bool pass_photon_cuts() const override;
0030   void identify_photon(std::ostream& os = std::cout) const override;
0031 
0032 
0033   void reset_photon_properties() override;
0034 
0035   //! @name PhotonCluster Setter Implementations
0036   //! @{
0037   //! @warning Virtual override - can be further overridden in derived classes
0038 
0039   // Extra helper to set named shower shape parameters
0040   void set_shower_shape_parameter(const std::string& name, float value) override { m_shower_shapes[name] = value; }
0041   float get_shower_shape_parameter(const std::string& name) const override;
0042   const std::map<std::string, float>& get_all_shower_shapes() const override { return m_shower_shapes; }
0043   //! @}
0044 
0045  private:
0046   //! @warning Photon-specific data members - memory managed only in this derived class
0047   // Photon energy and isolation energy now sourced from RawCluster
0048   //float m_conversion_prob{0.0f};                 //!< Probability of photon conversion
0049   //bool m_is_converted{false};                    //!< Conversion flag
0050   std::map<std::string, float> m_shower_shapes;  //!< Named shower shape parameters
0051 
0052   ClassDefOverride(PhotonClusterv1, 1)  //!< ROOT dictionary generation
0053 };
0054 
0055 #endif