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;
110 const int IsPhysicsReady(
const unsigned int px,
const unsigned int py);
Detector geometry and addressing related imformation and routines.
const unsigned int setMaskedHWElements(std::vector< std::string > &tokens)
Read HW element masks (strings), create Address and apply to detector map.
void ReadReportingChambers(const TH2 *&h2, const double threshold=1.0)
Read Reporting Chamber histogram and fill in detector map.
HW element in standby mode.
HW element was masked out (not in readout)
void Write(TH2 *&h2, const unsigned int station) const
Write detector map to H1 histogram (linear data) for the selected adr.station.
bool isChamberStandby(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Check if chamber is in standby?
Hardware and Physics Efficiency data structures and routines.
const HWStatusBitSet GetValue(Address adr) const
Get value of some address.
HW element is cold comparing with reference histogram.
HWStatusBitSet map[2][4][3][36][6][5][5]
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...
Data available (reporting)
const bool ChamberAddressToCoords(const Address &adr, unsigned int &x, unsigned int &y) const
Calculate CSCChamberMap histogram coordinates from Address.
HWStatusBit
Hardware Status Bit values used in Summary efficiency calculation.
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.
const double GetEfficiencyArea(const unsigned int station) const
Get Efficiency area for the station.
void ReSetValue(const HWStatusBit bit)
ReSetValue for the whole of detector.
void WriteMap(TH2 *&h2)
Write PhysicsReady Map to H2 histogram.
const Detector getDetector() const
HW element is hot by comparing with reference histogram.
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.
void SetValue(const HWStatusBit bit, const int value=1)
SetValue for the whole of detector.
const double GetReportingArea(Address adr) const
Calculate the reporting area for the address.
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.
const bool ChamberCoordsToAddress(const unsigned int x, const unsigned int y, Address &adr) const
Calculate Address from CSCChamberMap histogram coordinates.
void Reset()
Resets all detector map.
std::bitset< 14 > HWStatusBitSet
Hardware Status Bits structure used in Summary efficiency calculation and storage.
Structure to store detector addresses of any granularity: from whole detector to the single HV elemen...
void reset(double vett[256])