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 
26  public:
27 
29 
32 
35 
38 
41 
44  unsigned etaIndex,
45  unsigned phiIndex,
46  unsigned pTIndex,
47  float etaValue,
48  float phiValue,
49  float pTValue);
50 
52  ~SimpleL1MuGMTCand() override;
53 
55  void reset();
56 
58  inline std::string name() const { return m_name; }
59 
61  inline unsigned int phi() const { return m_phi; }
62 
64  inline unsigned int eta() const { return m_eta; }
65 
67  inline unsigned int pt() const { return m_pt; }
68 
70  inline int charge() const { return m_charge; }
71 
73  inline unsigned int rank() const { return m_rank; }
74 
76  inline bool empty() const { return m_empty; }
77 
79  inline void enable() { m_empty = false; }
80 
82  inline void disable() { m_empty = true; }
83 
85  void setPhi(float phi);
86 
88  void setEta(float eta);
89 
91  void setPt(float pt);
92 
94  void setCharge(int charge);
95 
97  inline void setRank(unsigned int rank) { m_rank = rank; }
98 
100  float smearedPt() const { return m_smearedPt; }
101 
103  inline unsigned int linearizedPt(float lsbValue, unsigned maxScale) const { return 0; }
104 
106  inline unsigned int quality() const { return m_quality; }
107 
108  unsigned int etaRegionIndex() const { return eta(); }
109 
110  unsigned int phiRegionIndex() const { return phi(); }
111 
112  // set and get the 4-momentum of the original (generator) particle
113  void setMomentum(const LorentzVector& m) { myMomentum = m; }
114  const LorentzVector getMomentum() const { return myMomentum; }
115 
117  SimpleL1MuGMTCand& operator=(const SimpleL1MuGMTCand&);
118 
120  SimpleL1MuGMTCand* operator=(const SimTrack*);
121 
123  bool operator==(const SimpleL1MuGMTCand&) const;
124 
126  bool operator!=(const SimpleL1MuGMTCand&) const;
127 
129  void print() const;
130 
132  friend std::ostream& operator<<(std::ostream&, const SimpleL1MuGMTCand&);
133 
135  bool getRank( const SimpleL1MuGMTCand* first, const SimpleL1MuGMTCand* second ) const {
136  unsigned int rank_f = (first) ? first->rank(): 0;
137  unsigned int rank_s = (second) ? second->rank() : 0;
138  return rank_f > rank_s;
139  }
140 
141  static const float ptScale[32];
142  static const float etaScale[63];
143  static const float phiScale[144];
144 
145  private:
146 
148  bool m_empty;
149 
150  unsigned int m_phi;
151  unsigned int m_eta;
152  unsigned int m_pt;
153  int m_charge;
154  unsigned int m_quality;
155  unsigned int m_rank;
156  float m_smearedPt;
157 
158  LorentzVector myMomentum ;
159 
160 };
161 
162 #endif
void setRank(unsigned int rank)
set rank
unsigned int eta() const
get eta-code
unsigned int rank() const
get rank
unsigned int phiRegionIndex() const
void enable()
enable muon candidate
int charge() const
get charge
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
unsigned int m_quality
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
unsigned int pt() const
get pt-code
math::XYZTLorentzVector LorentzVector
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.
bool empty() const
is it an empty muon candidate?
float smearedPt() const
return the smeared L1 Pt value before discretization in 32-bit
std::string name() const
get name of object
void disable()
disable muon candidate
bool operator!=(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:76
unsigned int quality() const
get quality (not implemented for FAMOS)
const LorentzVector getMomentum() const
const std::vector< double > ptScale
Definition: Utilities.cc:35
unsigned int etaRegionIndex() const
void setMomentum(const LorentzVector &m)
unsigned int phi() const
get phi-code
LorentzVector myMomentum
void reset(double vett[256])
Definition: TPedValues.cc:11
bool getRank(const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
define a rank for muon candidates
unsigned int linearizedPt(float lsbValue, unsigned maxScale) const
nevermind this one