ATLAS Offline Software
Loading...
Searching...
No Matches
MuonRoI_v1.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef XAODTRIGGER_VERSIONS_MUONROI_V1_H
8#define XAODTRIGGER_VERSIONS_MUONROI_V1_H
9
10// System include(s):
11extern "C" {
12# include <stdint.h>
13}
14#include <string>
15
16// EDM include(s):
18
19namespace xAOD {
20
29 class MuonRoI_v1 : public SG::AuxElement {
30
31 public:
38
43
44 enum Charge {
45 Neg = 0,
46 Pos = 1,
47 Undef = 100
48 };
49
51 MuonRoI_v1();
52
54 void initialize( uint32_t roiword, float eta, float phi,
55 const std::string& thrname, float thrvalue,
56 uint32_t extraword = 0u );
57
60
62 float eta() const;
64 void setEta( float v );
65
67 float phi() const;
69 void setPhi( float v );
70
74 void setRoIWord( uint32_t value );
75
77 float thrValue() const;
79 void setThrValue( float v );
80
82 const std::string& thrName() const;
84 void setThrName( const std::string& value );
85
87
90
92 int getThrNumber() const;
94 int getRoI() const;
96 int getSectorAddress() const;
98 int getSectorID() const;
100 bool isFirstCandidate() const;
102 bool isMoreCandInRoI() const;
104 bool isMoreCandInSector() const;
106 RoISource getSource() const;
110 bool getPhiOverlap() const;
112 bool getEtaOverlap() const;
114 Charge getCharge() const;
116 bool getBW3Coincidence() const;
118 bool getInnerCoincidence() const;
120 bool getGoodMF() const;
122 bool isVetoed() const;
124 bool isRun3() const;
125
127
130
135
137 float pt() const;
138
140 bool isRun4() const;
141
143
144
145 public:
147 static constexpr uint32_t ETA_MASK = 0x3fff;
148 static constexpr uint32_t PHI_MASK = 0x1ff;
149 static constexpr uint32_t PT_MASK = 0xff;
150 static constexpr uint32_t THR_MASK = 0xf;
151
152 private:
153 static constexpr uint32_t ETA_SHIFT = 0;
154 static constexpr uint32_t PHI_SHIFT = 14;
155 static constexpr uint32_t CHARGE_SHIFT = 23;
156 static constexpr uint32_t PT_SHIFT = 24;
157
158 static constexpr uint32_t THR_SHIFT = 0;
159
160 static constexpr float PT_WIDTH = 0.5;
161
162 }; // class MuonRoI_v1
163
164} // namespace xAOD
165
166// Declare the inheritance of the class:
167#include "xAODCore/BaseInfo.h"
169
170#endif // XAODTRIGGER_VERSIONS_MUONROI_V1_H
Scalar eta() const
pseudorapidity method
Base class for elements of a container that can have aux data.
#define SG_BASE(D, B)
Declare that class D derives from class B.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
Class describing a LVL1 muon region of interest.
Definition MuonRoI_v1.h:29
float eta() const
The pseudorapidity ( ) of the muon candidate.
float pt() const
the transverse momentum of the muon candidate
void setRoIExtraWord(uint32_t value)
Set the second "raw" RoI word, describing extra information of the muon candidate.
uint32_t roiExtraWord() const
The second "raw" RoI word describing extra information of the muon candidate.
static constexpr uint32_t PT_SHIFT
Definition MuonRoI_v1.h:156
int getSectorAddress() const
Get the full sector address.
bool getInnerCoincidence() const
Returns whether or not there was an inner coincidence in the TGC.
static constexpr uint32_t ETA_MASK
constants to decode RoI word for Run 4+
Definition MuonRoI_v1.h:147
static constexpr uint32_t CHARGE_SHIFT
Definition MuonRoI_v1.h:155
static constexpr uint32_t THR_SHIFT
Definition MuonRoI_v1.h:158
bool getBW3Coincidence() const
Returns whether or not there was a 3-station coincidence in the TGC.
bool isVetoed() const
Returns the veto flag for the candidate.
Hemisphere getHemisphere() const
Returns the hemisphere that detected the muon candidate.
static constexpr uint32_t ETA_SHIFT
Definition MuonRoI_v1.h:153
void setEta(float v)
Set the pseudorapidity of the muon candidate.
static constexpr uint32_t PT_MASK
Definition MuonRoI_v1.h:149
RoISource getSource() const
Returns the system that detected the muon candidate.
float thrValue() const
The highest threshold value (in MeV) passed by the muon candidate.
uint32_t roiWord() const
The "raw" RoI word describing the muon candidate.
bool getEtaOverlap() const
Returns whether there's overlap between the barrel-EC sectors.
void setRoIWord(uint32_t value)
Set the "raw" RoI word, describing the muon candidate.
bool getPhiOverlap() const
Returns whether there's overlap between barrel sectors.
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
bool isMoreCandInRoI() const
Returns if there were other muons detected in the same RoI.
static constexpr uint32_t THR_MASK
Definition MuonRoI_v1.h:150
float phi() const
The azimuthal angle ( ) of the muon candidate.
RoISource
RoI source enumeration.
Definition MuonRoI_v1.h:33
@ Endcap
The muon candidate was detected in the endcap region.
Definition MuonRoI_v1.h:35
@ Forward
The muon candidate was detected in the forward region.
Definition MuonRoI_v1.h:36
@ Barrel
The muon candidate was detected in the barrel region.
Definition MuonRoI_v1.h:34
static constexpr uint32_t PHI_MASK
Definition MuonRoI_v1.h:148
Charge getCharge() const
Returns the charge sign of the muon candidate.
const std::string & thrName() const
The name of the highest threshold value passed by the muon candidate.
int getSectorID() const
Get the sector ID number.
MuonRoI_v1()
Default constructor.
Hemisphere
RoI hemisphere enumeration.
Definition MuonRoI_v1.h:39
@ Positive
The candidate came from the +z side (side A)
Definition MuonRoI_v1.h:40
@ Negative
The candidate came from the -z side (side C)
Definition MuonRoI_v1.h:41
Charge
Charge sign.
Definition MuonRoI_v1.h:44
@ Neg
Candidate is a mu- from a TGC sector.
Definition MuonRoI_v1.h:45
@ Pos
Candidate is a mu+ from a TGC sector.
Definition MuonRoI_v1.h:46
@ Undef
This is an RPC candidate.
Definition MuonRoI_v1.h:47
void setThrValue(float v)
Set the threshold value passed by the muon candidate.
bool isRun3() const
Returns extra flag at end of RoI word indicating that it's in Run3 format.
static constexpr uint32_t PHI_SHIFT
Definition MuonRoI_v1.h:154
static constexpr float PT_WIDTH
Definition MuonRoI_v1.h:160
void setPhi(float v)
Set the azimuthal angle of the muon candidate.
int getRoI() const
Get the "RoI number" (position inside the sector)
bool getGoodMF() const
Returns whether or not there was a good magnetic field quality in the TGC.
bool isFirstCandidate() const
Returns if the candidate had the highest pT in the sector.
void setThrName(const std::string &value)
Set the name of the threshold passed by the muon candidate.
bool isMoreCandInSector() const
Returns if there were other muons detected in the same sector.
bool isRun4() const
flag whether it is Run4+ RoI definition
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setEventNumber uint32_t
void initialize()