ATLAS Offline Software
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 
33 class StatusCode;
34 class Identifier;
35 class ZdcID ;
36 
37 class ZdcRecChannelToolV2: public asg::AsgTool, virtual public IIncidentListener
38 {
41  public:
42  ZdcRecChannelToolV2(const std::string& name);
43  virtual ~ZdcRecChannelToolV2() {};
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 
55 private:
56 
57  // internal parameters, set in pythion
58  unsigned int m_nsamples;
60  float m_gainFactor;
61  bool m_useDelay;
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_ */
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ZdcRecChannelToolV2::makeRawFromDigits
int makeRawFromDigits(xAOD::ZdcModuleContainer &zdcModules) const
ZdcRecChannelToolV2::handle
virtual void handle(const Incident &) override
Definition: ZdcRecChannelToolV2.cxx:65
TriggerTowerContainer.h
xAOD::ZdcModule_v1
Class containing ZDC Module information.
Definition: ZdcModule_v1.h:25
ZdcRecChannelToolV2::m_gainFactor
float m_gainFactor
Definition: ZdcRecChannelToolV2.h:60
ZdcRecChannelToolV2::m_pedestalValue
float m_pedestalValue
Definition: ZdcRecChannelToolV2.h:65
ZdcRecChannelToolV2::ZdcRecChannelToolV2
ZdcRecChannelToolV2(const std::string &name)
Definition: ZdcRecChannelToolV2.cxx:47
ZdcRecChannelToolV2::m_nsamples
unsigned int m_nsamples
Definition: ZdcRecChannelToolV2.h:58
ZdcModuleAuxContainer.h
python.PyAthena.module
module
Definition: PyAthena.py:134
ZdcRecChannelToolV2::m_delta
int m_delta
Definition: ZdcRecChannelToolV2.h:62
ZdcRecChannelToolV2::~ZdcRecChannelToolV2
virtual ~ZdcRecChannelToolV2()
Definition: ZdcRecChannelToolV2.h:43
ZdcRecChannelToolV2::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: ZdcRecChannelToolV2.cxx:74
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ZdcRecChannelToolV2::getPeakProperties
int getPeakProperties(std::vector< float > &times, std::vector< float > &adcs, float &time, float &amp, float &qual, float &presamp) const
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ZdcRecChannelToolV2::m_useDelay
bool m_useDelay
Definition: ZdcRecChannelToolV2.h:61
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
ZdcRecChannelToolV2::m_saturation
int m_saturation
Definition: ZdcRecChannelToolV2.h:64
ZdcRecChannelToolV2::splitWaveform
static int splitWaveform(std::map< int, float > &waveform, std::vector< float > &times, std::vector< float > &adcs)
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
ZdcRecChannelToolV2::makeWaveformFromDigits
int makeWaveformFromDigits(xAOD::ZdcModule &module) const
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ZdcRecChannelToolV2::m_sample_time
float m_sample_time
Definition: ZdcRecChannelToolV2.h:59
ZdcRecChannelToolV2::finalize
virtual StatusCode finalize() override
Definition: ZdcRecChannelToolV2.cxx:103
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ZdcRecChannelToolV2::m_zeroSupress
int m_zeroSupress
Definition: ZdcRecChannelToolV2.h:63
ZdcRecChannelToolV2
Definition: ZdcRecChannelToolV2.h:38
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
beamspotman.qual
qual
Definition: beamspotman.py:481
AsgTool.h
ZdcID
Definition: ZdcID.h:25
ZdcModuleContainer.h
ZdcRecChannelToolV2::m_zdcId
const ZdcID * m_zdcId
Definition: ZdcRecChannelToolV2.h:67
plot_times.times
def times(fn)
Definition: plot_times.py:11
ZdcRecChannelToolV2::convertTT2ZM
int convertTT2ZM(const xAOD::TriggerTowerContainer *ttCollection, xAOD::ZdcModuleContainer *zdcModules, xAOD::ZdcModuleContainer *zdcSums) const
Definition: ZdcRecChannelToolV2.cxx:111
TriggerTowerAuxContainer.h