Skip to content

Commit

Permalink
Merge pull request #165 from dildick/CSC-Trigger-Upgrade-GEM-RPC-forS…
Browse files Browse the repository at this point in the history
…LHC14

Include Tao's changes
  • Loading branch information
Sven Dildick committed Jun 4, 2014
2 parents 15748ee + 8def3ca commit 37d3254
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@
## matching to pads in case LowQ CLCT
maxDeltaBXPad = cms.int32(1),
maxDeltaPadPad = cms.int32(2),
maxDeltaWg = cms.int32(1),

## matching to pads in case absent CLCT
maxDeltaBXCoPad = cms.int32(0),
Expand Down Expand Up @@ -496,6 +497,7 @@
## matching to digis in case LowQ CLCT
maxDeltaBXRPC = cms.int32(0),
maxDeltaStripRPC = cms.int32(3),
maxDeltaWg = cms.int32(1),

## efficiency recovery switches
dropLowQualityCLCTsNoRPCs = cms.bool(True),
Expand Down
17 changes: 14 additions & 3 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME21GEM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ CSCMotherboardME21GEM::CSCMotherboardME21GEM(unsigned endcap, unsigned station,
// deltas used to match to GEM pads
maxDeltaBXPad_ = me21tmbParams.getParameter<int>("maxDeltaBXPad");
maxDeltaPadPad_ = me21tmbParams.getParameter<int>("maxDeltaPadPad");
maxDeltaWg_ = me21tmbParams.getParameter<int>("maxDeltaWg");

// deltas used to match to GEM coincidence pads
maxDeltaBXCoPad_ = me21tmbParams.getParameter<int>("maxDeltaBXCoPad");
Expand Down Expand Up @@ -1113,10 +1114,19 @@ CSCMotherboardME21GEM::GEMPadsBX
CSCMotherboardME21GEM::matchingGEMPads(const CSCALCTDigi& alct, const GEMPadsBX& pads, bool isCoPad, bool first)
{
CSCMotherboardME21GEM::GEMPadsBX result;

auto alctRoll(cscWgToGemRollLong_[alct.getKeyWG()]);
int Wg = alct.getKeyWG();
std::vector<int> Rolls;
Rolls.push_back(cscWgToGemRollLong_[Wg]);
if (Wg>=maxDeltaWg_ && cscWgToGemRollLong_[Wg] != cscWgToGemRollLong_[Wg-maxDeltaWg_])
Rolls.push_back(cscWgToGemRollLong_[Wg-maxDeltaWg_]);
if ((unsigned int)(Wg+maxDeltaWg_)<cscWgToGemRollLong_.size() && cscWgToGemRollLong_[Wg] != cscWgToGemRollLong_[Wg+maxDeltaWg_])
Rolls.push_back(cscWgToGemRollLong_[Wg+maxDeltaWg_]);

const bool debug(false);
if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << ", roll " << alctRoll << std::endl;
if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << std::endl;
for (auto alctRoll : Rolls)
{
if (debug) std::cout <<"roll " << alctRoll << std::endl;
for (auto p: pads){
auto padRoll(GEMDetId(p.first).roll());
if (debug) std::cout << "Candidate ALCT: " << padRoll << std::endl;
Expand All @@ -1125,6 +1135,7 @@ CSCMotherboardME21GEM::matchingGEMPads(const CSCALCTDigi& alct, const GEMPadsBX&
result.push_back(p);
if (first) return result;
}
}
return result;
}

Expand Down
1 change: 1 addition & 0 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME21GEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class CSCMotherboardME21GEM : public CSCMotherboard
// deltas used to match to GEM pads
int maxDeltaBXPad_;
int maxDeltaPadPad_;
int maxDeltaWg_;

// deltas used to match to GEM coincidence pads
int maxDeltaBXCoPad_;
Expand Down
16 changes: 14 additions & 2 deletions L1Trigger/CSCTriggerPrimitives/src/CSCMotherboardME3141RPC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ CSCMotherboardME3141RPC::CSCMotherboardME3141RPC(unsigned endcap, unsigned stati
// deltas used to match to RPC digis
maxDeltaBXRPC_ = me3141tmbParams.getParameter<int>("maxDeltaBXRPC");
maxDeltaStripRPC_ = me3141tmbParams.getParameter<int>("maxDeltaStripRPC");
maxDeltaWg_ = me3141tmbParams.getParameter<int>("maxDeltaWg");

// use "old" or "new" dataformat for integrated LCTs?
useOldLCTDataFormatALCTRPC_ = me3141tmbParams.getParameter<bool>("useOldLCTDataFormatALCTRPC");
Expand Down Expand Up @@ -672,9 +673,19 @@ CSCMotherboardME3141RPC::matchingRPCDigis(const CSCALCTDigi& alct, const RPCDigi
{
CSCMotherboardME3141RPC::RPCDigisBX result;

auto alctRoll(cscWgToRpcRoll_[alct.getKeyWG()]);
int Wg = alct.getKeyWG();
std::vector<int> Rolls;
Rolls.push_back(cscWgToRpcRoll_[Wg]);
if (Wg>=maxDeltaWg_ && cscWgToRpcRoll_[Wg] != cscWgToRpcRoll_[Wg-maxDeltaWg_])
Rolls.push_back(cscWgToRpcRoll_[Wg-maxDeltaWg_]);
if ((unsigned int)(Wg+maxDeltaWg_)<cscWgToRpcRoll_.size() && cscWgToRpcRoll_[Wg] != cscWgToRpcRoll_[Wg+maxDeltaWg_])
Rolls.push_back(cscWgToRpcRoll_[Wg+maxDeltaWg_]);

const bool debug(false);
if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << ", roll " << alctRoll << std::endl;
if (debug) std::cout << "ALCT keyWG " << alct.getKeyWG() << std::endl;
for (auto alctRoll : Rolls)
{
if (debug) std::cout << " roll " << alctRoll << std::endl;
for (auto p: digis){
auto digiRoll(RPCDetId(p.first).roll());
if (debug) std::cout << "Candidate ALCT: " << digiRoll << std::endl;
Expand All @@ -683,6 +694,7 @@ CSCMotherboardME3141RPC::matchingRPCDigis(const CSCALCTDigi& alct, const RPCDigi
result.push_back(p);
if (first) return result;
}
}
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class CSCMotherboardME3141RPC : public CSCMotherboard
// deltas used to match to RPC digis
int maxDeltaBXRPC_;
int maxDeltaStripRPC_;
int maxDeltaWg_;

bool useOldLCTDataFormatCLCTRPC_;
bool useOldLCTDataFormatALCTRPC_;
Expand Down

0 comments on commit 37d3254

Please sign in to comment.