ATLAS Offline Software
ZdcLEDNtuple.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZdcNtuple_ZdcLEDNtuple_H
6 #define ZdcNtuple_ZdcLEDNtuple_H
7 
12 #include <vector>
13 #include <string>
14 
16 {
17 public:
18  std::string auxSuffix; // what to add to name the new data, when reprocessing
19  bool isLED{};
20 
21 public:
22  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_zdcModuleContainerName{this, "ZdcModuleContainerName", "ZdcModules", ""};
23  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_zdcSumContainerName{ this, "ZdcSumContainerName", "ZdcSums", "" };
26 
27  // flags
28  bool enableOutputTree{}; // enable output TTree
29 
30  // output tree and branches
31 
32  TTree *m_outputTree{};
33 
34  // evt info
45 
46  // LED and modules
47  unsigned int t_LEDType{};
48 
49  static constexpr int nSides = 2;
50  static constexpr int nZDC = 4;
51  static constexpr int nRPD = 16;
52  static constexpr int nSamples = 24;
53 
54  static constexpr int ZdcTypeInd = 0;
55  static constexpr int RPDTypeInd = 1;
56 
57  static constexpr int RPDModuleInd = 4;
58  static constexpr int infoSumInd = 0;
59 
60 
64  unsigned int t_ZdcModuleMaxSample[nSides][nZDC]{};
66 
69 
71 
72  std::vector<uint16_t> g0dataVec;
73  std::vector<uint16_t> g1dataVec;
74 
78  unsigned int t_RPDModuleMaxSample[nSides][nRPD]{};
80 
81  ZdcLEDNtuple(const std::string &name, ISvcLocator *pSvcLocator);
82 
83  void processEventInfo();
85 
86  virtual StatusCode initialize() override;
87  virtual StatusCode execute() override;
88  virtual StatusCode finalize() override;
89 };
90 
91 #endif
ZdcLEDNtuple::initialize
virtual StatusCode initialize() override
Definition: ZdcLEDNtuple.cxx:26
ZdcLEDNtuple::m_zdcSumContainerName
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcSumContainerName
Definition: ZdcLEDNtuple.h:23
ZdcLEDNtuple::t_eventNumber
uint32_t t_eventNumber
Definition: ZdcLEDNtuple.h:36
ZdcLEDNtuple::t_ZdcModuleMaxSample
unsigned int t_ZdcModuleMaxSample[nSides][nZDC]
Definition: ZdcLEDNtuple.h:64
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
ZdcLEDNtuple::nSamples
static constexpr int nSamples
Definition: ZdcLEDNtuple.h:52
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ZdcLEDNtuple::t_bcid
uint32_t t_bcid
Definition: ZdcLEDNtuple.h:38
ZdcLEDNtuple::m_eventInfo
const xAOD::EventInfo * m_eventInfo
Definition: ZdcLEDNtuple.h:24
ZdcLEDNtuple::t_RPDModuleADCSum
int t_RPDModuleADCSum[nSides][nRPD]
Definition: ZdcLEDNtuple.h:76
ZdcLEDNtuple::processEventInfo
void processEventInfo()
Definition: ZdcLEDNtuple.cxx:223
ZdcLEDNtuple::t_runNumber
uint32_t t_runNumber
Definition: ZdcLEDNtuple.h:35
ZdcLEDNtuple::RPDModuleInd
static constexpr int RPDModuleInd
Definition: ZdcLEDNtuple.h:57
ZdcLEDNtuple::nZDC
static constexpr int nZDC
Definition: ZdcLEDNtuple.h:50
ZdcLEDNtuple::t_RPDModuleMaxADC
int t_RPDModuleMaxADC[nSides][nRPD]
Definition: ZdcLEDNtuple.h:77
ZdcLEDNtuple::nRPD
static constexpr int nRPD
Definition: ZdcLEDNtuple.h:51
ZdcLEDNtuple::t_ZdcModuleADCSum
int t_ZdcModuleADCSum[nSides][nZDC]
Definition: ZdcLEDNtuple.h:62
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
ZdcLEDNtuple::ZdcLEDNtuple
ZdcLEDNtuple(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ZdcLEDNtuple.cxx:15
ZdcLEDNtuple::t_LEDType
unsigned int t_LEDType
Definition: ZdcLEDNtuple.h:47
ZdcLEDNtuple::t_bunchGroup
uint8_t t_bunchGroup
Definition: ZdcLEDNtuple.h:39
AnaAlgorithm.h
ZdcLEDNtuple::infoSumInd
static constexpr int infoSumInd
Definition: ZdcLEDNtuple.h:58
ZdcLEDNtuple
Definition: ZdcLEDNtuple.h:16
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
ZdcLEDNtuple::enableOutputTree
bool enableOutputTree
Definition: ZdcLEDNtuple.h:28
ZdcLEDNtuple::t_RPDModulePresample
float t_RPDModulePresample[nSides][nRPD]
Definition: ZdcLEDNtuple.h:75
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ZdcLEDNtuple::t_RPDModuleAvgTime
float t_RPDModuleAvgTime[nSides][nRPD]
Definition: ZdcLEDNtuple.h:79
ZdcLEDNtuple::m_outputTree
TTree * m_outputTree
Definition: ZdcLEDNtuple.h:32
ZdcLEDNtuple::t_RPDModuleMaxSample
unsigned int t_RPDModuleMaxSample[nSides][nRPD]
Definition: ZdcLEDNtuple.h:78
ZdcLEDNtuple::t_actIntPerCrossing
float t_actIntPerCrossing
Definition: ZdcLEDNtuple.h:44
ZdcLEDNtuple::t_ZdcModulePresample
float t_ZdcModulePresample[nSides][nZDC]
Definition: ZdcLEDNtuple.h:61
ZdcLEDNtuple::t_avgIntPerCrossing
float t_avgIntPerCrossing
Definition: ZdcLEDNtuple.h:43
ZdcLEDNtuple::t_extendedLevel1ID
uint32_t t_extendedLevel1ID
Definition: ZdcLEDNtuple.h:40
ZdcLEDNtuple::isLED
bool isLED
Definition: ZdcLEDNtuple.h:19
ZdcLEDNtuple::g0dataVec
std::vector< uint16_t > g0dataVec
Definition: ZdcLEDNtuple.h:72
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ZdcLEDNtuple::m_zdcModuleContainerName
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleContainerName
Definition: ZdcLEDNtuple.h:22
ZdcLEDNtuple::t_ZdcModuleMaxADC
int t_ZdcModuleMaxADC[nSides][nZDC]
Definition: ZdcLEDNtuple.h:63
ZdcLEDNtuple::auxSuffix
std::string auxSuffix
Definition: ZdcLEDNtuple.h:18
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ZdcLEDNtuple::t_lumiBlock
uint32_t t_lumiBlock
Definition: ZdcLEDNtuple.h:37
ZdcLEDNtuple::t_ZdcModuleg1data
uint16_t t_ZdcModuleg1data[nSides][nZDC][nSamples]
Definition: ZdcLEDNtuple.h:68
ZdcLEDNtuple::t_RPDModuleRawdata
uint16_t t_RPDModuleRawdata[nSides][nRPD][nSamples]
Definition: ZdcLEDNtuple.h:70
ZdcLEDNtuple::t_timeStamp
uint32_t t_timeStamp
Definition: ZdcLEDNtuple.h:41
ZdcLEDNtuple::t_ZdcModuleg0data
uint16_t t_ZdcModuleg0data[nSides][nZDC][nSamples]
Definition: ZdcLEDNtuple.h:67
ZdcLEDNtuple::execute
virtual StatusCode execute() override
Definition: ZdcLEDNtuple.cxx:72
ZdcLEDNtuple::ZdcTypeInd
static constexpr int ZdcTypeInd
Definition: ZdcLEDNtuple.h:54
ZdcLEDNtuple::t_timeStampNSOffset
uint32_t t_timeStampNSOffset
Definition: ZdcLEDNtuple.h:42
ZdcLEDNtuple::m_eventCounter
int m_eventCounter
Definition: ZdcLEDNtuple.h:25
ZdcLEDNtuple::t_ZdcModuleAvgTime
float t_ZdcModuleAvgTime[nSides][nZDC]
Definition: ZdcLEDNtuple.h:65
ZdcLEDNtuple::RPDTypeInd
static constexpr int RPDTypeInd
Definition: ZdcLEDNtuple.h:55
ZdcModuleContainer.h
ZdcLEDNtuple::nSides
static constexpr int nSides
Definition: ZdcLEDNtuple.h:49
ZdcLEDNtuple::g1dataVec
std::vector< uint16_t > g1dataVec
Definition: ZdcLEDNtuple.h:73
ZdcLEDNtuple::processZdcLEDNtupleFromModules
void processZdcLEDNtupleFromModules()
Definition: ZdcLEDNtuple.cxx:95
ZdcLEDNtuple::finalize
virtual StatusCode finalize() override
Definition: ZdcLEDNtuple.cxx:244