ATLAS Offline Software
Loading...
Searching...
No Matches
LArRODBCIDCorrAlg Class Reference

Subtract the BCID-dependent pile-up offset from the LArDigit samples. More...

#include <LArRODBCIDCorrAlg.h>

Inheritance diagram for LArRODBCIDCorrAlg:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode fillLumi ()
 Fill m_lumi from the beam intensity pattern.
void computePileupADCCorrection (float mbEnergy, const ILArShape::ShapeRef_t &pulseShape, int bcid, float adc2MeVSlope, float intperBC, bool hecShift, std::vector< float > &pileupADC) const
 Compute the mean pile-up ADC offset per sample for one channel.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< LArDigitContainerm_digitKey
SG::WriteHandleKey< LArDigitContainerm_digitCorrKey
SG::ReadCondHandleKey< LArADC2MeVm_adc2MeVKey
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey
SG::ReadCondHandleKey< ILArShapem_shapeKey
SG::ReadCondHandleKey< ILArMinBiasAveragem_minBiasAvgKey
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey { this, "EventInfo", "EventInfo", "SG key of the EventInfo object" }
Gaudi::Property< std::vector< float > > m_beamIntensityPattern { this, "BeamIntensityPattern", {}, "LHC beam intensity pattern" }
Gaudi::Property< int > m_firstSample
Gaudi::Property< int > m_minBunchCrossing
Gaudi::Property< int > m_maxBunchCrossing
std::vector< float > m_lumi
 Per-BCID luminosity, indexed by absolute BCID in [0, s_nBCID).
const LArOnlineIDm_onlineId = nullptr
 Online identifier helper, used to recognise HEC channels.
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static constexpr int s_nBCID = 3564
 Number of bunch crossings in one LHC orbit.

Detailed Description

Subtract the BCID-dependent pile-up offset from the LArDigit samples.

This is the ADC-level equivalent of the energy-level correction performed by CaloBCIDAvgAlg and CaloBCIDCoeffs (Calo.Cell.doPileupOffsetBCIDCorr). The two must not both be enabled, or the offset is subtracted twice.

The sample filling in LArHitEMapToDigitAlg::ConvertHits2Samples is

j = i - ishift + firstSample;  sampleList[i] += Shape[j] * energy

with ishift the bunch crossing of the energy deposit relative to the triggered one, and firstSample the digitisation firstSample (that is, -nPreceedingSamples; see LArDigitizationConfig.py). Averaging over minimum bias events therefore gives, for digit sample i,

ADC_pileup[i] = mbEnergy * mu / adc2MeV
              * sum_j Shape[j] * lumi[(bcid + i + firstSample - j) % 3564]

which for firstSample = 0 is exactly the convolution implemented by CaloBCIDCoeffs. Note that the sample index i and the shape index j enter the luminosity lookup with opposite signs.

Definition at line 51 of file LArRODBCIDCorrAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ computePileupADCCorrection()

void LArRODBCIDCorrAlg::computePileupADCCorrection ( float mbEnergy,
const ILArShape::ShapeRef_t & pulseShape,
int bcid,
float adc2MeVSlope,
float intperBC,
bool hecShift,
std::vector< float > & pileupADC ) const
private

Compute the mean pile-up ADC offset per sample for one channel.

Parameters
mbEnergyAverage minimum bias energy for this channel, in MeV.
pulseShapePulse shape for this channel and gain.
bcidBunch crossing identifier of the current event.
adc2MeVSlopeLinear ADC to MeV conversion factor for this gain.
intperBCAverage number of interactions per bunch crossing.
hecShiftWhether to apply the one sample shift that LArHitEMapToDigitAlg applies to HEC channels when there are four samples and firstSample is zero.
[out]pileupADCOffset per sample. Must be sized to the number of digit samples on entry.

The result is returned through pileupADC rather than by value so that the caller can reuse one buffer across all channels of an event.

Definition at line 268 of file LArRODBCIDCorrAlg.cxx.

