6#ifndef LARROD_LAROFFCRAWCHANNELBUILDER_H
7#define LARROD_LAROFFCRAWCHANNELBUILDER_H
38 using AthReentrantAlgorithm::AthReentrantAlgorithm;
41 StatusCode
execute(
const EventContext& ctx)
const override;
47 this,
"LArDigitKey",
"FREE",
"SG Key of LArDigitContainer"};
51 this,
"LArRawChannelKey",
"LArRawChannels",
52 "SG key of the output LArRawChannelContainer"};
56 this,
"PedestalKey",
"LArPedestal",
57 "SG Key of Pedestal conditions object"};
59 this,
"ADC2MeVKey",
"LArADC2MeV",
"SG Key of ADC2MeV conditions object"};
61 "SG Key of OFC conditions object"};
63 this,
"ShapeKey",
"LArShape",
"SG Key of Shape conditions object"};
66 this,
"CablingKey",
"LArOnOffIdMap",
67 "SG Key of LArOnOffIdMapping object"};
69 this,
"Run1DSPThresholdsKey",
"",
70 "SG Key for thresholds to compute time and quality, run 1"};
72 this,
"Run2DSPThresholdsKey",
"",
73 "SG Key for thresholds to compute time and quality, run 2"};
77 "Time and Quality will be computed only "
78 "for channels with E above this value"};
80 this,
"absECut",
true,
"Cut on fabs(E) for Q and t computation"};
82 this,
"useShapeDer",
true,
83 "Use shape derivative in Q-factor computation"};
85 "Use DB for cut on t,Q"};
91 this,
"firstSample", 0,
92 "Index of the digit sample the OFC window starts at"};
109 this,
"BelowThreshold", 0,
110 "ADC threshold below which samples are treated as noise"};
116 this,
"BelowTillReset", 0,
117 "Number of consecutive noise samples before cache reset (<=0 disables)"};
123 this,
"NPulse", 0,
"Maximum number of pulse corrections in flight"};
133 "Shape-consistency cut for pulse acceptance, on Q3/A"};
140 this,
"Q3Offset", 2.0,
141 "Absolute term of the Q3 cut in ADC, covering the noise floor"};
146 this,
"FilterThreshold", 0,
147 "Minimum corrected amplitude for pulse finding"};
156 this,
"FilterThresholdByLayer", {},
157 "Per-layer FilterThreshold, keyed <REGION>/<LAYER>; unlisted layers "
158 "fall back to FilterThreshold"};
160 this,
"Q3CutByLayer", {},
161 "Per-layer Q3Cut; unlisted layers fall back to Q3Cut"};
163 this,
"Q3OffsetByLayer", {},
164 "Per-layer Q3Offset; unlisted layers fall back to Q3Offset"};
166 this,
"NPulseByLayer", {},
167 "Per-layer NPulse; unlisted layers fall back to NPulse"};
173 this,
"EnabledLayers", {},
174 "Layers where the correction may fire; empty means all"};
193 static size_t slotOf(
int region,
int layer);
195 static size_t slotOfKey(
const std::string& key);
196 static std::string
keyOfSlot(
size_t slot);
221 double computeOFFC(
const std::vector<short>& samples,
int firstSample,
224 const LayerParams& par)
const;
A LArRawConditionsContainer holding thresholds used by the DSP.
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.
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
Helper class for offline cell identifiers.
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Container class for LArDigit.
Gaudi::Property< std::map< std::string, int > > m_nPulseByLayer
static constexpr size_t s_nSlots
Five regions x at most four samplings.
std::vector< double > pulseResponse(const ILArShape::ShapeRef_t &shape, const ILArOFC::OFCRef_t &ofc) const
Filter output for a unit-amplitude pulse, tabulated over every offset of the shape against the OFC wi...
SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
Gaudi::Property< bool > m_useDBFortQ
StatusCode initialize() override
static std::string keyOfSlot(size_t slot)
SG::ReadCondHandleKey< ILArShape > m_shapeKey
Gaudi::Property< double > m_belowThreshold
The OFFC extends optimal filtering by finding pulses in the preceding samples and subtracting their e...
Gaudi::Property< bool > m_absECutFortQ
Gaudi::Property< int > m_nPulse
Maximum number of pulse corrections in flight at once.
SG::ReadCondHandleKey< LArADC2MeV > m_adc2MeVKey
std::vector< LayerParams > m_layerParams
std::vector< uint8_t > m_slotByHash ATLAS_THREAD_SAFE
online hash -> slot, built on the first event: it needs the cabling, which is conditions data with an...
Gaudi::Property< int > m_firstSample
Index of the digit sample the OFC window starts at, i.e.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
double computeOFFC(const std::vector< short > &samples, int firstSample, const ILArOFC::OFCRef_t &ofc, const ILArShape::ShapeRef_t &shape, double pedestal, const LayerParams &par) const
Gaudi::Property< std::map< std::string, double > > m_q3OffsetByLayer
static size_t slotOf(int region, int layer)
Slot for a region code (0=EMB..4=FCAL) and sampling/module; s_nSlots if out of range.
const LArOnlineID * m_onlineId
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< float > m_eCutFortQ
SG::ReadHandleKey< LArDigitContainer > m_digitKey
StatusCode buildLayerMap(const EventContext &ctx) const
Gaudi::Property< double > m_filterThreshold
Minimum pile-up corrected amplitude required to accept a pulse peak.
const CaloCell_ID * m_caloId
static size_t slotOfKey(const std::string &key)
Parse "<REGION>/<LAYER>" into a slot. Returns s_nSlots if unparseable.
Gaudi::Property< double > m_Q3Offset
Absolute term of the Q3 cut, in ADC.
StatusCode finalize() override
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
Gaudi::Property< std::map< std::string, double > > m_q3CutByLayer
Gaudi::Property< double > m_Q3cut
Quality cut for pulse acceptance.
Gaudi::Property< bool > m_useShapeDer
std::atomic< unsigned long > m_nDropped
StatusCode execute(const EventContext &ctx) const override
SG::ReadCondHandleKey< AthenaAttributeList > m_run2DSPThresholdsKey
SG::ReadCondHandleKey< LArDSPThresholdsComplete > m_run1DSPThresholdsKey
Gaudi::Property< int > m_belowTillReset
Number of consecutive below-threshold samples after which the pending corrections are dropped,...
Gaudi::Property< std::vector< std::string > > m_enabledLayers
Layers the correction may run in; empty means all.
std::atomic< unsigned long > m_nSubtracted
Accepted pulses, and those NPulse left no room to subtract.
Gaudi::Property< std::map< std::string, double > > m_filterThresholdByLayer
Container for LArRawChannel (IDC using LArRawChannelCollection).
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.
Resolved parameters for one layer.