ATLAS Offline Software
TileMonitorAlgorithm.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 TILEMONITORING_TILEMONITORALGORITHM_H
6 #define TILEMONITORING_TILEMONITORALGORITHM_H
7 
9 #include "Identifier/Identifier.h"
11 
12 class CaloCell;
13 class TileID;
14 
20 
21  public:
22 
23  TileMonitorAlgorithm(const std::string& name, ISvcLocator* svcLocator)
24  :AthMonitorAlgorithm(name, svcLocator), m_l1TriggerIndices(9, -1) {}
25 
27  virtual ~TileMonitorAlgorithm() = default;
28  virtual StatusCode initialize() override;
29  virtual StatusCode fillHistograms(const EventContext& ctx) const override = 0;
30 
37 
43 
49  PART_EBC, PART_ALL, MAX_PART}; // ROS - 1
50 
56  std::vector<int> getL1TriggerIndices(uint32_t lvl1TriggerType) const;
57 
63  L1TriggerTypeBit getL1TriggerTypeBit(int lvl1TriggerIdx) const;
64 
68  int getNumberOfL1Triggers(void) const {return m_fillHistogramsForL1Triggers.size();};
69 
75  bool isPhysicsEvent(uint32_t lvl1TriggerType) const;
76 
81  Partition getPartition(const CaloCell* cell, const TileID* tileID) const;
82 
87  Partition getPartition(Identifier id, const TileID* tileID) const;
88 
93  Partition getPartition(IdentifierHash hash, const TileID* tileID) const;
94 
95 
96  private:
97 
98  L1TriggerTypeBit getL1TriggerTypeBitFromName(const std::string& triggerBitName) const;
99 
100  Gaudi::Property<std::vector<std::string>> m_fillHistogramsForL1Triggers{this,
101  "fillHistogramsForL1Triggers", {}, "Fill histograms per given L1 trigger types"};
102 
103  std::vector<L1TriggerTypeBit> m_l1Triggers;
104  std::vector<int> m_l1TriggerIndices;
105  std::vector<std::string> m_l1TriggerBitNames{"bit0_RNDM", "bit1_ZeroBias", "bit2_L1CAL", "bit3_MUON",
106  "bit4_RPC", "bit5_FTK", "bti6_CTP", "bit7_Calib", "AnyPhysTrig"};
107 };
108 
109 
110 #endif // TILEMONITORING_TILEMONITORALGORITHM_H
TileMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override=0
adds event to the monitoring histograms
TileMonitorAlgorithm::getL1TriggerIndices
std::vector< int > getL1TriggerIndices(uint32_t lvl1TriggerType) const
Return indices of histograms to be filled according fired L1 trigger type.
Definition: TileMonitorAlgorithm.cxx:67
TileMonitorAlgorithm::BIT2_L1CAL
@ BIT2_L1CAL
Definition: TileMonitorAlgorithm.h:35
TileMonitorAlgorithm::BIT4_RPC
@ BIT4_RPC
Definition: TileMonitorAlgorithm.h:36
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TileMonitorAlgorithm::isPhysicsEvent
bool isPhysicsEvent(uint32_t lvl1TriggerType) const
Return true if it is physics event or false for calibration event.
Definition: TileMonitorAlgorithm.cxx:98
TileMonitorAlgorithm::PART_EBA
@ PART_EBA
Definition: TileMonitorAlgorithm.h:48
TileMonitorAlgorithm::PART_EBC
@ PART_EBC
Definition: TileMonitorAlgorithm.h:49
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileMonitorAlgorithm::ANY_PHYSICS
@ ANY_PHYSICS
Definition: TileMonitorAlgorithm.h:36
TileMonitorAlgorithm::BIT3_MUON
@ BIT3_MUON
Definition: TileMonitorAlgorithm.h:35
TileMonitorAlgorithm::m_l1Triggers
std::vector< L1TriggerTypeBit > m_l1Triggers
Definition: TileMonitorAlgorithm.h:103
TileMonitorAlgorithm::~TileMonitorAlgorithm
virtual ~TileMonitorAlgorithm()=default
TileMonitorAlgorithm::m_fillHistogramsForL1Triggers
Gaudi::Property< std::vector< std::string > > m_fillHistogramsForL1Triggers
Definition: TileMonitorAlgorithm.h:100
TileMonitorAlgorithm::MAX_SAMP
@ MAX_SAMP
Definition: TileMonitorAlgorithm.h:42
TileMonitorAlgorithm::BIT5_FTK
@ BIT5_FTK
Definition: TileMonitorAlgorithm.h:36
TileMonitorAlgorithm::L1TriggerTypeBit
L1TriggerTypeBit
Describes L1 trigger type bits.
Definition: TileMonitorAlgorithm.h:35
TileMonitorAlgorithm::BIT6_CTP
@ BIT6_CTP
Definition: TileMonitorAlgorithm.h:36
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TileMonitorAlgorithm::SAMP_ALL
@ SAMP_ALL
Definition: TileMonitorAlgorithm.h:42
TileMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileMonitorAlgorithm.cxx:10
TileMonitorAlgorithm::TileMonitorAlgorithm
TileMonitorAlgorithm(const std::string &name, ISvcLocator *svcLocator)
Definition: TileMonitorAlgorithm.h:23
TileMonitorAlgorithm::m_l1TriggerBitNames
std::vector< std::string > m_l1TriggerBitNames
Definition: TileMonitorAlgorithm.h:105
TileMonitorAlgorithm::BIT7_CALIB
@ BIT7_CALIB
Definition: TileMonitorAlgorithm.h:36
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileMonitorAlgorithm::BIT0_RNDM
@ BIT0_RNDM
Definition: TileMonitorAlgorithm.h:35
AthMonitorAlgorithm.h
TileMonitorAlgorithm::Partition
Partition
Describes Tile partitions (ROS - 1)
Definition: TileMonitorAlgorithm.h:48
TileMonitorAlgorithm::AuxiliarySampling
AuxiliarySampling
Describes Tile auxiliary sampling.
Definition: TileMonitorAlgorithm.h:42
TileMonitorAlgorithm::PART_ALL
@ PART_ALL
Definition: TileMonitorAlgorithm.h:49
TileMonitorAlgorithm::PART_LBC
@ PART_LBC
Definition: TileMonitorAlgorithm.h:48
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IdentifierHash.h
TileMonitorAlgorithm::m_l1TriggerIndices
std::vector< int > m_l1TriggerIndices
Definition: TileMonitorAlgorithm.h:104
TileMonitorAlgorithm::getL1TriggerTypeBit
L1TriggerTypeBit getL1TriggerTypeBit(int lvl1TriggerIdx) const
Return Level1 Trigger type bit according trigger index.
Definition: TileMonitorAlgorithm.cxx:104
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
TileMonitorAlgorithm::getNumberOfL1Triggers
int getNumberOfL1Triggers(void) const
Return number of L1 triggers for which histograms should be filled.
Definition: TileMonitorAlgorithm.h:68
TileMonitorAlgorithm::MAX_PART
@ MAX_PART
Definition: TileMonitorAlgorithm.h:49
TileMonitorAlgorithm::BIT1_ZEROBIAS
@ BIT1_ZEROBIAS
Definition: TileMonitorAlgorithm.h:35
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
TileMonitorAlgorithm::getL1TriggerTypeBitFromName
L1TriggerTypeBit getL1TriggerTypeBitFromName(const std::string &triggerBitName) const
Definition: TileMonitorAlgorithm.cxx:35
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TileMonitorAlgorithm::getPartition
Partition getPartition(const CaloCell *cell, const TileID *tileID) const
Return Partition for Tile cell or MAX_PART otherwise.
Definition: TileMonitorAlgorithm.cxx:109
TileMonitorAlgorithm::PART_LBA
@ PART_LBA
Definition: TileMonitorAlgorithm.h:48
Identifier
Definition: IdentifierFieldParser.cxx:14
TileMonitorAlgorithm
Base class for Tile monitoring per L1 trigger type.
Definition: TileMonitorAlgorithm.h:19