ATLAS Offline Software
LArOFPeakRecoTool.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef LARCALIBUTILS_LAROFPEAKRECOTOOL_H
8 #define LARCALIBUTILS_LAROFPEAKRECOTOOL_H
9 
12 
13 #include "LArElecCalib/ILArOFC.h"
14 #include "LArElecCalib/ILArShape.h"
18 
19 class LArOnlineID_Base;
20 
26 static const InterfaceID IID_LArOFPeakRecoTool("LArOFPeakRecoTool", 1 , 0);
27 
28 
30 
31 {
32  public:
33 
35  // constructor
36  LArOFPeakRecoTool(const std::string& type,
37  const std::string& name,
38  const IInterface* parent);
39 
40  // destructor
41  virtual ~LArOFPeakRecoTool();
42 
43  // Retrieve interface ID
44  static const InterfaceID& interfaceID() { return IID_LArOFPeakRecoTool;}
45 
46  LArOFIterResults peak (const std::vector<short>& samples, HWIdentifier chID, CaloGain::CaloGain gain, int delay) const;
47 
48  LArOFIterResults peak(const std::vector<float>& samples, // raw data after pedestal subtraction
49  const HWIdentifier chID, // online channel id
50  const CaloGain::CaloGain gain, // gain
51  const float delayIn, // initial delay for Shape and OFC
52  const unsigned nIter=0, // number of iteration
53  const unsigned npeak=2, // initial peak position.
54  unsigned peak_low=2, // lower limit for peak position
55  unsigned peak_high=2 // upper limit for peak position
56  ) const;
57 
58  // initialize and finalize methods
59  virtual StatusCode initialize();
60  virtual StatusCode finalize() {return StatusCode::SUCCESS ; } ;
61 
62  // virtual StatusCode LoadCalibration(IOVSVC_CALLBACK_ARGS);
63 
64  enum { ERROR = -99999999 } ;
65 
66  private:
67  bool m_iterate;
68  SG::ReadCondHandleKey<ILArOFC> m_keyOFC {this, "OFCKey", "LArOFC", "SG key for OFC object"};
69  SG::ReadCondHandleKey<ILArShape> m_keyShape {this, "ShapeKey", "LArShape", "SG key for Shape object"};
70  bool m_useShape;
75  bool m_isSC;
76  const LArOnlineID_Base* m_lar_on_id = nullptr;
77 
78 };
79 
80 
81 #endif
LArOFPeakRecoTool::LArOFPeakRecoTool
LArOFPeakRecoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArOFPeakRecoTool.cxx:21
LArOFPeakRecoTool::m_keyShape
SG::ReadCondHandleKey< ILArShape > m_keyShape
Definition: LArOFPeakRecoTool.h:69
LArOFPeakRecoTool::~LArOFPeakRecoTool
virtual ~LArOFPeakRecoTool()
Definition: LArOFPeakRecoTool.cxx:40
LArOFPeakRecoTool::m_useShape
bool m_useShape
Definition: LArOFPeakRecoTool.h:70
LArOFPeakRecoTool::peak
LArOFIterResults peak(const std::vector< short > &samples, HWIdentifier chID, CaloGain::CaloGain gain, int delay) const
Definition: LArOFPeakRecoTool.cxx:74
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArOFPeakRecoTool::m_samplingPeriod
float m_samplingPeriod
Definition: LArOFPeakRecoTool.h:73
ILArOFC.h
HWIdentifier
Definition: HWIdentifier.h:13
LArOFPeakRecoTool::m_useShapeDer
bool m_useShapeDer
Definition: LArOFPeakRecoTool.h:71
LArOFPeakRecoTool
Definition: LArOFPeakRecoTool.h:31
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArOFPeakRecoTool::m_lar_on_id
const LArOnlineID_Base * m_lar_on_id
Definition: LArOFPeakRecoTool.h:76
delay
double delay(std::size_t d)
Definition: JetTrigTimerTest.cxx:14
LArOFPeakRecoTool::Result
LArOFIterResults Result
Definition: LArOFPeakRecoTool.h:34
ReadCondHandleKey.h
LArOFPeakRecoTool::interfaceID
static const InterfaceID & interfaceID()
Definition: LArOFPeakRecoTool.h:44
ILArShape.h
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArOFPeakRecoTool::ERROR
@ ERROR
Definition: LArOFPeakRecoTool.h:64
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
SG::ReadCondHandleKey< ILArOFC >
LArOFIterResults.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArOFPeakRecoTool::finalize
virtual StatusCode finalize()
Definition: LArOFPeakRecoTool.h:60
LArOFPeakRecoTool::m_isSC
bool m_isSC
Definition: LArOFPeakRecoTool.h:75
IOVSvcDefs.h
defines and typedefs for IOVSvc
LArOFPeakRecoTool::m_forceHighGain
bool m_forceHighGain
Definition: LArOFPeakRecoTool.h:74
LArOFPeakRecoTool::initialize
virtual StatusCode initialize()
Definition: LArOFPeakRecoTool.cxx:43
LArOFPeakRecoTool::m_delayShift
int m_delayShift
Definition: LArOFPeakRecoTool.h:72
AthAlgTool
Definition: AthAlgTool.h:26
CaloGain.h
LArOFPeakRecoTool::m_iterate
bool m_iterate
Definition: LArOFPeakRecoTool.h:67
LArOFIterResults
Definition: LArOFIterResults.h:15
LArOFPeakRecoTool::m_keyOFC
SG::ReadCondHandleKey< ILArOFC > m_keyOFC
Definition: LArOFPeakRecoTool.h:68