CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
LCTQualityControl Class Reference

#include <LCTQualityControl.h>

Inheritance diagram for LCTQualityControl:
CSCBaseboard

Public Member Functions

void checkMultiplicityBX (const std::vector< CSCALCTDigi > &alcts) const
 
void checkMultiplicityBX (const std::vector< CSCCLCTDigi > &clcts) const
 
void checkMultiplicityBX (const std::vector< CSCCorrelatedLCTDigi > &lcts) const
 
template<class T >
void checkMultiplicityBX (const std::vector< T > &lcts, unsigned nLCT) const
 
void checkRange (int parameter, int min_value, int max_value, const std::string &comment, unsigned &errors) const
 
void checkValid (const CSCALCTDigi &alct, unsigned max_stubs=CSCConstants::MAX_ALCTS_PER_PROCESSOR) const
 
void checkValid (const CSCCLCTDigi &lct, unsigned max_stubs=CSCConstants::MAX_CLCTS_PER_PROCESSOR) const
 
void checkValid (const CSCCorrelatedLCTDigi &lct) const
 
void checkValid (const CSCCorrelatedLCTDigi &lct, const unsigned station, const unsigned ring) const
 
void checkValidReadout (const CSCALCTDigi &alct) const
 
unsigned get_csc_alct_max_quality (int station, int ring, bool runGEMCSC) const
 
unsigned get_csc_clct_max_quality () const
 
std::pair< int, int > get_csc_clct_min_max_slope () const
 
unsigned get_csc_lct_max_quality () const
 
std::pair< unsigned, unsigned > get_csc_lct_min_max_pattern () const
 
unsigned get_csc_max_eighthstrip (int station, int ring) const
 
unsigned get_csc_max_halfstrip (int station, int ring) const
 
unsigned get_csc_max_quartstrip (int station, int ring) const
 
unsigned get_csc_max_wire (int station, int ring) const
 
std::pair< unsigned, unsigned > get_csc_min_max_cfeb (int station, int ring) const
 
std::pair< unsigned, unsigned > get_csc_min_max_pattern (bool isRun3) const
 
