-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMTF March 2020 emulator update #29262
Changes from all commits
a8ebb2a
05a3233
5a3b0fd
858821d
6f7123c
e3a449c
50d276a
b56bcc8
706c7d3
cebba8d
f5e9d96
52e2caa
0f90c8e
7dbd370
1430689
4e48484
ed980ba
d64a367
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,11 @@ | |
#include "DataFormats/MuonDetId/interface/RPCDetId.h" | ||
#include "DataFormats/MuonDetId/interface/GEMDetId.h" | ||
#include "DataFormats/MuonDetId/interface/ME0DetId.h" | ||
#include "DataFormats/MuonDetId/interface/DTChamberId.h" | ||
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h" | ||
#include "DataFormats/RPCDigi/interface/RPCDigi.h" | ||
#include "DataFormats/GEMDigi/interface/GEMPadDigi.h" | ||
#include "DataFormats/GEMDigi/interface/ME0PadDigi.h" | ||
//#include "DataFormats/RPCDigi/interface/RPCDigi.h" | ||
//#include "DataFormats/GEMDigi/interface/GEMPadDigi.h" | ||
//#include "DataFormats/GEMDigi/interface/ME0PadDigi.h" | ||
#include "DataFormats/L1TMuon/interface/CPPFDigi.h" | ||
#include "DataFormats/L1TMuon/interface/EMTF/ME.h" | ||
|
||
|
@@ -25,6 +26,7 @@ namespace l1t { | |
public: | ||
EMTFHit() | ||
: rawDetId(0), | ||
subsystem(-99), | ||
endcap(-99), | ||
station(-99), | ||
ring(-99), | ||
|
@@ -58,8 +60,6 @@ namespace l1t { | |
stub_num(-99), | ||
phi_fp(-99), | ||
theta_fp(-99), | ||
phzvl(-99), | ||
ph_hit(-99), | ||
zone_hit(-99), | ||
zone_code(-99), | ||
fs_segment(-99), | ||
|
@@ -77,20 +77,17 @@ namespace l1t { | |
rho_sim(-99), | ||
z_sim(-99), | ||
alct_quality(-99), | ||
clct_quality(-99), | ||
is_CSC(-99), | ||
is_RPC(-99), | ||
is_GEM(-99), | ||
subsystem(-99){}; | ||
clct_quality(-99){}; | ||
|
||
virtual ~EMTFHit(){}; | ||
|
||
// void ImportCSCDetId (const CSCDetId& _detId); | ||
CSCDetId CreateCSCDetId() const; | ||
// void ImportRPCDetId (const RPCDetId& _detId); | ||
// void ImportGEMDetId (const GEMDetId& _detId); | ||
RPCDetId CreateRPCDetId() const; | ||
// void ImportGEMDetId (const GEMDetId& _detId); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete commented-out code |
||
// GEMDetId CreateGEMDetId() const; | ||
|
||
// void ImportCSCCorrelatedLCTDigi (const CSCCorrelatedLCTDigi& _digi); | ||
CSCCorrelatedLCTDigi CreateCSCCorrelatedLCTDigi() const; | ||
// void ImportRPCDigi (const RPCDigi& _digi); | ||
|
@@ -114,6 +111,7 @@ namespace l1t { | |
void SetRPCDetId(const RPCDetId& id) { rawDetId = id.rawId(); } | ||
void SetGEMDetId(const GEMDetId& id) { rawDetId = id.rawId(); } | ||
void SetME0DetId(const ME0DetId& id) { rawDetId = id.rawId(); } | ||
void SetDTDetId(const DTChamberId& id) { rawDetId = id.rawId(); } | ||
|
||
//CSCDetId CSC_DetId () const { return csc_DetId; } | ||
//RPCDetId RPC_DetId () const { return rpc_DetId; } | ||
|
@@ -126,7 +124,9 @@ namespace l1t { | |
RPCDetId RPC_DetId() const { return RPCDetId(rawDetId); } | ||
GEMDetId GEM_DetId() const { return GEMDetId(rawDetId); } | ||
ME0DetId ME0_DetId() const { return ME0DetId(rawDetId); } | ||
DTChamberId DT_DetId() const { return DTChamberId(rawDetId); } | ||
|
||
void set_subsystem(int bits) { subsystem = bits; } | ||
void set_endcap(int bits) { endcap = bits; } | ||
void set_station(int bits) { station = bits; } | ||
void set_ring(int bits) { ring = bits; } | ||
|
@@ -160,8 +160,6 @@ namespace l1t { | |
void set_stub_num(int bits) { stub_num = bits; } | ||
void set_phi_fp(int bits) { phi_fp = bits; } | ||
void set_theta_fp(int bits) { theta_fp = bits; } | ||
void set_phzvl(int bits) { phzvl = bits; } | ||
void set_ph_hit(int bits) { ph_hit = bits; } | ||
void set_zone_hit(int bits) { zone_hit = bits; } | ||
void set_zone_code(int bits) { zone_code = bits; } | ||
void set_fs_segment(int bits) { fs_segment = bits; } | ||
|
@@ -180,11 +178,8 @@ namespace l1t { | |
void set_z_sim(float val) { z_sim = val; } | ||
void set_alct_quality(int bits) { alct_quality = bits; } | ||
void set_clct_quality(int bits) { clct_quality = bits; } | ||
void set_is_CSC(int bits) { is_CSC = bits; } | ||
void set_is_RPC(int bits) { is_RPC = bits; } | ||
void set_is_GEM(int bits) { is_GEM = bits; } | ||
void set_subsystem(int bits) { subsystem = bits; } | ||
|
||
int Subsystem() const { return subsystem; } | ||
int Endcap() const { return endcap; } | ||
int Station() const { return station; } | ||
int Ring() const { return ring; } | ||
|
@@ -218,8 +213,6 @@ namespace l1t { | |
int Stub_num() const { return stub_num; } | ||
int Phi_fp() const { return phi_fp; } | ||
int Theta_fp() const { return theta_fp; } | ||
int Phzvl() const { return phzvl; } | ||
int Ph_hit() const { return ph_hit; } | ||
int Zone_hit() const { return zone_hit; } | ||
int Zone_code() const { return zone_code; } | ||
int FS_segment() const { return fs_segment; } | ||
|
@@ -238,10 +231,13 @@ namespace l1t { | |
float Z_sim() const { return z_sim; } | ||
int ALCT_quality() const { return alct_quality; } | ||
int CLCT_quality() const { return clct_quality; } | ||
int Is_CSC() const { return is_CSC; } | ||
int Is_RPC() const { return is_RPC; } | ||
int Is_GEM() const { return is_GEM; } | ||
int Subsystem() const { return subsystem; } | ||
|
||
// See L1Trigger/L1TMuon/interface/MuonTriggerPrimitive.h | ||
bool Is_DT() const { return subsystem == 0; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like a good case for an enum |
||
bool Is_CSC() const { return subsystem == 1; } | ||
bool Is_RPC() const { return subsystem == 2; } | ||
bool Is_GEM() const { return subsystem == 3; } | ||
bool Is_ME0() const { return subsystem == 4; } | ||
|
||
private: | ||
//CSCDetId csc_DetId; | ||
|
@@ -253,14 +249,14 @@ namespace l1t { | |
//GEMPadDigi gem_PadDigi; | ||
|
||
uint32_t rawDetId; // raw CMSSW DetId | ||
|
||
int endcap; // +/-1. For ME+ and ME-. | ||
int station; // 1 - 4. | ||
int subsystem; // 0 - 4. 0 for DT, 1 for CSC, 2 for RPC, 3 for GEM, 4 for ME0 | ||
int endcap; // +/-1. For ME+ and ME-. | ||
int station; // 1 - 4. | ||
int ring; // 1 - 4. ME1/1a is denoted as "Ring 4". Should check dependence on input CSCDetId convention. - AWB 02.03.17 | ||
int sector; // 1 - 6. CSC / EMTF sector convention: sector 1 starts at 15 degrees | ||
int sector_RPC; // 1 - 6. RPC sector convention (in CMSSW): sector 1 starts at -5 degrees | ||
int sector_idx; // 0 - 11. 0 - 5 for ME+, 6 - 11 for ME-. For neighbor hits, set by EMTF sector that received it. | ||
int subsector; // 0 - 6. In CSCs, 1 or 2 for ME1, 0 for ME2/3/4. In RPCs, 1 - 6, where 1 is first chamber in EMTF sector. | ||
int subsector; // 0 - 6. In CSCs, 1 or 2 for ME1, 0 for ME2/3/4. | ||
int subsector_RPC; // 0 - 6. RPC sector convention (in CMSSW): subsector 3 is the first chamber in the EMTF sector. | ||
int chamber; // 1 - 36. Chamber 1 starts at -5 degrees. | ||
int csc_ID; // 1 - 9. For CSCs only. | ||
|
@@ -287,8 +283,6 @@ namespace l1t { | |
int stub_num; // 0 or 1. Only from unpacked data? - AWB 02.03.17 | ||
int phi_fp; // 0 - 4920 | ||
int theta_fp; // 0 - 127 | ||
int phzvl; // 0 - 6. | ||
int ph_hit; // 2 - 43. (Range? - AWB 02.03.17) | ||
int zone_hit; // 4 - 156 (Range? - AWB 02.03.17) | ||
int zone_code; // 0 - 12. (Range? - AWB 02.03.17) | ||
int fs_segment; // 0 - 13. (Range? - AWB 02.03.17) | ||
|
@@ -299,18 +293,14 @@ namespace l1t { | |
float phi_glob; // +/-180. | ||
float theta; // 0 - 90. | ||
float eta; // +/-2.5. | ||
float time; // ? - ?. RPC time information | ||
float time; // ? - ?. RPC time information (ns) | ||
float phi_sim; // +/-180. | ||
float theta_sim; // 0 - 90. | ||
float eta_sim; // +/-2.5. | ||
float rho_sim; // ? - ?. | ||
float z_sim; // ? - ?. | ||
int alct_quality; // 1 - 3. For emulated CSC LCTs only, maps to number of ALCT layers (4 - 6). | ||
int clct_quality; // 4 - 6. For emulated CSC LCTs only, maps to number of CLCT layers (4 - 6). | ||
int is_CSC; // 0 or 1. | ||
int is_RPC; // 0 or 1. | ||
int is_GEM; // 0 or 1. | ||
int subsystem; // 1 or ?. 1 for CSC, 2 for RPC, 3 for GEM | ||
|
||
}; // End of class EMTFHit | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,10 +107,10 @@ namespace l1t { | |
EMTFHitCollection Hits() const { return _Hits; } | ||
std::vector<unsigned int> HitIdx() const { return _HitIdx; } | ||
|
||
void set_Road(const EMTFRoad& bits) { _Road = bits; } | ||
void set_RoadIdx(unsigned int bits) { _RoadIdx = bits; } | ||
EMTFRoad Road() const { return _Road; } | ||
unsigned int RoadIdx() const { return _RoadIdx; } | ||
//void set_Road(const EMTFRoad& bits) { _Road = bits; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete commented-out code |
||
//void set_RoadIdx(unsigned int bits) { _RoadIdx = bits; } | ||
//EMTFRoad Road() const { return _Road; } | ||
//unsigned int RoadIdx() const { return _RoadIdx; } | ||
|
||
void set_PtLUT(EMTFPtLUT bits) { _PtLUT = bits; } | ||
EMTFPtLUT PtLUT() const { return _PtLUT; } | ||
|
@@ -182,8 +182,8 @@ namespace l1t { | |
EMTFHitCollection _Hits; | ||
std::vector<unsigned int> _HitIdx; | ||
|
||
EMTFRoad _Road; | ||
unsigned int _RoadIdx; | ||
//EMTFRoad _Road; | ||
//unsigned int _RoadIdx; | ||
|
||
EMTFPtLUT _PtLUT; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,15 +177,22 @@ namespace l1t { | |
RPC_.Word(), | ||
RPC_.Link()); | ||
|
||
// Rotate by 20 deg to match RPC convention in CMSSW | ||
int _sector_rpc = (_subsector < 5) ? _sector : (_sector % 6) + 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. magic numbers should be named constants (everywhere) |
||
// Rotate by 2 to match RPC convention in CMSSW (RPCDetId.h) | ||
int _subsector_rpc = ((_subsector + 1) % 6) + 1; | ||
// Define chamber number | ||
int _chamber = (_sector_rpc - 1) * 6 + _subsector_rpc; | ||
// Define CSC-like subsector | ||
int _subsector_csc = (_station != 1) ? 0 : ((_chamber % 6 > 2) ? 1 : 2); | ||
|
||
Hit_.set_station(_station); | ||
Hit_.set_ring(_ring); | ||
Hit_.set_sector(_sector); | ||
Hit_.set_subsector(_subsector); | ||
Hit_.set_sector_RPC(_subsector < 5 ? _sector | ||
: (_sector % 6) + 1); // Rotate by 20 deg to match RPC convention in CMSSW | ||
Hit_.set_subsector_RPC(((_subsector + 1) % 6) + | ||
1); // Rotate by 2 to match RPC convention in CMSSW (RPCDetId.h) | ||
Hit_.set_chamber((Hit_.Sector_RPC() - 1) * 6 + Hit_.Subsector_RPC()); | ||
Hit_.set_subsector(_subsector_csc); | ||
Hit_.set_sector_RPC(_sector_rpc); | ||
Hit_.set_subsector_RPC(_subsector_rpc); | ||
Hit_.set_chamber(_chamber); | ||
Hit_.set_neighbor(_neighbor); | ||
Hit_.set_pc_segment(_segment); | ||
Hit_.set_fs_segment(_segment); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented-out code