CMS 3D CMS Logo

EMTFHit2016.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 DataFormats_L1TMuon_EMTFHit2016_h
6 #define DataFormats_L1TMuon_EMTFHit2016_h
7 
8 #include <vector>
9 #include <boost/cstdint.hpp>
10 #include <cmath>
11 #include <iostream>
12 
18 
19 namespace l1t {
20 
21  class EMTFHit2016 {
22  public:
23 
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 ~EMTFHit2016() {};
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 EMTFHit2016.cc from CSCDetId, modified
128  int station; // 1 - 4. Filled in EMTFHit2016.cc from CSCDetId
129  int ring; // 1 - 3. Filled in EMTFHit2016.cc from CSCDetId
130  int sector; // 1 - 6. Filled in EMTFHit2016.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 EMTFHit2016.cc or emulator using calc_subsector above
133  int chamber; // 1 - 36. Filled in EMTFHit2016.cc from CSCDetId
134  int csc_ID; // 1 - 9. Filled in EMTFHit2016.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 EMTFHit2016.cc from CSCCorrelatedLCTDigi
139  int wire; // 1 - ?. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
140  int strip; // 1 - ?. Filled in EMTFHit2016.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 EMTFHit2016.cc from CSCCorrelatedLCTDigi
145  int pattern; // 0 - 10. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
146  int bend; // 0 or 1. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
147  int valid; // 0 or 1. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
148  int sync_err; // 0 or 1. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
149  int bc0; // 0 or 1.
150  int bx; // -3 - 3. Filled in EMTFHit2016.cc from CSCCorrelatedLCTDigi
151  int stub_num; // 0 or 1.
152  int is_CSC_hit; // 0 or 1. Filled in EMTFHit2016.cc
153  int is_RPC_hit; // 0 or 1. Filled in EMTFHit2016.cc
154 
155  }; // End of class EMTFHit2016
156 
157  // Define a vector of EMTFHit2016
158  typedef std::vector<EMTFHit2016> EMTFHit2016Collection;
159 
160 } // End of namespace l1t
161 
162 #endif /* define DataFormats_L1TMuon_EMTFHit2016_h */
void set_valid(int bits)
Definition: EMTFHit2016.h:83
void set_quality(int bits)
Definition: EMTFHit2016.h:80
void set_ring(int bits)
Definition: EMTFHit2016.h:65
void set_neighbor(int bits)
Definition: EMTFHit2016.h:73
int BX() const
Definition: EMTFHit2016.h:114
void set_pattern(int bits)
Definition: EMTFHit2016.h:81
void set_is_CSC_hit(int bits)
Definition: EMTFHit2016.h:88
int Stub_num() const
Definition: EMTFHit2016.h:115
int Sync_err() const
Definition: EMTFHit2016.h:112
CSCDetId CSC_DetId() const
Definition: EMTFHit2016.h:54
void set_bend(int bits)
Definition: EMTFHit2016.h:82
CSCDetId CreateCSCDetId()
void set_strip_low(int bits)
Definition: EMTFHit2016.h:78
void set_strip(int bits)
Definition: EMTFHit2016.h:76
int Track_num() const
Definition: EMTFHit2016.h:107
void SetCSCLCTDigi(CSCCorrelatedLCTDigi digi)
Definition: EMTFHit2016.h:51
void SetCSCDetId(CSCDetId id)
Definition: EMTFHit2016.h:49
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
int Roll() const
Definition: EMTFHit2016.h:99
void set_strip_hi(int bits)
Definition: EMTFHit2016.h:77
void ImportME(const emtf::ME _ME)
int Quality() const
Definition: EMTFHit2016.h:108
int Strip() const
Definition: EMTFHit2016.h:104
delete x;
Definition: CaloConfig.h:22
int Is_CSC_hit() const
Definition: EMTFHit2016.h:116
void set_roll(int bits)
Definition: EMTFHit2016.h:71
int Valid() const
Definition: EMTFHit2016.h:111
void set_chamber(int bits)
Definition: EMTFHit2016.h:69
void set_subsector(int bits)
Definition: EMTFHit2016.h:68
int Strip_low() const
Definition: EMTFHit2016.h:106
void ImportCSCCorrelatedLCTDigi(const CSCCorrelatedLCTDigi &_digi)
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi()
int Sector() const
Definition: EMTFHit2016.h:94
void set_csc_ID(int bits)
Definition: EMTFHit2016.h:70
int Station() const
Definition: EMTFHit2016.h:92
void set_wire(int bits)
Definition: EMTFHit2016.h:75
void SetRPCDigi(RPCDigi digi)
Definition: EMTFHit2016.h:52
int RPC_layer() const
Definition: EMTFHit2016.h:100
RPCDetId rpc_DetId
Definition: EMTFHit2016.h:123
const RPCDetId * PtrRPC_DetId() const
Definition: EMTFHit2016.h:59
void set_bc0(int bits)
Definition: EMTFHit2016.h:85
virtual ~EMTFHit2016()
Definition: EMTFHit2016.h:34
const RPCDigi * PtrRPC_Digi() const
Definition: EMTFHit2016.h:61
void set_endcap(int bits)
Definition: EMTFHit2016.h:63
int Endcap() const
Definition: EMTFHit2016.h:91
RPCDigi RPC_Digi() const
Definition: EMTFHit2016.h:57
int Sector_index() const
Definition: EMTFHit2016.h:95
int Is_RPC_hit() const
Definition: EMTFHit2016.h:117
RPCDetId CreateRPCDetId()
void set_is_RPC_hit(int bits)
Definition: EMTFHit2016.h:89
int MPC_link() const
Definition: EMTFHit2016.h:102
int Subsector() const
Definition: EMTFHit2016.h:96
void set_rpc_layer(int bits)
Definition: EMTFHit2016.h:72
void set_sector(int bits)
Definition: EMTFHit2016.h:66
CSCCorrelatedLCTDigi CSC_LCTDigi() const
Definition: EMTFHit2016.h:56
void SetRPCDetId(RPCDetId id)
Definition: EMTFHit2016.h:50
void ImportCSCDetId(const CSCDetId &_detId)
int Neighbor() const
Definition: EMTFHit2016.h:101
int BC0() const
Definition: EMTFHit2016.h:113
void set_sector_index(int bits)
Definition: EMTFHit2016.h:67
void ImportRPCDetId(const RPCDetId &_detId)
void set_stub_num(int bits)
Definition: EMTFHit2016.h:87
void set_station(int bits)
Definition: EMTFHit2016.h:64
void set_mpc_link(int bits)
Definition: EMTFHit2016.h:74
int Strip_hi() const
Definition: EMTFHit2016.h:105
void ImportRPCDigi(const RPCDigi &_digi)
void set_track_num(int bits)
Definition: EMTFHit2016.h:79
int CSC_ID() const
Definition: EMTFHit2016.h:98
RPCDetId RPC_DetId() const
Definition: EMTFHit2016.h:55
CSCDetId csc_DetId
Definition: EMTFHit2016.h:122
int Ring() const
Definition: EMTFHit2016.h:93
CSCCorrelatedLCTDigi csc_LCTDigi
Definition: EMTFHit2016.h:124
int Pattern() const
Definition: EMTFHit2016.h:109
const CSCDetId * PtrCSC_DetId() const
Definition: EMTFHit2016.h:58
const CSCCorrelatedLCTDigi * PtrCSC_LCTDigi() const
Definition: EMTFHit2016.h:60
std::vector< EMTFHit2016 > EMTFHit2016Collection
Definition: EMTFHit2016.h:158
void set_bx(int bits)
Definition: EMTFHit2016.h:86
int Wire() const
Definition: EMTFHit2016.h:103
void set_sync_err(int bits)
Definition: EMTFHit2016.h:84
int Chamber() const
Definition: EMTFHit2016.h:97
int Bend() const
Definition: EMTFHit2016.h:110