ATLAS Offline Software
Loading...
Searching...
No Matches
LArOFFCRawChannelBuilder.h
Go to the documentation of this file.
1/* -*-c++-*- */
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef LARROD_LAROFFCRAWCHANNELBUILDER_H
7#define LARROD_LAROFFCRAWCHANNELBUILDER_H
8
20
21#include <atomic>
22#include <vector>
23
24// Event classes
27class LArOnlineID;
28
30
31 public:
32 using AthReentrantAlgorithm::AthReentrantAlgorithm;
33
34 StatusCode initialize() override;
35 StatusCode execute(const EventContext& ctx) const override;
36 StatusCode finalize() override;
37
38 private:
39 // Event input
41 this, "LArDigitKey", "FREE", "SG Key of LArDigitContainer"};
42
43 // Event output
45 this, "LArRawChannelKey", "LArRawChannels",
46 "SG key of the output LArRawChannelContainer"};
47
48 // Conditions input
50 this, "PedestalKey", "LArPedestal",
51 "SG Key of Pedestal conditions object"};
53 this, "ADC2MeVKey", "LArADC2MeV", "SG Key of ADC2MeV conditions object"};
54 SG::ReadCondHandleKey<ILArOFC> m_ofcKey{this, "OFCKey", "LArOFC",
55 "SG Key of OFC conditions object"};
57 this, "ShapeKey", "LArShape", "SG Key of Shape conditions object"};
58
60 this, "CablingKey", "LArOnOffIdMap",
61 "SG Key of LArOnOffIdMapping object"};
63 this, "Run1DSPThresholdsKey", "",
64 "SG Key for thresholds to compute time and quality, run 1"};
66 this, "Run2DSPThresholdsKey", "",
67 "SG Key for thresholds to compute time and quality, run 2"};
68
69 // Other jobOptions
70 Gaudi::Property<float> m_eCutFortQ{this, "ECutFortQ", 256.0,
71 "Time and Quality will be computed only "
72 "for channels with E above this value"};
73 Gaudi::Property<bool> m_absECutFortQ{
74 this, "absECut", true, "Cut on fabs(E) for Q and t computation"};
75 Gaudi::Property<bool> m_useShapeDer{
76 this, "useShapeDer", true,
77 "Use shape derivative in Q-factor computation"};
78 Gaudi::Property<bool> m_useDBFortQ{this, "useDB", true,
79 "Use DB for cut on t,Q"};
80
84 Gaudi::Property<int> m_firstSample{
85 this, "firstSample", 0,
86 "Index of the digit sample the OFC window starts at"};
87
97
98 // OFFC algorithm configuration
102 Gaudi::Property<double> m_belowThreshold{
103 this, "BelowThreshold", 0,
104 "ADC threshold below which samples are treated as noise"};
105
109 Gaudi::Property<int> m_belowTillReset{
110 this, "BelowTillReset", 0,
111 "Number of consecutive noise samples before cache reset (<=0 disables)"};
112
116 Gaudi::Property<int> m_nPulse{
117 this, "NPulse", 0, "Maximum number of pulse corrections in flight"};
118
125 Gaudi::Property<double> m_Q3cut{
126 this, "Q3Cut", 0.1,
127 "Shape-consistency cut for pulse acceptance, on Q3/A"};
128
133 Gaudi::Property<double> m_Q3Offset{
134 this, "Q3Offset", 2.0,
135 "Absolute term of the Q3 cut in ADC, covering the noise floor"};
136
139 Gaudi::Property<double> m_filterThreshold{
140 this, "FilterThreshold", 0,
141 "Minimum corrected amplitude for pulse finding"};
142
143 // Identifier helper
144 const LArOnlineID* m_onlineId = nullptr;
145
148 mutable std::atomic<unsigned long> m_nSubtracted{0};
149 mutable std::atomic<unsigned long> m_nDropped{0};
150
151 // --- Member functions ---
155 std::vector<double> pulseResponse(const ILArShape::ShapeRef_t& shape,
156 const ILArOFC::OFCRef_t& ofc) const;
157
158 double computeOFFC(const std::vector<short>& samples, int firstSample,
159 const ILArOFC::OFCRef_t& ofc,
160 const ILArShape::ShapeRef_t& shape, double pedestal) const;
161};
162
163#endif
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.
An algorithm that can be simultaneously executed in multiple threads.
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
Definition ILArOFC.h:26
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
Container class for LArDigit.
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
double computeOFFC(const std::vector< short > &samples, int firstSample, const ILArOFC::OFCRef_t &ofc, const ILArShape::ShapeRef_t &shape, double pedestal) const
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
Gaudi::Property< int > m_firstSample
Index of the digit sample the OFC window starts at, i.e.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Gaudi::Property< float > m_eCutFortQ
SG::ReadHandleKey< LArDigitContainer > m_digitKey
Gaudi::Property< double > m_filterThreshold
Minimum pile-up corrected amplitude required to accept a pulse peak.
Gaudi::Property< double > m_Q3Offset
Absolute term of the Q3 cut, in ADC.
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
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,...
std::atomic< unsigned long > m_nSubtracted
Accepted pulses, and those NPulse left no room to subtract.
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.