CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
cscdqm::Summary Class Reference

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]
 

Detailed Description

Hardware and Physics Efficiency data structures and routines.

Definition at line 78 of file CSCDQM_Summary.h.

Constructor & Destructor Documentation

cscdqm::Summary::Summary ( )

Constructor.

Definition at line 26 of file CSCDQM_Summary.cc.

cscdqm::Summary::~Summary ( )

Destructor.

Definition at line 33 of file CSCDQM_Summary.cc.

Member Function Documentation

const bool cscdqm::Summary::ChamberAddressToCoords ( const Address adr,
unsigned int &  x,
unsigned int &  y 
) const
private

Calculate CSCChamberMap histogram coordinates from Address.

Parameters
adrAddress
xX coordinate of histogram to be returned
yY coordinate of histogram to be returned
Returns
true if coords filled, false - otherwise

Definition at line 868 of file CSCDQM_Summary.cc.

const bool cscdqm::Summary::ChamberCoordsToAddress ( const unsigned int  x,
const unsigned int  y,
Address adr 
) const
private

Calculate Address from CSCChamberMap histogram coordinates.

Parameters
xX coordinate of histogram
yY coordinate of histogram
adrAddress to be filled in and returned
Returns
true if address was found and filled, false - otherwise

Definition at line 808 of file CSCDQM_Summary.cc.

const Detector cscdqm::Summary::getDetector ( ) const
inline

Definition at line 87 of file CSCDQM_Summary.h.

References detector.

87 { return detector; }
const double cscdqm::Summary::GetEfficiencyArea ( const unsigned int  station) const

Get Efficiency area for the station.

Parameters
stationStation number 1..4
Returns
Reporting Area for the Station

Definition at line 607 of file CSCDQM_Summary.cc.

const double cscdqm::Summary::GetEfficiencyArea ( const Address adr) const

Get Efficiency area for the address.

Parameters
adrAddress
Returns
Area in eta/phi space

Definition at line 623 of file CSCDQM_Summary.cc.

const double cscdqm::Summary::GetEfficiencyHW ( ) const

Get efficiency of the whole detector.

Returns
Detector efficiency rate (0..1)

Definition at line 517 of file CSCDQM_Summary.cc.

const double cscdqm::Summary::GetEfficiencyHW ( const unsigned int  station) const

Get efficiency of the station.

Parameters
stationStation number
Returns
Detector efficiency rate (0..1)

Definition at line 530 of file CSCDQM_Summary.cc.

const double cscdqm::Summary::GetEfficiencyHW ( Address  adr) const

Get efficiency of the detector part supplied by the address.

Parameters
adrAddress to watch efficiency for
Returns
Subdetector efficiency rate (0..1)

if not error - then OK!

Definition at line 551 of file CSCDQM_Summary.cc.

const double cscdqm::Summary::GetReportingArea ( Address  adr) const
private

Calculate the reporting area for the address.

Parameters
adrAddress to calculate
Returns
Area in eta/phi space

NOT errorous!

Definition at line 646 of file CSCDQM_Summary.cc.

const HWStatusBitSet cscdqm::Summary::GetValue ( Address  adr) const

Get value of some address.

Parameters
adrAddress of atomic element to return value from
Returns
Value of the requested element

Definition at line 732 of file CSCDQM_Summary.cc.

bool cscdqm::Summary::isChamberStandby ( unsigned int  side,
unsigned int  station,
unsigned int  ring,
unsigned int  chamber 
) const

Check if chamber is in standby?

Parameters
sideSide
stationStation
ringRing
chamberChamber
Returns
true if chamber is in standby, false - otherwise

Definition at line 703 of file CSCDQM_Summary.cc.

bool cscdqm::Summary::isChamberStandby ( CSCDetId  cid) const

Check if chamber is in standby?

Parameters
cidChamber identifier
Returns
true if chamber is in standby, false - otherwise

