CMS 3D CMS Logo

CSCBaseboard.cc
Go to the documentation of this file.
2 
4  : conf_(&conf),
5  commonParams_(conf.getParameter<edm::ParameterSet>("commonParam")),
6  showerParams_(conf.getParameterSet("showerParam")){};
7 
8 void CSCBaseboard::Parameters::chooseParams(std::string_view tmb, std::string_view alct, std::string_view clct) {
9  if (tmbName_ != tmb) {
10  tmbParams_ = conf_->getParameter<edm::ParameterSet>(std::string(tmb));
11  tmbName_ = tmb;
12  }
13  if (alctName_ != alct) {
14  alctParams_ = conf_->getParameter<edm::ParameterSet>(std::string(alct));
15  alctName_ = alct;
16  }
17  if (clctName_ != clct) {
18  clctParams_ = conf_->getParameter<edm::ParameterSet>(std::string(clct));
19  clctName_ = clct;
20  }
21 }
22 
24  unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, Parameters& conf)
26  theRegion = (theEndcap == 1) ? 1 : -1;
27 
29 
31  isME11_ = (theStation == 1 && theRing == 1);
32  isME21_ = (theStation == 2 && theRing == 1);
33  isME31_ = (theStation == 3 && theRing == 1);
34  isME41_ = (theStation == 4 && theRing == 1);
35  isME12_ = (theStation == 1 && theRing == 2);
36  isME22_ = (theStation == 2 && theRing == 2);
37  isME32_ = (theStation == 3 && theRing == 2);
38  isME42_ = (theStation == 4 && theRing == 2);
39  isME13_ = (theStation == 1 && theRing == 3);
40 
41  const bool hasTMB(isME12_ or isME22_ or isME32_ or isME42_ or isME13_);
42  const bool hasOTMB(isME11_ or isME21_ or isME31_ or isME41_);
44 
46 
47  runPhase2_ = conf.commonParams().getParameter<bool>("runPhase2");
48 
49  enableAlctPhase2_ = conf.commonParams().getParameter<bool>("enableAlctPhase2");
50 
51  disableME1a_ = conf.commonParams().getParameter<bool>("disableME1a");
52 
53  gangedME1a_ = conf.commonParams().getParameter<bool>("gangedME1a");
54 
55  runME11Up_ = conf.commonParams().getParameter<bool>("runME11Up");
56  runME21Up_ = conf.commonParams().getParameter<bool>("runME21Up");
57  runME31Up_ = conf.commonParams().getParameter<bool>("runME31Up");
58  runME41Up_ = conf.commonParams().getParameter<bool>("runME41Up");
59 
60  runME11ILT_ = conf.commonParams().getParameter<bool>("runME11ILT");
61  runME21ILT_ = conf.commonParams().getParameter<bool>("runME21ILT");
62 
63  run3_ = conf.commonParams().getParameter<bool>("run3");
64  runCCLUT_TMB_ = conf.commonParams().getParameter<bool>("runCCLUT_TMB");
65  runCCLUT_OTMB_ = conf.commonParams().getParameter<bool>("runCCLUT_OTMB");
66  // check if CCLUT should be on in this chamber
67  runCCLUT_ = (hasTMB and runCCLUT_TMB_) or (hasOTMB and runCCLUT_OTMB_);
68 
69  // general case
70  std::string_view tmbParams = "tmbPhase1";
71  std::string_view alctParams = "alctPhase1";
72  std::string_view clctParams = "clctPhase1";
73 
74  const bool upgradeME11 = runPhase2_ and isME11_ and runME11Up_;
75  const bool upgradeME21 = runPhase2_ and isME21_ and runME21Up_;
76  const bool upgradeME31 = runPhase2_ and isME31_ and runME31Up_;
77  const bool upgradeME41 = runPhase2_ and isME41_ and runME41Up_;
78  const bool upgradeME = upgradeME11 or upgradeME21 or upgradeME31 or upgradeME41;
79 
80  if (upgradeME) {
81  tmbParams = "tmbPhase2";
82  clctParams = "clctPhase2";
83  // upgrade ME1/1
84  if (upgradeME11) {
85  // do not run the Phase-2 ALCT for Run-3
86  if (enableAlctPhase2_) {
87  alctParams = "alctPhase2";
88  }
89 
90  if (runME11ILT_) {
91  tmbParams = "tmbPhase2GE11";
92  clctParams = "clctPhase2GEM";
93  }
94  }
95  // upgrade ME2/1
96  if (upgradeME21 and runME21ILT_) {
97  tmbParams = "tmbPhase2GE21";
98  clctParams = "clctPhase2GEM";
99  alctParams = "alctPhase2GEM";
100  }
101  }
103 }
104 
105 CSCBaseboard::CSCBaseboard() : theEndcap(1), theStation(1), theSector(1), theSubsector(1), theTrigChamber(1) {
106  theRing = 1;
107  theChamber = 1;
108  runPhase2_ = false;
109  disableME1a_ = false;
110  gangedME1a_ = false;
111 }
112 
113 CSCChamber const* CSCBaseboard::cscChamber(const CSCGeometry& g) const { return g.chamber(cscId_); }
114 
116  const unsigned int var_max,
117  const unsigned int var_def,
118  const std::string& var_str) {
119  // Make sure that the parameter values are within the allowed range.
120  if (var >= var_max) {
121  edm::LogError("CSCConfigError") << "+++ Value of " + var_str + ", " << var << ", exceeds max allowed, " << var - 1
122  << " +++\n"
123  << "+++ Try to proceed with the default value, " + var_str + "=" << var_def
124  << " +++\n";
125  var = var_def;
126  }
127 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const unsigned theEndcap
Definition: CSCBaseboard.h:74
bool enableAlctPhase2_
Definition: CSCBaseboard.h:108
void checkConfigParameters(unsigned int &var, const unsigned int var_max, const unsigned int var_def, const std::string &var_str)
bool runCCLUT_TMB_
Definition: CSCBaseboard.h:127
const unsigned theSector
Definition: CSCBaseboard.h:76
Parameters(edm::ParameterSet const &conf)
Definition: CSCBaseboard.cc:3
Log< level::Error, false > LogError
std::string theCSCName_
Definition: CSCBaseboard.h:104
static int ringFromTriggerLabels(int station, int triggerCSCID)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
CSCDetId cscId_
Definition: CSCBaseboard.h:95
const unsigned theTrigChamber
Definition: CSCBaseboard.h:78
std::string chamberName() const
Definition: CSCDetId.cc:92
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool runCCLUT_OTMB_
Definition: CSCBaseboard.h:128
const CSCChamber * cscChamber(CSCGeometry const &) const
edm::ParameterSet const & commonParams() const
Definition: CSCBaseboard.h:20
unsigned theChamber
Definition: CSCBaseboard.h:81
const unsigned theStation
Definition: CSCBaseboard.h:75
ParameterSet const & getParameterSet(ParameterSetID const &id)
void chooseParams(std::string_view tmb, std::string_view alct, std::string_view clct)
Definition: CSCBaseboard.cc:8
HLT enums.
unsigned theRing
Definition: CSCBaseboard.h:80
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
const unsigned theSubsector
Definition: CSCBaseboard.h:77