File indexing completed on 2024-04-06 12:11:11
0001 #ifndef SIMPLEL1MU_GMT_CAND_H
0002 #define SIMPLEL1MU_GMT_CAND_H
0003
0004 #include <DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTExtendedCand.h>
0005
0006 #include "DataFormats/Math/interface/LorentzVector.h"
0007
0008 class SimTrack;
0009
0010 namespace HepMC {
0011 class GenParticle;
0012 }
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 class SimpleL1MuGMTCand : public L1MuGMTExtendedCand {
0025 public:
0026 typedef math::XYZTLorentzVector LorentzVector;
0027
0028
0029 SimpleL1MuGMTCand();
0030
0031
0032 SimpleL1MuGMTCand(const SimpleL1MuGMTCand&);
0033
0034
0035 SimpleL1MuGMTCand(const SimpleL1MuGMTCand*);
0036
0037
0038 SimpleL1MuGMTCand(const SimTrack*);
0039
0040
0041 SimpleL1MuGMTCand(const SimTrack* p,
0042 unsigned etaIndex,
0043 unsigned phiIndex,
0044 unsigned pTIndex,
0045 float etaValue,
0046 float phiValue,
0047 float pTValue);
0048
0049
0050 ~SimpleL1MuGMTCand() override;
0051
0052
0053 void reset();
0054
0055
0056 inline std::string name() const { return m_name; }
0057
0058
0059 inline unsigned int phi() const { return m_phi; }
0060
0061
0062 inline unsigned int eta() const { return m_eta; }
0063
0064
0065 inline unsigned int pt() const { return m_pt; }
0066
0067
0068 inline int charge() const { return m_charge; }
0069
0070
0071 inline unsigned int rank() const { return m_rank; }
0072
0073
0074 inline bool empty() const { return m_empty; }
0075
0076
0077 inline void enable() { m_empty = false; }
0078
0079
0080 inline void disable() { m_empty = true; }
0081
0082
0083 void setPhi(float phi);
0084
0085
0086 void setEta(float eta);
0087
0088
0089 void setPt(float pt);
0090
0091
0092 void setCharge(int charge);
0093
0094
0095 inline void setRank(unsigned int rank) { m_rank = rank; }
0096
0097
0098 float smearedPt() const { return m_smearedPt; }
0099
0100
0101 inline unsigned int linearizedPt(float lsbValue, unsigned maxScale) const { return 0; }
0102
0103
0104 inline unsigned int quality() const { return m_quality; }
0105
0106 unsigned int etaRegionIndex() const { return eta(); }
0107
0108 unsigned int phiRegionIndex() const { return phi(); }
0109
0110
0111 void setMomentum(const LorentzVector& m) { myMomentum = m; }
0112 const LorentzVector getMomentum() const { return myMomentum; }
0113
0114
0115 SimpleL1MuGMTCand& operator=(const SimpleL1MuGMTCand&);
0116
0117
0118 SimpleL1MuGMTCand* operator=(const SimTrack*);
0119
0120
0121 bool operator==(const SimpleL1MuGMTCand&) const;
0122
0123
0124 bool operator!=(const SimpleL1MuGMTCand&) const;
0125
0126
0127 void print() const;
0128
0129
0130 friend std::ostream& operator<<(std::ostream&, const SimpleL1MuGMTCand&);
0131
0132
0133 bool getRank(const SimpleL1MuGMTCand* first, const SimpleL1MuGMTCand* second) const {
0134 unsigned int rank_f = (first) ? first->rank() : 0;
0135 unsigned int rank_s = (second) ? second->rank() : 0;
0136 return rank_f > rank_s;
0137 }
0138
0139 static const float ptScale[32];
0140 static const float etaScale[63];
0141 static const float phiScale[144];
0142
0143 private:
0144 std::string m_name;
0145 bool m_empty;
0146
0147 unsigned int m_phi;
0148 unsigned int m_eta;
0149 unsigned int m_pt;
0150 int m_charge;
0151 unsigned int m_quality;
0152 unsigned int m_rank;
0153 float m_smearedPt;
0154
0155 LorentzVector myMomentum;
0156 };
0157
0158 #endif