int getSlopePhase1 (int pattern) const
 
 LCTQualityControl (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
template<class T >
void reportErrors (const T &lct, const unsigned errors) const
 
 ~LCTQualityControl () override=default
 
- Public Member Functions inherited from CSCBaseboard
 CSCBaseboard ()
 
 CSCBaseboard (unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
 
std::string getCSCName () const
 
void setCSCGeometry (const CSCGeometry *g)
 
virtual ~CSCBaseboard ()=default
 

Private Attributes

unsigned nplanes_clct_hit_pattern
 

Additional Inherited Members

- Protected Member Functions inherited from CSCBaseboard
void checkConfigParameters (unsigned int &var, const unsigned int var_max, const unsigned int var_def, const std::string &var_str)
 
- Protected Attributes inherited from CSCBaseboard
edm::ParameterSet alctParams_
 
edm::ParameterSet clctParams_
 
edm::ParameterSet commonParams_
 
const CSCChambercscChamber_
 
const CSCGeometrycscGeometry_
 
CSCDetId cscId_
 
bool disableME1a_
 
bool enableAlctPhase2_
 
bool gangedME1a_
 
int infoV
 
bool isME11_
 
bool isME21_
 
bool isME31_
 
bool isME41_
 
bool runCCLUT_
 
bool runME11ILT_
 
bool runME11Up_
 
bool runME21ILT_
 
bool runME21Up_
 
bool runME31Up_
 
bool runME41Up_
 
bool runPhase2_
 
unsigned theChamber
 
std::string theCSCName_
 
const unsigned theEndcap
 
unsigned theRegion
 
unsigned theRing
 
const unsigned theSector
 
const unsigned theStation
 
const unsigned theSubsector
 
const unsigned theTrigChamber
 
edm::ParameterSet tmbParams_
 

Detailed Description

Definition at line 20 of file LCTQualityControl.h.

Constructor & Destructor Documentation

◆ LCTQualityControl()

LCTQualityControl::LCTQualityControl ( unsigned  endcap,
unsigned  station,
unsigned  sector,
unsigned  subsector,
unsigned  chamber,
const edm::ParameterSet conf 
)

Definition at line 5 of file LCTQualityControl.cc.

11  : CSCBaseboard(endcap, station, sector, subsector, chamber, conf) {
12  nplanes_clct_hit_pattern = clctParams_.getParameter<unsigned int>("clctNplanesHitPattern");
13 }

References CSCBaseboard::clctParams_, edm::ParameterSet::getParameter(), and nplanes_clct_hit_pattern.

◆ ~LCTQualityControl()

LCTQualityControl::~LCTQualityControl ( )
overridedefault

Default destructor.

Member Function Documentation

◆ checkMultiplicityBX() [1/4]

void LCTQualityControl::checkMultiplicityBX ( const std::vector< CSCALCTDigi > &  alcts) const

◆ checkMultiplicityBX() [2/4]

void LCTQualityControl::checkMultiplicityBX ( const std::vector< CSCCLCTDigi > &  clcts) const

◆ checkMultiplicityBX() [3/4]

void LCTQualityControl::checkMultiplicityBX ( const std::vector< CSCCorrelatedLCTDigi > &  lcts) const

◆ checkMultiplicityBX() [4/4]

template<class T >
void LCTQualityControl::checkMultiplicityBX ( const std::vector< T > &  lcts,
unsigned  nLCT 
) const

Definition at line 88 of file LCTQualityControl.h.

88  {
89  std::unordered_map<int, unsigned> freq;
90  // check each BX
91  for (const auto& p : collection) {
92  if (p.isValid()) {
93  freq[p.getBX()]++;
94 
95  // too many ALCTs, CLCTs or LCTs in this BX
96  if (freq[p.getBX()] > nLCT) {
97  edm::LogError("LCTQualityControl") << "Collection with more than " << nLCT << " in BX " << p.getBX();
98  break;
99  }
100  }
101  }
102 }

References universalConfigTemplate::collection, and AlCaHLTBitMon_ParallelJobs::p.

◆ checkRange()

void LCTQualityControl::checkRange ( int  parameter,
int  min_value,
int  max_value,
const std::string &  comment,
unsigned &  errors 
) const

Definition at line 20 of file LCTQualityControl.cc.

21  {
22  if (value < min_value or value > max_value) {
23  edm::LogError("LCTQualityControl") << comment << value << "; allowed [" << min_value << ", " << max_value << "]";
24  errors++;
25  }
26 }

References hcaldqm::quantity::max_value, and hcaldqm::quantity::min_value.

Referenced by checkValid().

◆ checkValid() [1/4]

void LCTQualityControl::checkValid ( const CSCALCTDigi alct,
unsigned  max_stubs = CSCConstants::MAX_ALCTS_PER_PROCESSOR 
) const

Definition at line 36 of file LCTQualityControl.cc.

36  {
37  const unsigned max_wire = get_csc_max_wire(theStation, theRing);
38  const unsigned max_quality = get_csc_alct_max_quality(theStation, theRing, runME21ILT_);
39 
40  unsigned errors = 0;
41 
42  // stub must be valid
43  checkRange(alct.isValid(), 1, 1, "CSCALCTDigi with invalid bit set: ", errors);
44 
45  // ALCT number is 1 or 2
46  checkRange(alct.getTrknmb(), 1, max_stubs, "CSCALCTDigi with invalid track number: ", errors);
47 
48  // ALCT quality must be valid
49  // number of layers - 3
50  checkRange(alct.getQuality(), 1, max_quality, "CSCALCTDigi with invalid quality: ", errors);
51 
52  // ALCT key wire-group must be within bounds
53  checkRange(alct.getKeyWG(), 0, max_wire - 1, "CSCALCTDigi with invalid wire-group: ", errors);
54 
55  // ALCT with out-of-time BX
56  checkRange(alct.getBX(), 0, CSCConstants::MAX_ALCT_TBINS - 1, "CSCALCTDigi with invalid BX: ", errors);
57 
58  // ALCT is neither accelerator or collision
59  checkRange(alct.getCollisionB(), 0, 1, "CSCALCTDigi with invalid accel/coll biit: ", errors);
60 
61  reportErrors(alct, errors);
62 }

References checkRange(), debug_messages_cfi::errors, get_csc_alct_max_quality(), get_csc_max_wire(), CSCALCTDigi::getBX(), CSCALCTDigi::getCollisionB(), CSCALCTDigi::getKeyWG(), CSCALCTDigi::getQuality(), CSCALCTDigi::getTrknmb(), CSCALCTDigi::isValid(), CSCConstants::MAX_ALCT_TBINS, reportErrors(), CSCBaseboard::runME21ILT_, CSCBaseboard::theRing, and CSCBaseboard::theStation.

Referenced by checkValid(), and checkValidReadout().

◆ checkValid() [2/4]

void LCTQualityControl::checkValid ( const CSCCLCTDigi lct,
unsigned  max_stubs = CSCConstants::MAX_CLCTS_PER_PROCESSOR 
) const

Definition at line 65 of file LCTQualityControl.cc.

65  {
66  const unsigned max_strip = get_csc_max_halfstrip(theStation, theRing);
67  const auto& [min_pattern_run2, max_pattern_run2] = get_csc_min_max_pattern(false);
68  const auto& [min_pattern_run3, max_pattern_run3] = get_csc_min_max_pattern(true);
69  const auto& [min_slope, max_slope] = get_csc_clct_min_max_slope();
70  const auto& [min_cfeb, max_cfeb] = get_csc_min_max_cfeb(theStation, theRing);
71  const unsigned max_quality = get_csc_clct_max_quality();
72  unsigned errors = 0;
73 
74  // CLCT must be valid
75  checkRange(clct.isValid(), 1, 1, "CSCCLCTDigi with invalid bit set: ", errors);
76 
77  // CLCT number is 1 or max
78  checkRange(clct.getTrknmb(), 1, max_stubs, "CSCCLCTDigi with invalid track number: ", errors);
79 
80  // CLCT quality must be valid
81  // CLCTs require at least 4 layers hit
82  // Run-3: ME1/1 CLCTs require only 3 layers
83  // Run-4: ME2/1 CLCTs require only 3 layers
84  checkRange(clct.getQuality(), nplanes_clct_hit_pattern, max_quality, "CSCCLCTDigi with invalid quality: ", errors);
85 
86  // CLCT half-strip must be within bounds
87  checkRange(
88  clct.getStrip(), 0, CSCConstants::NUM_HALF_STRIPS_PER_CFEB - 1, "CSCCLCTDigi with invalid half-strip: ", errors);
89 
90  // CLCT key half-strip must be within bounds
91  checkRange(clct.getKeyStrip(), 0, max_strip - 1, "CSCCLCTDigi with invalid key half-strip: ", errors);
92 
93  // CLCT with out-of-time BX
94  checkRange(clct.getBX(), 0, CSCConstants::MAX_CLCT_TBINS - 1, "CSCCLCTDigi with invalid BX: ", errors);
95 
96  // CLCT with neither left nor right bending
97  checkRange(clct.getBend(), 0, 1, "CSCCLCTDigi with invalid bending: ", errors);
98 
99  // CLCT with an invalid pattern ID
100  checkRange(
101  clct.getPattern(), min_pattern_run2, max_pattern_run2, "CSCCLCTDigi with invalid Run-2 pattern ID: ", errors);
102 
103  // CLCT with an invalid pattern ID
104  checkRange(
105  clct.getRun3Pattern(), min_pattern_run3, max_pattern_run3, "CSCCLCTDigi with invalid Run-3 pattern ID: ", errors);
106 
107  // CLCT with an invalid slope
108  checkRange(clct.getSlope(), min_slope, max_slope, "CSCCLCTDigi with invalid slope: ", errors);
109 
110  // CLCT with an invalid CFEB ID
111  checkRange(clct.getCFEB(), min_cfeb, max_cfeb, "CSCCLCTDigi with invalid CFEB ID: ", errors);
112 
113  if (runCCLUT_) {
114  // CLCT comparator code is invalid
115  checkRange(clct.getCompCode(), 0, std::pow(2, 12) - 1, "CSCCLCTDigi with invalid comparator code: ", errors);
116 
117  const unsigned max_quartstrip = get_csc_max_quartstrip(theStation, theRing);
118  const unsigned max_eighthstrip = get_csc_max_eighthstrip(theStation, theRing);
119 
120  // CLCT key quart-strip must be within bounds
121  checkRange(clct.getKeyStrip(4), 0, max_quartstrip - 1, "CSCCLCTDigi with invalid key quart-strip: ", errors);
122 
123  // CLCT key eighth-strip must be within bounds
124  checkRange(clct.getKeyStrip(8), 0, max_eighthstrip - 1, "CSCCLCTDigi with invalid key quart-strip: ", errors);
125  }
126 
127  reportErrors(clct, errors);
128 }

References checkRange(), debug_messages_cfi::errors, get_csc_clct_max_quality(), get_csc_clct_min_max_slope(), get_csc_max_eighthstrip(), get_csc_max_halfstrip(), get_csc_max_quartstrip(), get_csc_min_max_cfeb(), get_csc_min_max_pattern(), CSCCLCTDigi::getBend(), CSCCLCTDigi::getBX(), CSCCLCTDigi::getCFEB(), CSCCLCTDigi::getCompCode(), CSCCLCTDigi::getKeyStrip(), CSCCLCTDigi::getPattern(), CSCCLCTDigi::getQuality(), CSCCLCTDigi::getRun3Pattern(), CSCCLCTDigi::getSlope(), CSCCLCTDigi::getStrip(), CSCCLCTDigi::getTrknmb(), CSCCLCTDigi::isValid(), CSCConstants::MAX_CLCT_TBINS, nplanes_clct_hit_pattern, CSCConstants::NUM_HALF_STRIPS_PER_CFEB, funct::pow(), reportErrors(), CSCBaseboard::runCCLUT_, CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ checkValid() [3/4]

void LCTQualityControl::checkValid ( const CSCCorrelatedLCTDigi lct) const

Definition at line 130 of file LCTQualityControl.cc.

130 { checkValid(lct, theStation, theRing); }

References checkValid(), CSCBaseboard::theRing, and CSCBaseboard::theStation.

◆ checkValid() [4/4]

void LCTQualityControl::checkValid ( const CSCCorrelatedLCTDigi lct,
const unsigned  station,
const unsigned  ring 
) const

Definition at line 132 of file LCTQualityControl.cc.

132  {
133  const unsigned max_strip = get_csc_max_halfstrip(station, ring);
134  const unsigned max_quartstrip = get_csc_max_quartstrip(station, ring);
135  const unsigned max_eighthstrip = get_csc_max_eighthstrip(station, ring);
136  const unsigned max_wire = get_csc_max_wire(station, ring);
137  const auto& [min_pattern, max_pattern] = get_csc_lct_min_max_pattern();
138  const unsigned max_quality = get_csc_lct_max_quality();
139 
140  unsigned errors = 0;
141 
142  // LCT must be valid
143  checkRange(lct.isValid(), 1, 1, "CSCCorrelatedLCTDigi with invalid bit set: ", errors);
144 
145  // LCT number is 1 or 2
146  checkRange(lct.getTrknmb(), 1, 2, "CSCCorrelatedLCTDigi with invalid track number: ", errors);
147 
148  // LCT quality must be valid
149  checkRange(lct.getQuality(), 0, max_quality, "CSCCorrelatedLCTDigi with invalid quality: ", errors);
150 
151  // LCT key half-strip must be within bounds
152  checkRange(lct.getStrip(), 0, max_strip - 1, "CSCCorrelatedLCTDigi with invalid key half-strip: ", errors);
153 
154  // LCT key quart-strip must be within bounds
155  checkRange(lct.getStrip(4), 0, max_quartstrip - 1, "CSCCorrelatedLCTDigi with invalid key quart-strip: ", errors);
156 
157  // LCT key eighth-strip must be within bounds
158  checkRange(lct.getStrip(8), 0, max_eighthstrip - 1, "CSCCorrelatedLCTDigi with invalid key eighth-strip: ", errors);
159 
160  // LCT key wire-group must be within bounds
161  checkRange(lct.getKeyWG(), 0, max_wire - 1, "CSCCorrelatedLCTDigi with invalid wire-group: ", errors);
162 
163  // LCT with out-of-time BX
164  checkRange(lct.getBX(), 0, CSCConstants::MAX_LCT_TBINS - 1, "CSCCorrelatedLCTDigi with invalid BX: ", errors);
165 
166  // LCT with neither left nor right bending
167  checkRange(lct.getBend(), 0, 1, "CSCCorrelatedLCTDigi with invalid bending: ", errors);
168 
169  // LCT with invalid MPC link
170  checkRange(lct.getMPCLink(), 0, CSCConstants::MAX_LCTS_PER_MPC, "CSCCorrelatedLCTDigi with MPC link: ", errors);
171 
172  // LCT with invalid CSCID
173  checkRange(lct.getCSCID(),
176  "CSCCorrelatedLCTDigi with invalid CSCID: ",
177  errors);
178 
179  // LCT with an invalid pattern ID
180  checkRange(lct.getPattern(), min_pattern, max_pattern, "CSCCorrelatedLCTDigi with invalid pattern ID: ", errors);
181 
182  // simulated LCT type must be valid
185  edm::LogError("LCTQualityControl") << "CSCCorrelatedLCTDigi with invalid type (SIM): " << lct.getType()
186  << "; allowed [" << CSCCorrelatedLCTDigi::ALCTCLCT << ", "
188  errors++;
189  }
190 
191  // non-GEM-CSC stations ALWAYS send out ALCTCLCT type LCTs
192  if (!(ring == 1 and (station == 1 or station == 2))) {
194  edm::LogError("LCTQualityControl") << "CSCCorrelatedLCTDigi with invalid type (SIM) in this station: "
195  << lct.getType() << "; allowed [" << CSCCorrelatedLCTDigi::ALCTCLCT << "]";
196  errors++;
197  }
198  }
199 
200  // GEM-CSC stations can send out GEM-type LCTs ONLY when the ILT is turned on!
201  if (ring == 1 and lct.getType() != CSCCorrelatedLCTDigi::ALCTCLCT) {
202  if ((station == 1 and !runME11ILT_) or (station == 2 and !runME21ILT_)) {
203  edm::LogError("LCTQualityControl") << "CSCCorrelatedLCTDigi with invalid type (SIM) with GEM-CSC trigger not on: "
204  << lct.getType() << "; allowed [" << CSCCorrelatedLCTDigi::ALCTCLCT << "]";
205  errors++;
206  }
207  }
208 
209  reportErrors(lct, errors);
210 }

