Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
L1TopoRatesCalculator.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 RATESANALYSIS_L1TOPORATESCALCULATOR_H
6 #define RATESANALYSIS_L1TOPORATESCALCULATOR_H 1
7 
11 
12 /* L1TopoSim results access
13  */
17 
18 //for hw data access
20 
21 /* Including L1Menu connectors
22  */
24 #include "TrigConfData/L1Menu.h"
26 #include <vector>
27 #include <cstdint>
28 #include <unordered_map>
29 
31  public:
32  L1TopoRatesCalculator( const std::string& name, ISvcLocator* pSvcLocator );
33 
34  SG::ReadHandleKey<xAOD::TrigDecision> m_trigDecisionKey{this, "TrigDecisionKey", "xTrigDecision"};
35  SG::ReadHandleKey<xAOD::L1TopoSimResultsContainer> m_l1topoKey {this, "L1_TopoKey", "L1_TopoSimResults", "l1topo EDM"};
36 
37  virtual StatusCode initialize() override;
38  virtual StatusCode ratesInitialize() override;
39  virtual StatusCode ratesExecute() override;
40  virtual StatusCode ratesFinalize() override;
41 
42  private:
43  TH2D* m_ratesMatrixHist{}; // Rates Matrix
45  unsigned int conID{};
46  unsigned int flatindex{};
47  unsigned int nBit{};
48  unsigned int clock{};
49  bool fromSim{};
50  bool overflow{};
51  };
52 
53  Gaudi::Property<std::vector<std::string>> m_L1_items_json{this, "m_L1_items_json", {}, "L1 trigger items"};
54  Gaudi::Property<std::vector<std::string>> m_userDefinedNames{this, "m_userDefinedNames", {}, "user Defined Names"};
55  Gaudi::Property<std::vector<std::string>> m_userDefinedDefinitions{this, "m_userDefinedDefinitions", {}, "user Defined definitions"};
56  std::unordered_map<std::string, std::string> m_userDefinedMap;
57 
58  std::vector<std::string> m_L1_items;
59  std::vector<std::string> m_L1_item_definitions;
60  std::vector<std::string> m_beforeCTP_triggers;
61  std::vector<std::string> m_beforeCTP_triggers_mult;
62  std::vector<ResultDefinition> m_definitions;
63  std::vector<std::vector<double>> m_rates_matrix;
64  std::vector<std::vector<double>> m_rates_matrix2;
65  std::vector<double> m_denominator;
66  double m_weighted_sum{};
67  struct TriggerInfo {
68  std::vector<std::string> triggers;
69  std::vector<std::string> operations;
70  };
71 
72  std::map<std::string, TriggerInfo> m_triggerMap;
73  uint32_t extractResult(const std::vector<uint32_t>& connectorContents, const L1TopoRatesCalculator::ResultDefinition& definition, unsigned int startOffset);
75  bool getTOBblockFromProcessor(const std::vector<uint32_t>& allDataBlock, std::vector<uint32_t>& tobBlock, uint32_t fpgaPattern);
77  Gaudi::Property<float> m_lumi{this, "TargetLuminosity", 2e34, "Targer inst. luminosity, assuming full ring."};
78 };
79 
80 #endif //> !RATESANALYSIS_RATESEMULATIONEXAMPLE_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
L1TopoRatesCalculator::L1TopoRatesCalculator
L1TopoRatesCalculator(const std::string &name, ISvcLocator *pSvcLocator)
Definition: L1TopoRatesCalculator.cxx:13
RatesAnalysisFullMenu.e34
e34
Definition: RatesAnalysisFullMenu.py:25
L1TopoRatesCalculator::m_trigDecisionKey
SG::ReadHandleKey< xAOD::TrigDecision > m_trigDecisionKey
Definition: L1TopoRatesCalculator.h:34
TrigDecision.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
L1TopoRatesCalculator::m_L1_items_json
Gaudi::Property< std::vector< std::string > > m_L1_items_json
Definition: L1TopoRatesCalculator.h:53
L1TopoRatesCalculator::m_triggerMap
std::map< std::string, TriggerInfo > m_triggerMap
Definition: L1TopoRatesCalculator.h:72
L1TopoSimResults.h
L1TopoRatesCalculator::m_userDefinedNames
Gaudi::Property< std::vector< std::string > > m_userDefinedNames
Definition: L1TopoRatesCalculator.h:54
RatesAnalysisAlg.h
L1TopoRatesCalculator::m_denominator
std::vector< double > m_denominator
Definition: L1TopoRatesCalculator.h:65
L1TopoRatesCalculator::ratesInitialize
virtual StatusCode ratesInitialize() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:205
L1TopoRatesCalculator::extractResult
uint32_t extractResult(const std::vector< uint32_t > &connectorContents, const L1TopoRatesCalculator::ResultDefinition &definition, unsigned int startOffset)
Definition: L1TopoRatesCalculator.cxx:328
L1TopoRatesCalculator
Definition: L1TopoRatesCalculator.h:30
L1TopoRatesCalculator::TriggerInfo::triggers
std::vector< std::string > triggers
Definition: L1TopoRatesCalculator.h:68
L1TopoRatesCalculator::m_userDefinedMap
std::unordered_map< std::string, std::string > m_userDefinedMap
Definition: L1TopoRatesCalculator.h:56
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
L1TopoRatesCalculator::getTOBblockFromProcessor
bool getTOBblockFromProcessor(const std::vector< uint32_t > &allDataBlock, std::vector< uint32_t > &tobBlock, uint32_t fpgaPattern)
L1TopoRatesCalculator::initialize
virtual StatusCode initialize() override
Get the trigger decision tool and set up global groups.
Definition: L1TopoRatesCalculator.cxx:16
L1TopoRatesCalculator::ResultDefinition
Definition: L1TopoRatesCalculator.h:44
L1TopoRatesCalculator::m_L1_item_definitions
std::vector< std::string > m_L1_item_definitions
Definition: L1TopoRatesCalculator.h:59
L1TopoRatesCalculator::m_lumi
Gaudi::Property< float > m_lumi
Definition: L1TopoRatesCalculator.h:77
L1TopoRawDataContainer.h
L1TopoRatesCalculator::ResultDefinition::clock
unsigned int clock
Definition: L1TopoRatesCalculator.h:48
L1TopoRatesCalculator::m_l1topoKey
SG::ReadHandleKey< xAOD::L1TopoSimResultsContainer > m_l1topoKey
Definition: L1TopoRatesCalculator.h:35
L1TopoRatesCalculator::TriggerInfo
Definition: L1TopoRatesCalculator.h:67
L1TopoRatesCalculator::L1TopoSimResultsContainer_decoder
uint32_t L1TopoSimResultsContainer_decoder(const L1TopoRatesCalculator::ResultDefinition &definition, SG::ReadHandle< xAOD::L1TopoSimResultsContainer > &cont)
Definition: L1TopoRatesCalculator.cxx:253
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthCommonDataStore.h
Templated class that provides access to Athena event stores and ability to set data dependencies via ...
L1TopoRatesCalculator::ratesFinalize
virtual StatusCode ratesFinalize() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:478
L1TopoRatesCalculator::m_ratesMatrixHist
TH2D * m_ratesMatrixHist
Definition: L1TopoRatesCalculator.h:43
L1Connector.h
L1TopoRatesCalculator::m_beforeCTP_triggers
std::vector< std::string > m_beforeCTP_triggers
Definition: L1TopoRatesCalculator.h:60
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
L1TopoRatesCalculator::m_beforeCTP_triggers_mult
std::vector< std::string > m_beforeCTP_triggers_mult
Definition: L1TopoRatesCalculator.h:61
L1TopoRatesCalculator::ResultDefinition::overflow
bool overflow
Definition: L1TopoRatesCalculator.h:50
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
L1TopoRatesCalculator::m_userDefinedDefinitions
Gaudi::Property< std::vector< std::string > > m_userDefinedDefinitions
Definition: L1TopoRatesCalculator.h:55
L1TopoRatesCalculator::ratesExecute
virtual StatusCode ratesExecute() override
To be implemented by the user.
Definition: L1TopoRatesCalculator.cxx:364
L1TopoRatesCalculator::m_definitions
std::vector< ResultDefinition > m_definitions
Definition: L1TopoRatesCalculator.h:62
L1TopoRatesCalculator::m_rates_matrix2
std::vector< std::vector< double > > m_rates_matrix2
Definition: L1TopoRatesCalculator.h:64
L1TopoRatesCalculator::m_rates_matrix
std::vector< std::vector< double > > m_rates_matrix
Definition: L1TopoRatesCalculator.h:63
L1TopoRatesCalculator::getHWvalue
uint32_t getHWvalue(const L1TopoRatesCalculator::ResultDefinition &definition)
L1Menu.h
L1TopoRatesCalculator::m_L1_items
std::vector< std::string > m_L1_items
Definition: L1TopoRatesCalculator.h:58
L1TopoRatesCalculator::ResultDefinition::flatindex
unsigned int flatindex
Definition: L1TopoRatesCalculator.h:46
L1TopoRatesCalculator::ResultDefinition::nBit
unsigned int nBit
Definition: L1TopoRatesCalculator.h:47
RatesAnalysisAlg
virtual analysis class for performing rates studies on AOD Pure virtual base class for trigger rate s...
Definition: RatesAnalysisAlg.h:37
L1TopoRatesCalculator::ResultDefinition::fromSim
bool fromSim
Definition: L1TopoRatesCalculator.h:49
L1TopoSimResultsContainer.h
L1TopoRatesCalculator::TriggerInfo::operations
std::vector< std::string > operations
Definition: L1TopoRatesCalculator.h:69
L1TopoRatesCalculator::m_weighted_sum
double m_weighted_sum
Definition: L1TopoRatesCalculator.h:66
L1TopoRatesCalculator::ResultDefinition::conID
unsigned int conID
Definition: L1TopoRatesCalculator.h:45