ATLAS Offline Software
Loading...
Searching...
No Matches
TgcL0RootOutputAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10namespace L0Muon {
11
13 ATH_CHECK(m_inputKey.initialize());
14 m_tree.setPath("L0MuonS1TGCValidation");
15 ATH_CHECK(m_tree.init(this));
16 return StatusCode::SUCCESS;
17}
18
19StatusCode TgcL0RootOutputAlg::execute(const EventContext& ctx) {
21 ATH_CHECK(input.isValid());
22
23 const TgcL0ValidationCheckResult check =
25 if (!check.valid) {
27 ATH_MSG_ERROR("Invalid TGC validation data: " << check.message);
28 return StatusCode::FAILURE;
29 }
30 ATH_MSG_WARNING("Skipping invalid TGC validation data: "
31 << check.message);
32 return StatusCode::SUCCESS;
33 }
34
35 copyToBranches(*input);
36 return m_tree.fill(ctx) ? StatusCode::SUCCESS : StatusCode::FAILURE;
37}
38
40 ATH_CHECK(m_tree.write());
41 return StatusCode::SUCCESS;
42}
43
45 const TgcL0ValidationEvent& input) {
46 m_runNumber = input.event.runNumber;
47 m_eventNumber = input.event.eventNumber;
48 m_lumiBlock = input.event.lumiBlock;
49 m_bcid = input.event.bcid;
50
51 m_truthPdgId = input.truth.pdgId;
52 m_truthBarcode = input.truth.barcode;
53 m_truthPt = input.truth.pt;
54 m_truthEta = input.truth.eta;
55 m_truthPhi = input.truth.phi;
56 m_truthCharge = input.truth.charge;
57 m_truthExtrapolatedStationMask = input.truth.extrapolatedStationMask;
58 m_truthM1Eta = input.truth.m1Eta;
59 m_truthM1Phi = input.truth.m1Phi;
60 m_truthM2Eta = input.truth.m2Eta;
61 m_truthM2Phi = input.truth.m2Phi;
62 m_truthM3Eta = input.truth.m3Eta;
63 m_truthM3Phi = input.truth.m3Phi;
64 m_truthMatched = input.truth.matched;
65 m_truthMatchedCandidateIndex = input.truth.matchedCandidateIndex;
66 m_truthMatchMeanDeltaR = input.truth.matchMeanDeltaR;
67 m_truthUnmatchedReason = input.truth.unmatchedReason;
68 m_truthWireSegmentMatched = input.truth.wireSegmentMatched;
69 m_truthStripSegmentMatched = input.truth.stripSegmentMatched;
70 m_truthMatchedWireSegmentIndex = input.truth.matchedWireSegmentIndex;
71 m_truthMatchedStripSegmentIndex = input.truth.matchedStripSegmentIndex;
72 m_truthWireSegmentMatchResidual = input.truth.wireSegmentMatchResidual;
73 m_truthStripSegmentMatchResidual = input.truth.stripSegmentMatchResidual;
74
75 m_segmentSubdetectorId = input.segments.subdetectorId;
76 m_segmentTriggerSector = input.segments.triggerSector;
77 m_segmentBcTag = input.segments.bcTag;
78 m_segmentProjection = input.segments.projection;
79 m_segmentStationMask = input.segments.stationMask;
80 m_segmentSummedQuality = input.segments.summedQuality;
81 m_segmentNStations = input.segments.nStations;
82 m_segmentEta = input.segments.eta;
83 m_segmentPhi = input.segments.phi;
84 m_segmentResidual = input.segments.residual;
85 m_segmentOutputResidual = input.segments.outputResidual;
86 m_segmentConsistency = input.segments.consistency;
87 m_segmentPivotChannel = input.segments.pivotChannel;
88 m_segmentTruthIndex = input.segments.truthIndex;
89 m_segmentTruthMatchResidual = input.segments.truthMatchResidual;
90
91 m_candidateSubdetectorId = input.candidates.subdetectorId;
92 m_candidateTriggerSector = input.candidates.triggerSector;
93 m_candidateReadoutSector = input.candidates.readoutSector;
94 m_candidateBcTag = input.candidates.bcTag;
95 m_candidateStationMask = input.candidates.stationMask;
96 m_candidateWireStationMask = input.candidates.wireStationMask;
97 m_candidateStripStationMask = input.candidates.stripStationMask;
98 m_candidateEta = input.candidates.eta;
99 m_candidatePhi = input.candidates.phi;
100 m_candidateDeltaTheta = input.candidates.deltaTheta;
101 m_candidateDeltaPhi = input.candidates.deltaPhi;
102 m_candidateTruthIndex = input.candidates.truthIndex;
103}
104
105} // namespace L0Muon
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
MuonVal::ScalarBranch< std::uint32_t > & m_bcid
virtual StatusCode initialize() override
MuonVal::ScalarBranch< std::uint32_t > & m_runNumber
MuonVal::ScalarBranch< std::uint32_t > & m_lumiBlock
Gaudi::Property< bool > m_failOnInvalidData
MuonVal::MuonTesterTree m_tree
MuonVal::ScalarBranch< std::uint64_t > & m_eventNumber
SG::ReadHandleKey< TgcL0ValidationEvent > m_inputKey
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
virtual StatusCode finalize() override
void copyToBranches(const TgcL0ValidationEvent &input)
TgcL0ValidationCheckResult checkTgcL0ValidationEvent(const TgcL0ValidationEvent &event)
Check vector sizes and reciprocal cross-block indices.
Result of a structural validation-data consistency check.
ROOT-independent validation data for one event.