Skip to content

Commit

Permalink
Merge pull request #44498 from zhenbinwu/GMT_24AR
Browse files Browse the repository at this point in the history
Update of Phase-2 GMT Emulator
  • Loading branch information
cmsbuild authored Jul 15, 2024
2 parents 5950987 + 0830f3b commit c1df4fb
Show file tree
Hide file tree
Showing 68 changed files with 6,786 additions and 3,249 deletions.
2 changes: 1 addition & 1 deletion DQMOffline/L1Trigger/python/L1TPhase2MuonOffline_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
useL1AtVtxCoord = cms.untracked.bool(False),

genParticlesInputTag = cms.untracked.InputTag("genParticles"),
gmtMuonToken = cms.InputTag("l1tSAMuonsGmt", "promptSAMuons"),
gmtMuonToken = cms.InputTag("l1tSAMuonsGmt", "prompt"),
gmtTkMuonToken = cms.InputTag("l1tTkMuonsGmt",""),

efficiencyVsPtBins = cms.untracked.vdouble(effVsPtBins),
Expand Down
43 changes: 23 additions & 20 deletions DataFormats/L1TMuonPhase2/interface/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace Phase2L1GMT {
const int BITSD0 = 12;

//Muon ROI
const int BITSSTUBCOORD = 8;
const int BITSSTUBCOORD = 10;
const int BITSSTUBETA = 8;
const int BITSSTUBID = 9;
const int BITSSTUBID = 12;
const int BITSSTUBPHIQUALITY = 4;
const int BITSSTUBETAQUALITY = 4;
const int BITSSTUBTIME = 8;
Expand All @@ -45,8 +45,8 @@ namespace Phase2L1GMT {
const int BITSSIGMAETA = 4;
const int BITSSIGMACOORD = 4;
const int BITSPROPCOORD = 9;
const int BITSPROPSIGMACOORD_A = 5;
const int BITSPROPSIGMACOORD_B = 5;
const int BITSPROPSIGMACOORD_A = 6;
const int BITSPROPSIGMACOORD_B = 6;
const int BITSPROPSIGMAETA_A = 5;
const int BITSPROPSIGMAETA_B = 5;

Expand All @@ -62,8 +62,9 @@ namespace Phase2L1GMT {
const int BITSGTETA = 14;
const int BITSGTZ0 = 10;
const int BITSGTD0 = 10;
const int BITSGTQUAL = 8;
const int BITSGTISO = 4;
const int BITSGTQUAL = 6;
const int BITSGTQUALSC = 7;
const int BITSGTISO = 6;
const int BITSGTBETA = 4;

// Bitwidth for Tau->3mu object
Expand Down Expand Up @@ -91,22 +92,24 @@ namespace Phase2L1GMT {
const float LSBpt = 0.03125;
const float LSBphi = 2. * M_PI / pow(2, BITSPHI);
const float LSBeta = 2. * M_PI / pow(2, BITSETA);
const float LSBGTz0 = 0.05; // 0.5mm, in sync with GTT and Correlator
const float LSBGTd0 = 0.03; // from GT interface doc
const float LSBSAz0 = 1.6; // 0.05 * 32 cm, with range +- 25.6
const float LSBSAd0 = 3.84; // 0.03 * 128 cm, with range +- 245.76
const float LSBGTiso = 0.25; // 0.25GeV, LSBphi * 8
const float LSBGTz0 = 0.05; // 0.5mm, in sync with GTT and Correlator
const float LSBGTd0 = 0.03; // from GT interface doc
const float LSBSAz0 = 1.6; // 0.05 * 32 cm, with range +- 25.6
const float LSBSAd0 = 3.84; // 0.03 * 128 cm, with range +- 245.76

typedef ap_uint<64> wordtype;
typedef ap_uint<1> valid_gt_t; //valid
typedef ap_uint<1> q_gt_t; //charge
typedef ap_uint<BITSGTPT> pt_gt_t; //pt of tracker muon
typedef ap_int<BITSGTPHI> phi_gt_t; //phi of tracker muon
typedef ap_int<BITSGTETA> eta_gt_t; //eta of tracker muon
typedef ap_int<BITSGTZ0> z0_gt_t; //z0 of tracker muon
typedef ap_int<BITSGTD0> d0_gt_t; //d0 of tracker muon
typedef ap_uint<BITSGTISO> iso_gt_t; //isolation of tracker muon
typedef ap_uint<BITSGTBETA> beta_gt_t; //beta of tracker muon
typedef ap_uint<BITSGTQUAL> qual_gt_t; //quality of tracker muon
typedef ap_uint<1> valid_gt_t; //valid
typedef ap_uint<1> q_gt_t; //charge
typedef ap_uint<BITSGTPT> pt_gt_t; //pt of tracker muon
typedef ap_int<BITSGTPHI> phi_gt_t; //phi of tracker muon
typedef ap_int<BITSGTETA> eta_gt_t; //eta of tracker muon
typedef ap_int<BITSGTZ0> z0_gt_t; //z0 of tracker muon
typedef ap_int<BITSGTD0> d0_gt_t; //d0 of tracker muon
typedef ap_uint<BITSGTISO> iso_gt_t; //isolation of tracker muon
typedef ap_uint<BITSGTBETA> beta_gt_t; //beta of tracker muon
typedef ap_uint<BITSGTQUAL> qual_gt_t; //quality of tracker muon
typedef ap_int<BITSGTQUALSC> qualsc_gt_t; //quality score of tracker muon (qual/q)

//Standalone muon datatype
typedef ap_uint<1> valid_sa_t; //valid
Expand Down
3 changes: 3 additions & 0 deletions DataFormats/L1TMuonPhase2/interface/EMTFTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ namespace l1t::phase2 {
void setEmtfBeta(int32_t aEmtfBeta) { emtf_beta_ = aEmtfBeta; }
void setEmtfModeV1(int16_t aEmtfModeV1) { emtf_mode_v1_ = aEmtfModeV1; }
void setEmtfModeV2(int16_t aEmtfModeV2) { emtf_mode_v2_ = aEmtfModeV2; }
void setEmtfQuality(int16_t aEmtfQuality) { emtf_quality_ = aEmtfQuality; }

void setSiteHits(const site_hits_t& aSiteHits) { site_hits_ = aSiteHits; }
void setSiteSegs(const site_segs_t& aSiteSegs) { site_segs_ = aSiteSegs; }
Expand Down Expand Up @@ -71,6 +72,7 @@ namespace l1t::phase2 {
int32_t emtfBeta() const { return emtf_beta_; }
int16_t emtfModeV1() const { return emtf_mode_v1_; }
int16_t emtfModeV2() const { return emtf_mode_v2_; }
int16_t emtfQuality() const { return emtf_quality_; }

const site_hits_t& siteHits() const { return site_hits_; }
const site_segs_t& siteSegs() const { return site_segs_; }
Expand Down Expand Up @@ -101,6 +103,7 @@ namespace l1t::phase2 {
int32_t emtf_beta_;
int16_t emtf_mode_v1_;
int16_t emtf_mode_v2_;
int16_t emtf_quality_;

site_hits_t site_hits_;
site_segs_t site_segs_;
Expand Down
Loading

0 comments on commit c1df4fb

Please sign in to comment.