Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24403 from dildick/CMSSW_10_3_X-Return-CSC-name
New CSCBaseboard class and helper function in CSCDetId
- Loading branch information
Showing
6 changed files
with
224 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#include "L1Trigger/CSCTriggerPrimitives/src/CSCBaseboard.h" | ||
|
||
CSCBaseboard::CSCBaseboard(unsigned endcap, unsigned station, | ||
unsigned sector, unsigned subsector, | ||
unsigned chamber, | ||
const edm::ParameterSet& conf) : | ||
theEndcap(endcap), | ||
theStation(station), | ||
theSector(sector), | ||
theSubsector(subsector), | ||
theTrigChamber(chamber) | ||
{ | ||
theRegion = (theEndcap == 1) ? 1: -1; | ||
|
||
// Ring number | ||
theRing = CSCTriggerNumbering::ringFromTriggerLabels(theStation, theTrigChamber); | ||
|
||
// actual chamber number | ||
theChamber = CSCTriggerNumbering::chamberFromTriggerLabels(theSector, theSubsector, | ||
theStation, theTrigChamber); | ||
// is this an ME11 chamber? | ||
isME11_ = (theStation == 1 && theRing == 1); | ||
|
||
// CSCDetId for this chamber | ||
cscId_ = CSCDetId(theEndcap, theStation, theRing, theChamber, 0); | ||
|
||
// Parameters common for all boards | ||
commonParams_ = conf.getParameter<edm::ParameterSet>("commonParam"); | ||
|
||
// Flag for SLHC studies | ||
isSLHC_ = commonParams_.getParameter<bool>("isSLHC"); | ||
|
||
// run the upgrade for the Phase-II ME1/1 integrated local trigger | ||
runME11ILT_ = commonParams_.existsAs<bool>("runME11ILT") ? | ||
commonParams_.getParameter<bool>("runME11ILT"):false; | ||
|
||
// run the upgrade for the Phase-II ME2/1 integrated local trigger | ||
runME21ILT_ = commonParams_.existsAs<bool>("runME21ILT")? | ||
commonParams_.getParameter<bool>("runME21ILT"):false; | ||
|
||
// run the upgrade for the Phase-II ME3/1-ME4/1 local trigger | ||
runME3141ILT_ = commonParams_.existsAs<bool>("runME3141ILT")? | ||
commonParams_.getParameter<bool>("runME3141ILT"):false; | ||
|
||
// chamber name, e.g. ME+1/1/9 | ||
theCSCName_ = CSCDetId::chamberName(theEndcap, theStation, theRing, theChamber); | ||
|
||
upgradeChambers_ = commonParams_.existsAs< std::vector<std::string> >("upgradeChambers") ? | ||
commonParams_.getParameter< std::vector<std::string> >("upgradeChambers"):std::vector<std::string>(); | ||
|
||
// is this particular board (ALCT processor, TMB or CLCT processor) running the upgrade algorithm? | ||
runUpgradeBoard_ = false; | ||
if (isSLHC_ and std::find(upgradeChambers_.begin(), upgradeChambers_.end(), theCSCName_) != upgradeChambers_.end()){ | ||
runUpgradeBoard_ = true; | ||
} | ||
|
||
// run upgrade scenarios for all MEX/1 stations | ||
if (isSLHC_ and theRing == 1 and runUpgradeBoard_){ | ||
if (theStation == 1) { | ||
tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbSLHC"); | ||
alctParams_ = conf.getParameter<edm::ParameterSet>("alctParam07"); | ||
clctParams_ = conf.getParameter<edm::ParameterSet>("clctSLHC"); | ||
if (runME11ILT_) { | ||
tmbParams_ = conf.getParameter<edm::ParameterSet>("me11tmbSLHCGEM"); | ||
} | ||
} | ||
else if (theStation == 2 and runME21ILT_) { | ||
tmbParams_ = conf.getParameter<edm::ParameterSet>("me21tmbSLHCGEM"); | ||
alctParams_ = conf.getParameter<edm::ParameterSet>("alctSLHCME21"); | ||
clctParams_ = conf.getParameter<edm::ParameterSet>("clctSLHCME21"); | ||
} | ||
else if ((theStation == 3 or theStation == 4) and runME3141ILT_) { | ||
tmbParams_ = conf.getParameter<edm::ParameterSet>("me3141tmbSLHC"); | ||
alctParams_ = conf.getParameter<edm::ParameterSet>("alctSLHCME3141"); | ||
clctParams_ = conf.getParameter<edm::ParameterSet>("clctSLHCME3141"); | ||
} | ||
} else { | ||
tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbParam"); | ||
alctParams_ = conf.getParameter<edm::ParameterSet>("alctParam07"); | ||
clctParams_ = conf.getParameter<edm::ParameterSet>("clctParam07"); | ||
} | ||
|
||
// special configuration parameters for ME11 treatment | ||
disableME1a_ = commonParams_.getParameter<bool>("disableME1a"); | ||
|
||
// special configuration parameters for ME11 treatment | ||
gangedME1a_ = commonParams_.getParameter<bool>("gangedME1a"); | ||
} | ||
|
||
CSCBaseboard::CSCBaseboard() : | ||
theEndcap(1), theStation(1), theSector(1), | ||
theSubsector(1), theTrigChamber(1) | ||
{ | ||
theRing = 1; | ||
theChamber = 1; | ||
isSLHC_ = false; | ||
disableME1a_ = false; | ||
gangedME1a_ = false; | ||
} | ||
|
||
void CSCBaseboard::setCSCGeometry(const CSCGeometry *g) | ||
{ | ||
cscGeometry_ = g; | ||
cscChamber_ = cscGeometry_->chamber(cscId_); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#ifndef L1Trigger_CSCTriggerPrimitives_CSCBaseboard_h | ||
#define L1Trigger_CSCTriggerPrimitives_CSCBaseboard_h | ||
|
||
#include "DataFormats/MuonDetId/interface/CSCTriggerNumbering.h" | ||
#include "DataFormats/MuonDetId/interface/CSCDetId.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "Geometry/CSCGeometry/interface/CSCGeometry.h" | ||
#include "L1Trigger/CSCCommonTrigger/interface/CSCConstants.h" | ||
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUT.h" | ||
#include "L1Trigger/CSCTriggerPrimitives/src/CSCUpgradeMotherboardLUTGenerator.h" | ||
|
||
class CSCBaseboard | ||
{ | ||
public: | ||
/** Normal constructor. */ | ||
CSCBaseboard(unsigned endcap, unsigned station, unsigned sector, | ||
unsigned subsector, unsigned chamber, | ||
const edm::ParameterSet& conf); | ||
|
||
/** Constructor for use during testing. */ | ||
CSCBaseboard(); | ||
|
||
/** Default destructor. */ | ||
virtual ~CSCBaseboard() = default; | ||
|
||
void setCSCGeometry(const CSCGeometry *g); | ||
|
||
protected: | ||
// Parameters common for all boards | ||
edm::ParameterSet commonParams_; | ||
|
||
// Motherboard parameters: | ||
edm::ParameterSet tmbParams_; | ||
|
||
// Motherboard parameters: | ||
edm::ParameterSet alctParams_; | ||
|
||
// Motherboard parameters: | ||
edm::ParameterSet clctParams_; | ||
|
||
/** Chamber id (trigger-type labels). */ | ||
const unsigned theEndcap; | ||
const unsigned theStation; | ||
const unsigned theSector; | ||
const unsigned theSubsector; | ||
const unsigned theTrigChamber; | ||
unsigned theRegion; | ||
unsigned theRing; | ||
unsigned theChamber; | ||
|
||
bool isME11_; | ||
|
||
CSCDetId cscId_; | ||
const CSCGeometry* cscGeometry_; | ||
const CSCChamber* cscChamber_; | ||
|
||
std::vector<std::string> upgradeChambers_; | ||
std::string theCSCName_; | ||
bool runUpgradeBoard_; | ||
|
||
/** Flag for SLHC studies. */ | ||
bool isSLHC_; | ||
|
||
/** SLHC: special configuration parameters for ME1a treatment */ | ||
bool disableME1a_, gangedME1a_; | ||
|
||
/** SLHC: run the upgrade for the Phase-II ME1/1 integrated local trigger */ | ||
bool runME11ILT_; | ||
|
||
/** SLHC: run the upgrade for the Phase-II ME2/1 integrated local trigger */ | ||
bool runME21ILT_; | ||
|
||
/** SLHC: run the upgrade for the Phase-II ME3/1(ME4/1) integrated local trigger */ | ||
bool runME3141ILT_; | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters