Go to the documentation of this file.
19 #ifndef CSCDQM_Summary_H
20 #define CSCDQM_Summary_H
32 #define HWSTATUSBITSETSIZE 14
33 #define HWSTATUSERRORBITS 0xffc
34 #define HWSTATUSEQUALS(s, m) (((std::bitset<HWSTATUSBITSETSIZE>)m & s) == m)
35 #define HWSTATUSANY(s, m) (((std::bitset<HWSTATUSBITSETSIZE>)m & s).any())
36 #define HWSTATUSANYERROR(s) (HWSTATUSANY(s, HWSTATUSERRORBITS))
90 const double cold_coef = 0.1,
91 const double cold_Sfail = 5.0,
92 const double hot_coef = 2.0,
93 const double hot_Sfail = 5.0);
95 const TH2*& evs,
const TH2*&
err,
const HWStatusBit bit,
const double eps_max = 0.1,
const double Sfail = 5.0);
102 TH2*& h2,
const int mask,
const int value = 1,
const bool reset =
true,
const bool op_any =
false)
const;
void ReadReportingChambers(const TH2 *&h2, const double threshold=1.0)
Read Reporting Chamber histogram and fill in detector map.
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.
HW element is cold comparing with reference histogram.
const bool ChamberCoordsToAddress(const unsigned int x, const unsigned int y, Address &adr) const
Calculate Address from CSCChamberMap histogram coordinates.
HWStatusBit
Hardware Status Bit values used in Summary efficiency calculation.
Hardware and Physics Efficiency data structures and routines.
std::bitset< 14 > HWStatusBitSet
Hardware Status Bits structure used in Summary efficiency calculation and storage.
Data available (reporting)
void Write(TH2 *&h2, const unsigned int station) const
Write detector map to H1 histogram (linear data) for the selected adr.station.
const bool ChamberAddressToCoords(const Address &adr, unsigned int &x, unsigned int &y) const
Calculate CSCChamberMap histogram coordinates from Address.
void ReSetValue(const HWStatusBit bit)
ReSetValue for the whole of detector.
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...
const double GetReportingArea(Address adr) const
Calculate the reporting area for the address.
HW element was masked out (not in readout)
void SetValue(const HWStatusBit bit, const int value=1)
SetValue for the whole of detector.
const unsigned int setMaskedHWElements(std::vector< std::string > &tokens)
Read HW element masks (strings), create Address and apply to detector map.
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.
const HWStatusBitSet GetValue(Address adr) const
Get value of some address.
void WriteMap(TH2 *&h2)
Write PhysicsReady Map to H2 histogram.
Structure to store detector addresses of any granularity: from whole detector to the single HV elemen...
bool isChamberStandby(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Check if chamber is in standby?
const double GetEfficiencyHW() const
Get efficiency of the whole detector.
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.
HW element is hot by comparing with reference histogram.
HW element in standby mode.
const double GetEfficiencyArea(const unsigned int station) const
Get Efficiency area for the station.
void reset(double vett[256])
Detector geometry and addressing related imformation and routines.
HWStatusBitSet map[2][4][3][36][6][5][5]
const Detector getDetector() const
void Reset()
Resets all detector map.