ATLAS Offline Software
Loading...
Searching...
No Matches
MistimedStreamMonitorAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef TRIGT1CALOMONITORING_MISTIMEDSTREAMMONITORALGORITHM
7#define TRIGT1CALOMONITORING_MISTIMEDSTREAMMONITORALGORITHM
8
13
22
30
44
47
48#include <TH2.h>
49
50// Trigger include(s):
55
56
58public: MistimedStreamMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
60 virtual StatusCode initialize() override;
61 virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
62
64 struct MonitorTT {
65 const xAOD::TriggerTower* tower = nullptr;
66 double phiScaled = 0;
67 double phi1d = 0;
68 };
69
71 struct MonitorCPM {
72 const xAOD::CPMTower* tower = nullptr;
73 std::vector<double> phiScaled;
74 double etaScaled = 0;
75 double phi1d = 0;
76 };
77
79 struct MonitorJE {
80 const xAOD::JetElement* element = nullptr;
81 std::vector<double> phiScaled;
82 std::vector<double> etaScaled;
83 double phi1d = 0;
84 };
85
86
87private:
88
89 StringProperty m_packageName{this,"PackageName","MistimedStreamMonitor","group name for histogramming"};
90
91 bool pulseQuality(const std::vector<uint16_t>& ttPulse, int peakSlice) const;
92
93
94 // TrigDecisionTool
95 PublicToolHandle< Trig::TrigDecisionTool > m_trigDec{this, "TriggerDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", ""};
96
97 SG::ReadHandleKey<CTP_RDO> m_ctpRdoReadKey {this, "CTPRDOReadKey", LVL1CTP::DEFAULT_RDOOutputLocation,"Read handle key to CTP_RDO for conversion to ByteStream"};
98
101
103
105
106 SG::ReadHandleKey<xAOD::eFexEMRoIContainer> m_eFexEMContainerKey{this,"eFexEMContainer","L1_eEMxRoI","SG key of the input eFex RoI container"};
107 SG::ReadHandleKey<xAOD::eFexTauRoIContainer> m_eFexTauContainerKey{this,"eFexTauContainer","L1_eTauxRoI","SG key of the input eFex Tau RoI container"};
108 SG::ReadHandleKey<xAOD::eFexEMRoIContainer> m_eFexEMOutContainerKey{this,"eFexEMOutContainer","L1_eEMxRoIOutOfTime","SG key of the input eFex RoI container"};
109
110 // container keys for jFex
111 SG::ReadHandleKey< xAOD::jFexLRJetRoIContainer > m_jFexLRJetContainerKey {this,"jFexLRJetRoIContainer","L1_jFexLRJetRoI","SG key of the input jFex LR Jet Roi container"};
112 SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetContainerKey {this,"jFexSRJetRoIContainer","L1_jFexSRJetRoI","SG key of the input jFex SR Jet Roi container"};
113 SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_jFexTauContainerKey {this,"jFexTauRoIContainer" ,"L1_jFexTauRoI" ,"SG key of the input jFex Tau Roi container"};
114
115 SG::ReadHandleKey<xAOD::jFexTowerContainer> m_jFexDataTowerKey {this, "jFexDataTower","L1_jFexDataTowers","SG key of the input jFex Tower container"};
116 SG::ReadHandleKey<xAOD::jFexTowerContainer> m_EmulTowerKey {this, "InputEmulatedTowers", "L1_jFexEmulatedTowers", "SG key of the emulated jFex Tower container"};
117
118 // Define read handles for gFex
119 SG::ReadHandleKeyArray<xAOD::gFexJetRoIContainer> m_gFexJetTobKeyList{this,"gFexJetTobKeyList",{"L1_gFexLRJetRoI", "L1_gFexSRJetRoI"},"Array of gFEX jet ReadHandleKeys to fill histograms for"};
120
121 ToolHandle<LVL1::IL1TriggerTowerToolRun3> m_ttTool{this,"L1TriggerTowerToolRun3", "LVL1::L1TriggerTowerToolRun3/L1TriggerTowerToolRun3", "L1TriggerTowerToolRun3"};
122
123 // Properties
124 Gaudi::Property<double> m_phiScaleTT{this, "phiScaleTT", 32./M_PI, "Scale factor to convert trigger tower phi to integer binning"};
125 Gaudi::Property<bool> m_uselegacy{this, "UseLegacy", false, "Use legacy system" };
126 Gaudi::Property<bool> m_usephaseI{this, "UsePhase1", false, "Use phaseI system" };
127 Gaudi::Property<bool> m_isIons{this, "IsIons", false, "Is ions data" };
128 Gaudi::Property<std::vector<std::string>> m_efexItems{this,"EfexTriggers", {"L1_eEM26M"}, "eFex trigger items in BC0"};
129 Gaudi::Property<std::vector<std::string>> m_jfexItems{this,"JfexTriggers", {"L1_jJ160", "L1_jJ500"}, "jFex trigger items in BC0"};
130 Gaudi::Property<std::vector<std::string>> m_gfexItems{this,"GfexTriggers", {"L1_gJ400p0ETA25", "L1_gLJ140p0ETA25"}, "gFex trigger items in BC0"};
131
132 // L1Calo Conditions
133 SG::ReadCondHandleKey<L1CaloRunParametersContainer> m_runParametersContainer{ this, "InputKeyRunParameters", "L1CaloRunParametersContainer"};
134 SG::ReadCondHandleKey<L1CaloReadoutConfigContainerJSON> m_readoutConfigContainerJSON{ this, "InputKeyReadoutConfig", "L1CaloReadoutConfigContainerJSON"};
135
137 StatusCode makeTowerPPM( const xAOD::TriggerTower* tt,
138 std::vector<MonitorTT> &vecMonTT) const;
139
140
141 StatusCode fillPPMEtaPhi( MonitorTT &monTT,
142 const std::string& groupName,
143 const std::string& weightName,
144 double weight) const;
145
146 StatusCode makeTowerCPM( const xAOD::CPMTower* cpm,
147 std::vector<MonitorCPM> &vecMonCPM) const;
148
149 StatusCode makeTowerJE( const xAOD::JetElement* je,
150 std::vector<MonitorJE> &vecMonJE) const;
151
152 //Control maximum number of histograms per job
153 Gaudi::Property<int> m_maxEvents{this,"MaxEvents",15};
154
155 // Event number counter
156 mutable std::atomic<int> m_eventCounter{0};
157 // count number of error events per lumiblock across threads for each type of error
158 mutable std::mutex m_mutex{};
159 mutable std::map<uint32_t, int> m_event_counter ATLAS_THREAD_SAFE;
160
161 // Bin Names for CutFlow
172
173};
174#endif
#define M_PI
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for reading from StoreGate.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
static const std::string JetElementLocation
static const std::string xAODTriggerTowerLocation
static const std::string CPMTowerLocation
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Gaudi::Property< std::vector< std::string > > m_gfexItems
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocation
ToolHandle< LVL1::IL1TriggerTowerToolRun3 > m_ttTool
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEMOutContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauContainerKey
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_EmulTowerKey
SG::ReadCondHandleKey< L1CaloReadoutConfigContainerJSON > m_readoutConfigContainerJSON
SG::ReadHandleKey< CTP_RDO > m_ctpRdoReadKey
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_jFexDataTowerKey
Gaudi::Property< std::vector< std::string > > m_jfexItems
Gaudi::Property< std::vector< std::string > > m_efexItems
SG::ReadCondHandleKey< L1CaloRunParametersContainer > m_runParametersContainer
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEMContainerKey
SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_jFexTauContainerKey
SG::ReadHandleKeyArray< xAOD::gFexJetRoIContainer > m_gFexJetTobKeyList
SG::ReadHandleKey< xAOD::JetElementContainer > m_jetElementLocation
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_xAODTriggerTowerContainerName
container keys including steering parameter and description
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetContainerKey
virtual ~MistimedStreamMonitorAlgorithm()=default
std::map< uint32_t, int > m_event_counter ATLAS_THREAD_SAFE
SG::ReadHandleKey< xAOD::jFexLRJetRoIContainer > m_jFexLRJetContainerKey
Property holding a SG store/key/clid from which a ReadHandle is made.
static const std::string DEFAULT_RDOOutputLocation
location of CTP RDO output in StoreGate
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
JetElement_v2 JetElement
Define the latest version of the JetElement class.
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
void initialize()
double phi1d
phi for 2d maps with integer bins (taking into account granularity in eta)
Struct to contain PPM trigger tower info.
double phi1d
phi for 2d maps with integer bins (taking into account granularity in eta)