275{
276 const int nShape = static_cast<int> (pulseShape.size());
277 const int nSamples = static_cast<int> (pileupADC.size());
278 const int firstSample = m_firstSample + (hecShift ? 1 : 0);
279
280 for (int i = 0; i < nSamples; ++i) {
281 // Digit sample i is fed by a pulse from bunch crossing bc through shape
282 // index j, with j = i - bc + firstSample.
283 double sum = 0;
284 for (int j = 0; j < nShape; ++j) {
285 const int bc = i + firstSample - j;
286 if (bc < m_minBunchCrossing || bc > m_maxBunchCrossing) {
287 continue;
288 }
289 int idx = (bcid + bc) % s_nBCID;
290 if (idx < 0) {
291 idx += s_nBCID;
292 }
293 sum += static_cast<double> (m_lumi[idx]) * pulseShape[j];
294 }
295 pileupADC[i] =
296 static_cast<float> (mbEnergy * sum * intperBC / adc2MeVSlope);
297 }
298}
std::vector< float > m_lumi
Per-BCID luminosity, indexed by absolute BCID in [0, s_nBCID).
static constexpr int s_nBCID
Number of bunch crossings in one LHC orbit.
Gaudi::Property< int > m_firstSample
Gaudi::Property< int > m_maxBunchCrossing
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
setEventNumber setTimeStamp bcid

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LArRODBCIDCorrAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 71 of file LArRODBCIDCorrAlg.cxx.

72{
73 ATH_MSG_DEBUG( "Executing LArRODBCIDCorrAlg" );
74
75 SG::ReadHandle<LArDigitContainer> digitHandle (m_digitKey, ctx);
76 if (!digitHandle.isValid()) {
77 ATH_MSG_ERROR( "Failed to retrieve LArDigitContainer "
78 << m_digitKey.key() );
79 return StatusCode::FAILURE;
80 }
81
82 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl (m_cablingKey, ctx);
83 if (!cablingHdl.isValid()) {
84 ATH_MSG_ERROR( "Invalid cabling conditions handle" );
85 return StatusCode::FAILURE;
86 }
87 const LArOnOffIdMapping* cabling = *cablingHdl;
88
89 SG::ReadCondHandle<ILArShape> shapesHdl (m_shapeKey, ctx);
90 if (!shapesHdl.isValid()) {
91 ATH_MSG_ERROR( "Invalid shape conditions handle" );
92 return StatusCode::FAILURE;
93 }
94 const ILArShape* shapes = *shapesHdl;
95
96 SG::ReadCondHandle<LArADC2MeV> adc2MeVHdl (m_adc2MeVKey, ctx);
97 if (!adc2MeVHdl.isValid()) {
98 ATH_MSG_ERROR( "Invalid ADC2MeV conditions handle" );
99 return StatusCode::FAILURE;
100 }
101 const LArADC2MeV* adc2MeVs = *adc2MeVHdl;
102
103 SG::ReadCondHandle<ILArMinBiasAverage> minBiasAvgHdl (m_minBiasAvgKey, ctx);
104 if (!minBiasAvgHdl.isValid()) {
105 ATH_MSG_ERROR( "Invalid MinBiasAverage conditions handle" );
106 return StatusCode::FAILURE;
107 }
108 const ILArMinBiasAverage* minBiasAvg = minBiasAvgHdl.cptr();
109
110 SG::ReadHandle<xAOD::EventInfo> eventInfo (m_eventInfoKey, ctx);
111 if (!eventInfo.isValid()) {
112 ATH_MSG_ERROR( "Failed to retrieve EventInfo" );
113 return StatusCode::FAILURE;
114 }
115
116 const int bcid = static_cast<int> (eventInfo->bcid());
117 if (bcid < 0 || bcid >= s_nBCID) {
118 ATH_MSG_ERROR( "BCID " << bcid << " is outside [0, " << s_nBCID << ")" );
119 return StatusCode::FAILURE;
120 }
121 const float intperBC = eventInfo->averageInteractionsPerCrossing();
122
123 SG::WriteHandle<LArDigitContainer> outHandle (m_digitCorrKey, ctx);
124 auto output = std::make_unique<LArDigitContainer> (SG::OWN_ELEMENTS);
125 LArDigitContainer* outputPtr = output.get();
126 outputPtr->reserve (digitHandle->size());
127 ATH_CHECK( outHandle.record (std::move (output)) );
128
129 // Declared outside the loop so that the buffers are reused across channels.
130 std::vector<float> pileupADC;
131 std::vector<short> correctedSamples;
132 size_t nClamped = 0;
133
134 for (const LArDigit* digit : *digitHandle) {
135
136 const HWIdentifier id = digit->hardwareID();
137 const CaloGain::CaloGain gain = digit->gain();
138 const std::vector<short>& rawSamples = digit->samples();
139
140 float slope = 0;
141 float mbEnergy = 0;
142 ILArShape::ShapeRef_t pulseShape;
143 bool correctable = cabling->isOnlineConnected (id) && !rawSamples.empty();
144 if (correctable) {
145 const auto& adc2mev = adc2MeVs->ADC2MEV (id, gain);
146 correctable = adc2mev.size() >= 2 &&
147 std::abs (adc2mev[1]) > minAdc2MeVSlope;
148 if (correctable) {
149 slope = adc2mev[1];
150 pulseShape = shapes->Shape (id, gain);
151 correctable = !pulseShape.empty();
152 }
153 if (correctable) {
154 // A non-positive average means no correction, as in CaloBCIDCoeffs.
155 // This also catches ILArMinBiasAverage::ERRORCODE.
156 mbEnergy = minBiasAvg->minBiasAverage (id);
157 correctable = mbEnergy > 0;
158 }
159 }
160
161 // Channels for which no correction can be computed are copied through
162 // unchanged, so that the output container always mirrors the input.
163 if (!correctable) {
164 outputPtr->push_back (std::make_unique<LArDigit> (id, gain, rawSamples));
165 continue;
166 }
167
168 // LArHitEMapToDigitAlg shifts the HEC shape by one sample in the four
169 // sample readout, so reproduce that here to stay aligned with the digits.
170 const bool hecShift = rawSamples.size() == hecShiftNSamples &&
171 m_firstSample == 0 &&
172 m_onlineId->isHECchannel (id);
173
174 pileupADC.assign (rawSamples.size(), 0);
175 computePileupADCCorrection (mbEnergy, pulseShape,
176 bcid, slope, intperBC, hecShift, pileupADC);
177
178 // The corrected value is clamped to the range of short rather than to the
179 // ADC range -> the raw channel builders treat samples of 0 and 4096 as
180 // saturation markers, so clipping there would flag saturation spuriously.
181
182 correctedSamples.resize (rawSamples.size());
183 for (size_t i = 0; i < rawSamples.size(); ++i) {
184 const long corrected =
185 std::lround (static_cast<double> (rawSamples[i]) -
186 static_cast<double> (pileupADC[i]));
187 const long clamped =
188 std::clamp (corrected,
189 static_cast<long> (std::numeric_limits<short>::lowest()),
190 static_cast<long> (std::numeric_limits<short>::max()));
191 if (clamped != corrected) {
192 ++nClamped;
193 }
194 correctedSamples[i] = static_cast<short> (clamped);
195 }
196
197 outputPtr->push_back
198 (std::make_unique<LArDigit> (id, gain, correctedSamples));
199 }
200
201 if (nClamped > 0) {
202 ATH_MSG_WARNING( nClamped << " corrected sample(s) fell outside the range "
203 "of short and were clamped" );
204 }
205
206 ATH_MSG_DEBUG( "Wrote " << outputPtr->size() << " digits to "
207 << m_digitCorrKey.key() );
208
209 return StatusCode::SUCCESS;
210}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual const float & minBiasAverage(const HWIdentifier &id) const =0
access to average of E in minimum bias events index by Identifier
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Definition LArADC2MeV.h:32
void computePileupADCCorrection(float mbEnergy, const ILArShape::ShapeRef_t &pulseShape, int bcid, float adc2MeVSlope, float intperBC, bool hecShift, std::vector< float > &pileupADC) const
Compute the mean pile-up ADC offset per sample for one channel.
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
SG::ReadCondHandleKey< ILArMinBiasAverage > m_minBiasAvgKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< ILArShape > m_shapeKey
const LArOnlineID * m_onlineId
Online identifier helper, used to recognise HEC channels.
SG::WriteHandleKey< LArDigitContainer > m_digitCorrKey
SG::ReadHandleKey< LArDigitContainer > m_digitKey
@ OWN_ELEMENTS
this data object owns its elements
output
Definition merge.py:16

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillLumi()

