File indexing completed on 2025-08-06 08:14:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef STREAKSIDEBANDFILTER_H
0014 #define STREAKSIDEBANDFILTER_H
0015
0016
0017 #include "BaseBeamBackgroundFilter.h"
0018 #include "BeamBackgroundFilterAndQADefs.h"
0019
0020
0021 #include <array>
0022 #include <cstddef>
0023 #include <cstdint>
0024 #include <string>
0025
0026
0027 class PHCompositeNode;
0028 class TowerInfoContainer;
0029
0030
0031
0032
0033
0034
0035
0036
0037 class StreakSidebandFilter : public BaseBeamBackgroundFilter
0038 {
0039 public:
0040
0041
0042
0043 struct Config
0044 {
0045 int verbosity{0};
0046 bool debug{true};
0047 float minStreakTwrEne{0.6};
0048 float maxAdjacentTwrEne{0.06};
0049 uint32_t minNumTwrsInStreak{5};
0050 std::string inNodeName{"TOWERINFO_CALIB_HCALOUT"};
0051 };
0052
0053
0054 StreakSidebandFilter(const std::string& name = "StreakSideband");
0055 StreakSidebandFilter(const Config& cfg, const std::string& name = "StreakSideband");
0056 virtual ~StreakSidebandFilter() = default;
0057
0058
0059 bool ApplyFilter(PHCompositeNode* topNode) override;
0060 void BuildHistograms(const std::string& module, const std::string& tag = "") override;
0061
0062 private:
0063
0064 void GrabNodes(PHCompositeNode* topNode) override;
0065
0066
0067 bool IsTowerNotStreaky(const BeamBackgroundFilterAndQADefs::Tower& tower);
0068 bool IsNeighborNotStreaky(const BeamBackgroundFilterAndQADefs::Tower& tower);
0069
0070
0071 TowerInfoContainer* m_ohContainer{nullptr};
0072
0073
0074 std::array<std::size_t, 64> m_ohNumStreak{};
0075
0076
0077 BeamBackgroundFilterAndQADefs::OHCalMap m_ohMap;
0078
0079
0080 Config m_config;
0081
0082 };
0083
0084 #endif
0085
0086