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 868 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, and cscdqm::Address::station.
Referenced by getDetector(), and 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 808 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, and cscdqm::Address::station.
Referenced by getDetector(), ReadErrorChambers(), ReadReportingChambers(), and ReadReportingChambersRef().
|
inline |
Definition at line 87 of file CSCDQM_Summary.h.
References relativeConstraints::chamber, ChamberAddressToCoords(), ChamberCoordsToAddress(), detector, GetEfficiencyArea(), GetEfficiencyHW(), GetReportingArea(), GetValue(), isChamberStandby(), IsPhysicsReady(), RecoTauDiscriminantConfiguration::mask, ReadErrorChambers(), ReadReportingChambers(), ReadReportingChambersRef(), reset(), ReSetValue(), relativeConstraints::ring, setMaskedHWElements(), SetValue(), relativeConstraints::station, ctppsDiamondLocalTracks_cfi::threshold, Write(), WriteChamberState(), WriteMap(), and x().
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 607 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, and cscdqm::Address::station.
Referenced by getDetector().
const double cscdqm::Summary::GetEfficiencyArea | ( | const Address & | adr | ) | const |
Get Efficiency area for the address.
adr | Address |
Definition at line 623 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 517 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 getDetector(), 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 530 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 551 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 646 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 getDetector(), and 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 732 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 getDetector(), 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 703 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 getDetector(), isChamberStandby(), and cscdqm::EventProcessor::processCSC().
bool cscdqm::Summary::isChamberStandby | ( | CSCDetId | cid | ) | const |
Check if chamber is in standby?
cid | Chamber identifier |
Definition at line 723 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 481 of file CSCDQM_Summary.cc.
References cscdqm::AddressBox::adr, cscdqm::DATA, detector, GetValue(), HWSTATUSANYERROR, mps_fire::i, cscdqm::MASKED, N_STATIONS, cscdqm::Detector::NextAddressBoxByPartition(), cscdqm::Address::station, mps_update::status, and PFTauMVAInputDiscriminatorTranslator_cfi::test.
Referenced by getDetector(), and 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 201 of file CSCDQM_Summary.cc.
References ChamberCoordsToAddress(), cscdqm::Utility::checkError(), createfilelist::int, LOG_WARN, N, gen::n, ReSetValue(), SetValue(), and x().
Referenced by getDetector(), and 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 62 of file CSCDQM_Summary.cc.
References ChamberCoordsToAddress(), cscdqm::DATA, LOG_WARN, ReSetValue(), SetValue(), and x().
Referenced by getDetector(), and 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 97 of file CSCDQM_Summary.cc.
References ChamberCoordsToAddress(), cscdqm::Utility::checkOccupancy(), cscdqm::COLD, cscdqm::DATA, cscdqm::HOT, createfilelist::int, LOG_WARN, N, gen::n, pileupDistInMC::num, funct::pow(), ReSetValue(), SetValue(), and x().
Referenced by getDetector(), and cscdqm::EventProcessor::updateEfficiencyHistos().
void cscdqm::Summary::Reset | ( | ) |
Resets all detector map.
Setting Zeros (no data) for each HW element (and beyond)
Definition at line 38 of file CSCDQM_Summary.cc.
References 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 390 of file CSCDQM_Summary.cc.
References SetValue().
Referenced by getDetector(), 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 399 of file CSCDQM_Summary.cc.
References 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 787 of file CSCDQM_Summary.cc.
References cscdqm::Detector::AddressFromString(), detector, cscdqm::MASKED, alignCSCRings::r, SetValue(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getDetector(), and 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 408 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 getDetector(), 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 420 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_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 234 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, fftjetcommon_cfi::title, x(), cscdqm::AddressBox::xmax, cscdqm::AddressBox::xmin, cscdqm::AddressBox::ymax, and cscdqm::AddressBox::ymin.
Referenced by getDetector(), and 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 348 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, cscdqm::Address::mask, N_SIDES, N_STATIONS, 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 x().
Referenced by getDetector(), 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 284 of file CSCDQM_Summary.cc.
References IsPhysicsReady(), LOG_WARN, NTICS, fftjetcommon_cfi::title, x(), TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.
Referenced by getDetector(), and cscdqm::EventProcessor::updateEfficiencyHistos().
|
private |
Detector routines object
Definition at line 127 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 124 of file CSCDQM_Summary.h.
Referenced by OrderedSet.OrderedSet::__contains__(), OrderedSet.OrderedSet::__len__(), OrderedSet.OrderedSet::add(), OrderedSet.OrderedSet::discard(), GetValue(), and SetValue().