Skip to content

Commit

Permalink
Merge pull request cms-sw#178 from tahuang1991/Tao-CSC-Trigger-Upgrad…
Browse files Browse the repository at this point in the history
…e-forSLHC14

adjust para set to get suitable matching window
  • Loading branch information
tahuang1991 committed Jun 25, 2014
2 parents 9d5f135 + 5384a15 commit 8e0d2b7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@
dropLowQualityALCTsNoGEMs_ME1b = cms.bool(False),
buildLCTfromALCTandGEM_ME1a = cms.bool(True),
buildLCTfromALCTandGEM_ME1b = cms.bool(True),
buildLCTfromCLCTandGEM_ME1a = cms.bool(True),
buildLCTfromCLCTandGEM_ME1b = cms.bool(True),
buildLCTfromCLCTandGEM_ME1a = cms.bool(False),
buildLCTfromCLCTandGEM_ME1b = cms.bool(False),
doLCTGhostBustingWithGEMs = cms.bool(False),
correctLCTtimingWithGEM = cms.bool(False),
promoteALCTGEMpattern = cms.bool(True),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@
dropLowQualityALCTsNoGEMs_ME1b = cms.bool(False),
buildLCTfromALCTandGEM_ME1a = cms.bool(True),
buildLCTfromALCTandGEM_ME1b = cms.bool(True),
buildLCTfromCLCTandGEM_ME1a = cms.bool(True),
buildLCTfromCLCTandGEM_ME1b = cms.bool(True),
buildLCTfromCLCTandGEM_ME1a = cms.bool(False),
buildLCTfromCLCTandGEM_ME1b = cms.bool(False),
doLCTGhostBustingWithGEMs = cms.bool(False),
correctLCTtimingWithGEM = cms.bool(False),
promoteALCTGEMpattern = cms.bool(True),
Expand Down Expand Up @@ -439,7 +439,7 @@
maxDeltaBXPad = cms.int32(1),
maxDeltaPadPadOdd = cms.int32(4),
maxDeltaPadPadEven = cms.int32(3),
maxDeltaWg = cms.int32(1),
maxDeltaWg = cms.int32(2),

## matching to pads in case absent CLCT
maxDeltaBXCoPad = cms.int32(1),
Expand All @@ -449,7 +449,7 @@
dropLowQualityALCTsNoGEMs = cms.bool(False),
dropLowQualityCLCTsNoGEMs = cms.bool(True),
buildLCTfromALCTandGEM = cms.bool(True),
buildLCTfromCLCTandGEM = cms.bool(True),
buildLCTfromCLCTandGEM = cms.bool(False),
doLCTGhostBustingWithGEMs = cms.bool(False),
correctLCTtimingWithGEM = cms.bool(False),
promoteALCTGEMpattern = cms.bool(True),
Expand Down Expand Up @@ -499,12 +499,12 @@
maxDeltaBXRPC = cms.int32(0),
maxDeltaStripRPCOdd = cms.int32(6),
maxDeltaStripRPCEven = cms.int32(4),
maxDeltaWg = cms.int32(1),
maxDeltaWg = cms.int32(2),

