ATLAS Offline Software
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;
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) : word0(w),eta(e),phi(p) { }
77  unsigned int word0;
78  float eta,phi;
79  };
80  template <typename T> void fillVectors(const SG::ReadHandleKey<T>& key, const EventContext& ctx, std::vector<float>& etas, std::vector<float>& phis, std::vector<unsigned int>& word0s) const {
81  etas.clear();phis.clear();word0s.clear();
82  SG::ReadHandle<T> tobs{key, ctx};
83  if(tobs.isValid()) {
84  etas.reserve(tobs->size());
85  phis.reserve(tobs->size());
86  word0s.reserve(tobs->size());
87  std::vector<SortableTob> sortedTobs;
88  sortedTobs.reserve(tobs->size());
89  for(auto tob : *tobs) {
90  sortedTobs.emplace_back(SortableTob{tob->word(),tob->eta(),tob->phi()});
91  }
92  std::sort(sortedTobs.begin(),sortedTobs.end(),[](const SortableTob& lhs, const SortableTob& rhs) { return lhs.eta<rhs.eta; });
93  for(auto& tob : sortedTobs) {
94  etas.push_back(tob.eta);
95  phis.push_back(tob.phi);
96  word0s.push_back(tob.word0);
97  }
98  }
99  }
100 
101 };
102 #endif
103 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
GfexSimMonitorAlgorithm::SortableTob
Definition: GfexSimMonitorAlgorithm.h:75
gFexTowerContainer.h
GfexSimMonitorAlgorithm::m_simu_gFexBlock
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexBlock
Definition: GfexSimMonitorAlgorithm.h:62
GfexSimMonitorAlgorithm::ATLAS_THREAD_SAFE
std::map< int, std::string > m_firstEvents ATLAS_THREAD_SAFE
Definition: GfexSimMonitorAlgorithm.h:32
GfexSimMonitorAlgorithm::SortableTob::word0
unsigned int word0
Definition: GfexSimMonitorAlgorithm.h:77
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
GfexSimMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: GfexSimMonitorAlgorithm.cxx:95
GfexSimMonitorAlgorithm::m_simu_gMHTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMHTComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:67
GfexSimMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: GfexSimMonitorAlgorithm.cxx:8
GfexSimMonitorAlgorithm::m_simu_gScalarERms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarERms
Definition: GfexSimMonitorAlgorithm.h:72
GfexSimMonitorAlgorithm::m_data_gFexBlock
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexBlock
Definition: GfexSimMonitorAlgorithm.h:39
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
gFexGlobalRoIContainer.h
GfexSimMonitorAlgorithm::m_simu_gMETComponentsRms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsRms
Definition: GfexSimMonitorAlgorithm.h:70
GfexSimMonitorAlgorithm::m_data_gScalarERms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarERms
Definition: GfexSimMonitorAlgorithm.h:49
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
GfexSimMonitorAlgorithm::m_simu_gFexRho
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexRho
Definition: GfexSimMonitorAlgorithm.h:61
GfexSimMonitorAlgorithm::fillVectors
void fillVectors(const SG::ReadHandleKey< T > &key, const EventContext &ctx, std::vector< float > &etas, std::vector< float > &phis, std::vector< unsigned int > &word0s) const
Definition: GfexSimMonitorAlgorithm.h:80
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
GfexSimMonitorAlgorithm::~GfexSimMonitorAlgorithm
virtual ~GfexSimMonitorAlgorithm()=default
LArBadChannelCont.h
GfexSimMonitorAlgorithm::m_simu_gScalarENoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarENoiseCut
Definition: GfexSimMonitorAlgorithm.h:71
GfexSimMonitorAlgorithm::m_bcContKey
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Definition: GfexSimMonitorAlgorithm.h:53
GfexSimMonitorAlgorithm::compareGlobalRoI
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
Definition: GfexSimMonitorAlgorithm.cxx:199
gFexJetRoIContainer.h
GfexSimMonitorAlgorithm::m_simu_gMSTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMSTComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
GfexSimMonitorAlgorithm::m_data_gMETComponentsRms
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsRms
Definition: GfexSimMonitorAlgorithm.h:47
GfexSimMonitorAlgorithm::SortableTob::phi
float phi
Definition: GfexSimMonitorAlgorithm.h:78
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
GfexSimMonitorAlgorithm::m_data_gFexJet
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexJet
Definition: GfexSimMonitorAlgorithm.h:40
GfexSimMonitorAlgorithm::GfexSimMonitorAlgorithm
GfexSimMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: GfexSimMonitorAlgorithm.cxx:6
GfexSimMonitorAlgorithm::m_data_gFexRho
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_data_gFexRho
Definition: GfexSimMonitorAlgorithm.h:38
GfexSimMonitorAlgorithm
Definition: GfexSimMonitorAlgorithm.py:1
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
GfexSimMonitorAlgorithm::compareJetRoI
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
Definition: GfexSimMonitorAlgorithm.cxx:112
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
GfexSimMonitorAlgorithm::m_data_gScalarENoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarENoiseCut
Definition: GfexSimMonitorAlgorithm.h:48
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
GfexSimMonitorAlgorithm::m_data_gScalarEJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gScalarEJwoj
Definition: GfexSimMonitorAlgorithm.h:42
GfexSimMonitorAlgorithm::m_simu_gMETComponentsNoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsNoiseCut
Definition: GfexSimMonitorAlgorithm.h:69
GfexSimMonitorAlgorithm::m_simu_gMETComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gMETComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:66
GfexSimMonitorAlgorithm::m_data_gMSTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMSTComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:45
GfexSimMonitorAlgorithm::m_data_gMETComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:43
GfexSimMonitorAlgorithm::m_simu_gScalarEJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_simu_gScalarEJwoj
Definition: GfexSimMonitorAlgorithm.h:65
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
GfexSimMonitorAlgorithm::SortableTob::SortableTob
SortableTob(unsigned int w, float e, float p)
Definition: GfexSimMonitorAlgorithm.h:76
GfexSimMonitorAlgorithm::m_simu_gFexJet
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_simu_gFexJet
Definition: GfexSimMonitorAlgorithm.h:63
EgEfficiencyCorr_testFixedInput.etas
list etas
Definition: EgEfficiencyCorr_testFixedInput.py:9
GfexSimMonitorAlgorithm::m_data_gMETComponentsNoiseCut
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMETComponentsNoiseCut
Definition: GfexSimMonitorAlgorithm.h:46
GfexSimMonitorAlgorithm::m_data_gMHTComponentsJwoj
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_data_gMHTComponentsJwoj
Definition: GfexSimMonitorAlgorithm.h:44
GfexSimMonitorAlgorithm::SortableTob::eta
float eta
Definition: GfexSimMonitorAlgorithm.h:78
GfexSimMonitorAlgorithm::m_firstEventsMutex
std::mutex m_firstEventsMutex
Definition: GfexSimMonitorAlgorithm.h:33
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37