References CSCCorrelatedLCTDigi::ALCTCLCT, CSCCorrelatedLCTDigi::ALCTONLY, checkRange(), CSCCorrelatedLCTDigi::CLCT2GEM, CSCCorrelatedLCTDigi::CLCTALCT, CSCCorrelatedLCTDigi::CLCTONLY, debug_messages_cfi::errors, get_csc_lct_max_quality(), get_csc_lct_min_max_pattern(), get_csc_max_eighthstrip(), get_csc_max_halfstrip(), get_csc_max_quartstrip(), get_csc_max_wire(), CSCCorrelatedLCTDigi::getBend(), CSCCorrelatedLCTDigi::getBX(), CSCCorrelatedLCTDigi::getCSCID(), CSCCorrelatedLCTDigi::getKeyWG(), CSCCorrelatedLCTDigi::getMPCLink(), CSCCorrelatedLCTDigi::getPattern(), CSCCorrelatedLCTDigi::getQuality(), CSCCorrelatedLCTDigi::getStrip(), CSCCorrelatedLCTDigi::getTrknmb(), CSCCorrelatedLCTDigi::getType(), CSCCorrelatedLCTDigi::isValid(), CSCConstants::MAX_LCT_TBINS, CSCConstants::MAX_LCTS_PER_MPC, CSCTriggerNumbering::maxTriggerCscId(), CSCTriggerNumbering::minTriggerCscId(), or, reportErrors(), relativeConstraints::ring, CSCBaseboard::runME11ILT_, CSCBaseboard::runME21ILT_, and relativeConstraints::station.