## efficiency recovery switches
dropLowQualityCLCTsNoRPCs = cms.bool(True),
buildLCTfromALCTandRPC = cms.bool(True),
buildLCTfromCLCTandRPC = cms.bool(True),
buildLCTfromCLCTandRPC = cms.bool(False),
buildLCTfromLowQstubandRPC = cms.bool(True),
promoteCLCTRPCquality = cms.bool(True),
promoteALCTRPCpattern = cms.bool(True),
Expand Down
6 changes: 3 additions & 3 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME21GEM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ CSCMotherboardME21GEM::run(const CSCWireDigiCollection* wiredc,

++nSuccesFulMatches;

//int mbx = bx_clct-bx_alct;
int mbx = std::abs(clct->bestCLCT[bx_alct].getBX()-bx_alct);
int bx_gem = (coPads[0].second)->bx()+lct_central_bx;
correlateLCTsGEM(clct->bestCLCT[bx_alct], clct->secondCLCT[bx_alct], *(coPads[0].second), GEMDetId(coPads[0].first).roll(),
allLCTs[bx_gem][0][0], allLCTs[bx_gem][0][1]);
allLCTs[bx_gem][mbx][0], allLCTs[bx_gem][mbx][1]);
if (debug_gem_matching) {
// if (infoV > 1) LogTrace("CSCMotherboard")
std::cout << "Successful GEM-CLCT match in ME21: bx_alct = " << bx_alct <<std::endl;
Expand All @@ -511,7 +511,7 @@ CSCMotherboardME21GEM::run(const CSCWireDigiCollection* wiredc,
std::cout << "+++ Second CLCT Details: ";
clct->secondCLCT[bx_alct].print();
}
if (allLCTs[bx_alct][0][0].isValid()) {
if (allLCTs[bx_gem][mbx][0].isValid()) {
used_clct_mask[bx_alct] += 1;
if (match_earliest_clct_me21_only) break;
}
Expand Down
37 changes: 18 additions & 19 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME3141RPC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,46 +450,45 @@ CSCMotherboardME3141RPC::run(const CSCWireDigiCollection* wiredc,
else{
auto digis(rpcDigis_[bx_alct]);
if (runME3141ILT_ and digis.size() and buildLCTfromCLCTandRPC_) {
const int bx_clct_start(bx_alct - match_trig_window_size/2);
const int bx_clct_stop(bx_alct + match_trig_window_size/2);
//const int bx_clct_start(bx_alct - match_trig_window_size/2);
//const int bx_clct_stop(bx_alct + match_trig_window_size/2);
// RPC-to-CLCT
int nSuccesFulMatches = 0;
for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
{
if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
if (drop_used_clcts and used_clct_mask[bx_clct]) continue;
if (clct->bestCLCT[bx_clct].isValid())
// for (int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
// {
// if (bx_clct < 0 or bx_clct >= CSCCathodeLCTProcessor::MAX_CLCT_BINS) continue;
if (drop_used_clcts and used_clct_mask[bx_alct]) continue;
if (clct->bestCLCT[bx_alct].isValid())
{
if (debug_rpc_matching_){
std::cout << "========================================================================" << std::endl;
std::cout << "RPC-CLCT matching in ME" << theStation << "/1 chamber: " << cscChamber->id() << " in bx range: [" << bx_clct_start << "," << bx_clct_stop << "]" << std::endl;
std::cout << "RPC-CLCT matching in ME" << theStation << "/1 chamber: " << cscChamber->id() << " in bx: "<<bx_alct<< std::endl;
std::cout << "------------------------------------------------------------------------" << std::endl;
}
const int quality(clct->bestCLCT[bx_clct].getQuality());
const int quality(clct->bestCLCT[bx_alct].getQuality());
// we also use low-Q stubs for the time being
if (quality < 4 and !buildLCTfromLowQstubandRPC_) continue;

++nSuccesFulMatches;

int mbx = bx_clct-bx_clct_start;
correlateLCTsRPC(clct->bestCLCT[bx_clct], clct->secondCLCT[bx_clct], *(digis[0].second), RPCDetId(digis[0].first).roll(),
allLCTs[bx_alct][mbx][0], allLCTs[bx_alct][mbx][1]);
int mbx = std::abs(clct->bestCLCT[bx_alct].getBX()-bx_alct);
int bx_rpc = lct_central_bx;
correlateLCTsRPC(clct->bestCLCT[bx_alct], clct->secondCLCT[bx_alct], *(digis[0].second), RPCDetId(digis[0].first).roll(),
allLCTs[bx_rpc][mbx][0], allLCTs[bx_rpc][mbx][1]);
if (debug_rpc_matching_) {
// if (infoV > 1) LogTrace("CSCMotherboard")
std::cout << "Successful RPC-CLCT match in ME"<<theStation<<"/1: bx_alct = " << bx_alct
<< "; match window: [" << bx_clct_start << "; " << bx_clct_stop
<< "]; bx_clct = " << bx_clct << std::endl;
<< std::endl;
std::cout << "+++ Best CLCT Details: ";
clct->bestCLCT[bx_clct].print();
clct->bestCLCT[bx_alct].print();
std::cout << "+++ Second CLCT Details: ";
clct->secondCLCT[bx_clct].print();
clct->secondCLCT[bx_alct].print();
}
if (allLCTs[bx_alct][mbx][0].isValid()) {
used_clct_mask[bx_clct] += 1;
if (allLCTs[bx_rpc][mbx][0].isValid()) {
used_clct_mask[bx_alct] += 1;
if (match_earliest_clct_me3141_only) break;
}
}
}
}
}
}
Expand Down

0 comments on commit 8e0d2b7

Please sign in to comment.