ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcRecChannelToolV2.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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#include "Gaudi/Property.h"
27
30
33
34class StatusCode;
35class Identifier;
36class ZdcID ;
37
38class ZdcRecChannelToolV2: public asg::AsgTool, virtual public IIncidentListener
39{
42 public:
43 ZdcRecChannelToolV2(const std::string& name);
45
46 virtual StatusCode initialize() override;
47 virtual StatusCode finalize() override;
48 virtual void handle( const Incident& ) override;
49
50 int convertTT2ZM(const xAOD::TriggerTowerContainer* ttCollection, xAOD::ZdcModuleContainer* zdcModules, xAOD::ZdcModuleContainer* zdcSums) const;
51 int makeRawFromDigits(xAOD::ZdcModuleContainer& zdcModules) const; // NOT const -- we're going to modify the objects to add signal processing
53 static int splitWaveform(std::map<int,float>& waveform, std::vector<float>& times, std::vector<float>& adcs) ;
54 int getPeakProperties(std::vector<float>& times, std::vector<float>& adcs, float& time, float& amp, float& qual, float& presamp) const;
55
56private:
57
58 // internal parameters, set in pythion
59 Gaudi::Property<unsigned int> m_nsamples{this, "NSamples", 5, "Number of samples in PPM raw data"};
60 Gaudi::Property<float> m_sample_time{this, "SampleTime", 12.5, "Sample time in ns (25. = 40 MHz, 12.5 = 80 MHz)"};
61 Gaudi::Property<float> m_gainFactor{this, "GainFactor", 10., "High/lo gain factor"};
62 Gaudi::Property<bool> m_useDelay{this, "UseDelay", false, "If true, then use delayed channels"};
63 Gaudi::Property<int> m_delta{this, "DeltaPeak", 5, "Minimum difference between min and max to be considered a signal"}; // A number to check for signal
64 Gaudi::Property<int> m_zeroSupress{this, "ZeroSuppress", 0, "Supress channels with only 0"};
65 Gaudi::Property<int> m_saturation{this, "SaturationADC", 1000, "ADC value above which a HG channel is considered saturated"}; // saturation level (absolute ADC)
66 Gaudi::Property<float> m_pedestalValue{this, "PedestalValue", 100., "Pedestal value"}; // pedestal value (set to 100)
67
68 const ZdcID* m_zdcId{};
69
70};
71
72
73#endif /* ZDCRECCHANNELTOOLV2_H_ */
#define ASG_TOOL_INTERFACE(CLASSNAME)
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition ZdcID.h:25
virtual void handle(const Incident &) override
Gaudi::Property< int > m_zeroSupress
Gaudi::Property< float > m_pedestalValue
virtual StatusCode finalize() override
static int splitWaveform(std::map< int, float > &waveform, std::vector< float > &times, std::vector< float > &adcs)
Gaudi::Property< float > m_gainFactor
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
Gaudi::Property< int > m_delta
Gaudi::Property< int > m_saturation
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
ZdcRecChannelToolV2(const std::string &name)
int makeWaveformFromDigits(xAOD::ZdcModule &module) const
Gaudi::Property< unsigned int > m_nsamples
Gaudi::Property< bool > m_useDelay
Gaudi::Property< float > m_sample_time
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
::StatusCode StatusCode
StatusCode definition for legacy code.
ZdcModuleContainer_v1 ZdcModuleContainer
ZdcModule_v1 ZdcModule
Definition ZdcModule.h:15
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.