File indexing completed on 2025-10-17 08:19:25
0001 #ifndef CALOBASE_PHOTONCLUSTERV1_H
0002 #define CALOBASE_PHOTONCLUSTERV1_H
0003
0004 #include "PhotonCluster.h"
0005 #include "RawClusterv1.h"
0006
0007 #include <map>
0008 #include <string>
0009
0010
0011
0012 class PhotonClusterv1 : public PhotonCluster, public RawClusterv1
0013 {
0014 public:
0015 PhotonClusterv1() = default;
0016
0017
0018 ~PhotonClusterv1() override = default;
0019
0020
0021
0022 explicit PhotonClusterv1(const RawClusterv1& rawcluster);
0023
0024
0025 PhotonClusterv1(const PhotonClusterv1& other) = default;
0026
0027
0028 PhotonClusterv1& operator=(const PhotonClusterv1& other) = default;
0029
0030
0031
0032
0033 void Reset() override;
0034 PHObject* CloneMe() const override { return new PhotonClusterv1(*this); }
0035 int isValid() const override;
0036 void identify(std::ostream& os = std::cout) const override;
0037
0038
0039
0040
0041
0042 float get_conversion_probability() const override { return m_conversion_prob; }
0043 bool is_converted() const override { return m_is_converted; }
0044
0045
0046 bool pass_photon_cuts() const override;
0047 void identify_photon(std::ostream& os = std::cout) const override;
0048 bool is_valid_photon() const override;
0049 void reset_photon_properties() override;
0050
0051
0052
0053
0054
0055 void set_conversion_probability(const float prob) override { m_conversion_prob = prob; }
0056 void set_converted(const bool converted) override { m_is_converted = converted; }
0057
0058 void set_shower_shape_parameter(const std::string& name, float value) override { m_shower_shapes[name] = value; }
0059 float get_shower_shape_parameter(const std::string& name) const override;
0060 const std::map<std::string, float>& get_all_shower_shapes() const { return m_shower_shapes; }
0061
0062
0063 private:
0064
0065
0066
0067 float m_conversion_prob{0.0f};
0068 bool m_is_converted{false};
0069 std::map<std::string, float> m_shower_shapes;
0070
0071 ClassDefOverride(PhotonClusterv1, 1)
0072 };
0073
0074 #endif