ATLAS Offline Software
Loading...
Searching...
No Matches
SectorLogicCandData_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// System include(s):
6#include <sstream>
7
8// xAOD include(s):
10
11// Local include(s):
13
14// Trigger include(s):
16
17namespace xAOD {
18
19
20
21 // Default constructor just creates empty AuxElement
25
26 // Intitialise using input bits from RPC & TGC SL
27 void SectorLogicCandData_v1::initialize(const std::vector<uint32_t>& data, int offset, uint16_t bID, uint16_t fID) {
28
29 // Check input format
30 if (data.size() != 2) {
31 setCandWord(0);
33 } else {
34 setCandWord(data[0]);
36 }
37 setBoardID(bID); // Set the board ID to provide information of where the candidate originates (i.e. what SL board)
38 setFiberID(fID); // Set the fiber ID to provide information of what link the candidate arrives on
39 setVeto(0); // Always initialise candidate with no veto -> veto comes from overlap handling
40 setBCIDOffset(offset); // Set the BCID offset, i.e. which timeslice it is associated to
41
42 }
43
44 // Save the information of the object to a string. Useful for debugging.
45 // Dump function with padded hex for all fields
46 const std::string SectorLogicCandData_v1::dump() const {
47 std::ostringstream s;
48 s << "\n*BEGIN* xAOD::SectorLogicCandData" << std::endl;
49 s << " Trigger Candidate ID: " << TCID() << std::endl;
50 s << " Veto: " << veto() << std::endl;
51 s << " Board ID: " << boardID() << std::endl;
52 s << " Fiber ID: " << fiberID() << std::endl;
53 s << " BCID offset: " << BCIDOffset() << std::endl;
54 s << " Position in phi: " << phi() << std::endl;
55 s << " Position in eta: " << eta() << std::endl;
56 s << " pT value: " << pT() << std::endl;
57 s << " pT threshold: " << ptThresh() << std::endl;
58 s << " Charge: " << (charge() ? "Positive" : "Negative") << std::endl;
59 s << " MDT processing flag [0:15]: " << mdtFlag() << std::endl;
60 s << " Processed by MDT or RPC/TGC: " << (isMDT() ? "RPC/TGC" : "MDT") << std::endl;
61 s << " MDT segment quality: " << mdtSegQual() << std::endl;
62 s << " Number of associated MDT segments: " << numMDTSeg() << std::endl;
63 s << " Exotic trigger: " << exotTrig() << std::endl;
64 s << " Presence of TILE Coincidence: " << (tileCoin() ? "Yes" : "No") << std::endl;
65 s << " RPC/TGC coincidence type: " << coinType() << std::endl;
66 s << "*END* xAOD::SectorLogicCandData" << std::endl;
67 return s.str();
68 }
69
70 // Get/set candidate word information
72
73 // Get/set the extra candidate word information
75
76 // Get/set the BoardID
78
79 // Get/set the FiberID
81
82 // Get/set the BCID offset
84
85 // Get/set the veto flag from overlap handling
87
88 // Get the pT value from word
92
93 // Get the Charge from word
97
98 // Get bits for phi position from word
102
103 // Get float phi value from phi bits
105 return (static_cast<float>(rawPhi()) / PHI_MAX_RAW) * PHI_MAX;
106 }
107
108 // Get bits for eta position from word
112
113 // Get float eta value from eta bits
115 return ETA_MIN + (static_cast<float>(rawEta()) / ETA_MAX_RAW) * (ETA_MAX - ETA_MIN);
116 }
117
118 // Get the pT threshold from word
122
123 // Get the TCID from word
127
128 // Get the isMDT flag from word
132
133 // Get the coincidence type flag from word
137
138 // Get the tile coincidence presence flag from word
142
143 // Get the exotic trigger flag from word
147
148 // Get the MDT flag from word
152
153 // Get the MDT segment number from word
157
158 // Get the MDT segment quality from word
162
163} // namespace xAOD
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
uint32_t charge() const
Retrieve the charge.
uint16_t fiberID() const
Retrieve the fiber ID.
void setBCIDOffset(int offset)
Set the bunch crossing identifier offset.
void initialize(const std::vector< uint32_t > &data, int offset, uint16_t bID, uint16_t fID)
Initialise the object given some input data.
unsigned short veto() const
Retrieve the veto flag.
uint32_t exotTrig() const
Retrieve the exotic trigger.
uint32_t ptThresh() const
Retrieve the Trigger candidate ID.
void setCandExtraWord(uint32_t word)
Set the candidate extra word (second 32-bits).
uint32_t mdtSegQual() const
Retrieve the MDT segment quality flag.
uint32_t coinType() const
Retrieve the RPC/TGC coincidence type.
uint32_t candWord() const
Retrieve the candidate word (first 32-bits).
float phi() const
Retrieve the position in phi.
float eta() const
Retrieve the position in eta.
uint32_t pT() const
Retrieve the pT value.
void setCandWord(uint32_t word)
Set the candidate word (first 32-bits).
int BCIDOffset() const
Retrieve the bunch crossing identifier offset.
void setFiberID(uint16_t id)
Set the fiber ID.
SectorLogicCandData_v1()
Default constructor.
uint16_t boardID() const
Retrieve the board ID.
void setBoardID(uint16_t id)
Set the board ID.
uint32_t isMDT() const
Retrieve whether the candidate was processed by MDTTP.
uint32_t TCID() const
Retrieve the Trigger candidate ID.
uint32_t rawPhi() const
Retrieve the bits for the position in phi.
const std::string dump() const
Get the information stored in the SectorLogicCandData_v1 object.
uint32_t candExtraWord() const
Retrieve the candidate extra word (second 32-bits).
uint32_t numMDTSeg() const
Retrieve the number of MDT segments.
uint32_t rawEta() const
Retrieve the bits for the position in eta.
void setVeto(unsigned short veto)
Set the veto flag.
uint32_t tileCoin() const
Retrieve the TILE coincidence presence.
uint32_t mdtFlag() const
Retrieve the MDT flag.
std::vector< std::string > veto
these patterns are anded
Definition listroot.cxx:191
static constexpr uint32_t RUN4_SL2MUCTPI_PTTHRESHOLD_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_COINTYPE_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_CHARGE_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_ETA_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_MDTFLAG_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_MDT_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_ET_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_ETA_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_TC_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_PT_VAL_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_SEGNUM_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_CHARGE_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_MDTFLAG_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_TCID_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_MDT_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_SEGQUAL_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_TC_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_PTTHRESHOLD_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_SEGNUM_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_ET_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_COINTYPE_SHIFT
static constexpr uint32_t RUN4_SL2MUCTPI_PT_VAL_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_PHI_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_TCID_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_SEGQUAL_MASK
static constexpr uint32_t RUN4_SL2MUCTPI_PHI_SHIFT
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setWord1 uint16_t
setEventNumber uint32_t