ATLAS Offline Software
ZdcTrigValidTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZDCTRIGVALID_ZDCTRIGVALIDTOOL_H
6 #define ZDCTRIGVALID_ZDCTRIGVALIDTOOL_H
7 
8 // Matthew Hoppesch.
9 // July 2023
10 //
11 // This is a simple tool to compare L1 ZDC decions made in CTP to those made using ZDC firmware
12 // Used for validation of ZDC firmware in Run3,
13 // WriteAux Property Determines if Trigger Validation Status is written to xAOD::ZdcModuleContainer
14 
17 #include "AsgTools/AsgTool.h"
19 #include "ZdcUtils/ZDCTriggerSim.h"
20 
21 #include "nlohmann/json.hpp"
22 
25 
26 
27 namespace ZDC {
29 {
31 
32  public:
33  ZdcTrigValidTool(const std::string& name);
34  virtual ~ZdcTrigValidTool() override;
35  virtual StatusCode initialize() override;
36 
37  virtual StatusCode recoZdcModules(const xAOD::ZdcModuleContainer& moduleContainer, const xAOD::ZdcModuleContainer& moduleSumContainer) override;
38  virtual StatusCode reprocessZdc() override {return StatusCode::SUCCESS;}
39 
40  protected:
41 
42 #ifdef XAOD_STANDALONE
43  ToolHandle<Trig::TrigDecisionTool> m_trigDecTool {this, "TrigDecisionTool",""};
44 #else
45  PublicToolHandle<Trig::TrigDecisionTool> m_trigDecTool {this, "TrigDecisionTool",""};
46 #endif
47 
48  private:
49  /* properties */
50  Gaudi::Property<std::vector<std::string>> m_triggerList{
51  this, "triggerList", {}, "Add triggers to this to be monitored"};
52  Gaudi::Property<std::string> m_lutFile{this, "filepath_LUT", "TrigT1ZDC/zdcRun3T1LUT_v1_30_05_2023.json", "path to LUT file"};
53 
55  std::shared_ptr<ZDCTriggerSim::ModuleAmplInputsFloat> m_modInputs_p;
56 
58  std::shared_ptr<ZDCTriggerSimModuleAmpls> m_simTrig;
59 
60  std::string m_msg;
61  std::map<std::string, unsigned int > m_triggerMap;
62  std::string m_auxSuffix;
63  std::string m_name;
64  bool m_writeAux;
65 
66  SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> m_zdcModuleAmp{this, "ZdcModuleAmplitude", "", "ZDC module Amplitude"};
67  SG::WriteDecorHandleKey<xAOD::ZdcModuleContainer> m_trigValStatus{this, "TrigValStatus", "","Trigger validation status"};
68 
69 };
70 }
71 #endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
ZDC::ZdcTrigValidTool::m_triggerMap
std::map< std::string, unsigned int > m_triggerMap
Definition: ZdcTrigValidTool.h:61
initialize
void initialize()
Definition: run_EoverP.cxx:894
ZDC::ZdcTrigValidTool::m_auxSuffix
std::string m_auxSuffix
Definition: ZdcTrigValidTool.h:62
ZDC::ZdcTrigValidTool::m_modInputs_p
std::shared_ptr< ZDCTriggerSim::ModuleAmplInputsFloat > m_modInputs_p
A data member to hold the ZDCTrigger Object that stores input floats: shared ptr to ensure cleanup.
Definition: ZdcTrigValidTool.h:55
ZDC::ZdcTrigValidTool
Definition: ZdcTrigValidTool.h:29
TrigDecisionTool.h
IZdcAnalysisTool.h
ZDC::ZdcTrigValidTool::m_simTrig
std::shared_ptr< ZDCTriggerSimModuleAmpls > m_simTrig
A data member to hold the ZDCTrigger Object that computes the LUT logic: shared ptr to ensure cleanup...
Definition: ZdcTrigValidTool.h:58
ZDC::IZdcAnalysisTool
Definition: IZdcAnalysisTool.h:15
ZDC::ZdcTrigValidTool::m_name
std::string m_name
Definition: ZdcTrigValidTool.h:63
ZdcModuleAuxContainer.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ZDC::ZdcTrigValidTool::m_writeAux
bool m_writeAux
Definition: ZdcTrigValidTool.h:64
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
WriteDecorHandleKey.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ZDC
Definition: RpdSubtractCentroidTool.cxx:13
ZDCTriggerSim.h
A tool to make L1 decision using LUTs.
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ZDC::ZdcTrigValidTool::reprocessZdc
virtual StatusCode reprocessZdc() override
Definition: ZdcTrigValidTool.h:38
AsgTool.h
ZDC::ZdcTrigValidTool::m_msg
std::string m_msg
Definition: ZdcTrigValidTool.h:60