Hardware and Physics Efficiency data structures and routines. More...
#include <CSCDQM_Summary.h>
Public Member Functions | |
const Detector | getDetector () const |
const double | GetEfficiencyArea (const unsigned int station) const |
Get Efficiency area for the station. More... | |
const double | GetEfficiencyArea (const Address &adr) const |
Get Efficiency area for the address. More... | |
const double | GetEfficiencyHW () const |
Get efficiency of the whole detector. More... | |
const double | GetEfficiencyHW (const unsigned int station) const |
Get efficiency of the station. More... | |
const double | GetEfficiencyHW (Address adr) const |
Get efficiency of the detector part supplied by the address. More... | |
const HWStatusBitSet | GetValue (Address adr) const |
Get value of some address. More... | |
bool | isChamberStandby (unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const |
Check if chamber is in standby? More... | |
bool | isChamberStandby (CSCDetId cid) const |
Check if chamber is in standby? More... | |
const int | IsPhysicsReady (const unsigned int px, const unsigned int py) |
Check if the current partition element (aka eta/phi polygon) has at least 2 active HW elements in the area. More... | |
void | ReadErrorChambers (const TH2 *&evs, const TH2 *&err, const HWStatusBit bit, const double eps_max=0.1, const double Sfail=5.0) |
Read Error data for Chambers. More... | |
void | ReadReportingChambers (const TH2 *&h2, const double threshold=1.0) |
Read Reporting Chamber histogram and fill in detector map. More... | |
void | ReadReportingChambersRef (const TH2 *&h2, const TH2 *&refh2, const double cold_coef=0.1, const double cold_Sfail=5.0, const double hot_coef=2.0, const double hot_Sfail=5.0) |
Read Reporting Chamber histogram and fill in detector map based on reference histogram. More... | |
void | Reset () |
Resets all detector map. More... | |
void | ReSetValue (const HWStatusBit bit) |
ReSetValue for the whole of detector. More... | |
void | ReSetValue (const Address &adr, const HWStatusBit bit) |
ReSet value recursivelly by following the supplied address. More... | |
const unsigned int | setMaskedHWElements (std::vector< std::string > &tokens) |
Read HW element masks (strings), create Address and apply to detector map. More... | |
void | SetValue (const HWStatusBit bit, const int value=1) |
SetValue for the whole of detector. More... | |
void | SetValue (Address adr, const HWStatusBit bit, const int value=1) |
Set value recursivelly by following the supplied address. More... | |
Summary () | |
Constructor. More... | |
void | Write (TH2 *&h2, const unsigned int station) const |
Write detector map to H1 histogram (linear data) for the selected adr.station. More... | |
void | WriteChamberState (TH2 *&h2, const int mask, const int value=1, const bool reset=true, const bool op_any=false) const |
Write State information to chamber histogram. More... | |
void | WriteMap (TH2 *&h2) |
Write PhysicsReady Map to H2 histogram. More... | |
~Summary () | |
Destructor. More... | |
Private Member Functions | |
const bool | ChamberAddressToCoords (const Address &adr, unsigned int &x, unsigned int &y) const |
Calculate CSCChamberMap histogram coordinates from Address. More... | |
const bool | ChamberCoordsToAddress (const unsigned int x, const unsigned int y, Address &adr) const |
Calculate Address from CSCChamberMap histogram coordinates. More... | |
const double | GetReportingArea (Address adr) const |
Calculate the reporting area for the address. More... | |
Private Attributes | |
Detector | detector |
HWStatusBitSet | map [2][4][3][36][6][5][5] |
Hardware and Physics Efficiency data structures and routines.
Definition at line 78 of file CSCDQM_Summary.h.
cscdqm::Summary::Summary | ( | ) |
cscdqm::Summary::~Summary | ( | ) |
|
private |
Calculate CSCChamberMap histogram coordinates from Address.
adr | Address |
x | X coordinate of histogram to be returned |
y | Y coordinate of histogram to be returned |
Definition at line 874 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::chamber, cscdqm::Address::chamber, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, and x.
Referenced by WriteChamberState().
|
private |
Calculate Address from CSCChamberMap histogram coordinates.
x | X coordinate of histogram |
y | Y coordinate of histogram |
adr | Address to be filled in and returned |
Definition at line 821 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, and x.
Referenced by ReadErrorChambers(), ReadReportingChambers(), and ReadReportingChambersRef().
|
inline |
Definition at line 85 of file CSCDQM_Summary.h.
References detector.
Referenced by cscdqm::EventProcessor::processCSC(), and cscdqm::EventProcessor::updateEfficiencyHistos().
const double cscdqm::Summary::GetEfficiencyArea | ( | const unsigned int | station | ) | const |
Get Efficiency area for the station.
station | Station number 1..4 |
Definition at line 609 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, N_STATIONS, cscdqm::AddressMask::ring, cscdqm::AddressMask::side, relativeConstraints::station, cscdqm::AddressMask::station, and cscdqm::Address::station.
const double cscdqm::Summary::GetEfficiencyArea | ( | const Address & | adr | ) | const |
Get Efficiency area for the address.
adr | Address |
Definition at line 627 of file CSCDQM_Summary.cc.
References cscdqm::Detector::Area(), cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, detector, GetReportingArea(), cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::AddressMask::side, cscdqm::AddressMask::station, and cscdqm::Address::station.
const double cscdqm::Summary::GetEfficiencyHW | ( | ) | const |
Get efficiency of the whole detector.
Definition at line 512 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::AddressMask::side, and cscdqm::AddressMask::station.
Referenced by GetEfficiencyHW(), and cscdqm::EventProcessor::updateEfficiencyHistos().
const double cscdqm::Summary::GetEfficiencyHW | ( | const unsigned int | station | ) | const |
Get efficiency of the station.
station | Station number |
Definition at line 525 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, GetEfficiencyHW(), cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, N_STATIONS, cscdqm::AddressMask::ring, cscdqm::AddressMask::side, relativeConstraints::station, cscdqm::AddressMask::station, and cscdqm::Address::station.
const double cscdqm::Summary::GetEfficiencyHW | ( | Address | adr | ) | const |
Get efficiency of the detector part supplied by the address.
adr | Address to watch efficiency for |
if not error - then OK!
Definition at line 546 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, detector, GetEfficiencyHW(), GetValue(), cscdqm::AddressMask::hv, cscdqm::Address::hv, HWSTATUSANYERROR, cscdqm::AddressMask::layer, cscdqm::Address::layer, cscdqm::Address::mask, N_LAYERS, N_SIDES, N_STATIONS, cscdqm::Detector::NumberOfChamberCFEBs(), cscdqm::Detector::NumberOfChamberHVs(), cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, and mps_update::status.
|
private |
Calculate the reporting area for the address.
adr | Address to calculate |
NOT errorous!
Definition at line 645 of file CSCDQM_Summary.cc.
References cscdqm::Detector::Area(), cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, detector, GetValue(), cscdqm::AddressMask::hv, cscdqm::Address::hv, HWSTATUSANYERROR, cscdqm::AddressMask::layer, cscdqm::Address::mask, N_SIDES, N_STATIONS, cscdqm::Detector::NumberOfChamberCFEBs(), cscdqm::Detector::NumberOfChamberHVs(), cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, and mps_update::status.
Referenced by GetEfficiencyArea().
const HWStatusBitSet cscdqm::Summary::GetValue | ( | Address | adr | ) | const |
Get value of some address.
adr | Address of atomic element to return value from |
Definition at line 739 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, detector, cscdqm::AddressMask::hv, cscdqm::Address::hv, cscdqm::AddressMask::layer, cscdqm::Address::layer, map, cscdqm::Address::mask, N_LAYERS, N_SIDES, N_STATIONS, cscdqm::Detector::NumberOfChamberCFEBs(), cscdqm::Detector::NumberOfChamberHVs(), cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, and cscdqm::Address::station.
Referenced by GetEfficiencyHW(), GetReportingArea(), isChamberStandby(), IsPhysicsReady(), Write(), and WriteChamberState().
bool cscdqm::Summary::isChamberStandby | ( | unsigned int | side, |
unsigned int | station, | ||
unsigned int | ring, | ||
unsigned int | chamber | ||
) | const |
Check if chamber is in standby?
side | Side |
station | Station |
ring | Ring |
chamber | Chamber |
Definition at line 707 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, relativeConstraints::chamber, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, GetValue(), cscdqm::AddressMask::hv, HWSTATUSANY, cscdqm::AddressMask::layer, cscdqm::Address::mask, relativeConstraints::ring, cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, relativeConstraints::station, cscdqm::AddressMask::station, and cscdqm::Address::station.
Referenced by isChamberStandby(), and cscdqm::EventProcessor::processCSC().
bool cscdqm::Summary::isChamberStandby | ( | CSCDetId | cid | ) | const |
Check if chamber is in standby?
cid | Chamber identifier |
Definition at line 730 of file CSCDQM_Summary.cc.
References CSCDetId::chamber(), CSCDetId::endcap(), isChamberStandby(), CSCDetId::ring(), and CSCDetId::station().
const int cscdqm::Summary::IsPhysicsReady | ( | const unsigned int | px, |
const unsigned int | py | ||
) |
Check if the current partition element (aka eta/phi polygon) has at least 2 active HW elements in the area.
px | partition element index in x axis |
py | partition element index in y axis |
If at least 2 stations with data and without errors = OK
Else, if at least one station errorous = ERROR
Else, if at least one station masked = MASKED
Else, not sufficient data = OK
Definition at line 473 of file CSCDQM_Summary.cc.
References cscdqm::AddressBox::adr, cscdqm::DATA, detector, GetValue(), HWSTATUSANYERROR, mps_fire::i, cscdqm::MASKED, N_STATIONS, cscdqm::Detector::NextAddressBoxByPartition(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, cscdqm::Address::station, mps_update::status, and ctpps_dqm_sourceclient-live_cfg::test.
Referenced by WriteMap().
void cscdqm::Summary::ReadErrorChambers | ( | const TH2 *& | evs, |
const TH2 *& | err, | ||
const HWStatusBit | bit, | ||
const double | eps_max = 0.1 , |
||
const double | Sfail = 5.0 |
||
) |
Read Error data for Chambers.
evs | Histogram for number of events (total) |
err | Histogram for number of errors |
bit | Error bit to set |
eps_max | Maximum tolerance of errors (rate) |
Sfail | Significance threshold for failure report |
Definition at line 197 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, ChamberCoordsToAddress(), cscdqm::Utility::checkError(), submitPVResolutionJobs::err, createfilelist::int, LOG_WARN, N, dqmiodumpmetadata::n, ReSetValue(), SetValue(), and x.
Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().
void cscdqm::Summary::ReadReportingChambers | ( | const TH2 *& | h2, |
const double | threshold = 1.0 |
||
) |
Read Reporting Chamber histogram and fill in detector map.
h2 | Histogram to read |
threshold | Min bin value to set HW element as reporting |
Definition at line 61 of file CSCDQM_Summary.cc.
References ChamberCoordsToAddress(), cscdqm::DATA, LOG_WARN, ReSetValue(), SetValue(), remoteMonitoring_LASER_era2018_cfg::threshold, and x.
Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().
void cscdqm::Summary::ReadReportingChambersRef | ( | const TH2 *& | h2, |
const TH2 *& | refh2, | ||
const double | cold_coef = 0.1 , |
||
const double | cold_Sfail = 5.0 , |
||
const double | hot_coef = 2.0 , |
||
const double | hot_Sfail = 5.0 |
||
) |
Read Reporting Chamber histogram and fill in detector map based on reference histogram.
h2 | Histogram to read |
refh2 | Reference histogram of hit occupancies |
cold_coef | Minimum tolerance of difference (rate) to set COLD (not reporting) HW element |
cold_Sfail | Significance threshold for COLD HW element |
hot_coef | Minimum tolerance of difference (rate) to set HOT HW element |
hot_Sfail | Significance threshold for HOT HW element |
Rate Factor calculation
Reset some bits
Definition at line 95 of file CSCDQM_Summary.cc.
References ChamberCoordsToAddress(), cscdqm::Utility::checkOccupancy(), cscdqm::COLD, cscdqm::DATA, cscdqm::HOT, createfilelist::int, LOG_WARN, N, dqmiodumpmetadata::n, EgammaValidation_cff::num, funct::pow(), ReSetValue(), SetValue(), and x.
Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().
void cscdqm::Summary::Reset | ( | ) |
Resets all detector map.
Setting Zeros (no data) for each HW element (and beyond)
Definition at line 36 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, cscdqm::AddressMask::hv, cscdqm::Address::hv, HWSTATUSBITSETSIZE, cscdqm::AddressMask::layer, cscdqm::Address::mask, N_CFEBS, N_CHAMBERS, N_HVS, N_RINGS, ReSetValue(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, and cscdqm::AddressMask::station.
Referenced by Summary().
void cscdqm::Summary::ReSetValue | ( | const HWStatusBit | bit | ) |
ReSetValue for the whole of detector.
bit | Status bit to set |
Definition at line 379 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, and SetValue().
Referenced by ReadErrorChambers(), ReadReportingChambers(), ReadReportingChambersRef(), and Reset().
void cscdqm::Summary::ReSetValue | ( | const Address & | adr, |
const HWStatusBit | bit | ||
) |
ReSet value recursivelly by following the supplied address.
adr | Address to be updated |
bit | Status bit to set |
Definition at line 386 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, and SetValue().
const unsigned int cscdqm::Summary::setMaskedHWElements | ( | std::vector< std::string > & | tokens | ) |
Read HW element masks (strings), create Address and apply to detector map.
tokens | Vector of mask strings |
Definition at line 800 of file CSCDQM_Summary.cc.
References cscdqm::Detector::AddressFromString(), detector, cscdqm::MASKED, SetValue(), AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.
Referenced by cscdqm::EventProcessor::maskHWElements().
void cscdqm::Summary::SetValue | ( | const HWStatusBit | bit, |
const int | value = 1 |
||
) |
SetValue for the whole of detector.
bit | Status bit to set |
value | Value to set |
Definition at line 393 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::AddressMask::hv, cscdqm::AddressMask::layer, cscdqm::Address::mask, cscdqm::AddressMask::ring, cscdqm::AddressMask::side, and cscdqm::AddressMask::station.
Referenced by ReadErrorChambers(), ReadReportingChambers(), ReadReportingChambersRef(), ReSetValue(), setMaskedHWElements(), SetValue(), and cscdqm::EventProcessor::standbyEfficiencyHistos().
void cscdqm::Summary::SetValue | ( | Address | adr, |
const HWStatusBit | bit, | ||
const int | value = 1 |
||
) |
Set value recursivelly by following the supplied address.
adr | Address to be updated |
bit | Status bit to set |
value | Value to be set |
Definition at line 407 of file CSCDQM_Summary.cc.
References triggerObjects_cff::bit, cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, detector, cscdqm::AddressMask::hv, cscdqm::Address::hv, cscdqm::AddressMask::layer, cscdqm::Address::layer, map, cscdqm::Address::mask, N_CFEBS, N_CHAMBERS, N_HVS, N_LAYERS, N_RINGS, N_SIDES, N_STATIONS, cscdqm::Detector::NumberOfChamberCFEBs(), cscdqm::Detector::NumberOfChamberHVs(), cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), cscdqm::AddressMask::ring, cscdqm::Address::ring, SetValue(), cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, and cscdqm::Address::station.
void cscdqm::Summary::Write | ( | TH2 *& | h2, |
const unsigned int | station | ||
) | const |
Write detector map to H1 histogram (linear data) for the selected adr.station.
h2 | Histogram to write data to |
station | station number (1-4) to write data for |
Definition at line 229 of file CSCDQM_Summary.cc.
References cscdqm::AddressBox::adr, cscdqm::AddressMask::cfeb, cscdqm::Address::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, cscdqm::DATA, detector, GetValue(), cscdqm::AddressMask::hv, cscdqm::Address::hv, HWSTATUSANYERROR, mps_fire::i, cscdqm::AddressMask::layer, cscdqm::Address::mask, cscdqm::MASKED, N_STATIONS, cscdqm::Detector::NextAddressBox(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, relativeConstraints::station, cscdqm::AddressMask::station, cscdqm::Address::station, mps_update::status, runGCPTkAlMap::title, x, cscdqm::AddressBox::xmax, cscdqm::AddressBox::xmin, cscdqm::AddressBox::ymax, and cscdqm::AddressBox::ymin.
Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().
void cscdqm::Summary::WriteChamberState | ( | TH2 *& | h2, |
const int | mask, | ||
const int | value = 1 , |
||
const bool | reset = true , |
||
const bool | op_any = false |
||
) | const |
Write State information to chamber histogram.
h2 | histogram to write to |
mask | mask of errors to check while writing |
value | to write to if state fits mask |
reset | should all chamber states be reseted to 0 prior writing? |
op_any | Should chamber be marked as errorous on any bit in mask? false - for all. |
Definition at line 339 of file CSCDQM_Summary.cc.
References cscdqm::AddressMask::cfeb, cscdqm::AddressMask::chamber, cscdqm::Address::chamber, ChamberAddressToCoords(), detector, GetValue(), cscdqm::AddressMask::hv, HWSTATUSANY, HWSTATUSEQUALS, cscdqm::AddressMask::layer, LOG_WARN, gpuClustering::pixelStatus::mask, cscdqm::Address::mask, N_SIDES, N_STATIONS, cscdqm::Detector::NumberOfChambers(), cscdqm::Detector::NumberOfRings(), reset(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, cscdqm::Address::station, and x.
Referenced by cscdqm::EventProcessor::standbyEfficiencyHistos(), and cscdqm::EventProcessor::writeShifterHistograms().
void cscdqm::Summary::WriteMap | ( | TH2 *& | h2 | ) |
Write PhysicsReady Map to H2 histogram.
h2 | Histogram to write map to |
Definition at line 279 of file CSCDQM_Summary.cc.
References IsPhysicsReady(), LOG_WARN, NTICS, runGCPTkAlMap::title, x, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.
Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().
|
private |
Detector routines object
Definition at line 131 of file CSCDQM_Summary.h.
Referenced by getDetector(), GetEfficiencyArea(), GetEfficiencyHW(), GetReportingArea(), GetValue(), IsPhysicsReady(), setMaskedHWElements(), SetValue(), Write(), and WriteChamberState().
|
private |
Atomic HW element status matrix
Definition at line 128 of file CSCDQM_Summary.h.
Referenced by OrderedSet.OrderedSet::__contains__(), OrderedSet.OrderedSet::__len__(), OrderedSet.OrderedSet::add(), OrderedSet.OrderedSet::discard(), GetValue(), and SetValue().