CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~SimpleL1MuGMTCand();
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 
118 
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  class Rank : std::binary_function< const SimpleL1MuGMTCand*, const SimpleL1MuGMTCand*, bool> {
136  public :
138  unsigned int rank_f = (first) ? first->rank(): 0;
139  unsigned int rank_s = (second) ? second->rank() : 0;
140  return rank_f > rank_s;
141  }
142  };
143 
144  static const float ptScale[32];
145  static const float etaScale[63];
146  static const float phiScale[144];
147 
148  private:
149 
151  bool m_empty;
152 
153  unsigned int m_phi;
154  unsigned int m_eta;
155  unsigned int m_pt;
156  int m_charge;
157  unsigned int m_quality;
158  unsigned int m_rank;
159  float m_smearedPt;
160 
162 
163 };
164 
165 #endif
float etaValue() const
Definition: L1MuGMTCand.cc:114
void setRank(unsigned int rank)
set rank
float phiValue() const
Definition: L1MuGMTCand.cc:100
unsigned int eta() const
get eta-code
virtual ~SimpleL1MuGMTCand()
destructor
unsigned int rank() const
get rank
unsigned int phiRegionIndex() const
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:73
void enable()
enable muon candidate
int charge() const
get charge
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:108
SimpleL1MuGMTCand & operator=(const SimpleL1MuGMTCand &)
assignment operator
unsigned int m_quality
void print() const
print parameters of muon candidate
U second(std::pair< T, U > const &p)
bool operator!=(const SimpleL1MuGMTCand &) const
unequal operator
bool operator==(const SimpleL1MuGMTCand &) const
equal operator
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
unsigned int pt() const
get pt-code
static const float etaScale[63]
math::XYZTLorentzVector LorentzVector
static const float ptScale[32]
void reset()
reset muon candidate
define a rank for muon candidates
void setCharge(int charge)
set charge and packed code of muon candidate
bool empty() const
is it an empty muon candidate?
friend std::ostream & operator<<(std::ostream &, const SimpleL1MuGMTCand &)
output stream operator
float smearedPt() const
return the smeared L1 Pt value before discretization in 32-bit
std::string name() const
get name of object
void setPt(float pt)
set pt-value and packed code of muon candidate
void disable()
disable muon candidate
void setEta(float eta)
set eta-value and packed code of muon candidate
unsigned int quality() const
get quality (not implemented for FAMOS)
const LorentzVector getMomentum() const
unsigned int etaRegionIndex() const
SimpleL1MuGMTCand()
constructor
void setMomentum(const LorentzVector &m)
unsigned int phi() const
get phi-code
bool operator()(const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
void setPhi(float phi)
set phi-value and packed code of muon candidate
LorentzVector myMomentum
static const float phiScale[144]
unsigned int linearizedPt(float lsbValue, unsigned maxScale) const
nevermind this one