CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCBaseboard.cc
Go to the documentation of this file.
2 
4  unsigned station,
5  unsigned sector,
6  unsigned subsector,
7  unsigned chamber,
8  const edm::ParameterSet& conf)
9  : theEndcap(endcap), theStation(station), theSector(sector), theSubsector(subsector), theTrigChamber(chamber) {
10  theRegion = (theEndcap == 1) ? 1 : -1;
11 
13 
15  isME11_ = (theStation == 1 && theRing == 1);
16  isME21_ = (theStation == 2 && theRing == 1);
17  isME31_ = (theStation == 3 && theRing == 1);
18  isME41_ = (theStation == 4 && theRing == 1);
19  isME12_ = (theStation == 1 && theRing == 2);
20  isME22_ = (theStation == 2 && theRing == 2);
21  isME32_ = (theStation == 3 && theRing == 2);
22  isME42_ = (theStation == 4 && theRing == 2);
23  isME13_ = (theStation == 1 && theRing == 3);
24 
25  const bool hasTMB(isME12_ or isME22_ or isME32_ or isME42_ or isME13_);
26  const bool hasOTMB(isME11_ or isME21_ or isME31_ or isME41_);
28 
29  commonParams_ = conf.getParameter<edm::ParameterSet>("commonParam");
30 
31  showerParams_ = conf.getParameterSet("showerParam");
32 
34 
35  runPhase2_ = commonParams_.getParameter<bool>("runPhase2");
36 
37  enableAlctPhase2_ = commonParams_.getParameter<bool>("enableAlctPhase2");
38 
39  disableME1a_ = commonParams_.getParameter<bool>("disableME1a");
40 
41  gangedME1a_ = commonParams_.getParameter<bool>("gangedME1a");
42 
43  runME11Up_ = commonParams_.getParameter<bool>("runME11Up");
44  runME21Up_ = commonParams_.getParameter<bool>("runME21Up");
45  runME31Up_ = commonParams_.getParameter<bool>("runME31Up");
46  runME41Up_ = commonParams_.getParameter<bool>("runME41Up");
47 
48  runME11ILT_ = commonParams_.getParameter<bool>("runME11ILT");
49  runME21ILT_ = commonParams_.getParameter<bool>("runME21ILT");
50 
51  runCCLUT_TMB_ = commonParams_.getParameter<bool>("runCCLUT_TMB");
52  runCCLUT_OTMB_ = commonParams_.getParameter<bool>("runCCLUT_OTMB");
53  // check if CCLUT should be on in this chamber
54  runCCLUT_ = (hasTMB and runCCLUT_TMB_) or (hasOTMB and runCCLUT_OTMB_);
55 
56  // general case
57  tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbPhase1");
58  alctParams_ = conf.getParameter<edm::ParameterSet>("alctPhase1");
59  clctParams_ = conf.getParameter<edm::ParameterSet>("clctPhase1");
60 
61  const bool upgradeME11 = runPhase2_ and isME11_ and runME11Up_;
62  const bool upgradeME21 = runPhase2_ and isME21_ and runME21Up_;
63  const bool upgradeME31 = runPhase2_ and isME31_ and runME31Up_;
64  const bool upgradeME41 = runPhase2_ and isME41_ and runME41Up_;
65  const bool upgradeME = upgradeME11 or upgradeME21 or upgradeME31 or upgradeME41;
66 
67  if (upgradeME) {
68  tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbPhase2");
69  clctParams_ = conf.getParameter<edm::ParameterSet>("clctPhase2");
70  // upgrade ME1/1
71  if (upgradeME11) {
72  // do not run the Phase-2 ALCT for Run-3
73  if (enableAlctPhase2_) {
74  alctParams_ = conf.getParameter<edm::ParameterSet>("alctPhase2");
75  }
76 
77  if (runME11ILT_) {
78  tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbPhase2GE11");
79  clctParams_ = conf.getParameter<edm::ParameterSet>("clctPhase2GEM");
80  }
81  }
82  // upgrade ME2/1
83  if (upgradeME21 and runME21ILT_) {
84  tmbParams_ = conf.getParameter<edm::ParameterSet>("tmbPhase2GE21");
85  clctParams_ = conf.getParameter<edm::ParameterSet>("clctPhase2GEM");
86  alctParams_ = conf.getParameter<edm::ParameterSet>("alctPhase2GEM");
87  }
88  }
89 }
90 
91 CSCBaseboard::CSCBaseboard() : theEndcap(1), theStation(1), theSector(1), theSubsector(1), theTrigChamber(1) {
92  theRing = 1;
93  theChamber = 1;
94  runPhase2_ = false;
95  disableME1a_ = false;
96  gangedME1a_ = false;
97 }
98 
100  cscGeometry_ = g;
102 }
103 
105  const unsigned int var_max,
106  const unsigned int var_def,
107  const std::string& var_str) {
108  // Make sure that the parameter values are within the allowed range.
109  if (var >= var_max) {
110  edm::LogError("CSCConfigError") << "+++ Value of " + var_str + ", " << var << ", exceeds max allowed, " << var - 1
111  << " +++\n"
112  << "+++ Try to proceed with the default value, " + var_str + "=" << var_def
113  << " +++\n";
114  var = var_def;
115  }
116 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const unsigned theEndcap
Definition: CSCBaseboard.h:42
bool enableAlctPhase2_
Definition: CSCBaseboard.h:94
const CSCChamber * cscChamber_
Definition: CSCBaseboard.h:72
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:112
const unsigned theSector
Definition: CSCBaseboard.h:44
bool disableME1a_
Definition: CSCBaseboard.h:97
Log< level::Error, false > LogError
std::string theCSCName_
Definition: CSCBaseboard.h:90
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:63
bool gangedME1a_
Definition: CSCBaseboard.h:97
const unsigned theTrigChamber
Definition: CSCBaseboard.h:46
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
bool runCCLUT_OTMB_
Definition: CSCBaseboard.h:113
unsigned theChamber
Definition: CSCBaseboard.h:49
edm::ParameterSet clctParams_
Definition: CSCBaseboard.h:84
const CSCGeometry * cscGeometry_
Definition: CSCBaseboard.h:71
edm::ParameterSet tmbParams_
Definition: CSCBaseboard.h:78
std::string chamberName() const
Definition: CSCDetId.cc:92
ParameterSet const & getParameterSet(std::string const &) const
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:100
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const unsigned theStation
Definition: CSCBaseboard.h:43
void setCSCGeometry(const CSCGeometry *g)
Definition: CSCBaseboard.cc:99
edm::ParameterSet alctParams_
Definition: CSCBaseboard.h:81
unsigned theRing
Definition: CSCBaseboard.h:48
edm::ParameterSet commonParams_
Definition: CSCBaseboard.h:75
edm::ParameterSet showerParams_
Definition: CSCBaseboard.h:87
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
const unsigned theSubsector
Definition: CSCBaseboard.h:45