Definition at line 723 of file CSCDQM_Summary.cc.

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.

Parameters
pxpartition element index in x axis
pypartition element index in y axis
Returns
1 if this polygon is ok for physics and reporting, 0 - if it is ok but does not report, -1 - otherwise

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.

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.

Parameters
evsHistogram for number of events (total)
errHistogram for number of errors
bitError bit to set
eps_maxMaximum tolerance of errors (rate)
SfailSignificance threshold for failure report

Definition at line 201 of file CSCDQM_Summary.cc.

void cscdqm::Summary::ReadReportingChambers ( const TH2 *&  h2,
const double  threshold = 1.0 
)

Read Reporting Chamber histogram and fill in detector map.

Parameters
h2Histogram to read
thresholdMin bin value to set HW element as reporting

Definition at line 62 of file CSCDQM_Summary.cc.

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.

Parameters
h2Histogram to read
refh2Reference histogram of hit occupancies
cold_coefMinimum tolerance of difference (rate) to set COLD (not reporting) HW element
cold_SfailSignificance threshold for COLD HW element
hot_coefMinimum tolerance of difference (rate) to set HOT HW element
hot_SfailSignificance threshold for HOT HW element

Rate Factor calculation

Reset some bits

Definition at line 97 of file CSCDQM_Summary.cc.

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.

void cscdqm::Summary::ReSetValue ( const HWStatusBit  bit)

ReSetValue for the whole of detector.

Parameters
bitStatus bit to set

Definition at line 390 of file CSCDQM_Summary.cc.

void cscdqm::Summary::ReSetValue ( const Address adr,
const HWStatusBit  bit 
)

ReSet value recursivelly by following the supplied address.

Parameters
adrAddress to be updated
bitStatus bit to set

Definition at line 399 of file CSCDQM_Summary.cc.

const unsigned int cscdqm::Summary::setMaskedHWElements ( std::vector< std::string > &  tokens)

Read HW element masks (strings), create Address and apply to detector map.

Parameters
tokensVector of mask strings
Returns
number of read and applied masks

Definition at line 787 of file CSCDQM_Summary.cc.

void cscdqm::Summary::SetValue ( const HWStatusBit  bit,
const int  value = 1 
)

SetValue for the whole of detector.

Parameters
bitStatus bit to set
valueValue to set

Definition at line 408 of file CSCDQM_Summary.cc.

void cscdqm::Summary::SetValue ( Address  adr,
const HWStatusBit  bit,
const int  value = 1 
)

Set value recursivelly by following the supplied address.

Parameters
adrAddress to be updated
bitStatus bit to set
valueValue to be set

Definition at line 420 of file CSCDQM_Summary.cc.

void cscdqm::Summary::Write ( TH2 *&  h2,
const unsigned int  station 
) const

Write detector map to H1 histogram (linear data) for the selected adr.station.

Parameters
h2Histogram to write data to
stationstation number (1-4) to write data for

Definition at line 234 of file CSCDQM_Summary.cc.

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.

Parameters
h2histogram to write to
maskmask of errors to check while writing
valueto write to if state fits mask
resetshould all chamber states be reseted to 0 prior writing?
op_anyShould chamber be marked as errorous on any bit in mask? false - for all.

Definition at line 348 of file CSCDQM_Summary.cc.

void cscdqm::Summary::WriteMap ( TH2 *&  h2)

Write PhysicsReady Map to H2 histogram.

Parameters
h2Histogram to write map to

Definition at line 284 of file CSCDQM_Summary.cc.

Member Data Documentation

Detector cscdqm::Summary::detector
private

Detector routines object

Definition at line 127 of file CSCDQM_Summary.h.

Referenced by getDetector().

HWStatusBitSet cscdqm::Summary::map[2][4][3][36][6][5][5]
private

Atomic HW element status matrix

Definition at line 124 of file CSCDQM_Summary.h.