CMS 3D CMS Logo

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 
18 
19 namespace l1t {
20 
21  class EMTFHit {
22  public:
23 
24  EMTFHit() :
25 
26  // Using -999 instead of -99 b/c this seems most common in the emulator. Unfortunate. - AWB 17.03.16
27  endcap(-999), station(-999), ring(-999), sector(-999), sector_index(-999), subsector(-999),
28  chamber(-999), csc_ID(-999), roll(-999), rpc_layer(-999), neighbor(-999), mpc_link(-999),
29  wire(-999), strip(-999), strip_hi(-999), strip_low(-999), track_num(-999), quality(-999),
30  pattern(-999), bend(-999), valid(-999), sync_err(-999), bc0(-999), bx(-999), stub_num(-999),
31  is_CSC_hit(-999), is_RPC_hit(-999)
32  {};
33 
34  virtual ~EMTFHit() {};
35 
36  void ImportCSCDetId (const CSCDetId& _detId);
38  void ImportRPCDetId (const RPCDetId& _detId);
42  void ImportRPCDigi (const RPCDigi& _digi);
44  void ImportME (const emtf::ME _ME );
45 
46  void PrintSimulatorHeader();
47  void PrintForSimulator();
48 
49  void SetCSCDetId (CSCDetId id) { csc_DetId = id; }
50  void SetRPCDetId (RPCDetId id) { rpc_DetId = id; }
52  void SetRPCDigi (RPCDigi digi) { rpc_Digi = digi; }
53 
54  CSCDetId CSC_DetId () const { return csc_DetId; }
55  RPCDetId RPC_DetId () const { return rpc_DetId; }
57  RPCDigi RPC_Digi () const { return rpc_Digi; }
58  const CSCDetId * PtrCSC_DetId () const { return &csc_DetId; }
59  const RPCDetId * PtrRPC_DetId () const { return &rpc_DetId; }
60  const CSCCorrelatedLCTDigi * PtrCSC_LCTDigi () const { return &csc_LCTDigi; }
61  const RPCDigi * PtrRPC_Digi () const { return &rpc_Digi; }
62 
63  void set_endcap (int bits) { endcap = bits; }
64  void set_station (int bits) { station = bits; }
65  void set_ring (int bits) { ring = bits; }
66  void set_sector (int bits) { sector = bits; }
68  void set_subsector (int bits) { subsector = bits; }
69  void set_chamber (int bits) { chamber = bits; }
70  void set_csc_ID (int bits) { csc_ID = bits; }
71  void set_roll (int bits) { roll = bits; }
72  void set_rpc_layer (int bits) { rpc_layer = bits; }
73  void set_neighbor (int bits) { neighbor = bits; }
74  void set_mpc_link (int bits) { mpc_link = bits; }
75  void set_wire (int bits) { wire = bits; }
76  void set_strip (int bits) { strip = bits; }
77  void set_strip_hi (int bits) { strip_hi = bits; }
78  void set_strip_low (int bits) { strip_low = bits; }
79  void set_track_num (int bits) { track_num = bits; }
80  void set_quality (int bits) { quality = bits; }
81  void set_pattern (int bits) { pattern = bits; }
82  void set_bend (int bits) { bend = bits; }
83  void set_valid (int bits) { valid = bits; }
84  void set_sync_err (int bits) { sync_err = bits; }
85  void set_bc0 (int bits) { bc0 = bits; }
86  void set_bx (int bits) { bx = bits; }
87  void set_stub_num (int bits) { stub_num = bits; }
88  void set_is_CSC_hit (int bits) { is_CSC_hit = bits; }
89  void set_is_RPC_hit (int bits) { is_RPC_hit = bits; }
90 
91  int Endcap () const { return endcap ; }
92  int Station () const { return station ; }
93  int Ring () const { return ring ; }
94  int Sector () const { return sector ; }
95  int Sector_index () const { return sector_index; }
96  int Subsector () const { return subsector; }
97  int Chamber () const { return chamber ; }
98  int CSC_ID () const { return csc_ID ; }
99  int Roll () const { return roll ; }
100  int RPC_layer () const { return rpc_layer; }
101  int Neighbor () const { return neighbor ; }
102  int MPC_link () const { return mpc_link ; }
103  int Wire () const { return wire ; }
104  int Strip () const { return strip ; }
105  int Strip_hi () const { return strip_hi ; }
106  int Strip_low () const { return strip_low; }
107  int Track_num () const { return track_num; }
108  int Quality () const { return quality ; }
109  int Pattern () const { return pattern ; }
110  int Bend () const { return bend ; }
111  int Valid () const { return valid ; }
112  int Sync_err () const { return sync_err ; }
113  int BC0 () const { return bc0 ; }
114  int BX () const { return bx ; }
115  int Stub_num () const { return stub_num ; }
116  int Is_CSC_hit () const { return is_CSC_hit; }
117  int Is_RPC_hit () const { return is_RPC_hit; }
118 
119 
120  private:
121 
126 
127  int endcap; // -1 or 1. Filled in EMTFHit.cc from CSCDetId, modified
128  int station; // 1 - 4. Filled in EMTFHit.cc from CSCDetId
129  int ring; // 1 - 3. Filled in EMTFHit.cc from CSCDetId
130  int sector; // 1 - 6. Filled in EMTFHit.cc from CSCDetId
131  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.
132  int subsector; // 1 - 2. Filled in EMTFHit.cc or emulator using calc_subsector above
133  int chamber; // 1 - 36. Filled in EMTFHit.cc from CSCDetId
134  int csc_ID; // 1 - 9. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi or emulator from CSCData
135  int roll; // Sub-division of ring for RPC hits
136  int rpc_layer; // Forward-backward bit for RPC hits
137  int neighbor; // 0 or 1. Filled in EMTFBlockME.cc
138  int mpc_link; // 1 - 3. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
139  int wire; // 1 - ?. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
140  int strip; // 1 - ?. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
141  int strip_hi; // Highest strip number in an RPC cluster
142  int strip_low; // Lowest strip number in an RPC cluster
143  int track_num; // ? - ?. Filled in emulator from CSCData
144  int quality; // 0 - 15. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
145  int pattern; // 0 - 10. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
146  int bend; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
147  int valid; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
148  int sync_err; // 0 or 1. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
149  int bc0; // 0 or 1.
150  int bx; // -3 - 3. Filled in EMTFHit.cc from CSCCorrelatedLCTDigi
151  int stub_num; // 0 or 1.
152  int is_CSC_hit; // 0 or 1. Filled in EMTFHit.cc
153  int is_RPC_hit; // 0 or 1. Filled in EMTFHit.cc
154 
155  }; // End of class EMTFHit
156 
157  // Define a vector of EMTFHit
158  typedef std::vector<EMTFHit> EMTFHitCollection;
159 
160 } // End of namespace l1t
161 
162 #endif /* define __l1t_EMTFHit_h__ */
RPCDetId RPC_DetId() const
Definition: EMTFHit.h:55
int Strip_hi() const
Definition: EMTFHit.h:105
int Quality() const
Definition: EMTFHit.h:108
void set_neighbor(int bits)
Definition: EMTFHit.h:73
int Sector_index() const
Definition: EMTFHit.h:95
int Bend() const
Definition: EMTFHit.h:110
void SetCSCLCTDigi(CSCCorrelatedLCTDigi digi)
Definition: EMTFHit.h:51
int station
Definition: EMTFHit.h:128
RPCDetId rpc_DetId
Definition: EMTFHit.h:123
int RPC_layer() const
Definition: EMTFHit.h:100
int Strip() const
Definition: EMTFHit.h:104
void set_sector_index(int bits)
Definition: EMTFHit.h:67
void SetRPCDetId(RPCDetId id)
Definition: EMTFHit.h:50
int mpc_link
Definition: EMTFHit.h:138
RPCDetId CreateRPCDetId()
Definition: EMTFHitTools.cc:61
int neighbor
Definition: EMTFHit.h:137
void set_stub_num(int bits)
Definition: EMTFHit.h:87
const CSCCorrelatedLCTDigi * PtrCSC_LCTDigi() const
Definition: EMTFHit.h:60
void set_station(int bits)
Definition: EMTFHit.h:64
RPCDigi CreateRPCDigi()
void ImportME(const emtf::ME _ME)
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:102
void set_bc0(int bits)
Definition: EMTFHit.h:85
RPCDigi RPC_Digi() const
Definition: EMTFHit.h:57
virtual ~EMTFHit()
Definition: EMTFHit.h:34
CSCCorrelatedLCTDigi CSC_LCTDigi() const
Definition: EMTFHit.h:56
int Roll() const
Definition: EMTFHit.h:99
delete x;
Definition: CaloConfig.h:22
void set_sync_err(int bits)
Definition: EMTFHit.h:84
int sync_err
Definition: EMTFHit.h:148
void PrintSimulatorHeader()
Definition: EMTFHitTools.cc:6
void set_endcap(int bits)
Definition: EMTFHit.h:63
void set_ring(int bits)
Definition: EMTFHit.h:65
int Chamber() const
Definition: EMTFHit.h:97
void ImportRPCDigi(const RPCDigi &_digi)
int Wire() const
Definition: EMTFHit.h:103
RPCDigi rpc_Digi
Definition: EMTFHit.h:125
int Subsector() const
Definition: EMTFHit.h:96
int is_CSC_hit
Definition: EMTFHit.h:152
int Is_RPC_hit() const
Definition: EMTFHit.h:117
int Sector() const
Definition: EMTFHit.h:94
void set_strip_low(int bits)
Definition: EMTFHit.h:78
int Strip_low() const
Definition: EMTFHit.h:106
int Valid() const
Definition: EMTFHit.h:111
int subsector
Definition: EMTFHit.h:132
int Sync_err() const
Definition: EMTFHit.h:112
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi()
Definition: EMTFHitTools.cc:98
int stub_num
Definition: EMTFHit.h:151
int Track_num() const
Definition: EMTFHit.h:107
int BX() const
Definition: EMTFHit.h:114
const CSCDetId * PtrCSC_DetId() const
Definition: EMTFHit.h:58
void set_pattern(int bits)
Definition: EMTFHit.h:81
void set_csc_ID(int bits)
Definition: EMTFHit.h:70
std::vector< EMTFHit > EMTFHitCollection
Definition: EMTFHit.h:158
void set_strip_hi(int bits)
Definition: EMTFHit.h:77
void set_wire(int bits)
Definition: EMTFHit.h:75
CSCDetId CSC_DetId() const
Definition: EMTFHit.h:54
void ImportRPCDetId(const RPCDetId &_detId)
Definition: EMTFHitTools.cc:45
int Ring() const
Definition: EMTFHit.h:93
int pattern
Definition: EMTFHit.h:145
void ImportCSCDetId(const CSCDetId &_detId)
Definition: EMTFHitTools.cc:21
int endcap
Definition: EMTFHit.h:127
CSCCorrelatedLCTDigi csc_LCTDigi
Definition: EMTFHit.h:124
void set_sector(int bits)
Definition: EMTFHit.h:66
int strip_low
Definition: EMTFHit.h:142
void set_is_CSC_hit(int bits)
Definition: EMTFHit.h:88
int Station() const
Definition: EMTFHit.h:92
int rpc_layer
Definition: EMTFHit.h:136
void set_valid(int bits)
Definition: EMTFHit.h:83
void SetCSCDetId(CSCDetId id)
Definition: EMTFHit.h:49
void SetRPCDigi(RPCDigi digi)
Definition: EMTFHit.h:52
void set_strip(int bits)
Definition: EMTFHit.h:76
int track_num
Definition: EMTFHit.h:143
int quality
Definition: EMTFHit.h:144
void ImportCSCCorrelatedLCTDigi(const CSCCorrelatedLCTDigi &_digi)
Definition: EMTFHitTools.cc:71
void set_rpc_layer(int bits)
Definition: EMTFHit.h:72
const RPCDigi * PtrRPC_Digi() const
Definition: EMTFHit.h:61
CSCDetId CreateCSCDetId()
Definition: EMTFHitTools.cc:39
const RPCDetId * PtrRPC_DetId() const
Definition: EMTFHit.h:59
int strip_hi
Definition: EMTFHit.h:141
void set_track_num(int bits)
Definition: EMTFHit.h:79
void set_is_RPC_hit(int bits)
Definition: EMTFHit.h:89
int sector_index
Definition: EMTFHit.h:131
int Is_CSC_hit() const
Definition: EMTFHit.h:116
int Pattern() const
Definition: EMTFHit.h:109
int sector
Definition: EMTFHit.h:130
void set_bx(int bits)
Definition: EMTFHit.h:86
int chamber
Definition: EMTFHit.h:133
int Endcap() const
Definition: EMTFHit.h:91
CSCDetId csc_DetId
Definition: EMTFHit.h:122
int Stub_num() const
Definition: EMTFHit.h:115
int is_RPC_hit
Definition: EMTFHit.h:153
int BC0() const
Definition: EMTFHit.h:113
void set_quality(int bits)
Definition: EMTFHit.h:80
void set_mpc_link(int bits)
Definition: EMTFHit.h:74
void set_chamber(int bits)
Definition: EMTFHit.h:69
int Neighbor() const
Definition: EMTFHit.h:101
void set_subsector(int bits)
Definition: EMTFHit.h:68
void set_bend(int bits)
Definition: EMTFHit.h:82
int CSC_ID() const
Definition: EMTFHit.h:98
void set_roll(int bits)
Definition: EMTFHit.h:71
int csc_ID
Definition: EMTFHit.h:134