test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMTFTrack.h
Go to the documentation of this file.
1 // Class for muon tracks in EMTF - AWB 04.01.16
2 // Mostly copied from L1Trigger/L1TMuonEndCap/interface/MuonInternalTrack.h
3 
4 #ifndef __l1t_EMTFTrack_h__
5 #define __l1t_EMTFTrack_h__
6 
7 #include <vector>
8 #include <boost/cstdint.hpp>
9 
13 
14 
15 namespace l1t {
16  class EMTFTrack {
17  public:
18 
20  // Using -999 instead of -99 b/c this seems most common in the emulator. Unfortunate. - AWB 17.03.16
21  endcap(-999), sector(-999), sector_GMT(-999), sector_index(-999), mode(-999), mode_LUT(-999), quality(-999), bx(-999),
22  pt(-999), pt_GMT(-999), pt_LUT_addr(0), eta(-999), eta_GMT(-999), eta_LUT(-999), phi_loc_int(-999),
23  phi_loc_deg(-999), phi_loc_rad(-999), phi_GMT(-999), phi_glob_deg(-999), phi_glob_rad(-999),
24  charge(-999), charge_GMT(-999), charge_valid(-999), dPhi_12(-999), dPhi_13(-999), dPhi_14(-999),
25  dPhi_23(-999), dPhi_24(-999), dPhi_34(-999), dTheta_12(-999), dTheta_13(-999), dTheta_14(-999),
26  dTheta_23(-999), dTheta_24(-999), dTheta_34(-999), clct_1(-999), clct_2(-999), clct_3(-999), clct_4(-999),
27  fr_1(-999), fr_2(-999), fr_3(-999), fr_4(-999), track_num(-999), has_neighbor(-999), all_neighbor(-999), numHits(0)
28  {};
29 
30  virtual ~EMTFTrack() {};
31 
32  // float pi = 3.141592653589793238;
33 
34  void ImportSP( const emtf::SP _SP, int _sector );
35  void ImportPtLUT( int _mode, unsigned long _address );
36 
38  void push_Hit(EMTFHit bits) { _Hits.push_back(bits); numHits = _Hits.size(); }
39  void set_HitIndices(std::vector<uint> bits) { _HitIndices = bits; numHits = _HitIndices.size(); }
40  void push_HitIndex(uint bits) { _HitIndices.push_back(bits); numHits = _HitIndices.size(); }
41 
42  int NumHits() const { return numHits; }
44  std::vector<uint> HitIndices() { return _HitIndices; }
45  const EMTFHitCollection * PtrHits() const { return &_Hits; }
46  const std::vector<uint> * PtrHitIndices() const { return &_HitIndices; }
47 
48  void set_endcap (int bits) { endcap = bits; }
49  void set_sector (int bits) { sector = bits; }
50  void set_sector_GMT (int bits) { sector_GMT = bits; }
52  void set_mode (int bits) { mode = bits; }
53  void set_mode_LUT (int bits) { mode_LUT = bits; }
54  void set_quality (int bits) { quality = bits; }
55  void set_bx (int bits) { bx = bits; }
56  void set_pt (float val) { pt = val; }
57  void set_pt_GMT (int bits) { pt_GMT = bits; }
58  void set_pt_LUT_addr (unsigned long bits) { pt_LUT_addr = bits; }
59  void set_eta (float val) { eta = val; }
60  void set_eta_GMT (int bits) { eta_GMT = bits; }
61  void set_eta_LUT (int bits) { eta_LUT = bits; }
63  void set_phi_loc_deg (float val) { phi_loc_deg = val; }
64  void set_phi_loc_rad (float val) { phi_loc_rad = val; }
65  void set_phi_GMT (int bits) { phi_GMT = bits; }
66  void set_phi_glob_deg (float val) { (val < 180) ? phi_glob_deg = val : phi_glob_deg = val - 360; }
67  void set_phi_glob_rad (float val) { (val < Geom::pi() ) ? phi_glob_rad = val : phi_glob_rad = val - 2*Geom::pi(); }
68  void set_charge (int bits) { charge = bits; }
69  void set_charge_GMT (int bits) { charge_GMT = bits; }
71  void set_dPhi_12 (int bits) { dPhi_12 = bits; }
72  void set_dPhi_13 (int bits) { dPhi_13 = bits; }
73  void set_dPhi_14 (int bits) { dPhi_14 = bits; }
74  void set_dPhi_23 (int bits) { dPhi_23 = bits; }
75  void set_dPhi_24 (int bits) { dPhi_24 = bits; }
76  void set_dPhi_34 (int bits) { dPhi_34 = bits; }
77  void set_dTheta_12 (int bits) { dTheta_12 = bits; }
78  void set_dTheta_13 (int bits) { dTheta_13 = bits; }
79  void set_dTheta_14 (int bits) { dTheta_14 = bits; }
80  void set_dTheta_23 (int bits) { dTheta_23 = bits; }
81  void set_dTheta_24 (int bits) { dTheta_24 = bits; }
82  void set_dTheta_34 (int bits) { dTheta_34 = bits; }
83  void set_clct_1 (int bits) { clct_1 = bits; }
84  void set_clct_2 (int bits) { clct_2 = bits; }
85  void set_clct_3 (int bits) { clct_3 = bits; }
86  void set_clct_4 (int bits) { clct_4 = bits; }
87  void set_fr_1 (int bits) { fr_1 = bits; }
88  void set_fr_2 (int bits) { fr_2 = bits; }
89  void set_fr_3 (int bits) { fr_3 = bits; }
90  void set_fr_4 (int bits) { fr_4 = bits; }
91  void set_track_num (int bits) { track_num = bits; }
94 
95 
96  int Endcap() const { return endcap; }
97  int Sector() const { return sector; }
98  int Sector_GMT() const { return sector_GMT; }
99  int Sector_index() const { return sector_index; }
100  int Mode() const { return mode; }
101  int Mode_LUT() const { return mode_LUT; }
102  int Quality() const { return quality; }
103  int BX() const { return bx; }
104  float Pt() const { return pt; }
105  int Pt_GMT() const { return pt_GMT; }
106  unsigned long Pt_LUT_addr() const { return pt_LUT_addr; }
107  float Eta() const { return eta; }
108  int Eta_GMT() const { return eta_GMT; }
109  int Eta_LUT() const { return eta_LUT; }
110  int Phi_loc_int() const { return phi_loc_int; }
111  float Phi_loc_deg() const { return phi_loc_deg; }
112  float Phi_loc_rad() const { return phi_loc_rad; }
113  int Phi_GMT() const { return phi_GMT; }
114  float Phi_glob_deg() const { return phi_glob_deg; }
115  float Phi_glob_rad() const { return phi_glob_rad; }
116  int Charge() const { return charge; }
117  int Charge_GMT() const { return charge_GMT; }
118  int Charge_valid() const { return charge_valid; }
119  int DPhi_12() const { return dPhi_12; }
120  int DPhi_13() const { return dPhi_13; }
121  int DPhi_14() const { return dPhi_14; }
122  int DPhi_23() const { return dPhi_23; }
123  int DPhi_24() const { return dPhi_24; }
124  int DPhi_34() const { return dPhi_34; }
125  int DTheta_12() const { return dTheta_12; }
126  int DTheta_13() const { return dTheta_13; }
127  int DTheta_14() const { return dTheta_14; }
128  int DTheta_23() const { return dTheta_23; }
129  int DTheta_24() const { return dTheta_24; }
130  int DTheta_34() const { return dTheta_34; }
131  int CLCT_1() const { return clct_1; }
132  int CLCT_2() const { return clct_2; }
133  int CLCT_3() const { return clct_3; }
134  int CLCT_4() const { return clct_4; }
135  int FR_1() const { return fr_1; }
136  int FR_2() const { return fr_2; }
137  int FR_3() const { return fr_3; }
138  int FR_4() const { return fr_4; }
139  int Track_num() const { return track_num; }
140  int Has_neighbor() const { return has_neighbor; }
141  int All_neighbor() const { return all_neighbor; }
142 
143 
144  private:
145 
147  std::vector<uint> _HitIndices;
148 
149  int endcap; // -1 or 1. Filled in emulator from hit.
150  int sector; // 1 - 6. Filled in emulator from hit.
151  int sector_GMT; // 0 - 5. Filled in emulator from hit.
152  int sector_index; // 0 - 11. Filled in emulator from hit.
153  int mode; // 0 - 15. Filled in emulator.
154  int mode_LUT; // 0 - 15. Filled in emulator.
155  int quality; // 0 - 15. Filled in emultaor.
156  int bx; //
157  float pt; // ? - ?. Filled in emulator.
158  int pt_GMT; // ? - ?. Filled in emulator.
159  float pt_XML; // ? - ?. Filled in emulator.
160  unsigned long pt_LUT_addr; // ? - ?. Filled in emulator.
161  float eta; // ? - ?. Filled in emulator.
162  int eta_GMT; // ? - ?. Filled in emulator.
163  int eta_LUT; // ? - ?. Filled in emulator.
164  int phi_loc_int; // ? - ?. Filled in emulator.
165  float phi_loc_deg; // ? - ?. Filled in emulator.
166  float phi_loc_rad; // ? - ?. Filled in emulator.
167  int phi_GMT; // ? - ?. Filled in emulator.
168  float phi_glob_deg; // ? - ?. Filled in emulator.
169  float phi_glob_rad; // ? - ?. Filled in emulator.
170  int charge; // -1 or 1. Filled in emulator.
171  int charge_GMT; // 0 or 1. Filled in emulator.
172  int charge_valid; // 0 or 1. Filled in emulator.
173  int dPhi_12;
174  int dPhi_13;
175  int dPhi_14;
176  int dPhi_23;
177  int dPhi_24;
178  int dPhi_34;
185  int clct_1;
186  int clct_2;
187  int clct_3;
188  int clct_4;
189  int fr_1;
190  int fr_2;
191  int fr_3;
192  int fr_4;
196  int numHits;
197 
198  }; // End of class EMTFTrack
199 
200  // Define a vector of EMTFTrack
201  typedef std::vector<EMTFTrack> EMTFTrackCollection;
202 
203 } // End of namespace l1t
204 
205 #endif /* define __l1t_EMTFTrack_h__ */
void set_mode(int bits)
Definition: EMTFTrack.h:52
int CLCT_2() const
Definition: EMTFTrack.h:132
void set_pt_GMT(int bits)
Definition: EMTFTrack.h:57
int CLCT_4() const
Definition: EMTFTrack.h:134
void set_fr_1(int bits)
Definition: EMTFTrack.h:87
void set_Hits(EMTFHitCollection bits)
Definition: EMTFTrack.h:37
int CLCT_3() const
Definition: EMTFTrack.h:133
void set_phi_GMT(int bits)
Definition: EMTFTrack.h:65
void set_dTheta_13(int bits)
Definition: EMTFTrack.h:78
float Phi_loc_rad() const
Definition: EMTFTrack.h:112
int FR_1() const
Definition: EMTFTrack.h:135
void set_bx(int bits)
Definition: EMTFTrack.h:55
void set_quality(int bits)
Definition: EMTFTrack.h:54
int Sector_index() const
Definition: EMTFTrack.h:99
void set_phi_loc_int(int bits)
Definition: EMTFTrack.h:62
int Mode_LUT() const
Definition: EMTFTrack.h:101
void set_sector(int bits)
Definition: EMTFTrack.h:49
int Endcap() const
Definition: EMTFTrack.h:96
void set_HitIndices(std::vector< uint > bits)
Definition: EMTFTrack.h:39
std::vector< uint > HitIndices()
Definition: EMTFTrack.h:44
void set_dPhi_14(int bits)
Definition: EMTFTrack.h:73
int FR_4() const
Definition: EMTFTrack.h:138
float Phi_loc_deg() const
Definition: EMTFTrack.h:111
float Pt() const
Definition: EMTFTrack.h:104
int NumHits() const
Definition: EMTFTrack.h:42
void set_dPhi_24(int bits)
Definition: EMTFTrack.h:75
void set_charge_GMT(int bits)
Definition: EMTFTrack.h:69
unsigned long pt_LUT_addr
Definition: EMTFTrack.h:160
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
void set_clct_3(int bits)
Definition: EMTFTrack.h:85
void set_charge(int bits)
Definition: EMTFTrack.h:68
int Sector() const
Definition: EMTFTrack.h:97
void set_dTheta_23(int bits)
Definition: EMTFTrack.h:80
int Charge() const
Definition: EMTFTrack.h:116
void push_Hit(EMTFHit bits)
Definition: EMTFTrack.h:38
float phi_glob_rad
Definition: EMTFTrack.h:169
void set_charge_valid(int bits)
Definition: EMTFTrack.h:70
int All_neighbor() const
Definition: EMTFTrack.h:141
void ImportSP(const emtf::SP _SP, int _sector)
void set_pt_LUT_addr(unsigned long bits)
Definition: EMTFTrack.h:58
void set_dPhi_34(int bits)
Definition: EMTFTrack.h:76
void push_HitIndex(uint bits)
Definition: EMTFTrack.h:40
void set_clct_1(int bits)
Definition: EMTFTrack.h:83
int Charge_GMT() const
Definition: EMTFTrack.h:117
void set_pt(float val)
Definition: EMTFTrack.h:56
int Sector_GMT() const
Definition: EMTFTrack.h:98
int Charge_valid() const
Definition: EMTFTrack.h:118
float phi_glob_deg
Definition: EMTFTrack.h:168
float Phi_glob_deg() const
Definition: EMTFTrack.h:114
void ImportPtLUT(int _mode, unsigned long _address)
int Pt_GMT() const
Definition: EMTFTrack.h:105
int Quality() const
Definition: EMTFTrack.h:102
void set_eta_LUT(int bits)
Definition: EMTFTrack.h:61
float phi_loc_rad
Definition: EMTFTrack.h:166
int Phi_loc_int() const
Definition: EMTFTrack.h:110
int CLCT_1() const
Definition: EMTFTrack.h:131
void set_clct_2(int bits)
Definition: EMTFTrack.h:84
std::vector< EMTFHit > EMTFHitCollection
Definition: EMTFHit.h:158
void set_dPhi_23(int bits)
Definition: EMTFTrack.h:74
void set_sector_index(int bits)
Definition: EMTFTrack.h:51
int DTheta_24() const
Definition: EMTFTrack.h:129
float Eta() const
Definition: EMTFTrack.h:107
void set_all_neighbor(int bits)
Definition: EMTFTrack.h:93
int DTheta_23() const
Definition: EMTFTrack.h:128
void set_track_num(int bits)
Definition: EMTFTrack.h:91
const std::vector< uint > * PtrHitIndices() const
Definition: EMTFTrack.h:46
const EMTFHitCollection * PtrHits() const
Definition: EMTFTrack.h:45
int Track_num() const
Definition: EMTFTrack.h:139
void set_phi_glob_rad(float val)
Definition: EMTFTrack.h:67
float phi_loc_deg
Definition: EMTFTrack.h:165
int DTheta_13() const
Definition: EMTFTrack.h:126
int DPhi_12() const
Definition: EMTFTrack.h:119
void set_mode_LUT(int bits)
Definition: EMTFTrack.h:53
void set_eta_GMT(int bits)
Definition: EMTFTrack.h:60
void set_eta(float val)
Definition: EMTFTrack.h:59
void set_dPhi_12(int bits)
Definition: EMTFTrack.h:71
int Phi_GMT() const
Definition: EMTFTrack.h:113
void set_has_neighbor(int bits)
Definition: EMTFTrack.h:92
unsigned long Pt_LUT_addr() const
Definition: EMTFTrack.h:106
int DPhi_23() const
Definition: EMTFTrack.h:122
void set_fr_3(int bits)
Definition: EMTFTrack.h:89
EMTFHitCollection _Hits
Definition: EMTFTrack.h:146
int DPhi_24() const
Definition: EMTFTrack.h:123
void set_endcap(int bits)
Definition: EMTFTrack.h:48
int DPhi_13() const
Definition: EMTFTrack.h:120
void set_clct_4(int bits)
Definition: EMTFTrack.h:86
void set_dTheta_34(int bits)
Definition: EMTFTrack.h:82
int BX() const
Definition: EMTFTrack.h:103
int Eta_LUT() const
Definition: EMTFTrack.h:109
void set_phi_loc_rad(float val)
Definition: EMTFTrack.h:64
int Has_neighbor() const
Definition: EMTFTrack.h:140
void set_dTheta_14(int bits)
Definition: EMTFTrack.h:79
void set_fr_4(int bits)
Definition: EMTFTrack.h:90
float Phi_glob_rad() const
Definition: EMTFTrack.h:115
int Mode() const
Definition: EMTFTrack.h:100
void set_dTheta_12(int bits)
Definition: EMTFTrack.h:77
void set_sector_GMT(int bits)
Definition: EMTFTrack.h:50
std::vector< uint > _HitIndices
Definition: EMTFTrack.h:147
void set_dTheta_24(int bits)
Definition: EMTFTrack.h:81
virtual ~EMTFTrack()
Definition: EMTFTrack.h:30
void set_dPhi_13(int bits)
Definition: EMTFTrack.h:72
std::vector< EMTFTrack > EMTFTrackCollection
Definition: EMTFTrack.h:201
constexpr double pi()
Definition: Pi.h:31
void set_phi_loc_deg(float val)
Definition: EMTFTrack.h:63
void set_fr_2(int bits)
Definition: EMTFTrack.h:88
int FR_2() const
Definition: EMTFTrack.h:136
EMTFHitCollection Hits()
Definition: EMTFTrack.h:43
int Eta_GMT() const
Definition: EMTFTrack.h:108
int DPhi_14() const
Definition: EMTFTrack.h:121
void set_phi_glob_deg(float val)
Definition: EMTFTrack.h:66
int FR_3() const
Definition: EMTFTrack.h:137
int DTheta_12() const
Definition: EMTFTrack.h:125
int DTheta_14() const
Definition: EMTFTrack.h:127
int DPhi_34() const
Definition: EMTFTrack.h:124
int DTheta_34() const
Definition: EMTFTrack.h:130