CMS 3D CMS Logo

EMTFTrack2016.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 DataFormats_L1TMuon_EMTFTrack2016_h
5 #define DataFormats_L1TMuon_EMTFTrack2016_h
6 
7 #include <vector>
8 #include <boost/cstdint.hpp>
9 
13 
14 
15 namespace l1t {
16  class EMTFTrack2016 {
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 ~EMTFTrack2016() {};
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(EMTFHit2016 bits) { _Hits.push_back(bits); numHits = _Hits.size(); }
39  void set_HitIndices(std::vector<unsigned int> bits) { _HitIndices = bits; numHits = _HitIndices.size(); }
40  void push_HitIndex(unsigned int bits) { _HitIndices.push_back(bits); numHits = _HitIndices.size(); }
41 
42  int NumHits() const { return numHits; }
44  std::vector<unsigned int> HitIndices() { return _HitIndices; }
45  const EMTFHit2016Collection * PtrHits() const { return &_Hits; }
46  const std::vector<unsigned int> * 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<unsigned int> _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 EMTFTrack2016
199 
200  // Define a vector of EMTFTrack2016
201  typedef std::vector<EMTFTrack2016> EMTFTrack2016Collection;
202 
203 } // End of namespace l1t
204 
205 #endif /* define DataFormats_L1TMuon_EMTFTrack2016_h */
void set_dTheta_24(int bits)
Definition: EMTFTrack2016.h:81
void set_phi_loc_int(int bits)
Definition: EMTFTrack2016.h:62
int Sector_index() const
Definition: EMTFTrack2016.h:99
void set_clct_1(int bits)
Definition: EMTFTrack2016.h:83
int Mode_LUT() const
void set_all_neighbor(int bits)
Definition: EMTFTrack2016.h:93
void set_fr_4(int bits)
Definition: EMTFTrack2016.h:90
void set_dTheta_34(int bits)
Definition: EMTFTrack2016.h:82
unsigned long Pt_LUT_addr() const
int CLCT_2() const
int Has_neighbor() const
int DTheta_23() const
void set_pt_GMT(int bits)
Definition: EMTFTrack2016.h:57
void set_HitIndices(std::vector< unsigned int > bits)
Definition: EMTFTrack2016.h:39
int All_neighbor() const
float Eta() const
void set_fr_2(int bits)
Definition: EMTFTrack2016.h:88
float Phi_loc_rad() const
void set_Hits(EMTFHit2016Collection bits)
Definition: EMTFTrack2016.h:37
void set_charge_GMT(int bits)
Definition: EMTFTrack2016.h:69
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_sector_GMT(int bits)
Definition: EMTFTrack2016.h:50
std::vector< unsigned int > _HitIndices
void set_dPhi_34(int bits)
Definition: EMTFTrack2016.h:76
void set_eta_GMT(int bits)
Definition: EMTFTrack2016.h:60
int FR_1() const
delete x;
Definition: CaloConfig.h:22
void set_clct_4(int bits)
Definition: EMTFTrack2016.h:86
void set_dPhi_13(int bits)
Definition: EMTFTrack2016.h:72
void set_dTheta_13(int bits)
Definition: EMTFTrack2016.h:78
void set_pt(float val)
Definition: EMTFTrack2016.h:56
void set_quality(int bits)
Definition: EMTFTrack2016.h:54
void set_eta_LUT(int bits)
Definition: EMTFTrack2016.h:61
int Eta_GMT() const
void ImportPtLUT(int _mode, unsigned long _address)
EMTFHit2016Collection Hits()
Definition: EMTFTrack2016.h:43
void set_fr_1(int bits)
Definition: EMTFTrack2016.h:87
int DTheta_12() const
int DPhi_34() const
const std::vector< unsigned int > * PtrHitIndices() const
Definition: EMTFTrack2016.h:46
int FR_4() const
int DTheta_14() const
void set_clct_2(int bits)
Definition: EMTFTrack2016.h:84
const EMTFHit2016Collection * PtrHits() const
Definition: EMTFTrack2016.h:45
unsigned long pt_LUT_addr
void set_track_num(int bits)
Definition: EMTFTrack2016.h:91
int NumHits() const
Definition: EMTFTrack2016.h:42
int FR_3() const
void set_endcap(int bits)
Definition: EMTFTrack2016.h:48
int DPhi_12() const
int CLCT_1() const
int Phi_loc_int() const
int DTheta_13() const
virtual ~EMTFTrack2016()
Definition: EMTFTrack2016.h:30
void set_dPhi_23(int bits)
Definition: EMTFTrack2016.h:74
EMTFHit2016Collection _Hits
std::vector< unsigned int > HitIndices()
Definition: EMTFTrack2016.h:44
int Sector() const
Definition: EMTFTrack2016.h:97
void set_phi_glob_deg(float val)
Definition: EMTFTrack2016.h:66
int Phi_GMT() const
int FR_2() const
void set_phi_glob_rad(float val)
Definition: EMTFTrack2016.h:67
void ImportSP(const emtf::SP _SP, int _sector)
void set_clct_3(int bits)
Definition: EMTFTrack2016.h:85
int Pt_GMT() const
void set_dPhi_14(int bits)
Definition: EMTFTrack2016.h:73
void set_phi_GMT(int bits)
Definition: EMTFTrack2016.h:65
int Charge_GMT() const
void set_phi_loc_deg(float val)
Definition: EMTFTrack2016.h:63
float Phi_loc_deg() const
void set_sector(int bits)
Definition: EMTFTrack2016.h:49
int DTheta_34() const
int DPhi_23() const
int Mode() const
void set_sector_index(int bits)
Definition: EMTFTrack2016.h:51
void set_mode_LUT(int bits)
Definition: EMTFTrack2016.h:53
void set_charge_valid(int bits)
Definition: EMTFTrack2016.h:70
int Eta_LUT() const
void set_dTheta_14(int bits)
Definition: EMTFTrack2016.h:79
int CLCT_4() const
void set_dTheta_23(int bits)
Definition: EMTFTrack2016.h:80
void set_eta(float val)
Definition: EMTFTrack2016.h:59
void push_HitIndex(unsigned int bits)
Definition: EMTFTrack2016.h:40
std::vector< EMTFTrack2016 > EMTFTrack2016Collection
int Sector_GMT() const
Definition: EMTFTrack2016.h:98
float Pt() const
void set_dPhi_12(int bits)
Definition: EMTFTrack2016.h:71
float Phi_glob_rad() const
int Charge() const
int Endcap() const
Definition: EMTFTrack2016.h:96
int DTheta_24() const
void set_charge(int bits)
Definition: EMTFTrack2016.h:68
constexpr double pi()
Definition: Pi.h:31
std::vector< EMTFHit2016 > EMTFHit2016Collection
Definition: EMTFHit2016.h:158
int DPhi_13() const
void set_mode(int bits)
Definition: EMTFTrack2016.h:52
void push_Hit(EMTFHit2016 bits)
Definition: EMTFTrack2016.h:38
int Track_num() const
float Phi_glob_deg() const
void set_pt_LUT_addr(unsigned long bits)
Definition: EMTFTrack2016.h:58
int DPhi_24() const
int Quality() const
void set_dTheta_12(int bits)
Definition: EMTFTrack2016.h:77
void set_fr_3(int bits)
Definition: EMTFTrack2016.h:89
void set_bx(int bits)
Definition: EMTFTrack2016.h:55
int DPhi_14() const
void set_has_neighbor(int bits)
Definition: EMTFTrack2016.h:92
void set_phi_loc_rad(float val)
Definition: EMTFTrack2016.h:64
int Charge_valid() const
int CLCT_3() const
void set_dPhi_24(int bits)
Definition: EMTFTrack2016.h:75