◆ checkValidReadout()

void LCTQualityControl::checkValidReadout ( const CSCALCTDigi alct) const

Definition at line 16 of file LCTQualityControl.cc.

16  {
18 }

References checkValid(), and CSCConstants::MAX_ALCTS_READOUT.

◆ get_csc_alct_max_quality()

unsigned LCTQualityControl::get_csc_alct_max_quality ( int  station,
int  ring,
bool  runGEMCSC 
) const

Definition at line 354 of file LCTQualityControl.cc.

354  {
355  int max_quality = 3;
356  // GE2/1-ME2/1 ALCTs are allowed 3-layer ALCTs
357  if (runGEMCSC and station == 2 and ring == 1) {
358  max_quality = 4;
359  }
360  return max_quality;
361 }

References relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid().

◆ get_csc_clct_max_quality()

unsigned LCTQualityControl::get_csc_clct_max_quality ( ) const

Definition at line 363 of file LCTQualityControl.cc.

363  {
364  int max_quality = 6;
365  return max_quality;
366 }

Referenced by checkValid().

◆ get_csc_clct_min_max_slope()

std::pair< int, int > LCTQualityControl::get_csc_clct_min_max_slope ( ) const

Definition at line 231 of file LCTQualityControl.cc.

231  {
232  int min_slope, max_slope;
233  // Run-3 case with CCLUT
234  // 5-bit number (includes the L/R bending)
235  if (runCCLUT_) {
236  min_slope = 0;
237  max_slope = 31;
238  }
239  // Run-1 or Run-2 case
240  // Run-3 case without CCLUT
241  else {
242  min_slope = -10;
243  max_slope = 10;
244  }
245 
246  return std::make_pair(min_slope, max_slope);
247 }