StatusCode LArRODBCIDCorrAlg::fillLumi ( )
private

Fill m_lumi from the beam intensity pattern.

Uses the same pattern-to-BCID mapping as BunchCrossingCondAlg, so that the set of filled bunch crossings matches the one CaloBCIDLumi would see.

Definition at line 212 of file LArRODBCIDCorrAlg.cxx.

213{
214 const std::vector<float>& pattern = m_beamIntensityPattern;
215 if (pattern.empty()) {
216 ATH_MSG_ERROR( "BeamIntensityPattern is empty. It must be set from "
217 "flags.Digitization.PU.BeamIntensityPattern." );
218 return StatusCode::FAILURE;
219 }
220
221 const int nPattern = static_cast<int> (pattern.size());
222 m_lumi.assign (s_nBCID, 0);
223
224 // Reproduce BunchCrossingCondAlg, so that the set of filled bunch crossings
225 // used here is identical to the one in BunchCrossingCondData, which is what
226 // the energy level correction uses.
227 if (s_nBCID % nPattern != 0) {
228 ATH_MSG_INFO( "Bunch pattern of length " << nPattern
229 << " does not fit into " << s_nBCID );
230 // As in BunchCrossingCondAlg, the loop deliberately stops short of the
231 // half orbit so as not to produce an odd pattern half way round.
232 const int nGuard = 20;
233 for (int i = 0; i < s_nBCID / 2 - nGuard; ++i) {
234 const int pos1 = i % nPattern;
235 const int pos2 = nPattern - 1 - (i % nPattern);
236 if (pattern[pos1] > minBunchIntensity) {
237 m_lumi[i] = xlumiMC;
238 }
239 if (pattern[pos2] > minBunchIntensity) {
240 m_lumi[s_nBCID - 1 - i] = xlumiMC;
241 }
242 }
243 }
244 else {
245 ATH_MSG_INFO( "Bunch pattern of length " << nPattern << " fits into "
246 << s_nBCID );
247 for (int i = 0; i < s_nBCID; ++i) {
248 if (pattern[i % nPattern] > minBunchIntensity) {
249 m_lumi[i] = xlumiMC;
250 }
251 }
252 }
253
254 const int nFilled = std::count_if (m_lumi.begin(), m_lumi.end(),
255 [] (float lumi) { return lumi > 0; });
256 ATH_MSG_INFO( "Filled " << nFilled << " of " << s_nBCID
257 << " bunch crossings" );
258 if (nFilled == 0) {
259 ATH_MSG_ERROR( "No filled bunch crossing found in the beam intensity "
260 "pattern, so the correction would be identically zero." );
261 return StatusCode::FAILURE;
262 }
263
264 return StatusCode::SUCCESS;
265}
#define ATH_MSG_INFO(x)
Gaudi::Property< std::vector< float > > m_beamIntensityPattern

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode LArRODBCIDCorrAlg::initialize ( )
overridevirtual

