ATLAS Offline Software
Loading...
Searching...
No Matches
LArRampBuilder.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6
7
8
26
27
28#ifndef LARRAMPBUILDER_H
29#define LARRAMPBUILDER_H
31#include "GaudiKernel/ToolHandle.h"
32
38
41
45
49
51
53#include <vector>
54#include <string>
55#include <map>
56#include <memory>
57
60
61class LArRampBuilder : public AthAlgorithm//, public IIncidentListener
62{
63
64public:
67
68 //standard algorithm methods
69 StatusCode initialize();
70 StatusCode execute();
71 virtual StatusCode stop();
72 StatusCode finalize(){return StatusCode::SUCCESS;}
73
74 typedef std::map<uint32_t,LArCalibTriggerAccumulator> ACCRAMP;
75
76
77private:
78 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};
79 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKeySC{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
80
81 //Private member functions
82 // choose reconstruction mode (i.e. OF or Parabola)
83 void chooseRecoMode() ;
84 //Does the fitting of the raw ramp. Result is returned as LArRampDB_t.
85 StatusCode rampfit(unsigned deg, const std::vector<LArRawRamp::RAMPPOINT_t>& data,
86 std::vector<float>& rampCoeffs, std::vector<int>& vSat,
87 const HWIdentifier chid, const LArOnOffIdMapping* cabling,
88 const LArBadChannelCont* bcCont);
89
90 std::unique_ptr<LArConditionsContainer<ACCRAMP> > m_ramps;
91
92
93 PublicToolHandle<LArParabolaPeakRecoTool> m_peakParabolaTool{this,"LArParabolaPeakRecoTool","LArParabolaPeakRecoTool"};
94 PublicToolHandle<LArShapePeakRecoTool> m_peakShapeTool{this,"LArShapePeakRecoTool","LArShapePeakRecoTool"};
95 ToolHandle<LArOFPeakRecoTool> m_peakOFTool{this,"PeakOFTool","LArOFPeakRecoTool"};
96
97 unsigned m_event_counter=0;
98 int m_delay=-1;
100
101 std::vector< std::vector< std::vector< std::vector<double> > > >m_CaliWaves;
102 // vector (gain) of vector(HashCell) of vector (DAC) of DACs
103 std::vector< std::vector< std::vector< unsigned int > > >m_CaliDACs;
104 // vector (gain) of vector(HashCell) of DAC0 index
105 std::vector< std::vector< int> > m_IndexDAC0;
106 std::vector< std::vector< int> > m_IndexHighestDAC;
107
108 std::vector<float> m_thePedestal;
109
110
111
114
115
116 //Algorithm-Properties:
117 Gaudi::Property<std::vector<std::string> > m_keylist{this, "KeyList",{},"List if input SG keys"};
118 Gaudi::Property<std::string> m_keyoutput{this,"KeyOutput","LArRamp","SG Key of output object"};
119
120 IntegerProperty m_degree{this,"Polynom",1,"Degree of ramp-polynom"};
121 IntegerProperty m_maxADC{this,"RampRange",0,"Ignore ADC values higher than this (0: do nothing)"};
122 BooleanProperty m_dac0sub{this,"SubtractDac0",true,"Take first DAC value as pedestal"};
123 UnsignedIntegerProperty m_DAC0{this,"DAC0",0,"DAC value considered DAC0"};
124 BooleanProperty m_saveRawRamp{this,"StoreRawRamp",false,"Save raw ramp obj in SG"};
125 BooleanProperty m_saveRecRamp{this,"StoreRecRamp",true,"Save reconstructed ramp obj in SG"};
126 BooleanProperty m_satSlope{this,"doSatSlope",true,"Ignore points subject to saturation"};
127 UnsignedIntegerProperty m_minDAC{this,"minDAC",0,"Ignore DAC values smaller that this"};
128 StringProperty m_recoTypeProp{this,"RecoType","OF","One of 'Parabola', 'Shape' or 'OF'"};
129 IntegerProperty m_deadChannelCut{this,"DeadChannelCut",1300,"Complain about channels with max-ADC below this value"};
130 BooleanProperty m_correctBias{this,"correctBias",false,"For Parabola method: Correction yes/no"};
131 BooleanProperty m_withIntercept{this,"WithIntercept",true,"False: Force fit to go through 0/0"};
132 FloatProperty m_delayShift{this,"DelayShift",23}; //Only for OF peak reco
133
134 Gaudi::Property<bool> m_doBadChannelMask{this,"IgnoreBadChannels",true,"Don't complain about known bad channels"};
136 SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};
137 Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};
138 Gaudi::Property<std::string> m_groupingType{this,"GroupingType","ExtendedFeedThrough","Grouping of the output conditions-container"};
139 Gaudi::Property<std::string> m_hec_key{this,"HECKey","","SG Key of injection-resistor obj used for HEC Ramps"};
140
142 const LArEM_Base_ID* m_emId=nullptr;
143
144 Gaudi::Property<bool> m_isSC{this,"isSC",false,"Processing SC data yes/no"};
145 Gaudi::Property<bool> m_ishec{this,"isHEC",false,"Processing HEC data yes/no"};
146 Gaudi::Property<bool> m_iterate{this,"Iterate",false,"Iterative OF peak reco"};
147
148 uint16_t m_fatalFebErrorPattern=0xffff;
149
150};
151
152#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
LArBadXCont< LArBadChannel > LArBadChannelCont
Helper class for LArEM offline identifiers for supercells.
#define deg
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Helper class to accumulate calibration triggers.
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
Helper for the Liquid Argon Calorimeter cell identifiers.
std::unique_ptr< LArConditionsContainer< ACCRAMP > > m_ramps
Gaudi::Property< bool > m_doBadChannelMask
IntegerProperty m_maxADC
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
PublicToolHandle< LArParabolaPeakRecoTool > m_peakParabolaTool
BooleanProperty m_satSlope
IntegerProperty m_deadChannelCut
LArBadChannelMask m_bcMask
Gaudi::Property< std::string > m_hec_key
virtual StatusCode stop()
Gaudi::Property< std::string > m_groupingType
std::vector< float > m_thePedestal
std::vector< std::vector< std::vector< unsigned int > > > m_CaliDACs
BooleanProperty m_dac0sub
unsigned m_event_counter
Gaudi::Property< bool > m_ishec
Gaudi::Property< bool > m_isSC
std::vector< std::vector< std::vector< std::vector< double > > > > m_CaliWaves
const LArOnlineID_Base * m_onlineHelper
Gaudi::Property< std::vector< std::string > > m_keylist
StatusCode finalize()
std::vector< std::vector< int > > m_IndexHighestDAC
Gaudi::Property< std::string > m_keyoutput
FloatProperty m_delayShift
std::vector< std::vector< int > > m_IndexDAC0
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
IntegerProperty m_degree
StringProperty m_recoTypeProp
StatusCode rampfit(unsigned deg, const std::vector< LArRawRamp::RAMPPOINT_t > &data, std::vector< float > &rampCoeffs, std::vector< int > &vSat, const HWIdentifier chid, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
StatusCode execute()
UnsignedIntegerProperty m_minDAC
Gaudi::Property< bool > m_iterate
std::map< uint32_t, LArCalibTriggerAccumulator > ACCRAMP
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
uint16_t m_fatalFebErrorPattern
StatusCode initialize()
ToolHandle< LArOFPeakRecoTool > m_peakOFTool
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
BooleanProperty m_withIntercept
const LArEM_Base_ID * m_emId
UnsignedIntegerProperty m_DAC0
Gaudi::Property< std::vector< std::string > > m_problemsToMask
BooleanProperty m_correctBias
BooleanProperty m_saveRawRamp
BooleanProperty m_saveRecRamp
PublicToolHandle< LArShapePeakRecoTool > m_peakShapeTool