ATLAS Offline Software
Loading...
Searching...
No Matches
LuminosityCondAlg.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef LUMIBLOCKCOMPS_LUMINOSITYCONDALG_H
14#define LUMIBLOCKCOMPS_LUMINOSITYCONDALG_H
15
16
27#include "CoralBase/Blob.h"
30
31
36 : public AthCondAlgorithm
37{
38public:
40 using AthCondAlgorithm::AthCondAlgorithm;
41
42
44 virtual StatusCode initialize() override;
45
46
48 virtual StatusCode execute (const EventContext& ctx) const override;
49
50
51private:
66 StatusCode
69 unsigned int& preferredChannel,
70 unsigned int& calibChannel,
71 const coral::Blob*& bunchInstLumiBlob) const;
72
73
85 StatusCode
86 updatePerBunchLumi (const EventContext& ctx,
87 const coral::Blob* bunchInstLumiBlob,
88 unsigned int preferredChannel,
89 unsigned int calibChannel,
91 LuminosityCondData& lumi) const;
92
93
103 StatusCode
104 updateMuToLumi (const EventContext& ctx,
105 unsigned int calibChannel,
107 LuminosityCondData& lumi,
108 bool& isValid) const;
109
110
117 StatusCode
118 updatePerBunchLumiRun2 (const coral::Blob& bunchInstLumiBlob,
119 unsigned int preferredChannel,
120 LuminosityCondData& lumi) const;
121
122
130 StatusCode
131 updatePerBunchLumiRun1 (const EventContext& ctx,
132 unsigned int preferredChannel,
134 LuminosityCondData& lumi) const;
135
136
137 Gaudi::Property<unsigned long> m_lumiChannel
138 { this, "LumiChannelNumber", 0, "Luminosity channel to read. 0 means to determine from the data." };
139
140 Gaudi::Property<unsigned long> m_calibBackupChannel
141 { this, "CalibBackupChannel", 112, "Backup channel in case calibChannel doesn't exist in online calibration folder" };
142
143 Gaudi::Property<bool> m_skipInvalid
144 { this, "SkipInvalid", true, "Flag to control whether invalid data is skipped: True (default), returning a zero luminosity; false, returning available luminosity values anyway." };
145
146 Gaudi::Property<bool> m_expectInvalid
147 { this, "ExpectInvalid", false, "Flag to control printouts when invalid data are encountered: True suppresses messages, False (default) leaves them in" };
148
149 // following properties are for MC
150 Gaudi::Property<bool> m_isMC
151 { this, "IsMC", false, "Set to true when running on MC instead of data" };
152
153 Gaudi::Property<float> m_muToLumi
154 { this, "MCMuToLumi", 0.140569, "mu to lumi conversion factor in MC (80 mb/LHC rev freq)" };
155
156
158 { this, "LuminosityFolderInputKey", "/TRIGGER/OFLLUMI/LBLESTOFL",
159 "Input luminosity COOL folder." };
160
162 { this, "OnlineLumiCalibrationInputKey", "OnlineLumiCalibrationCondData",
163 "Input luminosity calibration." };
164
166 { this, "BunchLumisInputKey", "",
167 "Input raw luminosities. Only used for Run 1." };
168
170 { this, "BunchGroupInputKey", "",
171 "Input filled bunch data. Only used for Run 1." };
172
174 { this, "FillParamsInputKey", "",
175 "Input luminous bunch data. Only used for Run 1." };
176
177 // the following are for MC
179 { this, "DigitizationFolderInputKey", "/Digitization/Parameters",
180 "Digitization parameters metadata folder." };
181
183 { this, "ByteStreamMetadataKey", "",
184 "ByteStream metadata (for reading IOV metadata from BS files in MC mode)" };
185
187 { this, "EventInfoKey", "EventInfo", "EventInfo key, used to read in simulated mu in MC" };
188
190 { this, "actualMuKey", m_eventInfoKey, "actualInteractionsPerCrossing",
191 "Decoration for Actual Interaction Per Crossing, for MC" };
192
194 { this, "averageMuKey", m_eventInfoKey, "averageInteractionsPerCrossing",
195 "Decoration for Average Interaction Per Crossing" };
196
199 { this, "LuminosityOutputKey", "LuminosityCondData",
200 "Output luminosity data." };
201};
202
203
204#endif // not LUMIBLOCKCOMPS_LUMINOSITYCONDALG_H
Base class for conditions algorithms.
Holds data on filled bunches.
Holds raw luminosity data, per channel.
This file contains the class definition for the ByteStreamMetadataContainer class.
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
Holds fill parameters data.
Hold luminosity data produced by LuminosityCondAlg.
Luminosity calibration data, produced by OnlineLumiCalibrationCondAlg.
An AttributeList represents a logical row of attributes in a metadata table.
Base class for conditions algorithms.
This class is a collection of AttributeLists where each one is associated with a channel number.
Conditions algorithm for luminosity data.
StatusCode updatePerBunchLumi(const EventContext &ctx, const coral::Blob *bunchInstLumiBlob, unsigned int preferredChannel, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data.
Gaudi::Property< float > m_muToLumi
SG::WriteCondHandleKey< LuminosityCondData > m_luminosityOutputKey
Output conditions object.
SG::ReadCondHandleKey< BunchGroupCondData > m_bunchGroupInputKey
SG::ReadCondHandleKey< OnlineLumiCalibrationCondData > m_onlineLumiCalibrationInputKey
StatusCode updatePerBunchLumiRun1(const EventContext &ctx, unsigned int preferredChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data, run 1.
Gaudi::Property< bool > m_isMC
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm execute method.
SG::ReadDecorHandleKey< xAOD::EventInfo > m_averageMuKey
SG::ReadCondHandleKey< FillParamsCondData > m_fillParamsInputKey
StatusCode updateMuToLumi(const EventContext &ctx, unsigned int calibChannel, SG::WriteCondHandle< LuminosityCondData > &wHdl, LuminosityCondData &lumi, bool &isValid) const
Fill in mu-to-lumi calibration.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Gaudi::Property< unsigned long > m_lumiChannel
SG::ReadDecorHandleKey< xAOD::EventInfo > m_actualMuKey
Gaudi::Property< bool > m_skipInvalid
SG::ReadHandleKey< ByteStreamMetadataContainer > m_byteStreamMetadataKey
SG::ReadCondHandleKey< AthenaAttributeList > m_mcDigitizationInputKey
Gaudi::Property< bool > m_expectInvalid
SG::ReadCondHandleKey< BunchLumisCondData > m_bunchLumisInputKey
virtual StatusCode initialize() override
Gaudi initialize method.
StatusCode updateAvgLumi(const CondAttrListCollection &lumiData, LuminosityCondData &lumi, unsigned int &preferredChannel, unsigned int &calibChannel, const coral::Blob *&bunchInstLumiBlob) const
Unpack luminosity data from the attribute list.
StatusCode updatePerBunchLumiRun2(const coral::Blob &bunchInstLumiBlob, unsigned int preferredChannel, LuminosityCondData &lumi) const
Fill in per-bunch luminosity data, run 2 and later.
SG::ReadCondHandleKey< CondAttrListCollection > m_luminosityFolderInputKey
Gaudi::Property< unsigned long > m_calibBackupChannel
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.