Definition at line 43 of file LArRODBCIDCorrAlg.cxx.

44{
45 ATH_CHECK( m_digitKey.initialize() );
46 ATH_CHECK( m_digitCorrKey.initialize() );
47 ATH_CHECK( m_adc2MeVKey.initialize() );
48 ATH_CHECK( m_cablingKey.initialize() );
49 ATH_CHECK( m_shapeKey.initialize() );
50 ATH_CHECK( m_minBiasAvgKey.initialize() );
51 ATH_CHECK( m_eventInfoKey.initialize() );
52
53 ATH_CHECK( detStore()->retrieve (m_onlineId, "LArOnlineID") );
54
56 ATH_MSG_ERROR( "MinBunchCrossing (" << m_minBunchCrossing
57 << ") is larger than MaxBunchCrossing ("
58 << m_maxBunchCrossing << ")" );
59 return StatusCode::FAILURE;
60 }
61
63
64 ATH_MSG_INFO( "firstSample = " << m_firstSample
65 << ", so digit sample 0 corresponds to bunch crossing "
66 << m_firstSample << " relative to the triggered one" );
67
68 return StatusCode::SUCCESS;
69}
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< int > m_minBunchCrossing
StatusCode fillLumi()
Fill m_lumi from the beam intensity pattern.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_adc2MeVKey

SG::ReadCondHandleKey<LArADC2MeV> LArRODBCIDCorrAlg::m_adc2MeVKey
private
Initial value:
{ this, "ADC2MeVKey", "LArADC2MeV",
"SG key of the ADC2MeV conditions object" }

Definition at line 71 of file LArRODBCIDCorrAlg.h.

72 { this, "ADC2MeVKey", "LArADC2MeV",
73 "SG key of the ADC2MeV conditions object" };

◆ m_beamIntensityPattern

Gaudi::Property<std::vector<float> > LArRODBCIDCorrAlg::m_beamIntensityPattern { this, "BeamIntensityPattern", {}, "LHC beam intensity pattern" }
private

Definition at line 90 of file LArRODBCIDCorrAlg.h.

91{ this, "BeamIntensityPattern", {}, "LHC beam intensity pattern" };

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArRODBCIDCorrAlg::m_cablingKey
private
Initial value:
{ this, "CablingKey", "LArOnOffIdMap",
"SG key of the LArOnOffIdMapping object" }

Definition at line 75 of file LArRODBCIDCorrAlg.h.

76 { this, "CablingKey", "LArOnOffIdMap",
77 "SG key of the LArOnOffIdMapping object" };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitCorrKey

SG::WriteHandleKey<LArDigitContainer> LArRODBCIDCorrAlg::m_digitCorrKey
private
Initial value:
{ this, "OutputDigitKey", "LArDigitContainer_PileupCorrected",
"SG key of the output LArDigitContainer" }

Definition at line 67 of file LArRODBCIDCorrAlg.h.

