ATLAS Offline Software
Loading...
Searching...
No Matches
GfexSimMonitorAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef TRIGT1CALOMONITORING_GFEXSIMMONITORALGORITHM_H
5#define TRIGT1CALOMONITORING_GFEXSIMMONITORALGORITHM_H
6
10
13
15
17
19 public:
20 GfexSimMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
21 virtual ~GfexSimMonitorAlgorithm()=default;
22 virtual StatusCode initialize() override;
23 virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
24
25 private:
26
27 bool compareJetRoI(const std::string& label, const SG::ReadHandleKey<xAOD::gFexJetRoIContainer>& tobs1Key, const SG::ReadHandleKey<xAOD::gFexJetRoIContainer>& tobs2Key, const EventContext& ctx, bool simReady=false) const;
28
29 bool compareGlobalRoI(const std::string& label, const SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer>& tobs1Key, const SG::ReadHandleKey<xAOD::gFexGlobalRoIContainer>& tobs2Key, const EventContext& ctx, uint32_t tobMask=0xffffffff) const;
30
31 // map hold the binlabels (in form of LBN:FirstEventNum) to use for each lb
32 mutable std::map<int,std::string> m_firstEvents ATLAS_THREAD_SAFE;
33 mutable std::mutex m_firstEventsMutex;
34
35
36 // container keys for Data tobs
37
38 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexRho {this,"gFexRhoOutputContainer","L1_gFexRhoRoI","SG key of the gFEX EDM gFexRho container"};
39 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexBlock {this,"gFexSRJetOutputContainer","L1_gFexSRJetRoI","SG key of the gFEX EDM gFexBlock container"};
40 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexJet {this,"gFexLRJetOutputContainer","L1_gFexLRJetRoI","SG key of the gFEX EDM gFexJet container"};
41
42 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarEJwoj {this,"gScalarEJwojOutputContainer","L1_gScalarEJwoj","SG key gFEX EDM Scalar MET and SumET (JwoJ) container"};
43 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsJwoj {this,"gMETComponentsJwojOutputContainer","L1_gMETComponentsJwoj","SG key gFEX EDM total MET components (JwoJ) container"};
44 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMHTComponentsJwoj {this,"gMHTComponentsJwojOutputContainer","L1_gMHTComponentsJwoj","SG key gFEX EDM hard MET components (JwoJ) container"};
45 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMSTComponentsJwoj {this,"gMSTComponentsJwojOutputContainer","L1_gMSTComponentsJwoj","SG key gFEX EDM soft MET components (JwoJ) container"};
46 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsNoiseCut {this,"gMETComponentsNoiseCutOutputContainer","L1_gMETComponentsNoiseCut","SG key gFEX EDM total MET components (NoiseCut) container"};
47 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsRms {this,"gMETComponentsRmsOutputContainer","L1_gMETComponentsRms","SG key gFEX EDM total MET components (RMS) container"};
48 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarENoiseCut {this,"gScalarENoiseCutOutputContainer","L1_gScalarENoiseCut","SG key gFEX EDM Scalar MET and SumET (NoiseCut) container"};
49 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarERms {this,"gScalarERmsOutputContainer","L1_gScalarERms","SG key gFEX EDM Scalar MET and SumET (RMS) container"};
50
51
52
53 SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey{this, "LArMaskedChannelKey", "LArMaskedSC", "Key of the OTF-Masked SC" };
54
55
56 // container keys for Simulation tobsi
57// SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_key_gGlob {this,"gFexGlobalRoISimContainer","L1_gFexGlobalRoISim","SG key of the Sim gFex Global Roi container" };
58// SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_key_gJ {this,"gFexJetRoISimContainer" ,"L1_gFexJetRoISim" ,"SG key of the Sim gFex Jet Roi container" };
59
60
61 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexRho {this,"gFexRhoOutputSimContainer","L1_gFexRhoRoISim","SG key of the Sim gFEX EDM gFexRho container"};
62 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexBlock {this,"gFexSRJetOutputSimContainer","L1_gFexSRJetRoISim","SG key of the Sim gFEX EDM gFexBlock container"};
63 SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexJet {this,"gFexLRJetOutputSimContainer","L1_gFexLRJetRoISim","SG key of the Sim gFEX EDM gFexJet container"};
64
65 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarEJwoj {this,"gScalarEJwojOutputSimContainer","L1_gScalarEJwojSim","SG key Sim gFEX EDM Scalar MET and SumET (JwoJ) container"};
66 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsJwoj {this,"gMETComponentsJwojOutputSimContainer","L1_gMETComponentsJwojSim","SG key Sim gFEX EDM total MET components (JwoJ) container"};
67 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMHTComponentsJwoj {this,"gMHTComponentsJwojOutputSimContainer","L1_gMHTComponentsJwojSim","SG key Sim gFEX EDM hard MET components (JwoJ) container"};
68 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMSTComponentsJwoj {this,"gMSTComponentsJwojOutputSimContainer","L1_gMSTComponentsJwojSim","SG key Sim gFEX EDM soft MET components (JwoJ) container"};
69 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsNoiseCut {this,"gMETComponentsNoiseCutOutputSimContainer","L1_gMETComponentsNoiseCutSim","SG key Sim gFEX EDM total MET components (NoiseCut) container"};
70 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsRms {this,"gMETComponentsRmsOutputSimContainer","L1_gMETComponentsRmsSim","SG key Sim gFEX EDM total MET components (RMS) container"};
71 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarENoiseCut {this,"gScalarENoiseCutOutputSimContainer","L1_gScalarENoiseCutSim","SG key Sim gFEX EDM Scalar MET and SumET (NoiseCut) container"};
72 SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarERms {this,"gScalarERmsOutputSimContainer","L1_gScalarERmsSim","SG key Sim gFEX EDM Scalar MET and SumET (RMS) container"};
73
74
75 struct SortableTob {
76 SortableTob(unsigned int w, float e, float p, int pt) : word0(w),eta(e),phi(p),et(pt) { }
77 unsigned int word0;
78 float eta,phi;
79 int et;
80 };
81 template <typename T> void fillVectors(const SG::ReadHandleKey<T>& key, const EventContext& ctx, std::vector<SortableTob>& sortedTobs) const {
82 sortedTobs.clear();
83 SG::ReadHandle<T> tobs{key, ctx};
84 if(tobs.isValid()) {
85 sortedTobs.reserve(tobs->size());
86 for(auto tob : *tobs) {
87 sortedTobs.emplace_back(SortableTob{tob->word(),tob->eta(),tob->phi(),tob->gFexTobEt()});
88 }
89 std::sort(sortedTobs.begin(),sortedTobs.end(),[](const SortableTob& lhs, const SortableTob& rhs) { return lhs.eta<rhs.eta; });
90 }
91 }
92
93};
94#endif
95
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexBlock
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexBlock
void fillVectors(const SG::ReadHandleKey< T > &key, const EventContext &ctx, std::vector< SortableTob > &sortedTobs) const
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsNoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMSTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexJet
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarERms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarEJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMSTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexJet
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
bool compareGlobalRoI(const std::string &label, const SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > &tobs1Key, const SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > &tobs2Key, const EventContext &ctx, uint32_t tobMask=0xffffffff) const
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsNoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarEJwoj
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
virtual ~GfexSimMonitorAlgorithm()=default
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarERms
std::map< int, std::string > m_firstEvents ATLAS_THREAD_SAFE
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarENoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsRms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsJwoj
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexRho
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarENoiseCut
bool compareJetRoI(const std::string &label, const SG::ReadHandleKey< xAOD::gFexJetRoIContainer > &tobs1Key, const SG::ReadHandleKey< xAOD::gFexJetRoIContainer > &tobs2Key, const EventContext &ctx, bool simReady=false) const
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMHTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsRms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMHTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexRho
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::string label(const std::string &format, int i)
Definition label.h:19
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
void initialize()
SortableTob(unsigned int w, float e, float p, int pt)