ATLAS Offline Software
Loading...
Searching...
No Matches
LArRawChannelMonAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARMONITORING_LARRAWCHANNELMONALG_H
6#define LARMONITORING_LARRAWCHANNELMONALG_H
7
8#include <array>
9#include <set>
10#include <string>
11#include <vector>
12
15#include "GaudiKernel/ToolHandle.h"
16#include "GaudiKernel/SystemOfUnits.h"
23
24class LArOnlineID;
25class CaloNoise;
26
27// A monitoring algorithm for the LAr's Raw Channels
28//
29// This AthMonitorAlgorithm is largely based upon the original class
30// LArRawChannelMonTool authored by Rob McPherson &Frank Berghaus.
31// For the time being, it provides only a subset of the monitoring
32// histograms defined in the original class.
34 public:
35 LArRawChannelMonAlg(const std::string&, ISvcLocator*);
36
37 virtual ~LArRawChannelMonAlg();
38
39 // Connects to services and tools
40 //
41 // The LArOnlineID and LArCablingService are retrieved.
42 // Mapping from FEB hash to sub-detector is created.
43 virtual StatusCode initialize() override;
44
45 // Fill histograms with monitoring quantities
46 //
47 // Returns success if no LArRawChannelContainer exists, returns failure if
48 // LArRawChannelContainer cannot be retrieved.
49 virtual StatusCode fillHistograms(const EventContext& ctx) const override;
50
51 private:
52 // Public alg properties
53 Gaudi::Property<bool> m_monitor_occupancy{this, "monitor_occupancy", false, ""};
54 Gaudi::Property<bool> m_monitor_signal{this, "monitor_signal", true, ""};
55 Gaudi::Property<bool> m_monitor_positive_noise{this, "monitor_positive_noise", true, ""};
56 Gaudi::Property<bool> m_monitor_negative_noise{this, "monitor_negative_noise", true, ""};
57 Gaudi::Property<bool> m_monitor_time{this, "monitor_time", true, ""};
58 Gaudi::Property<bool> m_monitor_quality{this, "monitor_quality", false, ""};
59 Gaudi::Property<bool> m_monitor_burst{this, "monitor_burst", true, ""};
60 Gaudi::Property<bool> m_monitor_febs{this, "monitor_febs", false, ""};
61 Gaudi::Property<bool> m_monitor_feedthroughs{this, "monitor_feedthroughs", false, ""};
62 Gaudi::Property<bool> m_monitor_detectors{this, "monitor_detectors", true, ""};
63 Gaudi::Property<std::vector<double>> m_occupancy_thresholds{this, "occupancy_thresholds", {8, 500. * Gaudi::Units::MeV}, ""};
64 Gaudi::Property<std::vector<double>> m_signal_thresholds{this, "signal_thresholds", {8, 500. * Gaudi::Units::MeV}, ""};
65 Gaudi::Property<std::vector<int>> m_pos_noise_thresholds{this, "pos_noise_thresholds", {8, 3}, ""};
66 Gaudi::Property<std::vector<int>> m_neg_noise_thresholds{this, "neg_noise_thresholds", {8, 3}, ""};
67 Gaudi::Property<double> m_bcid_signal_threshold{this, "bcid_signal_threshold", 500. * Gaudi::Units::MeV, ""};
68 Gaudi::Property<short> m_time_threshold{this, "time_threshold", 5, ""};
69 Gaudi::Property<unsigned short> m_quality_threshold{this, "quality_threshold", 4000, ""};
70 Gaudi::Property<short> m_noise_threshold{this, "noise_threshold", 3, ""};
71 Gaudi::Property<std::vector<double>> m_noise_burst_percent_thresholds{this, "noise_burst_percent_threshold", {8, 1.}, ""};
72 Gaudi::Property<std::vector<unsigned>> m_noise_burst_nChannel_thresholds{this, "noise_burst_nChannel_threshold", {8, 10}, ""};
73 Gaudi::Property<std::vector<std::string>> m_noise_streams{this, "noise_streams", {}, ""};
74 Gaudi::Property<bool> m_db_and_ofc_only{this, "db_and_ofc_only", true,
75 "use channels "
76 "only if pedestal and adc2e value from DB and OFC was used"};
77 Gaudi::Property<std::vector<std::string>> m_problemsToMask{this, "ProblemsToMask", {}, "Bad-Channel categories to mask"};
78 ToolHandleArray<IDQFilterTool> m_atlasReady_tools{this, "AtlasReadyFilterTool", {}};
79
80 // --- ReadHandle keys ---
81 SG::ReadHandleKey<LArRawChannelContainer> m_LArRawChannel_container_key{this, "LArRawChannelContainerKey", "LArRawChannels"};
82
83 // --- tools ---
85
86 // Handle to bad-channel mask
88 SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey{this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};
89 SG::ReadCondHandleKey<CaloNoise> m_noiseKey{this, "NoiseKey", "totalNoise", "SG key for noise"};
90 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingKey", "LArOnOffIdMap", "SG Key of LArOnOffIdMapping object"};
91 // To get the data-dependency right ...
92 SG::ReadDecorHandleKey<xAOD::EventInfo> m_larFlagKey{this, "LArStatusFlag", "EventInfo.larFlags", "Key for EventInfo object"};
93
94 // Index of the GenericMonitoringTool associated to a given partition
95 // in the vector AthMonitorAlgorithm::m_tools
96 std::array<int, 8> m_monitoring_tool_index;
97
98 // Dictionary FEB hash <-> partition
99 std::vector<int8_t> m_feb_hash_to_detector;
100
101 // Number of LArRawChannels connected in each detector
102 std::array<uint32_t, 8> m_det_to_nchannels;
103
104 // Same as m_noise_streams but retaining only unique streams
105 std::set<std::string> m_noise_streams_set;
106};
107
108#endif // LARMONITORING_LARRAWCHANNELMONALG_H
Handle class for reading a decoration on an object.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< LArRawChannelContainer > m_LArRawChannel_container_key
Gaudi::Property< std::vector< int > > m_pos_noise_thresholds
Gaudi::Property< bool > m_monitor_positive_noise
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const LArOnlineID * m_lar_online_id_ptr
Gaudi::Property< short > m_time_threshold
Gaudi::Property< std::vector< unsigned > > m_noise_burst_nChannel_thresholds
ToolHandleArray< IDQFilterTool > m_atlasReady_tools
Gaudi::Property< bool > m_db_and_ofc_only
Gaudi::Property< bool > m_monitor_negative_noise
SG::ReadCondHandleKey< CaloNoise > m_noiseKey
Gaudi::Property< short > m_noise_threshold
Gaudi::Property< bool > m_monitor_signal
std::vector< int8_t > m_feb_hash_to_detector
Gaudi::Property< bool > m_monitor_feedthroughs
std::array< uint32_t, 8 > m_det_to_nchannels
Gaudi::Property< bool > m_monitor_burst
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Gaudi::Property< unsigned short > m_quality_threshold
std::set< std::string > m_noise_streams_set
Gaudi::Property< bool > m_monitor_quality
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Gaudi::Property< bool > m_monitor_time
Gaudi::Property< std::vector< std::string > > m_noise_streams
SG::ReadDecorHandleKey< xAOD::EventInfo > m_larFlagKey
Gaudi::Property< bool > m_monitor_occupancy
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< bool > m_monitor_febs
std::array< int, 8 > m_monitoring_tool_index
Gaudi::Property< double > m_bcid_signal_threshold
Gaudi::Property< std::vector< double > > m_occupancy_thresholds
Gaudi::Property< bool > m_monitor_detectors
Gaudi::Property< std::vector< double > > m_noise_burst_percent_thresholds
Gaudi::Property< std::vector< int > > m_neg_noise_thresholds
Gaudi::Property< std::vector< double > > m_signal_thresholds
LArBadChannelMask m_bcMask
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
void initialize()