ATLAS Offline Software
MuonTOB.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef L1TopoEvent_MuonTOB
4 #define L1TopoEvent_MuonTOB
5 
6 #include <iostream>
7 #include <string>
8 
9 #include "L1TopoEvent/BaseTOB.h"
10 #include "L1TopoEvent/Heap.h"
11 
12 namespace TCS {
13 
14  class MuonTOB : public BaseTOB {
15  public:
16 
17  // default constructor
18  MuonTOB(uint32_t roiWord = 0, const std::string& tobName = "MuonTOB");
19 
20  // constructor with individual values
21  MuonTOB(unsigned int et, unsigned int isolation, int eta, unsigned int phi, uint32_t roiWord = 0, const std::string& tobName = "MuonTOB");
22 
23  // constructor with initial values
24  MuonTOB(const MuonTOB & muon);
25 
26  // destructor
27  virtual ~MuonTOB();
28 
29  // accessors
30  unsigned int nBitsEt() const { return m_nBitsEt; }
31  unsigned int nBitsIsolation() const { return m_nBitsIsolation; }
32  unsigned int nBitsEta() const { return m_nBitsEta; }
33  unsigned int nBitsPhi() const { return m_nBitsPhi; }
34 
35  unsigned int Et() const { return m_Et; } // Et threshold in units of 100 MeV
36  unsigned int isolation() const { return m_isolation; }
37  int eta() const { return m_eta; } // Int eta for L1Topo, granularity = 0.025
38  unsigned int phi() const { return m_phi; } // Int phi for L1Topo, granularity = 0.05
39 
40  int bw2or3() const { return m_bw2or3; }
41  int innerCoin() const { return m_innerCoin; }
42  int goodMF() const { return m_goodMF; }
43  int charge() const { return m_charge; }
44  int is2cand() const { return m_is2cand; }
45 
46  double EtDouble() const { return m_EtDouble; } // Et threshold in units of GeV
47  double EtaDouble() const { return m_etaDouble; } // Real muon eta
48  double PhiDouble() const { return m_phiDouble; } // Real muon phi
49 
50  inline bool isTGC() const {return m_isTGC;} // Additonal flag that identifies muons from TGC
51 
52  // setters
53  void setEt(unsigned int et) { m_Et = sizeCheck(et, nBitsEt()); }
54  void setIsolation(unsigned int iso) { m_isolation = sizeCheck(iso, nBitsIsolation()); }
55  void setEta(int eta) { m_eta = sizeCheck(eta, nBitsEta()); }
56  void setPhi(unsigned int phi) { m_phi = sizeCheck(phi, nBitsPhi()); }
57 
58  void setBW2or3(int bw2or3) { m_bw2or3 = bw2or3; }
60  void setGoodMF(int goodMF) { m_goodMF = goodMF; }
61  void setCharge(int charge) { m_charge = charge; }
63  void setIsTGC(int isTGC) { m_isTGC = isTGC; }
64 
65  void setEtDouble(double et) { m_EtDouble = et; }
66  void setEtaDouble(double eta) { m_etaDouble = eta; }
67  void setPhiDouble(double phi) { m_phiDouble = phi; }
68 
69  void setBitsEt(unsigned int nBitsEt) { m_nBitsEt = nBitsEt; }
71  void setBitsEta(unsigned int nBitsEta) { m_nBitsEta = nBitsEta; }
72  void setBitsPhi(unsigned int nBitsPhi) { m_nBitsPhi = nBitsPhi; }
73 
74  inputTOBType_t tobType() const { return MUON; }
75 
76  // memory management
77  static MuonTOB* createOnHeap(const MuonTOB& cl);
78  static void clearHeap();
79  static const Heap<TCS::MuonTOB>& heap() { return fg_heap; }
80 
81  virtual void print(std::ostream &o) const;
82 
83  private:
84  unsigned int m_nBitsEt{13};
85  unsigned int m_nBitsIsolation{5};
86  unsigned int m_nBitsEta{9};
87  unsigned int m_nBitsPhi{7};
88 
89  unsigned int m_Et{0};
90  unsigned int m_isolation{0};
91  int m_eta{0};
92  unsigned int m_phi{0};
93 
94  int m_bw2or3{0};
95  int m_innerCoin{0};
96  int m_goodMF{0};
97  int m_charge{0};
98  int m_is2cand{0};
99  int m_isTGC{0};
100 
101  double m_EtDouble{0};
102  double m_etaDouble{0};
103  double m_phiDouble{0};
104 
105  static thread_local Heap<TCS::MuonTOB> fg_heap;
106  };
107 }
108 
109 #endif
TCS::BaseTOB::tobName
const std::string & tobName() const
Definition: BaseTOB.h:23
TCS::MuonTOB::m_innerCoin
int m_innerCoin
Definition: MuonTOB.h:95
TCS::MuonTOB::m_bw2or3
int m_bw2or3
Definition: MuonTOB.h:94
TCS::MuonTOB::m_EtDouble
double m_EtDouble
Definition: MuonTOB.h:101
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
TCS::MuonTOB::is2cand
int is2cand() const
Definition: MuonTOB.h:44
et
Extra patterns decribing particle interation process.
TCS::MuonTOB::EtaDouble
double EtaDouble() const
Definition: MuonTOB.h:47
Heap.h
TCS::MuonTOB::PhiDouble
double PhiDouble() const
Definition: MuonTOB.h:48
TCS::MuonTOB::nBitsEt
unsigned int nBitsEt() const
Definition: MuonTOB.h:30
TCS::MuonTOB::setIsolation
void setIsolation(unsigned int iso)
Definition: MuonTOB.h:54
TCS::MuonTOB::heap
static const Heap< TCS::MuonTOB > & heap()
Definition: MuonTOB.h:79
TCS::MuonTOB
Definition: MuonTOB.h:14
TCS::MuonTOB::phi
unsigned int phi() const
Definition: MuonTOB.h:38
TCS::MuonTOB::setIsTGC
void setIsTGC(int isTGC)
Definition: MuonTOB.h:63
TCS::MuonTOB::fg_heap
static thread_local Heap< TCS::MuonTOB > fg_heap
Definition: MuonTOB.h:105
TCS::MuonTOB::EtDouble
double EtDouble() const
Definition: MuonTOB.h:46
TCS::MuonTOB::charge
int charge() const
Definition: MuonTOB.h:43
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TCS::MuonTOB::nBitsPhi
unsigned int nBitsPhi() const
Definition: MuonTOB.h:33
TCS::MuonTOB::tobType
inputTOBType_t tobType() const
Definition: MuonTOB.h:74
BaseTOB.h
TCS::MuonTOB::eta
int eta() const
Definition: MuonTOB.h:37
TCS::MuonTOB::m_eta
int m_eta
Definition: MuonTOB.h:91
TCS::MuonTOB::m_goodMF
int m_goodMF
Definition: MuonTOB.h:96
TCS::MuonTOB::setInnerCoin
void setInnerCoin(int innerCoin)
Definition: MuonTOB.h:59
TCS::BaseTOB::roiWord
uint32_t roiWord() const
Definition: BaseTOB.h:21
TCS::MuonTOB::Et
unsigned int Et() const
Definition: MuonTOB.h:35
TCS::MuonTOB::setEta
void setEta(int eta)
Definition: MuonTOB.h:55
TCS::MuonTOB::setIs2cand
void setIs2cand(int is2cand)
Definition: MuonTOB.h:62
TCS::Heap< TCS::MuonTOB >
TCS::MuonTOB::nBitsEta
unsigned int nBitsEta() const
Definition: MuonTOB.h:32
TCS::BaseTOB::sizeCheck
int sizeCheck(int value, unsigned int size) const
Definition: BaseTOB.cxx:32
TCS::MuonTOB::m_isTGC
int m_isTGC
Definition: MuonTOB.h:99
TCS::MuonTOB::isolation
unsigned int isolation() const
Definition: MuonTOB.h:36
TCS::MuonTOB::setEt
void setEt(unsigned int et)
Definition: MuonTOB.h:53
TCS::MuonTOB::m_Et
unsigned int m_Et
Definition: MuonTOB.h:89
TCS::MuonTOB::m_nBitsEt
unsigned int m_nBitsEt
Definition: MuonTOB.h:84
TCS::MuonTOB::clearHeap
static void clearHeap()
Definition: MuonTOB.cxx:33
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::MuonTOB::innerCoin
int innerCoin() const
Definition: MuonTOB.h:41
TCS::MuonTOB::nBitsIsolation
unsigned int nBitsIsolation() const
Definition: MuonTOB.h:31
TCS::MuonTOB::m_is2cand
int m_is2cand
Definition: MuonTOB.h:98
TCS::MuonTOB::setEtDouble
void setEtDouble(double et)
Definition: MuonTOB.h:65
TCS::MuonTOB::~MuonTOB
virtual ~MuonTOB()
TCS::MuonTOB::setGoodMF
void setGoodMF(int goodMF)
Definition: MuonTOB.h:60
TCS::MuonTOB::m_isolation
unsigned int m_isolation
Definition: MuonTOB.h:90
TCS::MuonTOB::setPhi
void setPhi(unsigned int phi)
Definition: MuonTOB.h:56
TCS::MuonTOB::isTGC
bool isTGC() const
Definition: MuonTOB.h:50
TCS::MuonTOB::setBW2or3
void setBW2or3(int bw2or3)
Definition: MuonTOB.h:58
TCS::MuonTOB::setEtaDouble
void setEtaDouble(double eta)
Definition: MuonTOB.h:66
TCS::MUON
@ MUON
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:17
TCS::MuonTOB::MuonTOB
MuonTOB(uint32_t roiWord=0, const std::string &tobName="MuonTOB")
Definition: MuonTOB.cxx:7
TCS::MuonTOB::goodMF
int goodMF() const
Definition: MuonTOB.h:42
TCS::MuonTOB::bw2or3
int bw2or3() const
Definition: MuonTOB.h:40
TCS::MuonTOB::setBitsIsolation
void setBitsIsolation(unsigned int nBitsIsolation)
Definition: MuonTOB.h:70
TCS::MuonTOB::setBitsEt
void setBitsEt(unsigned int nBitsEt)
Definition: MuonTOB.h:69
TCS::MuonTOB::createOnHeap
static MuonTOB * createOnHeap(const MuonTOB &cl)
Definition: MuonTOB.cxx:28
TCS::MuonTOB::setBitsPhi
void setBitsPhi(unsigned int nBitsPhi)
Definition: MuonTOB.h:72
TCS::inputTOBType_t
inputTOBType_t
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::MuonTOB::m_phiDouble
double m_phiDouble
Definition: MuonTOB.h:103
TCS::MuonTOB::setBitsEta
void setBitsEta(unsigned int nBitsEta)
Definition: MuonTOB.h:71
TCS::MuonTOB::m_nBitsIsolation
unsigned int m_nBitsIsolation
Definition: MuonTOB.h:85
TCS::MuonTOB::MuonTOB
MuonTOB(const MuonTOB &muon)
TCS::MuonTOB::m_nBitsPhi
unsigned int m_nBitsPhi
Definition: MuonTOB.h:87
TCS::MuonTOB::m_nBitsEta
unsigned int m_nBitsEta
Definition: MuonTOB.h:86
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::MuonTOB::print
virtual void print(std::ostream &o) const
Definition: MuonTOB.cxx:37
TCS::MuonTOB::m_charge
int m_charge
Definition: MuonTOB.h:97
TCS::MuonTOB::setCharge
void setCharge(int charge)
Definition: MuonTOB.h:61
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TCS::MuonTOB::m_phi
unsigned int m_phi
Definition: MuonTOB.h:92
TCS::MuonTOB::setPhiDouble
void setPhiDouble(double phi)
Definition: MuonTOB.h:67
TCS::MuonTOB::m_etaDouble
double m_etaDouble
Definition: MuonTOB.h:102