ATLAS Offline Software
ZdcRecTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HIEVENTUTILS_ZDCRECTOOL_H
6 #define HIEVENTUTILS_ZDCRECTOOL_H
7 
8 #include "AsgTools/AsgTool.h"
12 
13 #include "TF1.h"
14 #include "TMath.h"
15 
16 namespace ZDC
17 {
18 
19  double SincInterp(double* xvec, double* pvec);
20  double FermiExpFit(double* xvec, double* pvec);
21 
22  class ZdcRecTool : public virtual IZdcRecTool, public asg::AsgTool
23  {
24 
26 
27  public:
28  ZdcRecTool(const std::string& name);
29  virtual ~ZdcRecTool();
30 
31  //interface from AsgTool
32  virtual StatusCode initializeTool() override;
33  virtual StatusCode initialize() override {return initializeTool();}
34  virtual StatusCode recoZdcModule(const xAOD::ZdcModule& module) override;
35  virtual StatusCode recoZdcModules(const xAOD::ZdcModuleContainer& moduleContainer) override;
36  virtual StatusCode reprocessZdc() override;
37 
38  // methods for processing, used for decoration
39  // TODO: documentaton about the arguments of these methods must be written by experts
40  bool sigprocMaxFinder(const std::vector<unsigned short>& adc, float deltaT, float& amp, float& time, float& qual);
41  bool sigprocPeakFitter(const std::vector<unsigned short>& adc, float deltaT, float& amp, float& time, float& qual);
42  bool sigprocSincInterp(const std::vector<unsigned short>& adc, float deltaT, float& amp, float& time, float& qual);
43 
44  private:
45 
46  // internal functions - moved to private accoding to T.Bold request while merging into master
47  TF1* m_tf1SincInterp = nullptr;
48  TF1* m_tf1FermiExpFit = nullptr;
49 
50  // Name of the ZDC rec tool
51  std::string m_name;
52  // Boolean to flag initialization
53  bool m_init;
54  // Path to the configuring file
55  std::string m_zdcRecConfigPath;
56 
57  bool m_eventReady = false;
60 
61  };
62 
63 } // namespace ZDC
64 
65 #endif
ZDC::ZdcRecTool::m_tf1FermiExpFit
TF1 * m_tf1FermiExpFit
Definition: ZdcRecTool.h:48
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ZDC::ZdcRecTool::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: ZdcRecTool.h:33
ZDC::ZdcRecTool::sigprocPeakFitter
bool sigprocPeakFitter(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
Definition: ZdcRecTool.cxx:125
TriggerTowerContainer.h
xAOD::ZdcModule_v1
Class containing ZDC Module information.
Definition: ZdcModule_v1.h:25
ZDC::ZdcRecTool::~ZdcRecTool
virtual ~ZdcRecTool()
Definition: ZdcRecTool.cxx:26
ZDC::ZdcRecTool::sigprocSincInterp
bool sigprocSincInterp(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
Definition: ZdcRecTool.cxx:152
ZDC::SincInterp
double SincInterp(const double *xvec, const double *pvec)
Definition: ZdcSincInterp.cxx:11
ZDC::ZdcRecTool::m_init
bool m_init
Definition: ZdcRecTool.h:53
ZDC::ZdcRecTool::m_zdcModuleContainerName
std::string m_zdcModuleContainerName
Definition: ZdcRecTool.h:58
python.PyAthena.module
module
Definition: PyAthena.py:134
ZDC::ZdcRecTool::m_tf1SincInterp
TF1 * m_tf1SincInterp
Definition: ZdcRecTool.h:47
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ZDC::ZdcRecTool::m_zdcRecConfigPath
std::string m_zdcRecConfigPath
Definition: ZdcRecTool.h:55
ZDC::ZdcRecTool::ZdcRecTool
ZdcRecTool(const std::string &name)
Definition: ZdcRecTool.cxx:14
IZdcRecTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ZDC::ZdcRecTool::initializeTool
virtual StatusCode initializeTool() override
Initialize the tool.
Definition: ZdcRecTool.cxx:31
ZDC::ZdcRecTool::m_name
std::string m_name
Definition: ZdcRecTool.h:51
ZDC::ZdcRecTool::m_eventReady
bool m_eventReady
Definition: ZdcRecTool.h:57
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ZDC::IZdcRecTool
Definition: IZdcRecTool.h:15
ZDC::ZdcRecTool::reprocessZdc
virtual StatusCode reprocessZdc() override
Definition: ZdcRecTool.cxx:82
ZDC::ZdcRecTool::sigprocMaxFinder
bool sigprocMaxFinder(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
Definition: ZdcRecTool.cxx:98
ZDC::ZdcRecTool::recoZdcModules
virtual StatusCode recoZdcModules(const xAOD::ZdcModuleContainer &moduleContainer) override
Definition: ZdcRecTool.cxx:67
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
ZDC::ZdcRecTool::recoZdcModule
virtual StatusCode recoZdcModule(const xAOD::ZdcModule &module) override
Definition: ZdcRecTool.cxx:53
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ZDC
Definition: RpdSubtractCentroidTool.cxx:13
ZDC::ZdcRecTool::m_zdcModules
const xAOD::ZdcModuleContainer * m_zdcModules
Definition: ZdcRecTool.h:59
beamspotman.qual
qual
Definition: beamspotman.py:481
pvec
std::array< fp_t, 2 > pvec
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:9
AsgTool.h
ZDC::ZdcRecTool
Definition: ZdcRecTool.h:23
ZdcModuleContainer.h
ZDC::FermiExpFit
double FermiExpFit(double *xvec, double *pvec)
Definition: ZdcRecTool.cxx:184