ATLAS Offline Software
Loading...
Searching...
No Matches
LArSuperCellMonAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4// Morvaj, P.Strizenec - develop for Digital Trigger monitoring (2021)
5
6#ifndef LARMONITORING_LARSUPERCELLMONALG_H
7#define LARMONITORING_LARSUPERCELLMONALG_H
8
10
11//#include "LArRecConditions/ILArBadChannelMasker.h"
12
15
17//#include "LArRecConditions/LArBadChannelCont.h"
21
22//#include "TrigDecisionTool/TrigDecisionTool.h"
24
25#include <vector>
26#include <string>
27#include <bitset>
28#include <array>
29#include <map>
30#include <unordered_map>
31
32namespace Trig {
33 class ChainGroup;
34}
35
36class CaloCell;
37class TileID;
38class CaloCell_ID;
39
40
42
43 public:
44
45 LArSuperCellMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
47
48 virtual StatusCode initialize() override final;
49 virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
50
51
52private:
53
54 // Job properties
55 SG::ReadHandleKey<CaloCellContainer> m_superCellContainerKey{this,"CaloCellContainer","SCell","SG key of the input super cell container"};
56 SG::ReadHandleKey<CaloCellContainer> m_superCellContainerRefKey{this,"CaloCellContainerRef","SCellEm","SG key of the reference super cell container"};
57 SG::ReadHandleKey<CaloCellContainer> m_superCellContainerRecoKey{this,"CaloCellContainerReco","","SG key of reconstructed SC"};
58
61 {this, "BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"};
62
63 Gaudi::Property<std::string> m_MonGroupName {this, "MonGroupName", "LArSuperCellMonGroup"};
64 //Gaudi::Property<std::string> m_SuperCellContainer {this, "SuperCellContainer", "LArSuperCellContainer"};
65 // std::string m_SuperCellContainer;
66
67 Gaudi::Property<std::vector<std::string> > m_streams{this, "Streams", {}, "Which streams to monitor, if empty, only simple profile per partition (offline case)"};
68 Gaudi::Property<std::vector<std::string> > m_SubDetNames{this, "SubDetNames", {} };
69
70 SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","totalNoise","SG Key of CaloNoise data object"};
71
72 //Tool maps, for thr. histograms
73 std::map<std::string,std::map<std::string,int>> m_toolmapAll;
74
75
76 // Thresholds for time and Time vs Energy plots:
77 // Energy thresholds hardcoded following official timing analysis. See for example:
78 // https://indico.cern.ch/event/522351/
79 FloatArrayProperty m_eCutForTiming {this, "EcutForTiming",
80 //EMBPNS=0, EMB1NS, EMB2NS, EMB3NS, HEC0NS, HEC1NS, HEC2NS, HEC3NS,EMECPNS,EMEC1NS,EMEC2NS,EMEC3NS,FCAL1NS,FCAL2NS,FCAL3NS
81 {1000., 1000., 3000., 1500., 3500., 3500., 3500., 3500., 1500., 3000., 3000., 2000., 10000., 10000., 10000.}
82 };
83
84 StringArrayProperty m_layerNames{this, "LayerNames", {"EMBPA", "EMBPC", "EMB1A", "EMB1C", "EMB2A", "EMB2C", "EMB3A", "EMB3C",
85 "HEC0A", "HEC0C", "HEC1A", "HEC1C", "HEC2A", "HEC2C", "HEC3A", "HEC3C",
86 "EMECPA", "EMECPC", "EMEC1A", "EMEC1C", "EMEC2A", "EMEC2C", "EMEC3A", "EMEC3C",
87 "FCAL1A", "FCAL1C", "FCAL2A", "FCAL2C", "FCAL3A", "FCAL3C"},
88 "Names of individual layers to monitor"};
89 IntegerArrayProperty m_layerNcells{this,"LayerNcells",{ 3905, 3905, 29376, 29376, 14595, 14595, 6912, 6912,
90 768, 768, 736, 736, 672, 672, 640, 640,
91 768, 768, 14272, 14272, 11712, 11712, 5120, 5120,
92 1008, 1008, 500, 500, 254, 254},
93 "Number of expected cells per layer"};
94
95 BooleanProperty m_doDatabaseNoiseVsEtaPhi{this, "doDatabaseNoiseVsEtaPhi", true};
96
97 BooleanProperty m_doSCReco{this, "doSCReco", false};
98
99 //enums to help with the conversion of Layer, partitions and such:
100 //Enumerate layers
105
106 //Enumerate layer-types, ignoring sides. Useful for configuration that is per-definition symmetric
109
110 FloatArrayProperty m_thresholdsProp[MAXLYRNS];
111 FloatProperty m_thresholdsForResolution{this,"Threshold",5e2};
112 BooleanProperty m_removeMasked{this, "RemoveMasked", true};
113
114 //Enumerate partitions
116
117
118
119 //Mapping of CaloCell nomencature to CaloCellMonitoring nomencature
120 const std::map<unsigned,LayerEnumNoSides> m_caloSamplingToLyrNS{
121 {CaloSampling::PreSamplerB, EMBPNS},{CaloSampling::EMB1,EMB1NS},{CaloSampling::EMB2,EMB2NS},{CaloSampling::EMB3,EMB3NS}, //LAr Barrel
122 {CaloSampling::PreSamplerE, EMECPNS},{CaloSampling::EME1,EMEC1NS}, {CaloSampling::EME2,EMEC2NS}, {CaloSampling::EME3,EMEC3NS}, //LAr Endcap
123 {CaloSampling::HEC0,HEC0NS}, {CaloSampling::HEC1,HEC1NS}, {CaloSampling::HEC2,HEC2NS}, {CaloSampling::HEC3,HEC3NS}, //Hadronic endcap
124 {CaloSampling::FCAL0,FCAL1NS}, {CaloSampling::FCAL1,FCAL2NS}, {CaloSampling::FCAL2,FCAL3NS} //FCAL
125 };
126
127 //Private methods: Initialization and job-option interpretation
128 StatusCode initThresh();
129
130 std::string strToLower(const std::string& input) const;
131
132
133 //Private methods: Histogram filling
134 StatusCode createPerJobHistograms(const CaloCellContainer* cellcont, const CaloNoise *noisep) const;
135
136 //Helpers for histogram filling
137 void getHistoCoordinates(const CaloDetDescrElement* dde, float& celleta, float& cellphi, unsigned& iLyr, unsigned& iLyrNS) const;
138
139 // other private variables
140
141
142 // Identifer helpers and such
143
145
146
147};
148
149#endif
150
Replaces the BunchCrossing AlgTool used in run1/2.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Container class for CaloCell.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
This class groups all DetDescr information related to a CaloCell.
FloatArrayProperty m_thresholdsProp[MAXLYRNS]
BooleanProperty m_removeMasked
BooleanProperty m_doSCReco
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Gaudi::Property< std::string > m_MonGroupName
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerKey
FloatProperty m_thresholdsForResolution
std::map< std::string, std::map< std::string, int > > m_toolmapAll
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerRefKey
IntegerArrayProperty m_layerNcells
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
const std::map< unsigned, LayerEnumNoSides > m_caloSamplingToLyrNS
const CaloCell_ID * m_calo_id
StringArrayProperty m_layerNames
SG::ReadHandleKey< CaloCellContainer > m_superCellContainerRecoKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Property: Bunch crossing data (MC only) (conditions input).
FloatArrayProperty m_eCutForTiming
Gaudi::Property< std::vector< std::string > > m_streams
BooleanProperty m_doDatabaseNoiseVsEtaPhi
Property holding a SG store/key/clid from which a ReadHandle is made.
Helper class for TileCal offline identifiers.
Definition TileID.h:67
The common trigger namespace for trigger analysis tools.
void initialize()