68 { this, "OutputDigitKey", "LArDigitContainer_PileupCorrected",
69 "SG key of the output LArDigitContainer" };

◆ m_digitKey

SG::ReadHandleKey<LArDigitContainer> LArRODBCIDCorrAlg::m_digitKey
private
Initial value:
{ this, "LArDigitKey", "LArDigitContainer_MC",
"SG key of the input LArDigitContainer" }

Definition at line 63 of file LArRODBCIDCorrAlg.h.

64 { this, "LArDigitKey", "LArDigitContainer_MC",
65 "SG key of the input LArDigitContainer" };

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LArRODBCIDCorrAlg::m_eventInfoKey { this, "EventInfo", "EventInfo", "SG key of the EventInfo object" }
private

Definition at line 87 of file LArRODBCIDCorrAlg.h.

88{ this, "EventInfo", "EventInfo", "SG key of the EventInfo object" };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_firstSample

Gaudi::Property<int> LArRODBCIDCorrAlg::m_firstSample
private
Initial value:
{ this, "firstSample", 0,
"Digitisation firstSample: the shape index seen by digit sample 0. Must be "
"set exactly as LArHitEMapToDigitAlg.firstSample, that is "
"-nPreceedingSamples, or LAr.ROD.FirstSample when that is zero." }

Definition at line 93 of file LArRODBCIDCorrAlg.h.

94 { this, "firstSample", 0,
95 "Digitisation firstSample: the shape index seen by digit sample 0. Must be "
96 "set exactly as LArHitEMapToDigitAlg.firstSample, that is "
97 "-nPreceedingSamples, or LAr.ROD.FirstSample when that is zero." };

◆ m_lumi

std::vector<float> LArRODBCIDCorrAlg::m_lumi
private

Per-BCID luminosity, indexed by absolute BCID in [0, s_nBCID).

Filled once in initialize() and only read afterwards, so it is safe to share between threads.

Definition at line 113 of file LArRODBCIDCorrAlg.h.

◆ m_maxBunchCrossing

Gaudi::Property<int> LArRODBCIDCorrAlg::m_maxBunchCrossing
private
Initial value:
{ this, "MaxBunchCrossing", s_nBCID,
"Latest bunch crossing, relative to the triggered one, included in the "
"correction." }

Definition at line 105 of file LArRODBCIDCorrAlg.h.

106 { this, "MaxBunchCrossing", s_nBCID,
107 "Latest bunch crossing, relative to the triggered one, included in the "
108 "correction." };

◆ m_minBiasAvgKey

SG::ReadCondHandleKey<ILArMinBiasAverage> LArRODBCIDCorrAlg::m_minBiasAvgKey
private
Initial value:
{ this, "MinBiasAvgKey", "LArPileupAverageSym",
"SG key of the LArMinBiasAverage object" }

Definition at line 83 of file LArRODBCIDCorrAlg.h.

84 { this, "MinBiasAvgKey", "LArPileupAverageSym",
85 "SG key of the LArMinBiasAverage object" };

◆ m_minBunchCrossing

Gaudi::Property<int> LArRODBCIDCorrAlg::m_minBunchCrossing
private
Initial value:
{ this, "MinBunchCrossing", -s_nBCID,
"Earliest bunch crossing, relative to the triggered one, included in the "
"correction. Set this to the earliest crossing actually overlaid by the "
"digitisation to avoid over-subtracting in the preceding samples." }

Definition at line 99 of file LArRODBCIDCorrAlg.h.

100 { this, "MinBunchCrossing", -s_nBCID,
101 "Earliest bunch crossing, relative to the triggered one, included in the "
102 "correction. Set this to the earliest crossing actually overlaid by the "
103 "digitisation to avoid over-subtracting in the preceding samples." };

◆ m_onlineId

const LArOnlineID* LArRODBCIDCorrAlg::m_onlineId = nullptr
private

Online identifier helper, used to recognise HEC channels.

Definition at line 116 of file LArRODBCIDCorrAlg.h.

◆ m_shapeKey

SG::ReadCondHandleKey<ILArShape> LArRODBCIDCorrAlg::m_shapeKey
private
Initial value:
{ this, "ShapeKey", "LArShape",
"SG key of the LArShape conditions object" }

Definition at line 79 of file LArRODBCIDCorrAlg.h.

80 { this, "ShapeKey", "LArShape",
81 "SG key of the LArShape conditions object" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ s_nBCID

int LArRODBCIDCorrAlg::s_nBCID = 3564
staticconstexprprivate

Number of bunch crossings in one LHC orbit.

Definition at line 61 of file LArRODBCIDCorrAlg.h.


The documentation for this class was generated from the following files: