ATLAS Offline Software
Loading...
Searching...
No Matches
CpmMonitorAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGT1CALOMONITORING_CPMMONITORALGORITHM_H
5#define TRIGT1CALOMONITORING_CPMMONITORALGORITHM_H
6
17
18
20 public:CpmMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
21 virtual ~CpmMonitorAlgorithm()=default;
22 virtual StatusCode initialize() override;
23 virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
24
25 // monitoring trigger tower structs for various towers
26 struct MonitorTT{
28 double phi_scaled{}; // rescaled for 2D plots
29 };
30
33 // some modified/derived information
34 double phi_scaled{}; // rescaled for 2D plots
35 int slice{}; // crate * m_maxSlices + emEnergyVec()).size() - 1;
36 // errors
41 };
42
45 // some modified/derived information
46 double etaMod{};
47 double phiMod{};
48 };
49
51 MonitorCmxCpTob() = default; // suppresses a cppcheck false positive
53 // some modified/derived information
54 uint8_t x{}; // crate * m_modules + cpm - 1
55 uint8_t y{}; // chip * 4 + location
56 int ybase{}; // cmx * 5
57 // errors required to be used as masks
59 int ybaseError{};
60 };
61
64 // some modified/derived information
65 uint8_t crateSlices{}; // crate * m_maxSlices + slices - 1
66 uint8_t crateCmx{}; // crate * 2 + cmx
67 // source flag
69 };
70
71
72private:
73
74 // Phi scale for trigger tower eta/phi plots
75 double m_phiScaleTT{};
76
77 StringProperty m_packageName{this,"PackageName","CpmMonitor","group name for histograming"};
78
79 Gaudi::Property<int> m_crates{this,"s_crates", 4, "Number of CPM crates"};
80 Gaudi::Property<int> m_modules{this,"s_modules", 14, "Number of modules per crate (modules numbered 1-14)"};
81 Gaudi::Property<int> m_maxSlices{this,"s_maxSlices", 5, "Maximum number of slices"};
82 Gaudi::Property<int> m_tobsPerCPM{this,"s_tobsPerCPM", 5, "Maximum number of TOBs per CPM sent to CMX"};
83 Gaudi::Property<int> m_isolBits{this,"s_isolBits", 5, "Number of bits for encoded isolation"};
84 Gaudi::Property<int> m_threshBits{this,"s_threshBits", 3, "Number of bits per threshold for hit sums"};
85 Gaudi::Property<int> m_thresholds{this,"s_thresholds", 16, "Number of EM/Tau threshold bits"};
86 Gaudi::Property<int> m_maxTobsPerCmx{this,"MaxTOBsPerCMX", 70, "Maximum number of TOBs per CMX plotted"};
87
88 // Error vector StoreGate key
89 SG::WriteHandleKey<std::vector<int>> m_errorLocation{this,"ErrorLocation","L1CaloCPMErrorVector","Error vector name"};
90
91 // Error summary plot bins
94
95
96 // container keys including steering parameter and description
99 SG::ReadHandleKey<xAOD::CPMTowerContainer> m_cpmTowerLocationOverlap{this, "CPMTowerLocationOverlap",LVL1::TrigT1CaloDefs::CPMTowerLocation + "Overlap", "CPM Overlap container"};
103
104 std::vector<bool> getIsolationBits(int val, int nThresh, int nBits) const;
105
106
107 StatusCode fillCpmTowerVectors(SG::ReadHandle<xAOD::CPMTowerContainer> &cpmTower,
108 std::vector<MonitorCpmTT> &monCpmTTs_em, std::vector<MonitorCpmTT> &monCpmTTs_had,
109 std::vector<int> &errorsCPM,
110 bool core,
112 Monitored::Scalar<int> &GLinkParityError
113 ) const;
114
115
116};
117#endif
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocationOverlap
Gaudi::Property< int > m_maxSlices
Gaudi::Property< int > m_modules
SG::WriteHandleKey< std::vector< int > > m_errorLocation
Gaudi::Property< int > m_threshBits
Gaudi::Property< int > m_crates
SG::ReadHandleKey< xAOD::CMXCPHitsContainer > m_cmxCpHitsLocation
SG::ReadHandleKey< xAOD::CMXCPTobContainer > m_cmxCpTobLocation
StringProperty m_packageName
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_xAODTriggerTowerContainerName
Gaudi::Property< int > m_maxTobsPerCmx
Gaudi::Property< int > m_thresholds
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
virtual ~CpmMonitorAlgorithm()=default
Gaudi::Property< int > m_tobsPerCPM
SG::ReadHandleKey< xAOD::CPMTobRoIContainer > m_cpmTobRoiLocation
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocation
Gaudi::Property< int > m_isolBits
static const std::string CPMTobRoILocation
static const std::string xAODTriggerTowerLocation
static const std::string CMXCPHitsLocation
static const std::string CPMTowerLocation
static const std::string CMXCPTobLocation
Declare a monitored scalar variable.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Description of CMXCPHits_v1.
Description of CMXCPTob_v1.
Definition CMXCPTob_v1.h:27
Description of CPMTobRoI_v1.
Description of CPMTower_v2.
Definition CPMTower_v2.h:26
Description of TriggerTower_v2.
void initialize()
const xAOD::TriggerTower_v2 * ttower
const xAOD::CPMTobRoI_v1 * tobroi