References CSCBaseboard::runCCLUT_.

Referenced by checkValid().

◆ get_csc_lct_max_quality()

unsigned LCTQualityControl::get_csc_lct_max_quality ( ) const

Definition at line 368 of file LCTQualityControl.cc.

368  {
369  int max_quality = 15;
370  return max_quality;
371 }

Referenced by checkValid().

◆ get_csc_lct_min_max_pattern()

std::pair< unsigned, unsigned > LCTQualityControl::get_csc_lct_min_max_pattern ( ) const

Definition at line 339 of file LCTQualityControl.cc.

339  {
340  int min_pattern, max_pattern;
341  // Run-1 or Run-2 case
342  if (!runCCLUT_) {
343  min_pattern = 2;
344  max_pattern = 10;
345  }
346  // Run-3 case: pattern Id is interpreted as the slope!
347  else {
348  min_pattern = 0;
349  max_pattern = 15;
350  }
351  return std::make_pair(min_pattern, max_pattern);
352 }

References CSCBaseboard::runCCLUT_.

Referenced by checkValid().

◆ get_csc_max_eighthstrip()

unsigned LCTQualityControl::get_csc_max_eighthstrip ( int  station,
int  ring 
) const

Definition at line 309 of file LCTQualityControl.cc.

309  {
310  return get_csc_max_halfstrip(station, ring) * 4;
311 }

