File indexing completed on 2024-09-07 04:35:55
0001
0002
0003
0004
0005 #ifndef DataFormats_L1TMuon_EMTFHit_h
0006 #define DataFormats_L1TMuon_EMTFHit_h
0007
0008 #include <cstdint>
0009 #include <vector>
0010
0011 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
0012 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0013 #include "DataFormats/MuonDetId/interface/GEMDetId.h"
0014 #include "DataFormats/MuonDetId/interface/ME0DetId.h"
0015 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0016 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h"
0017 #include "DataFormats/CSCDigi/interface/CSCShowerDigi.h"
0018 #include "DataFormats/GEMDigi/interface/GEMPadDigiCluster.h"
0019 #include "DataFormats/L1TMuon/interface/CPPFDigi.h"
0020 #include "DataFormats/L1TMuon/interface/L1TMuonSubsystems.h"
0021
0022 namespace l1t {
0023
0024 namespace l1tmu = L1TMuon;
0025
0026 class EMTFHit {
0027 public:
0028 EMTFHit()
0029 : rawDetId(0),
0030 subsystem(-99),
0031 endcap(-99),
0032 station(-99),
0033 ring(-99),
0034 sector(-99),
0035 sector_RPC(-99),
0036 sector_idx(-99),
0037 subsector(-99),
0038 subsector_RPC(-99),
0039 chamber(-99),
0040 csc_ID(-99),
0041 csc_nID(-99),
0042 roll(-99),
0043 neighbor(-99),
0044 mpc_link(-99),
0045 pc_sector(-99),
0046 pc_station(-99),
0047 pc_chamber(-99),
0048 pc_segment(-99),
0049 wire(-99),
0050 strip(-99),
0051 strip_hi(-99),
0052 strip_low(-99),
0053 strip_quart(-99),
0054 strip_eighth(-99),
0055 strip_quart_bit(-99),
0056 strip_eighth_bit(-99),
0057 muon_shower_valid(-99),
0058 muon_shower_inTime(-99),
0059 muon_shower_outOfTime(-99),
0060 track_num(-99),
0061 quality(-99),
0062 pattern(-99),
0063 pattern_run3(-99),
0064 bend(-99),
0065 slope(-99),
0066 valid(-99),
0067 sync_err(-99),
0068 layer(-99),
0069 bc0(-99),
0070 bx(-99),
0071 stub_num(-99),
0072 phi_fp(-99),
0073 theta_fp(-99),
0074 zone_hit(-99),
0075 zone_code(-99),
0076 fs_segment(-99),
0077 fs_zone_code(-99),
0078 bt_station(-99),
0079 bt_segment(-99),
0080 phi_loc(-99),
0081 phi_glob(-999),
0082 theta(-99),
0083 eta(-99),
0084 time(-99),
0085 phi_sim(-999),
0086 theta_sim(-99),
0087 eta_sim(-99),
0088 rho_sim(-99),
0089 z_sim(-99),
0090 alct_quality(-99),
0091 clct_quality(-99) {}
0092
0093 virtual ~EMTFHit() {}
0094
0095 CSCDetId CreateCSCDetId() const;
0096 RPCDetId CreateRPCDetId() const;
0097 GEMDetId CreateGEMDetId() const;
0098 ME0DetId CreateME0DetId() const;
0099
0100
0101 CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi(const bool isRun3) const;
0102
0103 CSCShowerDigi CreateCSCShowerDigi() const;
0104
0105
0106
0107 CPPFDigi CreateCPPFDigi() const;
0108
0109 GEMPadDigiCluster CreateGEMPadDigiCluster() const;
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121 void SetCSCDetId(const CSCDetId& id) { rawDetId = id.rawId(); }
0122 void SetRPCDetId(const RPCDetId& id) { rawDetId = id.rawId(); }
0123 void SetGEMDetId(const GEMDetId& id) { rawDetId = id.rawId(); }
0124 void SetME0DetId(const ME0DetId& id) { rawDetId = id.rawId(); }
0125 void SetDTDetId(const DTChamberId& id) { rawDetId = id.rawId(); }
0126
0127
0128
0129
0130
0131
0132
0133
0134 CSCDetId CSC_DetId() const { return CSCDetId(rawDetId); }
0135 RPCDetId RPC_DetId() const { return RPCDetId(rawDetId); }
0136 GEMDetId GEM_DetId() const { return GEMDetId(rawDetId); }
0137 ME0DetId ME0_DetId() const { return ME0DetId(rawDetId); }
0138 DTChamberId DT_DetId() const { return DTChamberId(rawDetId); }
0139
0140 void set_subsystem(int bits) { subsystem = bits; }
0141 void set_endcap(int bits) { endcap = bits; }
0142 void set_station(int bits) { station = bits; }
0143 void set_ring(int bits) { ring = bits; }
0144 void set_sector(int bits) { sector = bits; }
0145 void set_sector_RPC(int bits) { sector_RPC = bits; }
0146 void set_sector_idx(int bits) { sector_idx = bits; }
0147 void set_subsector(int bits) { subsector = bits; }
0148 void set_subsector_RPC(int bits) { subsector_RPC = bits; }
0149 void set_chamber(int bits) { chamber = bits; }
0150 void set_csc_ID(int bits) { csc_ID = bits; }
0151 void set_csc_nID(int bits) { csc_nID = bits; }
0152 void set_roll(int bits) { roll = bits; }
0153 void set_neighbor(int bits) { neighbor = bits; }
0154 void set_mpc_link(int bits) { mpc_link = bits; }
0155 void set_pc_sector(int bits) { pc_sector = bits; }
0156 void set_pc_station(int bits) { pc_station = bits; }
0157 void set_pc_chamber(int bits) { pc_chamber = bits; }
0158 void set_pc_segment(int bits) { pc_segment = bits; }
0159 void set_wire(int bits) { wire = bits; }
0160 void set_strip(int bits) { strip = bits; }
0161 void set_strip_hi(int bits) { strip_hi = bits; }
0162 void set_strip_low(int bits) { strip_low = bits; }
0163 void set_strip_quart(int bits) { strip_quart = bits; }
0164 void set_strip_eighth(int bits) { strip_eighth = bits; }
0165 void set_strip_quart_bit(int bits) { strip_quart_bit = bits; }
0166 void set_strip_eighth_bit(int bits) { strip_eighth_bit = bits; }
0167 void set_muon_shower_valid(int bits) { muon_shower_valid = bits; }
0168 void set_muon_shower_inTime(int bits) { muon_shower_inTime = bits; }
0169 void set_muon_shower_outOfTime(int bits) { muon_shower_outOfTime = bits; }
0170 void set_track_num(int bits) { track_num = bits; }
0171 void set_quality(int bits) { quality = bits; }
0172 void set_pattern(int bits) { pattern = bits; }
0173 void set_pattern_run3(int bits) { pattern_run3 = bits; }
0174 void set_bend(int bits) { bend = bits; }
0175 void set_slope(int bits) { slope = bits; }
0176 void set_valid(int bits) { valid = bits; }
0177 void set_sync_err(int bits) { sync_err = bits; }
0178
0179 void set_pad(int bits) { set_strip(bits); }
0180 void set_pad_hi(int bits) { set_strip_hi(bits); }
0181 void set_pad_low(int bits) { set_strip_low(bits); }
0182 void set_partition(int bits) { set_roll(bits); }
0183 void set_layer(int bits) { layer = bits; }
0184 void set_cluster_size(int bits) { set_quality(bits); }
0185 void set_cluster_id(int bits) { set_track_num(bits); }
0186
0187 void set_bc0(int bits) { bc0 = bits; }
0188 void set_bx(int bits) { bx = bits; }
0189 void set_stub_num(int bits) { stub_num = bits; }
0190 void set_phi_fp(int bits) { phi_fp = bits; }
0191 void set_theta_fp(int bits) { theta_fp = bits; }
0192 void set_zone_hit(int bits) { zone_hit = bits; }
0193 void set_zone_code(int bits) { zone_code = bits; }
0194 void set_fs_segment(int bits) { fs_segment = bits; }
0195 void set_fs_zone_code(int bits) { fs_zone_code = bits; }
0196 void set_bt_station(int bits) { bt_station = bits; }
0197 void set_bt_segment(int bits) { bt_segment = bits; }
0198 void set_phi_loc(float val) { phi_loc = val; }
0199 void set_phi_glob(float val) { phi_glob = val; }
0200 void set_theta(float val) { theta = val; }
0201 void set_eta(float val) { eta = val; }
0202 void set_time(float val) { time = val; }
0203 void set_phi_sim(float val) { phi_sim = val; }
0204 void set_theta_sim(float val) { theta_sim = val; }
0205 void set_eta_sim(float val) { eta_sim = val; }
0206 void set_rho_sim(float val) { rho_sim = val; }
0207 void set_z_sim(float val) { z_sim = val; }
0208 void set_alct_quality(int bits) { alct_quality = bits; }
0209 void set_clct_quality(int bits) { clct_quality = bits; }
0210
0211 int Subsystem() const { return subsystem; }
0212 int Endcap() const { return endcap; }
0213 int Station() const { return station; }
0214 int Ring() const { return ring; }
0215 int Sector() const { return sector; }
0216 int Sector_RPC() const { return sector_RPC; }
0217 int Sector_idx() const { return sector_idx; }
0218 int Subsector() const { return subsector; }
0219 int Subsector_RPC() const { return subsector_RPC; }
0220 int Chamber() const { return chamber; }
0221 int CSC_ID() const { return csc_ID; }
0222 int CSC_nID() const { return csc_nID; }
0223 int Roll() const { return roll; }
0224 int Neighbor() const { return neighbor; }
0225 int MPC_link() const { return mpc_link; }
0226 int PC_sector() const { return pc_sector; }
0227 int PC_station() const { return pc_station; }
0228 int PC_chamber() const { return pc_chamber; }
0229 int PC_segment() const { return pc_segment; }
0230 int Wire() const { return wire; }
0231 int Strip() const { return strip; }
0232 int Strip_hi() const { return strip_hi; }
0233 int Strip_low() const { return strip_low; }
0234 int Strip_quart() const { return strip_quart; }
0235 int Strip_eighth() const { return strip_eighth; }
0236 int Strip_quart_bit() const { return strip_quart_bit; }
0237 int Strip_eighth_bit() const { return strip_eighth_bit; }
0238 int Muon_shower_valid() const { return muon_shower_valid; }
0239 int Muon_shower_inTime() const { return muon_shower_inTime; }
0240 int Muon_shower_outOfTime() const { return muon_shower_outOfTime; }
0241 int Track_num() const { return track_num; }
0242 int Quality() const { return quality; }
0243 int Pattern() const { return pattern; }
0244 int Pattern_run3() const { return pattern_run3; }
0245 int Bend() const { return bend; }
0246 int Slope() const { return slope; }
0247 int Valid() const { return valid; }
0248 int Sync_err() const { return sync_err; }
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260 int Pad() const { return Strip(); }
0261
0262 int Pad_hi() const { return Strip_hi(); }
0263
0264 int Pad_low() const { return Strip_low(); }
0265
0266 int Partition() const { return Roll(); }
0267 int Layer() const { return layer; }
0268
0269 int ClusterSize() const { return Quality(); }
0270
0271 int ClusterID() const { return Track_num(); }
0272
0273 int BC0() const { return bc0; }
0274 int BX() const { return bx; }
0275 int Stub_num() const { return stub_num; }
0276 int Phi_fp() const { return phi_fp; }
0277 int Theta_fp() const { return theta_fp; }
0278 int Zone_hit() const { return zone_hit; }
0279 int Zone_code() const { return zone_code; }
0280 int FS_segment() const { return fs_segment; }
0281 int FS_zone_code() const { return fs_zone_code; }
0282 int BT_station() const { return bt_station; }
0283 int BT_segment() const { return bt_segment; }
0284 float Phi_loc() const { return phi_loc; }
0285 float Phi_glob() const { return phi_glob; }
0286 float Theta() const { return theta; }
0287 float Eta() const { return eta; }
0288 float Time() const { return time; }
0289 float Phi_sim() const { return phi_sim; }
0290 float Theta_sim() const { return theta_sim; }
0291 float Eta_sim() const { return eta_sim; }
0292 float Rho_sim() const { return rho_sim; }
0293 float Z_sim() const { return z_sim; }
0294 int ALCT_quality() const { return alct_quality; }
0295 int CLCT_quality() const { return clct_quality; }
0296
0297 bool Is_DT() const { return subsystem == l1tmu::kDT; }
0298 bool Is_CSC() const { return subsystem == l1tmu::kCSC; }
0299 bool Is_RPC() const { return subsystem == l1tmu::kRPC; }
0300 bool Is_GEM() const { return subsystem == l1tmu::kGEM; }
0301 bool Is_ME0() const { return subsystem == l1tmu::kME0; }
0302
0303 private:
0304
0305
0306
0307
0308
0309
0310
0311
0312 uint32_t rawDetId;
0313 int subsystem;
0314 int endcap;
0315 int station;
0316 int ring;
0317 int sector;
0318 int sector_RPC;
0319 int sector_idx;
0320 int subsector;
0321 int subsector_RPC;
0322 int chamber;
0323 int csc_ID;
0324 int csc_nID;
0325 int roll;
0326 int neighbor;
0327 int mpc_link;
0328 int pc_sector;
0329 int pc_station;
0330 int pc_chamber;
0331 int pc_segment;
0332 int wire;
0333 int strip;
0334 int strip_hi;
0335 int strip_low;
0336 int strip_quart;
0337 int strip_eighth;
0338 int strip_quart_bit;
0339 int strip_eighth_bit;
0340 int muon_shower_valid;
0341 int muon_shower_inTime;
0342 int muon_shower_outOfTime;
0343 int track_num;
0344 int quality;
0345 int pattern;
0346 int pattern_run3;
0347 int bend;
0348 int slope;
0349 int valid;
0350 int sync_err;
0351
0352 int layer;
0353
0354 int bc0;
0355 int bx;
0356 int stub_num;
0357 int phi_fp;
0358 int theta_fp;
0359 int zone_hit;
0360 int zone_code;
0361 int fs_segment;
0362 int fs_zone_code;
0363 int bt_station;
0364 int bt_segment;
0365 float phi_loc;
0366 float phi_glob;
0367 float theta;
0368 float eta;
0369 float time;
0370 float phi_sim;
0371 float theta_sim;
0372 float eta_sim;
0373 float rho_sim;
0374 float z_sim;
0375 int alct_quality;
0376 int clct_quality;
0377
0378 };
0379
0380
0381 typedef std::vector<EMTFHit> EMTFHitCollection;
0382
0383 }
0384
0385 #endif