Skip to content

Commit

Permalink
Adjust TkMuStub producer to have configurable stub stations. Default …
Browse files Browse the repository at this point in the history
…is S2(q99), and introduce instances TkMuStub S1(q90), S2(90), S12(q90), S12q99, S1234(q90)
  • Loading branch information
rekovic authored and Victor committed Oct 7, 2020
1 parent d63c0e2 commit 3346406
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
5 changes: 3 additions & 2 deletions L1Trigger/L1TTrackMatch/plugins/L1TkMuonStubProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class L1TkMuonStubProducer : public edm::EDProducer {

std::unique_ptr<L1TkMuCorrDynamicWindows> dwcorr_;
bool requireBX0_;
int mu_stub_station_;

const edm::EDGetTokenT< EMTFTrackCollection > emtfTCToken; // the track collection, directly from the EMTF and not formatted by GT
const edm::EDGetTokenT< EMTFHitCollection > emtfHCToken; // the hit collection, directly from the EMTF which stored the input Hits
Expand All @@ -99,6 +100,7 @@ L1TkMuonStubProducer::L1TkMuonStubProducer(const edm::ParameterSet& iConfig) :
std::string emtfMatchAlgoVersionString = iConfig.getParameter<std::string>("emtfMatchAlgoVersion");
std::transform(emtfMatchAlgoVersionString.begin(), emtfMatchAlgoVersionString.end(), emtfMatchAlgoVersionString.begin(), ::tolower); // make lowercase

mu_stub_station_ = iConfig.getParameter<int>("mu_stub_station");
requireBX0_ = iConfig.getParameter<bool>("require_BX0");

if (emtfMatchAlgoVersionString == "dynamicwindows")
Expand Down Expand Up @@ -191,8 +193,7 @@ L1TkMuonStubProducer::runOnMuonHitCollection(const edm::Handle<EMTFHitCollection
{
const EMTFHitCollection& l1muStubs = (*muonStubH.product());
const L1TTTrackCollectionType& l1trks = (*l1tksH.product());
const int myStation = 2;
auto corr_muStub_idxs = dwcorr_->find_match_stub(l1muStubs, l1trks, myStation, requireBX0_);
auto corr_muStub_idxs = dwcorr_->find_match_stub(l1muStubs, l1trks, mu_stub_station_, requireBX0_);
// it's a vector with as many entries as the L1TT vector.
// >= 0 : the idx in the muStub vector of matched muStubs
// < 0: no match
Expand Down
46 changes: 46 additions & 0 deletions L1Trigger/L1TTrackMatch/python/L1TkMuonStubProducer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,52 @@
max_trk_chi2 = cms.double(100.0),
min_trk_nstubs = cms.int32(4),
require_BX0 = cms.bool(False),
mu_stub_station = cms.int32(2),


)

# Station = 1, windows 90
L1TkMuonStubS1 = L1TkMuonStub.clone(

emtfcorr_theta_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_theta_q90.root'),
emtfcorr_phi_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_phi_q90.root'),
mu_stub_station = cms.int32(1),

)

# Station = 2, windows 90
L1TkMuonStubS2 = L1TkMuonStub.clone(

emtfcorr_theta_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_theta_q90.root'),
emtfcorr_phi_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_phi_q90.root'),
mu_stub_station = cms.int32(2),

)

# Station = 12, windows 90
L1TkMuonStubS12 = L1TkMuonStub.clone(

emtfcorr_theta_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_theta_q90.root'),
emtfcorr_phi_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_phi_q90.root'),
mu_stub_station = cms.int32(12),

)

# Station = 12, windows 99
L1TkMuonStubS12q99 = L1TkMuonStub.clone(

emtfcorr_theta_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_theta_q99.root'),
emtfcorr_phi_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_phi_q99.root'),
mu_stub_station = cms.int32(12),

)

# Station = 1234, windows 90
L1TkMuonStubS1234 = L1TkMuonStub.clone(

emtfcorr_theta_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_theta_q90.root'),
emtfcorr_phi_windows = cms.FileInPath('L1Trigger/L1TMuon/data/emtf_luts/matching_windows_phi_q90.root'),
mu_stub_station = cms.int32(1234),

)

0 comments on commit 3346406

Please sign in to comment.