ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcRecChannelToolV2.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/*
6 * ZdcRecChannelToolV2.h
7 *
8 * Two steps:
9 * 1. Convert the towers to ZdcModules
10 * 2. Process the ZdcModules and add Energy/time info
11 * Created on: September 27, 2015
12 * Author: steinber
13 */
14
15#ifndef ZDCRECCHANNELTOOLV2_H_
16#define ZDCRECCHANNELTOOLV2_H_
17
18
19#include <string>
20#include <map>
21
22//#include "AthenaBaseComps/AthAlgTool.h"
23#include "AsgTools/AsgTool.h"
24#include "GaudiKernel/ToolHandle.h"
25#include "GaudiKernel/ServiceHandle.h"
26
29
32
33class StatusCode;
34class Identifier;
35class ZdcID ;
36
37class ZdcRecChannelToolV2: public asg::AsgTool, virtual public IIncidentListener
38{
41 public:
42 ZdcRecChannelToolV2(const std::string& name);
44
45 virtual StatusCode initialize() override;
46 virtual StatusCode finalize() override;
47 virtual void handle( const Incident& ) override;
48
49 int convertTT2ZM(const xAOD::TriggerTowerContainer* ttCollection, xAOD::ZdcModuleContainer* zdcModules, xAOD::ZdcModuleContainer* zdcSums) const;
50 int makeRawFromDigits(xAOD::ZdcModuleContainer& zdcModules) const; // NOT const -- we're going to modify the objects to add signal processing
52 static int splitWaveform(std::map<int,float>& waveform, std::vector<float>& times, std::vector<float>& adcs) ;
53 int getPeakProperties(std::vector<float>& times, std::vector<float>& adcs, float& time, float& amp, float& qual, float& presamp) const;
54
55private:
56
57 // internal parameters, set in pythion
58 unsigned int m_nsamples;
62 int m_delta; // A number to check for signal
64 int m_saturation; // saturation level (absolute ADC)
65 float m_pedestalValue; // pedestal value (set to 100)
66
67 const ZdcID* m_zdcId{};
68
69};
70
71
72#endif /* ZDCRECCHANNELTOOLV2_H_ */
#define ASG_TOOL_INTERFACE(CLASSNAME)
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition ZdcID.h:25
virtual void handle(const Incident &) override
virtual StatusCode finalize() override
static int splitWaveform(std::map< int, float > &waveform, std::vector< float > &times, std::vector< float > &adcs)
int getPeakProperties(std::vector< float > &times, std::vector< float > &adcs, float &time, float &amp, float &qual, float &presamp) const
int convertTT2ZM(const xAOD::TriggerTowerContainer *ttCollection, xAOD::ZdcModuleContainer *zdcModules, xAOD::ZdcModuleContainer *zdcSums) const
int makeRawFromDigits(xAOD::ZdcModuleContainer &zdcModules) const
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
ZdcRecChannelToolV2(const std::string &name)
int makeWaveformFromDigits(xAOD::ZdcModule &module) const
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
ZdcModuleContainer_v1 ZdcModuleContainer
ZdcModule_v1 ZdcModule
Definition ZdcModule.h:15
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.