CMS 3D CMS Logo

SimpleL1MuGMTCand.h
Go to the documentation of this file.
1 #ifndef SIMPLEL1MU_GMT_CAND_H
2 #define SIMPLEL1MU_GMT_CAND_H
3 
5 
7 
8 class SimTrack;
9 
10 namespace HepMC {
11  class GenParticle;
12 }
13 
25 public:
27 
30 
33 
36 
39 
42  unsigned etaIndex,
43  unsigned phiIndex,
44  unsigned pTIndex,
45  float etaValue,
46  float phiValue,
47  float pTValue);
48 
50  ~SimpleL1MuGMTCand() override;
51 
53  void reset();
54 
56  inline std::string name() const { return m_name; }
57 
59  inline unsigned int phi() const { return m_phi; }
60 
62  inline unsigned int eta() const { return m_eta; }
63 
65  inline unsigned int pt() const { return m_pt; }
66 
68  inline int charge() const { return m_charge; }
69 
71  inline unsigned int rank() const { return m_rank; }
72 
74  inline bool empty() const { return m_empty; }
75 
77  inline void enable() { m_empty = false; }
78 
80  inline void disable() { m_empty = true; }
81 
83  void setPhi(float phi);
84 
86  void setEta(float eta);
87 
89  void setPt(float pt);
90 
92  void setCharge(int charge);
93 
95  inline void setRank(unsigned int rank) { m_rank = rank; }
96 
98  float smearedPt() const { return m_smearedPt; }
99 
101  inline unsigned int linearizedPt(float lsbValue, unsigned maxScale) const { return 0; }
102 
104  inline unsigned int quality() const { return m_quality; }
105 
106  unsigned int etaRegionIndex() const { return eta(); }
107 
108  unsigned int phiRegionIndex() const { return phi(); }
109 
110  // set and get the 4-momentum of the original (generator) particle
111  void setMomentum(const LorentzVector& m) { myMomentum = m; }
112  const LorentzVector getMomentum() const { return myMomentum; }
113 
116 
119 
121  bool operator==(const SimpleL1MuGMTCand&) const;
122 
124  bool operator!=(const SimpleL1MuGMTCand&) const;
125 
127  void print() const;
128 
130  friend std::ostream& operator<<(std::ostream&, const SimpleL1MuGMTCand&);
131 
134  unsigned int rank_f = (first) ? first->rank() : 0;
135  unsigned int rank_s = (second) ? second->rank() : 0;
136  return rank_f > rank_s;
137  }
138 
139  static const float ptScale[32];
140  static const float etaScale[63];
141  static const float phiScale[144];
142 
143 private:
145  bool m_empty;
146 
147  unsigned int m_phi;
148  unsigned int m_eta;
149  unsigned int m_pt;
150  int m_charge;
151  unsigned int m_quality;
152  unsigned int m_rank;
153  float m_smearedPt;
154 
156 };
157 
158 #endif
L1MuGMTCand::etaIndex
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:105
SimpleL1MuGMTCand::getRank
bool getRank(const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
define a rank for muon candidates
Definition: SimpleL1MuGMTCand.h:133
L1MuGMTExtendedCand
Definition: L1MuGMTExtendedCand.h:46
SimpleL1MuGMTCand::print
void print() const
print parameters of muon candidate
Definition: SimpleL1MuGMTCand.cc:289
fftjetcommon_cfi.maxScale
maxScale
Definition: fftjetcommon_cfi.py:110
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SimpleL1MuGMTCand::setRank
void setRank(unsigned int rank)
set rank
Definition: SimpleL1MuGMTCand.h:95
SimpleL1MuGMTCand::m_eta
unsigned int m_eta
Definition: SimpleL1MuGMTCand.h:148
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SimpleL1MuGMTCand::operator=
SimpleL1MuGMTCand & operator=(const SimpleL1MuGMTCand &)
assignment operator
Definition: SimpleL1MuGMTCand.cc:217
SimpleL1MuGMTCand::enable
void enable()
enable muon candidate
Definition: SimpleL1MuGMTCand.h:77
GenParticle
Definition: GenParticle.py:1
SimpleL1MuGMTCand::etaScale
static const float etaScale[63]
Definition: SimpleL1MuGMTCand.h:140
SimpleL1MuGMTCand::setCharge
void setCharge(int charge)
set charge and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:199
SimpleL1MuGMTCand::charge
int charge() const
get charge
Definition: SimpleL1MuGMTCand.h:68
SimpleL1MuGMTCand::eta
unsigned int eta() const
get eta-code
Definition: SimpleL1MuGMTCand.h:62
SimpleL1MuGMTCand::operator==
bool operator==(const SimpleL1MuGMTCand &) const
equal operator
Definition: SimpleL1MuGMTCand.cc:247
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
SimpleL1MuGMTCand::LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: SimpleL1MuGMTCand.h:26
SimpleL1MuGMTCand::name
std::string name() const
get name of object
Definition: SimpleL1MuGMTCand.h:56
SimpleL1MuGMTCand::phiRegionIndex
unsigned int phiRegionIndex() const
Definition: SimpleL1MuGMTCand.h:108
SimpleL1MuGMTCand::reset
void reset()
reset muon candidate
Definition: SimpleL1MuGMTCand.cc:120
SimpleL1MuGMTCand::etaRegionIndex
unsigned int etaRegionIndex() const
Definition: SimpleL1MuGMTCand.h:106
SimpleL1MuGMTCand::m_quality
unsigned int m_quality
Definition: SimpleL1MuGMTCand.h:151
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
L1MuGMTCand::etaValue
float etaValue() const
Definition: L1MuGMTCand.cc:102
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SimpleL1MuGMTCand::~SimpleL1MuGMTCand
~SimpleL1MuGMTCand() override
destructor
Definition: SimpleL1MuGMTCand.cc:117
SimpleL1MuGMTCand::operator!=
bool operator!=(const SimpleL1MuGMTCand &) const
unequal operator
Definition: SimpleL1MuGMTCand.cc:268
SimpleL1MuGMTCand::m_rank
unsigned int m_rank
Definition: SimpleL1MuGMTCand.h:152
SimpleL1MuGMTCand::rank
unsigned int rank() const
get rank
Definition: SimpleL1MuGMTCand.h:71
SimpleL1MuGMTCand::disable
void disable()
disable muon candidate
Definition: SimpleL1MuGMTCand.h:80
SimpleL1MuGMTCand::setEta
void setEta(float eta)
set eta-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:157
SimpleL1MuGMTCand::m_charge
int m_charge
Definition: SimpleL1MuGMTCand.h:150
LorentzVector.h
SimpleL1MuGMTCand::operator<<
friend std::ostream & operator<<(std::ostream &, const SimpleL1MuGMTCand &)
output stream operator
Definition: SimpleL1MuGMTCand.cc:306
SimpleL1MuGMTCand::getMomentum
const LorentzVector getMomentum() const
Definition: SimpleL1MuGMTCand.h:112
SimpleL1MuGMTCand::m_empty
bool m_empty
Definition: SimpleL1MuGMTCand.h:145
SimpleL1MuGMTCand::ptScale
static const float ptScale[32]
Definition: SimpleL1MuGMTCand.h:139
SimpleL1MuGMTCand::setPt
void setPt(float pt)
set pt-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:177
SimpleL1MuGMTCand::phi
unsigned int phi() const
get phi-code
Definition: SimpleL1MuGMTCand.h:59
L1MuGMTCand::phiIndex
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:70
SimpleL1MuGMTCand::m_phi
unsigned int m_phi
Definition: SimpleL1MuGMTCand.h:147
SimpleL1MuGMTCand::pt
unsigned int pt() const
get pt-code
Definition: SimpleL1MuGMTCand.h:65
SimpleL1MuGMTCand::empty
bool empty() const
is it an empty muon candidate?
Definition: SimpleL1MuGMTCand.h:74
SimpleL1MuGMTCand::setPhi
void setPhi(float phi)
set phi-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:134
SimpleL1MuGMTCand
Definition: SimpleL1MuGMTCand.h:24
SimpleL1MuGMTCand::m_name
std::string m_name
Definition: SimpleL1MuGMTCand.h:144
L1MuGMTCand::phiValue
float phiValue() const
Definition: L1MuGMTCand.cc:92
SimTrack
Definition: SimTrack.h:9
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
HepMC
Definition: GenParticle.h:15
SimpleL1MuGMTCand::m_smearedPt
float m_smearedPt
Definition: SimpleL1MuGMTCand.h:153
SimpleL1MuGMTCand::quality
unsigned int quality() const
get quality (not implemented for FAMOS)
Definition: SimpleL1MuGMTCand.h:104
SimpleL1MuGMTCand::linearizedPt
unsigned int linearizedPt(float lsbValue, unsigned maxScale) const
nevermind this one
Definition: SimpleL1MuGMTCand.h:101
SimpleL1MuGMTCand::SimpleL1MuGMTCand
SimpleL1MuGMTCand()
constructor
Definition: SimpleL1MuGMTCand.cc:14
SimpleL1MuGMTCand::smearedPt
float smearedPt() const
return the smeared L1 Pt value before discretization in 32-bit
Definition: SimpleL1MuGMTCand.h:98
SimpleL1MuGMTCand::setMomentum
void setMomentum(const LorentzVector &m)
Definition: SimpleL1MuGMTCand.h:111
L1MuGMTExtendedCand.h
SimpleL1MuGMTCand::myMomentum
LorentzVector myMomentum
Definition: SimpleL1MuGMTCand.h:155
SimpleL1MuGMTCand::m_pt
unsigned int m_pt
Definition: SimpleL1MuGMTCand.h:149
SimpleL1MuGMTCand::phiScale
static const float phiScale[144]
Definition: SimpleL1MuGMTCand.h:141