ATLAS Offline Software
Loading...
Searching...
No Matches
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
16namespace 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
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
std::array< fp_t, 2 > pvec
bool sigprocMaxFinder(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
ZdcRecTool(const std::string &name)
TF1 * m_tf1FermiExpFit
Definition ZdcRecTool.h:48
std::string m_zdcModuleContainerName
Definition ZdcRecTool.h:58
std::string m_zdcRecConfigPath
Definition ZdcRecTool.h:55
bool sigprocSincInterp(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
bool sigprocPeakFitter(const std::vector< unsigned short > &adc, float deltaT, float &amp, float &time, float &qual)
std::string m_name
Definition ZdcRecTool.h:51
TF1 * m_tf1SincInterp
Definition ZdcRecTool.h:47
virtual ~ZdcRecTool()
virtual StatusCode recoZdcModules(const xAOD::ZdcModuleContainer &moduleContainer) override
virtual StatusCode recoZdcModule(const xAOD::ZdcModule &module) override
virtual StatusCode reprocessZdc() override
const xAOD::ZdcModuleContainer * m_zdcModules
Definition ZdcRecTool.h:59
virtual StatusCode initializeTool() override
Initialize the tool.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition ZdcRecTool.h:33
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
double SincInterp(const double *xvec, const double *pvec)
double FermiExpFit(double *xvec, double *pvec)
ZdcModuleContainer_v1 ZdcModuleContainer
ZdcModule_v1 ZdcModule
Definition ZdcModule.h:15