3 #include <unordered_map>
12 :
CSCBaseboard(endcap, station, sector, subsector, chamber, conf) {
23 if (value < min_value or value > max_value) {
24 edm::LogError(
"LCTQualityControl") << comment << value <<
"; allowed [" << min_value <<
", " << max_value <<
"]";
32 edm::LogError(
"LCTQualityControl") <<
"Invalid stub in " <<
cscId_ <<
" (" << errors <<
" errors):\n" << lct;
47 checkRange(alct.
getTrknmb(), 1, max_stubs,
"CSCALCTDigi with invalid track number: ", errors);
51 checkRange(alct.
getQuality(), min_quality, max_quality,
"CSCALCTDigi with invalid quality: ", errors);
54 checkRange(alct.
getKeyWG(), 0, max_wiregroup - 1,
"CSCALCTDigi with invalid wire-group: ", errors);
80 checkRange(clct.
getTrknmb(), 1, max_stubs,
"CSCCLCTDigi with invalid track number: ", errors);
86 checkRange(clct.
getQuality(), min_quality, max_quality,
"CSCCLCTDigi with invalid quality: ", errors);
93 checkRange(clct.
getKeyStrip(), 0, max_strip - 1,
"CSCCLCTDigi with invalid key half-strip: ", errors);
103 clct.
getPattern(), min_pattern_run2, max_pattern_run2,
"CSCCLCTDigi with invalid Run-2 pattern ID: ", errors);
107 clct.
getRun3Pattern(), min_pattern_run3, max_pattern_run3,
"CSCCLCTDigi with invalid Run-3 pattern ID: ", errors);
110 checkRange(clct.
getSlope(), min_slope, max_slope,
"CSCCLCTDigi with invalid slope: ", errors);
113 checkRange(clct.
getCFEB(), min_cfeb, max_cfeb,
"CSCCLCTDigi with invalid CFEB ID: ", errors);
123 checkRange(clct.
getKeyStrip(4), 0, max_quartstrip - 1,
"CSCCLCTDigi with invalid key quart-strip: ", errors);
126 checkRange(clct.
getKeyStrip(8), 0, max_eighthstrip - 1,
"CSCCLCTDigi with invalid key quart-strip: ", errors);
146 checkRange(lct.
isValid(), 1, 1,
"CSCCorrelatedLCTDigi with invalid bit set: ", errors);
149 checkRange(lct.
getTrknmb(), 1, 2,
"CSCCorrelatedLCTDigi with invalid track number: ", errors);
152 checkRange(lct.
getQuality(), min_quality, max_quality,
"CSCCorrelatedLCTDigi with invalid quality: ", errors);
155 checkRange(lct.
getStrip(), 0, max_strip - 1,
"CSCCorrelatedLCTDigi with invalid key half-strip: ", errors);
158 checkRange(lct.
getStrip(4), 0, max_quartstrip - 1,
"CSCCorrelatedLCTDigi with invalid key quart-strip: ", errors);
161 checkRange(lct.
getStrip(8), 0, max_eighthstrip - 1,
"CSCCorrelatedLCTDigi with invalid key eighth-strip: ", errors);
164 checkRange(lct.
getKeyWG(), 0, max_wiregroup - 1,
"CSCCorrelatedLCTDigi with invalid wire-group: ", errors);
170 checkRange(lct.
getBend(), 0, 1,
"CSCCorrelatedLCTDigi with invalid bending: ", errors);
179 "CSCCorrelatedLCTDigi with invalid CSCID: ",
186 "CSCCorrelatedLCTDigi with invalid Run-2 pattern ID: ",
192 "CSCCorrelatedLCTDigi with invalid Run-3 pattern ID: ",
198 edm::LogError(
"LCTQualityControl") <<
"CSCCorrelatedLCTDigi with invalid type (SIM): " << lct.
getType()
207 edm::LogError(
"LCTQualityControl") <<
"CSCCorrelatedLCTDigi with invalid type (SIM) in this station: "
216 edm::LogError(
"LCTQualityControl") <<
"CSCCorrelatedLCTDigi with invalid type (SIM) with GEM-CSC trigger not on: "
226 edm::LogError(
"LCTQualityControl") <<
"CSCCorrelatedLCTDigi with valid GEM-CSC type (SIM) has no valid GEM hits: "
237 if (ME11ILT
or ME21ILT) {
257 if (!(case1
or case2
or case3
or case4
or case5
or case6
or case7)) {
259 <<
"CSCCorrelatedLCTDigi with valid GEM-CSC type (SIM) has no matching Run-3 quality: " << lct.
getType()
273 if (!(case1
or case2
or case3)) {
275 <<
"CSCCorrelatedLCTDigi with invalid CSC type (SIM) has no matching Run-3 quality: " << lct.
getType()
299 int slopeList[
CSCConstants::NUM_CLCT_PATTERNS] = {0, 0, -8, 8, -6, 6, -4, 4, -2, 2, 0};
300 return slopeList[pattern];
304 int min_slope, max_slope;
318 return std::make_pair(min_slope, max_slope);
336 unsigned max_wiregroup = 0;
337 if (station == 1 && ring == 4) {
339 }
else if (station == 1 && ring == 1) {
341 }
else if (station == 1 && ring == 2) {
343 }
else if (station == 1 && ring == 3) {
345 }
else if (station == 2 && ring == 1) {
347 }
else if (station >= 3 && ring == 1) {
349 }
else if (station >= 2 && ring == 2) {
352 return max_wiregroup;
356 unsigned max_half_strip = 0;
360 }
else if (station == 1 && ring == 4 and !gangedME1a_) {
366 else if (station == 1 && ring == 1 and gangedME1a_) {
368 }
else if (station == 1 && ring == 1 and !gangedME1a_) {
372 else if (station == 1 && ring == 2) {
376 else if (station == 1 && ring == 3) {
380 else if (station == 2 && ring == 1) {
384 else if (station >= 3 && ring == 1) {
388 else if (station >= 2 && ring == 2) {
391 return max_half_strip;
404 unsigned min_cfeb = 0;
405 unsigned max_cfeb = 0;
441 return std::make_pair(min_cfeb, max_cfeb - 1);
449 unsigned min_pattern, max_pattern;
460 return std::make_pair(min_pattern, max_pattern);
466 unsigned min_quality = 1;
471 return std::make_pair(min_quality, 3);
476 unsigned min_quality = 4;
481 return std::make_pair(min_quality, 6);
508 return std::make_pair(min_quality, max_quality);
uint16_t getCollisionB() const
uint16_t getRun3Pattern() const
return pattern
uint16_t getQuality() const
return quality of a pattern
unsigned nplanes_clct_hit_pattern
unsigned get_csc_max_wiregroup(unsigned station, unsigned ring) const
uint16_t getBX() const
return BX
std::pair< unsigned, unsigned > get_csc_clct_min_max_quality() const
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
std::pair< int, int > get_csc_clct_min_max_slope() const
static int maxTriggerCscId()
bool isValid() const
check ALCT validity (1 - valid ALCT)
uint16_t getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
std::pair< unsigned, unsigned > get_csc_min_max_cfeb() const
Log< level::Error, false > LogError
const std::map< ValueQuantityType, double > min_value
void checkValidReadout(const CSCALCTDigi &alct) const
std::pair< unsigned, unsigned > get_csc_min_max_pattern() const
uint16_t getKeyStrip(const uint16_t n=2) const
void reportErrors(const T &lct, const unsigned errors) const
unsigned get_csc_max_halfstrip(unsigned station, unsigned ring) const
uint16_t getCFEB() const
return Key CFEB ID
void checkRange(int parameter, int min_value, int max_value, const std::string &comment, unsigned &errors) const
uint16_t getTrknmb() const
return track number (1,2)
bool isValid() const
check CLCT validity (1 - valid CLCT)
std::pair< unsigned, unsigned > get_csc_lct_min_max_quality(unsigned station, unsigned ring) const
unsigned get_csc_max_quartstrip(unsigned station, unsigned ring) const
unsigned get_csc_max_eighthstrip(unsigned station, unsigned ring) const
std::pair< unsigned, unsigned > get_csc_alct_min_max_quality() const
edm::ParameterSet clctParams_
std::pair< unsigned, unsigned > get_csc_min_max_pattern_run3() const
uint16_t getStrip() const
return halfstrip that goes from 0 to 31 in a (D)CFEB
uint16_t getKeyWG() const
return key wire group
T getParameter(std::string const &) const
const unsigned theStation
uint16_t getSlope() const
return the slope
uint16_t getPattern() const
return pattern
const std::map< ValueQuantityType, double > max_value
uint16_t getTrknmb() const
return track number (1,2)
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)
static int minTriggerCscId()
std::pair< unsigned, unsigned > get_csc_lct_min_max_pattern() const
void checkValid(const CSCALCTDigi &alct, unsigned max_stubs=CSCConstants::MAX_ALCTS_PER_PROCESSOR) const
LCTQualityControl(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
int16_t getCompCode() const
Power< A, B >::type pow(const A &a, const B &b)
void checkMultiplicityBX(const std::vector< CSCALCTDigi > &alcts) const
int getSlopePhase1(unsigned pattern) const