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  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 
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  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 
161  LorentzVector myMomentum ;
162 
163 };
164 
165 #endif
const std::vector< Double_t > ptScale
Definition: Utilities.cc:32
void setRank(unsigned int rank)
set rank
unsigned int eta() const
get eta-code
unsigned int rank() const
get rank
unsigned int phiRegionIndex() const
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Definition: print.cc:10
void enable()
enable muon candidate
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
int charge() const
get charge
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
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.
define a rank for muon candidates
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
unsigned int quality() const
get quality (not implemented for FAMOS)
const LorentzVector getMomentum() const
unsigned int etaRegionIndex() const
void setMomentum(const LorentzVector &m)
unsigned int phi() const
get phi-code
bool operator()(const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
LorentzVector myMomentum
void reset(double vett[256])
Definition: TPedValues.cc:11
unsigned int linearizedPt(float lsbValue, unsigned maxScale) const
nevermind this one