Go to the documentation of this file.00001 #ifndef SIMPLEL1MU_GMT_CAND_H
00002 #define SIMPLEL1MU_GMT_CAND_H
00003
00004 #include <DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h>
00005
00006 #include "DataFormats/Math/interface/LorentzVector.h"
00007
00008 class SimTrack;
00009
00010 namespace HepMC {
00011 class GenParticle;
00012 }
00013
00024 class SimpleL1MuGMTCand : public L1MuGMTExtendedCand {
00025
00026 public:
00027
00028 typedef math::XYZTLorentzVector LorentzVector;
00029
00031 SimpleL1MuGMTCand();
00032
00034 SimpleL1MuGMTCand(const SimpleL1MuGMTCand&);
00035
00037 SimpleL1MuGMTCand(const SimpleL1MuGMTCand*);
00038
00040 SimpleL1MuGMTCand(const SimTrack*);
00041
00043 SimpleL1MuGMTCand(const SimTrack* p,
00044 unsigned etaIndex,
00045 unsigned phiIndex,
00046 unsigned pTIndex,
00047 float etaValue,
00048 float phiValue,
00049 float pTValue);
00050
00052 virtual ~SimpleL1MuGMTCand();
00053
00055 void reset();
00056
00058 inline std::string name() const { return m_name; }
00059
00061 inline unsigned int phi() const { return m_phi; }
00062
00064 inline unsigned int eta() const { return m_eta; }
00065
00067 inline unsigned int pt() const { return m_pt; }
00068
00070 inline int charge() const { return m_charge; }
00071
00073 inline unsigned int rank() const { return m_rank; }
00074
00076 inline bool empty() const { return m_empty; }
00077
00079 inline void enable() { m_empty = false; }
00080
00082 inline void disable() { m_empty = true; }
00083
00085 void setPhi(float phi);
00086
00088 void setEta(float eta);
00089
00091 void setPt(float pt);
00092
00094 void setCharge(int charge);
00095
00097 inline void setRank(unsigned int rank) { m_rank = rank; }
00098
00100 float smearedPt() const { return m_smearedPt; }
00101
00103 inline unsigned int linearizedPt(float lsbValue, unsigned maxScale) const { return 0; }
00104
00106 inline unsigned int quality() const { return m_quality; }
00107
00108 unsigned int etaRegionIndex() const { return eta(); }
00109
00110 unsigned int phiRegionIndex() const { return phi(); }
00111
00112
00113 void setMomentum(LorentzVector m) { myMomentum = m; }
00114 const LorentzVector getMomentum() const { return myMomentum; }
00115
00117 SimpleL1MuGMTCand& operator=(const SimpleL1MuGMTCand&);
00118
00120 SimpleL1MuGMTCand* operator=(const SimTrack*);
00121
00123 bool operator==(const SimpleL1MuGMTCand&) const;
00124
00126 bool operator!=(const SimpleL1MuGMTCand&) const;
00127
00129 void print() const;
00130
00132 friend std::ostream& operator<<(std::ostream&, const SimpleL1MuGMTCand&);
00133
00135 class Rank : std::binary_function< const SimpleL1MuGMTCand*, const SimpleL1MuGMTCand*, bool> {
00136 public :
00137 bool operator()( const SimpleL1MuGMTCand* first, const SimpleL1MuGMTCand* second ) const {
00138 unsigned int rank_f = (first) ? first->rank(): 0;
00139 unsigned int rank_s = (second) ? second->rank() : 0;
00140 return rank_f > rank_s;
00141 }
00142 };
00143
00144 static const float ptScale[32];
00145 static const float etaScale[63];
00146 static const float phiScale[144];
00147
00148 private:
00149
00150 std::string m_name;
00151 bool m_empty;
00152
00153 unsigned int m_phi;
00154 unsigned int m_eta;
00155 unsigned int m_pt;
00156 int m_charge;
00157 unsigned int m_quality;
00158 unsigned int m_rank;
00159 float m_smearedPt;
00160
00161 LorentzVector myMomentum ;
00162
00163 };
00164
00165 #endif