ATLAS Offline Software
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):
11 extern "C" {
12 # include <stdint.h>
13 }
14 #include <string>
15 
16 // EDM include(s):
18 
19 namespace xAOD {
20 
29  class MuonRoI_v1 : public SG::AuxElement {
30 
31  public:
33  enum RoISource {
36  Forward
37  };
39  enum Hemisphere {
41  Negative
42  };
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 
72  uint32_t roiWord() const;
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;
108  Hemisphere getHemisphere() 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 
151  private:
152  static constexpr uint32_t ETA_SHIFT = 0;
153  static constexpr uint32_t PHI_SHIFT = 14;
154  static constexpr uint32_t CHARGE_SHIFT = 23;
155  static constexpr uint32_t PT_SHIFT = 24;
156 
157  static constexpr float PT_WIDTH = 0.5;
158 
159  }; // class MuonRoI_v1
160 
161 } // namespace xAOD
162 
163 // Declare the inheritance of the class:
164 #include "xAODCore/BaseInfo.h"
166 
167 #endif // XAODTRIGGER_VERSIONS_MUONROI_V1_H
xAOD::MuonRoI_v1::isRun4
bool isRun4() const
flag whether it is Run4+ RoI definition
Definition: MuonRoI_v1.cxx:349
xAOD::MuonRoI_v1::PT_WIDTH
static constexpr float PT_WIDTH
Definition: MuonRoI_v1.h:157
xAOD::MuonRoI_v1::initialize
void initialize(uint32_t roiword, float eta, float phi, const std::string &thrname, float thrvalue, uint32_t extraword=0u)
Initialise the object with all its properties.
Definition: MuonRoI_v1.cxx:31
xAOD::MuonRoI_v1::ETA_MASK
static constexpr uint32_t ETA_MASK
constants to decode RoI word for Run 4+
Definition: MuonRoI_v1.h:147
xAOD::MuonRoI_v1::getSectorAddress
int getSectorAddress() const
Get the full sector address.
Definition: MuonRoI_v1.cxx:122
xAOD::MuonRoI_v1::getPhiOverlap
bool getPhiOverlap() const
Returns whether there's overlap between barrel sectors.
Definition: MuonRoI_v1.cxx:234
xAOD::MuonRoI_v1::Endcap
@ Endcap
The muon candidate was detected in the endcap region.
Definition: MuonRoI_v1.h:35
xAOD::MuonRoI_v1::getInnerCoincidence
bool getInnerCoincidence() const
Returns whether or not there was an inner coincidence in the TGC.
Definition: MuonRoI_v1.cxx:299
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::MuonRoI_v1::Neg
@ Neg
Candidate is a mu- from a TGC sector.
Definition: MuonRoI_v1.h:45
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
xAOD::MuonRoI_v1::PHI_SHIFT
static constexpr uint32_t PHI_SHIFT
Definition: MuonRoI_v1.h:153
xAOD::MuonRoI_v1::getCharge
Charge getCharge() const
Returns the charge sign of the muon candidate.
Definition: MuonRoI_v1.cxx:264
BaseInfo.h
xAOD::MuonRoI_v1::eta
float eta() const
The pseudorapidity ( ) of the muon candidate.
xAOD::MuonRoI_v1::thrValue
float thrValue() const
The highest threshold value (in MeV) passed by the muon candidate.
athena.value
value
Definition: athena.py:124
xAOD::MuonRoI_v1::MuonRoI_v1
MuonRoI_v1()
Default constructor.
Definition: MuonRoI_v1.cxx:17
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::MuonRoI_v1::getHemisphere
Hemisphere getHemisphere() const
Returns the hemisphere that detected the muon candidate.
Definition: MuonRoI_v1.cxx:220
xAOD::MuonRoI_v1::setPhi
void setPhi(float v)
Set the azimuthal angle of the muon candidate.
xAOD::MuonRoI_v1::setRoIWord
void setRoIWord(uint32_t value)
Set the "raw" RoI word, describing the muon candidate.
SG_BASE
SG_BASE(xAOD::MuonRoI_v1, SG::AuxElement)
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
xAOD::MuonRoI_v1::thrName
const std::string & thrName() const
The name of the highest threshold value passed by the muon candidate.
xAOD::MuonRoI_v1::PT_MASK
static constexpr uint32_t PT_MASK
Definition: MuonRoI_v1.h:149
xAOD::MuonRoI_v1::isRun3
bool isRun3() const
Returns extra flag at end of RoI word indicating that it's in Run3 format.
Definition: MuonRoI_v1.cxx:328
xAOD::MuonRoI_v1::isMoreCandInRoI
bool isMoreCandInRoI() const
Returns if there were other muons detected in the same RoI.
Definition: MuonRoI_v1.cxx:174
xAOD::MuonRoI_v1::isVetoed
bool isVetoed() const
Returns the veto flag for the candidate.
Definition: MuonRoI_v1.cxx:319
xAOD::MuonRoI_v1::PT_SHIFT
static constexpr uint32_t PT_SHIFT
Definition: MuonRoI_v1.h:155
xAOD::MuonRoI_v1::setThrName
void setThrName(const std::string &value)
Set the name of the threshold passed by the muon candidate.
xAOD::MuonRoI_v1
Class describing a LVL1 muon region of interest.
Definition: MuonRoI_v1.h:29
xAOD::MuonRoI_v1::PHI_MASK
static constexpr uint32_t PHI_MASK
Definition: MuonRoI_v1.h:148
xAOD::MuonRoI_v1::getSource
RoISource getSource() const
Returns the system that detected the muon candidate.
Definition: MuonRoI_v1.cxx:202
xAOD::MuonRoI_v1::setThrValue
void setThrValue(float v)
Set the threshold value passed by the muon candidate.
xAOD::MuonRoI_v1::Undef
@ Undef
This is an RPC candidate.
Definition: MuonRoI_v1.h:47
xAOD::MuonRoI_v1::getRoI
int getRoI() const
Get the "RoI number" (position inside the sector)
Definition: MuonRoI_v1.cxx:89
xAOD::MuonRoI_v1::setRoIExtraWord
void setRoIExtraWord(uint32_t value)
Set the second "raw" RoI word, describing extra information of the muon candidate.
xAOD::MuonRoI_v1::Charge
Charge
Charge sign.
Definition: MuonRoI_v1.h:44
xAOD::MuonRoI_v1::Barrel
@ Barrel
The muon candidate was detected in the barrel region.
Definition: MuonRoI_v1.h:34
xAOD::MuonRoI_v1::Negative
@ Negative
The candidate came from the -z side (side C)
Definition: MuonRoI_v1.h:41
xAOD::MuonRoI_v1::pt
float pt() const
the transverse momentum of the muon candidate
Definition: MuonRoI_v1.cxx:342
xAOD::MuonRoI_v1::RoISource
RoISource
RoI source enumeration.
Definition: MuonRoI_v1.h:33
xAOD::MuonRoI_v1::isMoreCandInSector
bool isMoreCandInSector() const
Returns if there were other muons detected in the same sector.
Definition: MuonRoI_v1.cxx:190
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::MuonRoI_v1::isFirstCandidate
bool isFirstCandidate() const
Returns if the candidate had the highest pT in the sector.
Definition: MuonRoI_v1.cxx:163
xAOD::MuonRoI_v1::ETA_SHIFT
static constexpr uint32_t ETA_SHIFT
Definition: MuonRoI_v1.h:152
xAOD::MuonRoI_v1::Hemisphere
Hemisphere
RoI hemisphere enumeration.
Definition: MuonRoI_v1.h:39
xAOD::MuonRoI_v1::Forward
@ Forward
The muon candidate was detected in the forward region.
Definition: MuonRoI_v1.h:36
xAOD::MuonRoI_v1::getBW3Coincidence
bool getBW3Coincidence() const
Returns whether or not there was a 3-station coincidence in the TGC.
Definition: MuonRoI_v1.cxx:289
xAOD::MuonRoI_v1::roiExtraWord
uint32_t roiExtraWord() const
The second "raw" RoI word describing extra information of the muon candidate.
xAOD::MuonRoI_v1::getSectorID
int getSectorID() const
Get the sector ID number.
Definition: MuonRoI_v1.cxx:133
xAOD::MuonRoI_v1::getThrNumber
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
Definition: MuonRoI_v1.cxx:76
xAOD::MuonRoI_v1::CHARGE_SHIFT
static constexpr uint32_t CHARGE_SHIFT
Definition: MuonRoI_v1.h:154
xAOD::MuonRoI_v1::setEta
void setEta(float v)
Set the pseudorapidity of the muon candidate.
xAOD::MuonRoI_v1::Pos
@ Pos
Candidate is a mu+ from a TGC sector.
Definition: MuonRoI_v1.h:46
xAOD::MuonRoI_v1::Positive
@ Positive
The candidate came from the +z side (side A)
Definition: MuonRoI_v1.h:40
xAOD::MuonRoI_v1::roiWord
uint32_t roiWord() const
The "raw" RoI word describing the muon candidate.
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::MuonRoI_v1::getEtaOverlap
bool getEtaOverlap() const
Returns whether there's overlap between the barrel-EC sectors.
Definition: MuonRoI_v1.cxx:249
xAOD::MuonRoI_v1::getGoodMF
bool getGoodMF() const
Returns whether or not there was a good magnetic field quality in the TGC.
Definition: MuonRoI_v1.cxx:309
xAOD::MuonRoI_v1::phi
float phi() const
The azimuthal angle ( ) of the muon candidate.