References get_csc_max_halfstrip(), relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid().

◆ get_csc_max_halfstrip()

unsigned LCTQualityControl::get_csc_max_halfstrip ( int  station,
int  ring 
) const

Definition at line 283 of file LCTQualityControl.cc.

283  {
284  int max_strip = 0; // halfstrip
285  if (station == 1 && ring == 4) { // ME1/1a
286  max_strip = 96;
287  } else if (station == 1 && ring == 1) { // ME1/1b
288  // In the CSC local trigger
289  // ME1/a is taken together with ME1/b
290  max_strip = 128 + 96;
291  } else if (station == 1 && ring == 2) { // ME1/2
292  max_strip = 160;
293  } else if (station == 1 && ring == 3) { // ME1/3
294  max_strip = 128;
295  } else if (station == 2 && ring == 1) { // ME2/1
296  max_strip = 160;
297  } else if (station >= 3 && ring == 1) { // ME3/1, ME4/1
298  max_strip = 160;
299  } else if (station >= 2 && ring == 2) { // ME2/2, ME3/2, ME4/2
300  max_strip = 160;
301  }
302  return max_strip;
303 }

References relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid(), get_csc_max_eighthstrip(), and get_csc_max_quartstrip().

◆ get_csc_max_quartstrip()

unsigned LCTQualityControl::get_csc_max_quartstrip ( int  station,
int  ring 
) const

Definition at line 305 of file LCTQualityControl.cc.

305  {
306  return get_csc_max_halfstrip(station, ring) * 2;
307 }

References get_csc_max_halfstrip(), relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid().

◆ get_csc_max_wire()

unsigned LCTQualityControl::get_csc_max_wire ( int  station,
int  ring 
) const

Definition at line 263 of file LCTQualityControl.cc.

263  {
264  unsigned max_wire = 0; // wiregroup
265  if (station == 1 && ring == 4) { // ME1/1a
266  max_wire = 48;
267  } else if (station == 1 && ring == 1) { // ME1/1b
268  max_wire = 48;
269  } else if (station == 1 && ring == 2) { // ME1/2
270  max_wire = 64;
271  } else if (station == 1 && ring == 3) { // ME1/3
272  max_wire = 32;
273  } else if (station == 2 && ring == 1) { // ME2/1
274  max_wire = 112;
275  } else if (station >= 3 && ring == 1) { // ME3/1, ME4/1
276  max_wire = 96;
277  } else if (station >= 2 && ring == 2) { // ME2/2, ME3/2, ME4/2
278  max_wire = 64;
279  }
280  return max_wire;
281 }

References relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid().

◆ get_csc_min_max_cfeb()

std::pair< unsigned, unsigned > LCTQualityControl::get_csc_min_max_cfeb ( int  station,
int  ring 
) const

Definition at line 313 of file LCTQualityControl.cc.

313  {
314  // 5 CFEBs [0,4] for non-ME1/1 chambers
315  int min_cfeb = 0;
316  int max_cfeb = CSCConstants::MAX_CFEBS - 1; // 4
317  // 7 CFEBs [0,6] for ME1/1 chambers
318  if (station == 1 and ring == 1) {
319  max_cfeb = 6;
320  }
321  return std::make_pair(min_cfeb, max_cfeb);
322 }

References CSCConstants::MAX_CFEBS, relativeConstraints::ring, and relativeConstraints::station.

Referenced by checkValid().

◆ get_csc_min_max_pattern()

std::pair< unsigned, unsigned > LCTQualityControl::get_csc_min_max_pattern ( bool  isRun3) const

Definition at line 324 of file LCTQualityControl.cc.

324  {
325  int min_pattern, max_pattern;
326  // Run-1 or Run-2 case
327  if (!runCCLUT) {
328  min_pattern = 2;
329  max_pattern = 10;
330  }
331  // Run-3 case
332  else {
333  min_pattern = 0;
334  max_pattern = 4;
335  }
336  return std::make_pair(min_pattern, max_pattern);
337 }

References auxiliaryParams::runCCLUT.

Referenced by checkValid().

◆ getSlopePhase1()

int LCTQualityControl::getSlopePhase1 ( int  pattern) const

Definition at line 224 of file LCTQualityControl.cc.

