ATLAS Offline Software
Loading...
Searching...
No Matches
MUCTPI_AthTool.h
Go to the documentation of this file.
1// This file is really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGT1MUCTPIPHASE1_MUCTPI_ATHTOOL_H
8#define TRIGT1MUCTPIPHASE1_MUCTPI_ATHTOOL_H
9
10/*
11 Tool to perform simulation of PhaseI MUCTPI board
12*/
13
14#include "SimController.h"
15#include "MUCTPIResults.h"
16
22
24
26#include "GaudiKernel/IIncidentListener.h"
28#include "Gaudi/Property.h"
29
30#include <optional>
31#include <functional>
32
33namespace LVL1 {
35}
36
37namespace LVL1MUCTPIPHASE1 {
38
40 {
41
42 public:
43
44 MUCTPI_AthTool(const std::string& type, const std::string& name,
45 const IInterface* parent);
46
47 virtual ~MUCTPI_AthTool() override = default;
48
49 virtual StatusCode initialize() override;
50 virtual StatusCode start() override;
51 StatusCode execute() const;
52
53 private:
54
56 StatusCode executeFromDigi() const;
58 StatusCode executeFromAOD() const;
60 StatusCode executeFromRDO() const;
62 StatusCode saveOutput(std::optional<std::reference_wrapper<MUCTPIResults>> results, int bcidOffset = 0) const;
63
64
65 static constexpr std::array<int,4> m_bcidOffsetList{-2,-1,1,2};
66
67
68 SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyRPC{this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"};
69 SG::ReadHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1KeyTGC{this, "MuctpiPhase1LocationTGC", "L1MuctpiStoreTGC", "Location of muctpiPhase1 for Tgc"};
72 this, "MUCTPI_xAODLocation", {
73 "LVL1MuonRoIsBCm2", "LVL1MuonRoIsBCm1",
74 "LVL1MuonRoIs",
75 "LVL1MuonRoIsBCp1", "LVL1MuonRoIsBCp2"
76 },
77 "Output keys for xAOD::MuonRoIContainer, one per time slice"
78 };
87
88
89 // Locations of the inputs and outputs of the simulation in StoreGate:
90 static const std::string m_DEFAULT_locationMuCTPItoCTP;
91 static const std::string m_DEFAULT_locationMuCTPItoRoIB;
92 static const std::string m_DEFAULT_L1MuctpiStoreLocationRPC;
93 static const std::string m_DEFAULT_L1MuctpiStoreLocationTGC;
94 static const std::string m_DEFAULT_AODLocID;
95 static const std::string m_DEFAULT_RDOLocID;
96 static const std::string m_DEFAULT_barrelRoIFile;
97 static const std::string m_DEFAULT_ecfRoIFile;
98 static const std::string m_DEFAULT_side0LUTFile;
99 static const std::string m_DEFAULT_side1LUTFile;
100
102 // Gaudy properties
104
105 // Properties for the overlap treatment
106 Gaudi::Property<std::string> m_overlapStrategyName { this, "OverlapStrategyName", "LUT", "Overlap strategy for the MUCTPI. Options: \"LUT\" or \"NULL\" " };
107 Gaudi::Property<std::string> m_lutXMLFile { this, "LUTXMLFile", "TrigConfMuctpi/overlapRun3_20201214.xml", "xml file with the overlap handling for the MUCTPI. Default file for Run3: \"TrigConfMuctpi/overlapRun3_20201214.xml\" " };
108
109 // Properties for the output generation for L1Topo
110 Gaudi::Property<std::string> m_barrelRoIFile { this, "BarrelRoIFile", m_DEFAULT_barrelRoIFile, "" };
111 Gaudi::Property<std::string> m_ecfRoIFile { this, "EndcapForwardRoIFile", m_DEFAULT_ecfRoIFile, "" };
112 Gaudi::Property<std::string> m_side0LUTFile { this, "Side0LUTFile", m_DEFAULT_side0LUTFile, "" };
113 Gaudi::Property<std::string> m_side1LUTFile { this, "Side1LUTFile", m_DEFAULT_side1LUTFile, "" };
114
115 // Properties for the input selection
116 Gaudi::Property<std::string> m_inputSource { this, "InputSource", "DIGITIZATION", "" };
117 Gaudi::Property<std::string> m_aodLocId { this, "AODLocID", m_DEFAULT_AODLocID, "" };
118 Gaudi::Property<std::string> m_rdoLocId { this, "RDOLocID", m_DEFAULT_RDOLocID, "" };
119 Gaudi::Property<std::string> m_rdoOutputLocId { this, "RDOOutputLocID", m_DEFAULT_RDOLocID, "" };
120 Gaudi::Property<std::string> m_roiOutputLocId { this, "RoIOutputLocID", m_DEFAULT_locationMuCTPItoRoIB, "" };
121 Gaudi::Property<std::string> m_ctpOutputLocId { this, "CTPOutputLocID", m_DEFAULT_locationMuCTPItoCTP, "" };
122
123 // These are just here for flexibility, normally they should not be changed:
124 Gaudi::Property<std::string> m_tgcLocId { this, "TGCLocID", m_DEFAULT_L1MuctpiStoreLocationTGC, "" };
125 Gaudi::Property<std::string> m_rpcLocId { this, "RPCLocID", m_DEFAULT_L1MuctpiStoreLocationRPC, "" };
126
127 ServiceHandle<StoreGateSvc> m_detStore { this, "DetectorStore", "StoreGateSvc/DetectorStore", "Detector store to get the menu" };
128
130 ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_rpcTool{this, "RPCRecRoiTool", "LVL1::TrigT1RPCRecRoiTool/LVL1__TrigT1RPCRecRoiTool", "Tool to get the eta/phi coordinates in the RPC"};
131 ToolHandle<LVL1::ITrigT1MuonRecRoiTool> m_tgcTool{this, "TGCRecRoiTool", "LVL1::TrigT1TGCRecRoiTool/LVL1__TrigT1TGCRecRoiTool", "Tool to get the eta/phi coordinates in the TGC"};
132 ToolHandle<LVL1::TrigThresholdDecisionTool> m_trigThresholdDecisionTool{this, "TrigThresholdDecisionTool", "LVL1::TrigThresholdDecisionTool/LVL1__TrigThresholdDecisionTool", "Tool to get pass/fail of each trigger threshold"};
133
135 StatusCode ( LVL1MUCTPIPHASE1::MUCTPI_AthTool::*m_executeFunction )( void ) const{};
136
137 };
138}
139
140#endif // TRIGT1MUCTPIPHASE1_MUCTPI_ATHTOOL_H
defines an "iterator" over instances of a given type in StoreGateSvc
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
StatusCode(LVL1MUCTPIPHASE1::MUCTPI_AthTool::* m_executeFunction)(void) const
Function pointer to the execute function we want to use:
Gaudi::Property< std::string > m_overlapStrategyName
Gaudi::Property< std::string > m_ecfRoIFile
static const std::string m_DEFAULT_side0LUTFile
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_tgcLocId
Gaudi::Property< std::string > m_rdoOutputLocId
static const std::string m_DEFAULT_AODLocID
Gaudi::Property< std::string > m_ctpOutputLocId
Gaudi::Property< std::string > m_rdoLocId
static const std::string m_DEFAULT_L1MuctpiStoreLocationTGC
virtual ~MUCTPI_AthTool() override=default
Gaudi::Property< std::string > m_roiOutputLocId
Gaudi::Property< std::string > m_rpcLocId
Gaudi::Property< std::string > m_side0LUTFile
StatusCode executeFromDigi() const
Event loop method for running as part of digitization.
static const std::string m_DEFAULT_locationMuCTPItoCTP
static const std::string m_DEFAULT_barrelRoIFile
Gaudi::Property< std::string > m_lutXMLFile
static const std::string m_DEFAULT_locationMuCTPItoRoIB
virtual StatusCode start() override
ServiceHandle< StoreGateSvc > m_detStore
static const std::string m_DEFAULT_RDOLocID
MUCTPI_AthTool(const std::string &type, const std::string &name, const IInterface *parent)
SG::WriteHandleKey< LVL1::MuCTPICTP > m_MuCTPICTPWriteKey
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_tgcTool
static constexpr std::array< int, 4 > m_bcidOffsetList
Gaudi::Property< std::string > m_barrelRoIFile
SG::WriteHandleKeyArray< xAOD::MuonRoIContainer > m_MuCTPI_xAODWriteKeys
Gaudi::Property< std::string > m_side1LUTFile
SG::ReadHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1KeyRPC
SG::WriteHandleKeyArray< LVL1::MuCTPIL1Topo > m_MuCTPIL1TopoKeys
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_rpcTool
StatusCode executeFromRDO() const
Event loop method for running on an RDO file.
static const std::string m_DEFAULT_side1LUTFile
ToolHandle< LVL1::TrigThresholdDecisionTool > m_trigThresholdDecisionTool
StatusCode executeFromAOD() const
Event loop method for running on an AOD file.
Gaudi::Property< std::string > m_aodLocId
static const std::string m_DEFAULT_L1MuctpiStoreLocationRPC
StatusCode saveOutput(std::optional< std::reference_wrapper< MUCTPIResults > > results, int bcidOffset=0) const
Save the outputs of the simulation into StoreGate.
SG::ReadHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1KeyTGC
Gaudi::Property< std::string > m_inputSource
static const std::string m_DEFAULT_ecfRoIFile
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
static const std::string DEFAULT_MuonCTPLocation
default StoreGate location for MuCTPI to CTP input
static const std::string DEFAULT_MuonL1TopoLocation
default StoreGate location for MuCTPI to L1Topo input
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray