test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMTFHit.h
Go to the documentation of this file.
1 // Class for input trigger primitives to EMTF - AWB 04.01.16
2 // Based on L1Trigger/L1TMuon/interface/deprecate/MuonTriggerPrimitive.h
3 // In particular, see struct CSCData
4 
5 #ifndef __l1t_EMTFHit_h__
6 #define __l1t_EMTFHit_h__
7 
8 #include <vector>
9 #include <boost/cstdint.hpp>
10 #include <cmath>
11 #include <iostream>
12 
16 
17 namespace l1t {
18 
19  class EMTFHit {
20  public:
21 
22  EMTFHit() :
23 
24  // Using -999 instead of -99 b/c this seems most common in the emulator. Unfortunate. - AWB 17.03.16
25  endcap(-999), station(-999), ring(-999), sector(-999), sector_index(-999), subsector(-999), chamber(-999), csc_ID(-999),
26  neighbor(-999), mpc_link(-999), wire(-999), strip(-999), track_num(-999), quality(-999), pattern(-999), bend(-999),
27  valid(-999), sync_err(-999), bc0(-999), bx(-999), stub_num(-999), is_CSC_hit(-999), is_RPC_hit(-999)
28  {};
29 
30  virtual ~EMTFHit() {};
31 
32  void ImportCSCDetId (const CSCDetId& _detId);
36  void ImportME (const emtf::ME _ME );
37 
38  void PrintSimulatorHeader();
39  void PrintForSimulator();
40 
41  void SetCSCDetId (CSCDetId id) { csc_DetId = id; }
43 
44  CSCDetId CSC_DetId () const { return csc_DetId; }
46  const CSCDetId * PtrCSC_DetId () const { return &csc_DetId; }
47  const CSCCorrelatedLCTDigi * PtrCSC_LCTDigi () const { return &csc_LCTDigi; }
48 
49  void set_endcap (int bits) { endcap = bits; }
50  void set_station (int bits) { station = bits; }
51  void set_ring (int bits) { ring = bits; }
52  void set_sector (int bits) { sector = bits; }
54  void set_subsector (int bits) { subsector = bits; }
55  void set_chamber (int bits) { chamber = bits; }
56  void set_csc_ID (int bits) { csc_ID = bits; }
57  void set_neighbor (int bits) { neighbor = bits; }
58  void set_mpc_link (int bits) { mpc_link = bits; }
59  void set_wire (int bits) { wire = bits; }
60  void set_strip (int bits) { strip = bits; }
61  void set_track_num (int bits) { track_num = bits; }
62  void set_quality (int bits) { quality = bits; }
63  void set_pattern (int bits) { pattern = bits; }
64  void set_bend (int bits) { bend = bits; }
65  void set_valid (int bits) { valid = bits; }
66  void set_sync_err (int bits) { sync_err = bits; }
67  void set_bc0 (int bits) { bc0 = bits; }
68  void set_bx (int bits) { bx = bits; }
69  void set_stub_num (int bits) { stub_num = bits; }
70  void set_is_CSC_hit (int bits) { is_CSC_hit = bits; }
71  void set_is_RPC_hit (int bits) { is_RPC_hit = bits; }
72 
73  int Endcap () const { return endcap ; }
74  int Station () const { return station ; }
75  int Ring () const { return ring ; }
76  int Sector () const { return sector ; }
77  int Sector_index () const { return sector_index; }
78  int Subsector () const { return subsector; }
79  int Chamber () const { return chamber ; }
80  int CSC_ID () const { return csc_ID ; }
81  int Neighbor () const { return neighbor ; }
82  int MPC_link () const { return mpc_link ; }
83  int Wire () const { return wire ; }
84  int Strip () const { return strip ; }
85  int Track_num () const { return track_num; }
86  int Quality () const { return quality ; }
87  int Pattern () const { return pattern ; }
88  int Bend () const { return bend ; }
89  int Valid () const { return valid ; }
90  int Sync_err () const { return sync_err ; }
91  int BC0 () const { return bc0 ; }
92  int BX () const { return bx ; }
93  int Stub_num () const { return stub_num ; }
94  int Is_CSC_hit () const { return is_CSC_hit; }
95  int Is_RPC_hit () const { return is_RPC_hit; }
96 
97 
98  private:
99 
102 
103  int endcap; // -1 or 1. Filled in EMTFHit.cc from CSCDetId, modified
104  int station; // 1 - 4. Filled in EMTFHit.cc from CSCDetId
105  int ring; // 1 - 3. Filled in EMTFHit.cc from CSCDetId
106  int sector; // 1 - 6. Filled in EMTFHit.cc from CSCDetId
107  int sector_index; // 0 - 11. 0 - 5 for positive endcap, 6 - 11 for negative. If a neighbor hit, set by the sector that received it, not the actual sector of the hit.
108  int subsector; // 1 - 2. Filled in EMTFHit.cc or emulator using calc_subsector above
109  int chamber; // 1 - 36. Filled in EMTFHit.cc from CSCDetId
110  int csc_ID; // 1 - 9. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi or emulator from CSCData
111  int neighbor; // 0 or 1. Filled in EMTFBlockME.cc
112  int mpc_link; // 1 - 3. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
113  int wire; // 1 - ?. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
114  int strip; // 1 - ?. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
115  int track_num; // ? - ?. Filled in emulator from CSCData
116  int quality; // 0 - 15. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
117  int pattern; // 0 - 10. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
118  int bend; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
119  int valid; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
120  int sync_err; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
121  int bc0; // 0 or 1.
122  int bx; // -3 - 3. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
123  int stub_num; // 0 or 1.
124  int is_CSC_hit; // 0 or 1. Filled in EMTFHit.cc
125  int is_RPC_hit; // 0 or 1. Filled in EMTFHit.cc
126 
127  }; // End of class EMTFHit
128 
129  // Define a vector of EMTFHit
130  typedef std::vector<EMTFHit> EMTFHitCollection;
131 
132 } // End of namespace l1t
133 
134 #endif /* define __l1t_EMTFHit_h__ */
int Quality() const
Definition: EMTFHit.h:86
void set_neighbor(int bits)
Definition: EMTFHit.h:57
int Sector_index() const
Definition: EMTFHit.h:77
int Bend() const
Definition: EMTFHit.h:88
void SetCSCLCTDigi(CSCCorrelatedLCTDigi digi)
Definition: EMTFHit.h:42
int station
Definition: EMTFHit.h:104
int Strip() const
Definition: EMTFHit.h:84
void set_sector_index(int bits)
Definition: EMTFHit.h:53
int mpc_link
Definition: EMTFHit.h:112
int neighbor
Definition: EMTFHit.h:111
void set_stub_num(int bits)
Definition: EMTFHit.h:69
const CSCCorrelatedLCTDigi * PtrCSC_LCTDigi() const
Definition: EMTFHit.h:47
void set_station(int bits)
Definition: EMTFHit.h:50
void ImportME(const emtf::ME _ME)
Definition: EMTFHitTools.cc:85
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 PrintForSimulator()
Definition: EMTFHitTools.cc:13
int MPC_link() const
Definition: EMTFHit.h:82
void set_bc0(int bits)
Definition: EMTFHit.h:67
virtual ~EMTFHit()
Definition: EMTFHit.h:30
CSCCorrelatedLCTDigi CSC_LCTDigi() const
Definition: EMTFHit.h:45
void set_sync_err(int bits)
Definition: EMTFHit.h:66
int sync_err
Definition: EMTFHit.h:120
void PrintSimulatorHeader()
Definition: EMTFHitTools.cc:6
void set_endcap(int bits)
Definition: EMTFHit.h:49
void set_ring(int bits)
Definition: EMTFHit.h:51
int Chamber() const
Definition: EMTFHit.h:79
int Wire() const
Definition: EMTFHit.h:83
int Subsector() const
Definition: EMTFHit.h:78
int is_CSC_hit
Definition: EMTFHit.h:124
int Is_RPC_hit() const
Definition: EMTFHit.h:95
int Sector() const
Definition: EMTFHit.h:76
int Valid() const
Definition: EMTFHit.h:89
int subsector
Definition: EMTFHit.h:108
int Sync_err() const
Definition: EMTFHit.h:90
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi()
Definition: EMTFHitTools.cc:76
int stub_num
Definition: EMTFHit.h:123
int Track_num() const
Definition: EMTFHit.h:85
int BX() const
Definition: EMTFHit.h:92
const CSCDetId * PtrCSC_DetId() const
Definition: EMTFHit.h:46
void set_pattern(int bits)
Definition: EMTFHit.h:63
void set_csc_ID(int bits)
Definition: EMTFHit.h:56
std::vector< EMTFHit > EMTFHitCollection
Definition: EMTFHit.h:130
void set_wire(int bits)
Definition: EMTFHit.h:59
CSCDetId CSC_DetId() const
Definition: EMTFHit.h:44
int Ring() const
Definition: EMTFHit.h:75
int pattern
Definition: EMTFHit.h:117
void ImportCSCDetId(const CSCDetId &_detId)
Definition: EMTFHitTools.cc:21
int endcap
Definition: EMTFHit.h:103
CSCCorrelatedLCTDigi csc_LCTDigi
Definition: EMTFHit.h:101
void set_sector(int bits)
Definition: EMTFHit.h:52
void set_is_CSC_hit(int bits)
Definition: EMTFHit.h:70
int Station() const
Definition: EMTFHit.h:74
void set_valid(int bits)
Definition: EMTFHit.h:65
void SetCSCDetId(CSCDetId id)
Definition: EMTFHit.h:41
void set_strip(int bits)
Definition: EMTFHit.h:60
int track_num
Definition: EMTFHit.h:115
int quality
Definition: EMTFHit.h:116
void ImportCSCCorrelatedLCTDigi(const CSCCorrelatedLCTDigi &_digi)
Definition: EMTFHitTools.cc:49
CSCDetId CreateCSCDetId()
Definition: EMTFHitTools.cc:39
void set_track_num(int bits)
Definition: EMTFHit.h:61
void set_is_RPC_hit(int bits)
Definition: EMTFHit.h:71
int sector_index
Definition: EMTFHit.h:107
int Is_CSC_hit() const
Definition: EMTFHit.h:94
int Pattern() const
Definition: EMTFHit.h:87
int sector
Definition: EMTFHit.h:106
void set_bx(int bits)
Definition: EMTFHit.h:68
int chamber
Definition: EMTFHit.h:109
int Endcap() const
Definition: EMTFHit.h:73
CSCDetId csc_DetId
Definition: EMTFHit.h:100
int Stub_num() const
Definition: EMTFHit.h:93
int is_RPC_hit
Definition: EMTFHit.h:125
int BC0() const
Definition: EMTFHit.h:91
void set_quality(int bits)
Definition: EMTFHit.h:62
void set_mpc_link(int bits)
Definition: EMTFHit.h:58
void set_chamber(int bits)
Definition: EMTFHit.h:55
int Neighbor() const
Definition: EMTFHit.h:81
void set_subsector(int bits)
Definition: EMTFHit.h:54
void set_bend(int bits)
Definition: EMTFHit.h:64
int CSC_ID() const
Definition: EMTFHit.h:80
int csc_ID
Definition: EMTFHit.h:110