224  {
225  // PID 2 is actually a left-bending pattern with a negative slope
226  // PID 3 is actually a right-bending pattern with a positive slope
227  int slopeList[CSCConstants::NUM_CLCT_PATTERNS] = {0, 0, -8, 8, -6, 6, -4, 4, -2, 2, 0};
228  return slopeList[pattern];
229 }

References CSCConstants::NUM_CLCT_PATTERNS, and topSingleLeptonDQM_PU_cfi::pattern.

◆ reportErrors()

template<class T >
void LCTQualityControl::reportErrors ( const T lct,
const unsigned  errors 
) const

Definition at line 29 of file LCTQualityControl.cc.

29  {
30  if (errors > 0) {
31  edm::LogError("LCTQualityControl") << "Invalid stub in " << cscId_ << " (" << errors << " errors):\n" << lct;
32  }
33 }

References CSCBaseboard::cscId_.

Referenced by checkValid().

Member Data Documentation

◆ nplanes_clct_hit_pattern

unsigned LCTQualityControl::nplanes_clct_hit_pattern
private

Definition at line 84 of file LCTQualityControl.h.

Referenced by checkValid(), and LCTQualityControl().

CSCALCTDigi::getBX
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:73
CSCBaseboard::clctParams_
edm::ParameterSet clctParams_
Definition: CSCBaseboard.h:78
CSCCorrelatedLCTDigi::getTrknmb
uint16_t getTrknmb() const
return track number
Definition: CSCCorrelatedLCTDigi.h:52
LCTQualityControl::get_csc_min_max_pattern
std::pair< unsigned, unsigned > get_csc_min_max_pattern(bool isRun3) const
Definition: LCTQualityControl.cc:324
CSCConstants::MAX_ALCT_TBINS
Definition: CSCConstants.h:64
CSCCorrelatedLCTDigi::getType
int getType() const
Definition: CSCCorrelatedLCTDigi.h:212
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCCorrelatedLCTDigi::CLCTALCT
Definition: CSCCorrelatedLCTDigi.h:202
LCTQualityControl::nplanes_clct_hit_pattern
unsigned nplanes_clct_hit_pattern
Definition: LCTQualityControl.h:84
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CSCCorrelatedLCTDigi::getStrip
uint16_t getStrip(uint16_t n=2) const
return the key halfstrip from 0,159
Definition: CSCCorrelatedLCTDigi.cc:72
CSCBaseboard::theStation
const unsigned theStation
Definition: CSCBaseboard.h:42
CSCCorrelatedLCTDigi::getKeyWG
uint16_t getKeyWG() const
return the key wire group. counts from 0.
Definition: CSCCorrelatedLCTDigi.h:61
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
CSCCorrelatedLCTDigi::ALCTCLCT
Definition: CSCCorrelatedLCTDigi.h:203
CSCBaseboard::runME11ILT_
bool runME11ILT_
Definition: CSCBaseboard.h:91
CSCCorrelatedLCTDigi::CLCT2GEM
Definition: CSCCorrelatedLCTDigi.h:207
auxiliaryParams.runCCLUT
runCCLUT
Definition: auxiliaryParams.py:33
CSCALCTDigi::getKeyWG
uint16_t getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:67
CSCConstants::MAX_LCTS_PER_CSC
Definition: CSCConstants.h:75
errors
Definition: errors.py:1
LCTQualityControl::reportErrors
void reportErrors(const T &lct, const unsigned errors) const
Definition: LCTQualityControl.cc:29
CSCCorrelatedLCTDigi::CLCTONLY
Definition: CSCCorrelatedLCTDigi.h:208
CSCConstants::MAX_LCT_TBINS
Definition: CSCConstants.h:65
CSCConstants::MAX_ALCTS_READOUT
Definition: CSCConstants.h:73
CSCCorrelatedLCTDigi::getBend
uint16_t getBend() const
Definition: CSCCorrelatedLCTDigi.h:115
hcaldqm::quantity::min_value
const std::map< ValueQuantityType, double > min_value
Definition: ValueQuantity.h:130
CSCALCTDigi::getCollisionB
uint16_t getCollisionB() const
Definition: CSCALCTDigi.h:61
LCTQualityControl::checkRange
void checkRange(int parameter, int min_value, int max_value, const std::string &comment, unsigned &errors) const
Definition: LCTQualityControl.cc:20
LCTQualityControl::get_csc_lct_max_quality
unsigned get_csc_lct_max_quality() const
Definition: LCTQualityControl.cc:368
CSCALCTDigi::getQuality
uint16_t getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:46
LCTQualityControl::get_csc_max_quartstrip
unsigned get_csc_max_quartstrip(int station, int ring) const
Definition: LCTQualityControl.cc:305
LCTQualityControl::get_csc_alct_max_quality
unsigned get_csc_alct_max_quality(int station, int ring, bool runGEMCSC) const
Definition: LCTQualityControl.cc:354
CSCTriggerNumbering::minTriggerCscId
static int minTriggerCscId()
Definition: CSCTriggerNumbering.h:111
CSCBaseboard::CSCBaseboard
CSCBaseboard()
Definition: CSCBaseboard.cc:79
CSCCorrelatedLCTDigi::getCSCID
uint16_t getCSCID() const
Definition: CSCCorrelatedLCTDigi.h:133
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
LCTQualityControl::get_csc_min_max_cfeb
std::pair< unsigned, unsigned > get_csc_min_max_cfeb(int station, int ring) const
Definition: LCTQualityControl.cc:313
LCTQualityControl::checkValid
void checkValid(const CSCALCTDigi &alct, unsigned max_stubs=CSCConstants::MAX_ALCTS_PER_PROCESSOR) const
Definition: LCTQualityControl.cc:36
value
Definition: value.py:1
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
LCTQualityControl::get_csc_lct_min_max_pattern
std::pair< unsigned, unsigned > get_csc_lct_min_max_pattern() const
Definition: LCTQualityControl.cc:339
CSCBaseboard::runME21ILT_
bool runME21ILT_
Definition: CSCBaseboard.h:94
CSCConstants::MAX_CLCTS_READOUT
Definition: CSCConstants.h:70
hcaldqm::quantity::max_value
const std::map< ValueQuantityType, double > max_value
Definition: ValueQuantity.h:190
LCTQualityControl::get_csc_max_wire
unsigned get_csc_max_wire(int station, int ring) const
Definition: LCTQualityControl.cc:263
CSCCorrelatedLCTDigi::getPattern
uint16_t getPattern() const
Definition: CSCCorrelatedLCTDigi.cc:151
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CSCConstants::MAX_CLCT_TBINS
Definition: CSCConstants.h:63
CSCCorrelatedLCTDigi::getMPCLink
uint16_t getMPCLink() const
return MPC link number, 0 means not sorted, 1-3 give MPC sorting rank
Definition: CSCCorrelatedLCTDigi.h:131
LCTQualityControl::checkMultiplicityBX
void checkMultiplicityBX(const std::vector< CSCALCTDigi > &alcts) const
Definition: LCTQualityControl.cc:212
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
LCTQualityControl::get_csc_clct_min_max_slope
std::pair< int, int > get_csc_clct_min_max_slope() const
Definition: LCTQualityControl.cc:231
or
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CSCCorrelatedLCTDigi::ALCTONLY
Definition: CSCCorrelatedLCTDigi.h:209
CSCTriggerNumbering::maxTriggerCscId
static int maxTriggerCscId()
Definition: CSCTriggerNumbering.h:110
CSCBaseboard::cscId_
CSCDetId cscId_
Definition: CSCBaseboard.h:57
LCTQualityControl::get_csc_max_eighthstrip
unsigned get_csc_max_eighthstrip(int station, int ring) const
Definition: LCTQualityControl.cc:309
CSCALCTDigi::isValid
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:40
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
CSCConstants::MAX_LCTS_PER_MPC
Definition: CSCConstants.h:77
CSCALCTDigi::getTrknmb
uint16_t getTrknmb() const
return track number (1,2)
Definition: CSCALCTDigi.h:79
CSCConstants::NUM_CLCT_PATTERNS
Definition: CSCConstants.h:52
CSCCorrelatedLCTDigi::getBX
uint16_t getBX() const
return BX
Definition: CSCCorrelatedLCTDigi.h:118
LCTQualityControl::get_csc_clct_max_quality
unsigned get_csc_clct_max_quality() const
Definition: LCTQualityControl.cc:363
CSCConstants::NUM_HALF_STRIPS_PER_CFEB
Definition: CSCConstants.h:32
CSCCorrelatedLCTDigi::isValid
bool isValid() const
return valid pattern bit
Definition: CSCCorrelatedLCTDigi.h:55
CSCCorrelatedLCTDigi::getQuality
uint16_t getQuality() const
return the Quality
Definition: CSCCorrelatedLCTDigi.h:58
LCTQualityControl::get_csc_max_halfstrip
unsigned get_csc_max_halfstrip(int station, int ring) const
Definition: LCTQualityControl.cc:283
CSCConstants::MAX_CFEBS
Definition: CSCConstants.h:15
CSCBaseboard::runCCLUT_
bool runCCLUT_
Definition: CSCBaseboard.h:102
CSCBaseboard::theRing
unsigned theRing
Definition: CSCBaseboard.h:47
debug_messages_cfi.errors
errors
Definition: debug_messages_cfi.py:54