10#ifndef LARROD_LARRODBCIDCORRALG_H
11#define LARROD_LARRODBCIDCORRALG_H
54 using AthReentrantAlgorithm::AthReentrantAlgorithm;
57 virtual StatusCode
execute (
const EventContext& ctx)
const override;
64 {
this,
"LArDigitKey",
"LArDigitContainer_MC",
65 "SG key of the input LArDigitContainer" };
68 {
this,
"OutputDigitKey",
"LArDigitContainer_PileupCorrected",
69 "SG key of the output LArDigitContainer" };
72 {
this,
"ADC2MeVKey",
"LArADC2MeV",
73 "SG key of the ADC2MeV conditions object" };
76 {
this,
"CablingKey",
"LArOnOffIdMap",
77 "SG key of the LArOnOffIdMapping object" };
80 {
this,
"ShapeKey",
"LArShape",
81 "SG key of the LArShape conditions object" };
84 {
this,
"MinBiasAvgKey",
"LArPileupAverageSym",
85 "SG key of the LArMinBiasAverage object" };
88 {
this,
"EventInfo",
"EventInfo",
"SG key of the EventInfo object" };
91 {
this,
"BeamIntensityPattern", {},
"LHC beam intensity pattern" };
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." };
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." };
106 {
this,
"MaxBunchCrossing",
s_nBCID,
107 "Latest bunch crossing, relative to the triggered one, included in the "
148 std::vector<float>& pileupADC)
const;
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Container class for LArDigit.
Subtract the BCID-dependent pile-up offset from the LArDigit samples.
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::Property< int > m_minBunchCrossing
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
SG::ReadCondHandleKey< ILArMinBiasAverage > m_minBiasAvgKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual StatusCode initialize() override
std::vector< float > m_lumi
Per-BCID luminosity, indexed by absolute BCID in [0, s_nBCID).
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandleKey< ILArShape > m_shapeKey
const LArOnlineID * m_onlineId
Online identifier helper, used to recognise HEC channels.
static constexpr int s_nBCID
Number of bunch crossings in one LHC orbit.
Gaudi::Property< int > m_firstSample
Gaudi::Property< int > m_maxBunchCrossing
SG::WriteHandleKey< LArDigitContainer > m_digitCorrKey
StatusCode fillLumi()
Fill m_lumi from the beam intensity pattern.
SG::ReadHandleKey< LArDigitContainer > m_digitKey
Gaudi::Property< std::vector< float > > m_beamIntensityPattern
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.