CMS 3D CMS Logo

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 Address &adr) const
 Get Efficiency area for the address. More...
 
const double GetEfficiencyArea (const unsigned int station) const
 Get Efficiency area for the station. More...
 
const double GetEfficiencyHW () const
 Get efficiency of the whole detector. More...
 
const double GetEfficiencyHW (Address adr) const
 Get efficiency of the detector part supplied by the address. More...
 
const double GetEfficiencyHW (const unsigned int station) const
 Get efficiency of the station. More...
 
const HWStatusBitSet GetValue (Address adr) const
 Get value of some address. More...
 
bool isChamberStandby (CSCDetId cid) const
 Check if chamber is in standby? More...
 
bool isChamberStandby (unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) 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 Address &adr, const HWStatusBit bit)
 ReSet value recursivelly by following the supplied address. More...
 
void ReSetValue (const HWStatusBit bit)
 ReSetValue for the whole of detector. 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 (Address adr, const HWStatusBit bit, const int value=1)
 Set value recursivelly by following the supplied address. More...
 
void SetValue (const HWStatusBit bit, const int value=1)
 SetValue for the whole of detector. 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

◆ Summary()

cscdqm::Summary::Summary ( )

Constructor.

Definition at line 26 of file CSCDQM_Summary.cc.

26 : detector(NTICS, NTICS) { Reset(); }

References Reset().

◆ ~Summary()

cscdqm::Summary::~Summary ( )

Destructor.

Definition at line 31 of file CSCDQM_Summary.cc.

31 {}

Member Function Documentation

◆ ChamberAddressToCoords()

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 862 of file CSCDQM_Summary.cc.

862  {
863  if (!adr.mask.side || !adr.mask.station || !adr.mask.ring || !adr.mask.chamber)
864  return false;
865 
866  x = adr.chamber;
867  y = 0;
868 
869  if (adr.side == 1) {
870  switch (adr.station) {
871  case 1:
872  y = 10;
873  if (adr.ring == 2)
874  y = 11;
875  if (adr.ring == 3)
876  y = 12;
877  break;
878  case 2:
879  y = 13;
880  if (adr.ring == 2)
881  y = 14;
882  break;
883  case 3:
884  y = 15;
885  if (adr.ring == 2)
886  y = 16;
887  break;
888  case 4:
889  y = 17;
890  if (adr.ring == 2)
891  y = 18;
892  break;
893  }
894  } else if (adr.side == 2) {
895  switch (adr.station) {
896  case 1:
897  y = 7;
898  if (adr.ring == 2)
899  y = 8;
900  if (adr.ring == 1)
901  y = 9;
902  break;
903  case 2:
904  y = 5;
905  if (adr.ring == 1)
906  y = 6;
907  break;
908  case 3:
909  y = 3;
910  if (adr.ring == 1)
911  y = 4;
912  break;
913  case 4:
914  y = 1;
915  if (adr.ring == 1)
916  y = 2;
917  break;
918  }
919  }
920 
921  return true;
922  }

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 WriteChamberState().

◆ ChamberCoordsToAddress()

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 809 of file CSCDQM_Summary.cc.

809  {
810  if (x < 1 || x > 36 || y < 1 || y > 18)
811  return false;
812 
813  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = true;
814  adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
815 
816  if (y < 10)
817  adr.side = 2;
818  else
819  adr.side = 1;
820 
821  adr.chamber = x;
822 
823  if (y == 1 || y == 18) {
824  adr.station = 4;
825  adr.ring = 2;
826  } else if (y == 2 || y == 17) {
827  adr.station = 4;
828  adr.ring = 1;
829  } else if (y == 3 || y == 16) {
830  adr.station = 3;
831  adr.ring = 2;
832  } else if (y == 4 || y == 15) {
833  adr.station = 3;
834  adr.ring = 1;
835  } else if (y == 5 || y == 14) {
836  adr.station = 2;
837  adr.ring = 2;
838  } else if (y == 6 || y == 13) {
839  adr.station = 2;
840  adr.ring = 1;
841  } else if (y == 7 || y == 12) {
842  adr.station = 1;
843  adr.ring = 3;
844  } else if (y == 8 || y == 11) {
845  adr.station = 1;
846  adr.ring = 2;
847  } else if (y == 9 || y == 10) {
848  adr.station = 1;
849  adr.ring = 1;
850  }
851 
852  return true;
853  }

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 ReadErrorChambers(), ReadReportingChambers(), and ReadReportingChambersRef().

◆ getDetector()

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

Definition at line 85 of file CSCDQM_Summary.h.

85 { return detector; }

References detector.

Referenced by cscdqm::EventProcessor::processCSC(), and cscdqm::EventProcessor::updateEfficiencyHistos().

◆ GetEfficiencyArea() [1/2]

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 616 of file CSCDQM_Summary.cc.

616  {
617  double all_area = 1;
618 
619  if (adr.mask.side == false && adr.mask.ring == false && adr.mask.chamber == false && adr.mask.layer == false &&
620  adr.mask.cfeb == false && adr.mask.hv == false && adr.mask.station == true)
621  all_area = detector.Area(adr.station);
622  else
623  all_area = detector.Area(adr);
624 
625  double rep_area = GetReportingArea(adr);
626  return rep_area / all_area;
627  }

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.

◆ GetEfficiencyArea() [2/2]

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 599 of file CSCDQM_Summary.cc.

599  {
600  if (station <= 0 || station > N_STATIONS)
601  return 0.0;
602 
603  Address adr;
604  adr.mask.side = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
605  adr.station = true;
606  adr.station = station;
607 
608  return GetEfficiencyArea(adr);
609  }

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.

◆ GetEfficiencyHW() [1/3]

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

Get efficiency of the whole detector.

Returns
Detector efficiency rate (0..1)

Definition at line 504 of file CSCDQM_Summary.cc.

504  {
505  Address adr;
506  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv =
507  false;
508  return GetEfficiencyHW(adr);
509  }

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().

◆ GetEfficiencyHW() [2/3]

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 536 of file CSCDQM_Summary.cc.

536  {
537  double sum = 0.0;
538  if (!adr.mask.side) {
539  adr.mask.side = true;
540  for (adr.side = 1; adr.side <= N_SIDES; adr.side++)
541  sum += GetEfficiencyHW(adr);
542  return sum / N_SIDES;
543  }
544 
545  if (!adr.mask.station) {
546  adr.mask.station = true;
547  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++)
548  sum += GetEfficiencyHW(adr);
549  return sum / N_STATIONS;
550  }
551 
552  if (!adr.mask.ring) {
553  adr.mask.ring = true;
554  for (adr.ring = 1; adr.ring <= detector.NumberOfRings(adr.station); adr.ring++)
555  sum += GetEfficiencyHW(adr);
556  return sum / detector.NumberOfRings(adr.station);
557  }
558 
559  if (!adr.mask.chamber) {
560  adr.mask.chamber = true;
561  for (adr.chamber = 1; adr.chamber <= detector.NumberOfChambers(adr.station, adr.ring); adr.chamber++)
562  sum += GetEfficiencyHW(adr);
563  return sum / detector.NumberOfChambers(adr.station, adr.ring);
564  }
565 
566  if (!adr.mask.layer) {
567  adr.mask.layer = true;
568  for (adr.layer = 1; adr.layer <= N_LAYERS; adr.layer++)
569  sum += GetEfficiencyHW(adr);
570  return sum / N_LAYERS;
571  }
572 
573  if (!adr.mask.cfeb) {
574  adr.mask.cfeb = true;
575  for (adr.cfeb = 1; adr.cfeb <= detector.NumberOfChamberCFEBs(adr.station, adr.ring); adr.cfeb++)
576  sum += GetEfficiencyHW(adr);
577  return sum / detector.NumberOfChamberCFEBs(adr.station, adr.ring);
578  }
579 
580  if (!adr.mask.hv) {
581  adr.mask.hv = true;
582  for (adr.hv = 1; adr.hv <= detector.NumberOfChamberHVs(adr.station, adr.ring); adr.hv++)
583  sum += GetEfficiencyHW(adr);
584  return sum / detector.NumberOfChamberHVs(adr.station, adr.ring);
585  }
586 
590  return 0.0;
591  return 1.0;
592  }

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.

◆ GetEfficiencyHW() [3/3]

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 516 of file CSCDQM_Summary.cc.

516  {
517  Address adr;
518  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv =
519  false;
520 
521  if (station > 0 && station <= N_STATIONS) {
522  adr.mask.station = true;
523  adr.station = station;
524  } else {
525  return 0.0;
526  }
527 
528  return GetEfficiencyHW(adr);
529  }

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.

◆ GetReportingArea()

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 634 of file CSCDQM_Summary.cc.

634  {
635  double sum = 0.0;
636  if (!adr.mask.side) {
637  adr.mask.side = true;
638  for (adr.side = 1; adr.side <= N_SIDES; adr.side++)
639  sum += GetReportingArea(adr);
640  return sum;
641  }
642 
643  if (!adr.mask.station) {
644  adr.mask.station = true;
645  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++)
646  sum += GetReportingArea(adr);
647  return sum;
648  }
649 
650  if (!adr.mask.ring) {
651  adr.mask.ring = true;
652  for (adr.ring = 1; adr.ring <= detector.NumberOfRings(adr.station); adr.ring++)
653  sum += GetReportingArea(adr);
654  return sum;
655  }
656 
657  if (!adr.mask.chamber) {
658  adr.mask.chamber = true;
659  for (adr.chamber = 1; adr.chamber <= detector.NumberOfChambers(adr.station, adr.ring); adr.chamber++)
660  sum += GetReportingArea(adr);
661  return sum;
662  }
663 
664  if (!adr.mask.cfeb) {
665  adr.mask.cfeb = true;
666  for (adr.cfeb = 1; adr.cfeb <= detector.NumberOfChamberCFEBs(adr.station, adr.ring); adr.cfeb++)
667  sum += GetReportingArea(adr);
668  return sum;
669  }
670 
671  if (!adr.mask.hv) {
672  adr.mask.hv = true;
673  for (adr.hv = 1; adr.hv <= detector.NumberOfChamberHVs(adr.station, adr.ring); adr.hv++)
674  sum += GetReportingArea(adr);
675  return sum;
676  }
677 
678  adr.mask.layer = false;
679 
682  if (!HWSTATUSANYERROR(status)) {
683  return detector.Area(adr);
684  }
685  return 0.0;
686  }

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().

◆ GetValue()

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 727 of file CSCDQM_Summary.cc.

727  {
728  HWStatusBitSet state;
729  state.reset();
730 
731  if (!adr.mask.side) {
732  adr.mask.side = true;
733  for (adr.side = 1; adr.side <= N_SIDES; adr.side++)
734  state |= GetValue(adr);
735  return state;
736  }
737 
738  if (!adr.mask.station) {
739  adr.mask.station = true;
740  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++)
741  state |= GetValue(adr);
742  return state;
743  }
744 
745  if (!adr.mask.ring) {
746  adr.mask.ring = true;
747  for (adr.ring = 1; adr.ring <= detector.NumberOfRings(adr.station); adr.ring++)
748  state |= GetValue(adr);
749  return state;
750  }
751 
752  if (!adr.mask.chamber) {
753  adr.mask.chamber = true;
754  for (adr.chamber = 1; adr.chamber <= detector.NumberOfChambers(adr.station, adr.ring); adr.chamber++)
755  state |= GetValue(adr);
756  return state;
757  }
758 
759  if (!adr.mask.layer) {
760  adr.mask.layer = true;
761  for (adr.layer = 1; adr.layer <= N_LAYERS; adr.layer++)
762  state |= GetValue(adr);
763  return state;
764  }
765 
766  if (!adr.mask.cfeb) {
767  adr.mask.cfeb = true;
768  for (adr.cfeb = 1; adr.cfeb <= detector.NumberOfChamberCFEBs(adr.station, adr.ring); adr.cfeb++)
769  state |= GetValue(adr);
770  return state;
771  }
772 
773  if (!adr.mask.hv) {
774  adr.mask.hv = true;
775  for (adr.hv = 1; adr.hv <= detector.NumberOfChamberHVs(adr.station, adr.ring); adr.hv++)
776  state |= GetValue(adr);
777  return state;
778  }
779 
780  return map[adr.side - 1][adr.station - 1][adr.ring - 1][adr.chamber - 1][adr.layer - 1][adr.cfeb - 1][adr.hv - 1];
781  }

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().

◆ isChamberStandby() [1/2]

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 718 of file CSCDQM_Summary.cc.

718  {
719  return isChamberStandby(cid.endcap(), cid.station(), cid.ring(), cid.chamber());
720  }

References CSCDetId::chamber(), CSCDetId::endcap(), isChamberStandby(), CSCDetId::ring(), and CSCDetId::station().

◆ isChamberStandby() [2/2]

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 696 of file CSCDQM_Summary.cc.

699  {
700  Address adr;
701  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = true;
702  adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
703  adr.side = side;
704  adr.station = station;
705  adr.ring = ring;
706  adr.chamber = chamber;
707 
708  //std::cout << adr << " = " << HWSTATUSANY(GetValue(adr), 0x1000) << "\n";
709 
710  return HWSTATUSANY(GetValue(adr), 0x1000);
711  }

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().

◆ IsPhysicsReady()

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 465 of file CSCDQM_Summary.cc.

465  {
466  AddressBox* box;
467 
469 
470  unsigned int i = 0;
471  while (detector.NextAddressBoxByPartition(i, px, py, box)) {
472  status[box->adr.station - 1] |= GetValue(box->adr);
473  }
474 
475  unsigned int cdata = 0, cerror = 0, cmask = 0;
476  for (unsigned int i = 0; i < N_STATIONS; i++) {
477  if (HWSTATUSANYERROR(status[i])) {
478  cerror++;
479  } else {
480  if (status[i].test(MASKED))
481  cmask++;
482  if (status[i].test(DATA))
483  cdata++;
484  }
485  }
486 
488  if (cdata > 1)
489  return 1;
491  if (cerror > 0)
492  return -1;
494  if (cmask > 0)
495  return 2;
497  return 0;
498  }

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().

◆ ReadErrorChambers()

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 194 of file CSCDQM_Summary.cc.

195  {
196  if (evs->GetXaxis()->GetXmin() <= 1 && evs->GetXaxis()->GetXmax() >= 36 && evs->GetYaxis()->GetXmin() <= 1 &&
197  evs->GetYaxis()->GetXmax() >= 18 && err->GetXaxis()->GetXmin() <= 1 && err->GetXaxis()->GetXmax() >= 36 &&
198  err->GetYaxis()->GetXmin() <= 1 && err->GetYaxis()->GetXmax() >= 18) {
199  Address adr;
200  unsigned int N = 0, n = 0;
201 
202  for (unsigned int x = 1; x <= 36; x++) {
203  for (unsigned int y = 1; y <= 18; y++) {
204  N = int(evs->GetBinContent(x, y));
205  n = int(err->GetBinContent(x, y));
206  if (ChamberCoordsToAddress(x, y, adr)) {
207  if (Utility::checkError(N, n, eps_max, Sfail)) {
208  SetValue(adr, bit);
209  } else {
210  ReSetValue(adr, bit);
211  }
212  }
213  }
214  }
215  } else {
216  LOG_WARN << "cscdqm::Summary.ReadErrorChambers routine. Wrong histogram dimensions!";
217  }
218  }

References ChamberCoordsToAddress(), cscdqm::Utility::checkError(), runTheMatrix::err, createfilelist::int, LOG_WARN, N, dqmiodumpmetadata::n, ReSetValue(), and SetValue().

Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().

◆ ReadReportingChambers()

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 60 of file CSCDQM_Summary.cc.

60  {
61  if (h2->GetXaxis()->GetXmin() <= 1 && h2->GetXaxis()->GetXmax() >= 36 && h2->GetYaxis()->GetXmin() <= 1 &&
62  h2->GetYaxis()->GetXmax() >= 18) {
63  Address adr;
64  double z = 0.0;
65 
66  for (unsigned int x = 1; x <= 36; x++) {
67  for (unsigned int y = 1; y <= 18; y++) {
68  z = h2->GetBinContent(x, y);
69  if (ChamberCoordsToAddress(x, y, adr)) {
70  if (z >= threshold) {
71  SetValue(adr, DATA);
72  } else {
73  ReSetValue(adr, DATA);
74  }
75  }
76  }
77  }
78  } else {
79  LOG_WARN << "cscdqm::Summary.ReadReportingChambers routine. Wrong histogram dimensions!";
80  }
81  }

References ChamberCoordsToAddress(), cscdqm::DATA, LOG_WARN, ReSetValue(), SetValue(), and remoteMonitoring_LED_IterMethod_cfg::threshold.

Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().

◆ ReadReportingChambersRef()

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 93 of file CSCDQM_Summary.cc.

98  {
99  if (h2->GetXaxis()->GetXmin() <= 1 && h2->GetXaxis()->GetXmax() >= 36 && h2->GetYaxis()->GetXmin() <= 1 &&
100  h2->GetYaxis()->GetXmax() >= 18 && refh2->GetXaxis()->GetXmin() <= 1 && refh2->GetXaxis()->GetXmax() >= 36 &&
101  refh2->GetYaxis()->GetXmin() <= 1 && refh2->GetYaxis()->GetXmax() >= 18) {
103  double num = 1.0, denum = 1.0;
104  for (unsigned int x = 1; x <= 36; x++) {
105  for (unsigned int y = 1; y <= 18; y++) {
106  double Nij = h2->GetBinContent(x, y);
107  double Nrefij = refh2->GetBinContent(x, y);
108  if (Nij > 0) {
109  num += Nrefij;
110  denum += pow(Nrefij, 2.0) / Nij;
111  }
112  }
113  }
114  double factor = num / denum;
115 
116  Address adr;
117  unsigned int N = 0, n = 0;
118 
119  for (unsigned int x = 1; x <= 36; x++) {
120  for (unsigned int y = 1; y <= 18; y++) {
121  N = int(refh2->GetBinContent(x, y) * factor);
122  n = int(h2->GetBinContent(x, y));
123 
124  if (ChamberCoordsToAddress(x, y, adr)) {
126  ReSetValue(adr, HOT);
127  ReSetValue(adr, COLD);
128 
129  if (n == 0) {
130  ReSetValue(adr, DATA);
131  } else {
132  SetValue(adr, DATA);
133  }
134 
135  switch (Utility::checkOccupancy(N, n, cold_coef, hot_coef, cold_Sfail, hot_Sfail)) {
136  case -1:
137  SetValue(adr, COLD);
138 
139  /*
140  std::cout << "adr = " << detector.AddressName(adr);
141  std::cout << ", x = " << x << ", y = " << y;
142  std::cout << ", value = " << GetValue(adr);
143  std::cout << ", refh2 = " << refh2->GetBinContent(x, y);
144  std::cout << ", factor = " << factor;
145  std::cout << ", N = " << N;
146  std::cout << ", n = " << n;
147  std::cout << ", num = " << num;
148  std::cout << ", denum = " << denum;
149  std::cout << ", rate = " << (N > 0 ? n / N : 0);
150  std::cout << ", cold_coef = " << cold_coef;
151  std::cout << ", = COLD";
152  std::cout << "\n";
153  */
154 
155  break;
156  case 1:
157  SetValue(adr, HOT);
158 
159  /*
160  std::cout << "adr = " << detector.AddressName(adr);
161  std::cout << ", x = " << x << ", y = " << y;
162  std::cout << ", value = " << GetValue(adr);
163  std::cout << ", refh2 = " << refh2->GetBinContent(x, y);
164  std::cout << ", factor = " << factor;
165  std::cout << ", N = " << N;
166  std::cout << ", n = " << n;
167  std::cout << ", num = " << num;
168  std::cout << ", denum = " << denum;
169  std::cout << ", rate = " << (N > 0 ? n / N : 0);
170  std::cout << ", hot_coef = " << hot_coef;
171  std::cout << ", = HOT";
172  std::cout << "\n";
173  */
174 
175  break;
176  };
177  }
178  }
179  }
180 
181  } else {
182  LOG_WARN << "cscdqm::Summary.ReadReportingChambersRef routine. Wrong histogram dimensions!";
183  }
184  }

References ChamberCoordsToAddress(), cscdqm::Utility::checkOccupancy(), cscdqm::COLD, cscdqm::DATA, DQMScaleToClient_cfi::factor, cscdqm::HOT, createfilelist::int, LOG_WARN, N, dqmiodumpmetadata::n, EgammaValidation_cff::num, funct::pow(), ReSetValue(), and SetValue().

Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().

◆ Reset()

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.

36  {
37  Address adr;
38 
40  adr.mask.side = adr.mask.station = adr.mask.layer = false;
41  adr.mask.ring = adr.mask.chamber = adr.mask.cfeb = adr.mask.hv = true;
42  for (adr.ring = 1; adr.ring <= N_RINGS; adr.ring++) {
43  for (adr.chamber = 1; adr.chamber <= N_CHAMBERS; adr.chamber++) {
44  for (adr.cfeb = 1; adr.cfeb <= N_CFEBS; adr.cfeb++) {
45  for (adr.hv = 1; adr.hv <= N_HVS; adr.hv++) {
46  for (unsigned int bit = 0; bit < HWSTATUSBITSETSIZE; bit++) {
47  ReSetValue(adr, (HWStatusBit)bit);
48  }
49  }
50  }
51  }
52  }
53  }

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().

◆ ReSetValue() [1/2]

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 379 of file CSCDQM_Summary.cc.

379 { SetValue(adr, bit, 0); }

References SetValue().

◆ ReSetValue() [2/2]

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

ReSetValue for the whole of detector.

Parameters
bitStatus bit to set

Definition at line 372 of file CSCDQM_Summary.cc.

372 { SetValue(bit, 0); }

References SetValue().

Referenced by ReadErrorChambers(), ReadReportingChambers(), ReadReportingChambersRef(), and Reset().

◆ setMaskedHWElements()

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 788 of file CSCDQM_Summary.cc.

788  {
789  unsigned int applied = 0;
790 
791  for (unsigned int r = 0; r < tokens.size(); r++) {
792  std::string token = (std::string)tokens.at(r);
793  Address adr;
794  if (detector.AddressFromString(token, adr)) {
795  SetValue(adr, MASKED);
796  applied++;
797  }
798  }
799  return applied;
800  }

References cscdqm::Detector::AddressFromString(), detector, cscdqm::MASKED, alignCSCRings::r, SetValue(), AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

Referenced by cscdqm::EventProcessor::maskHWElements().

◆ SetValue() [1/2]

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 399 of file CSCDQM_Summary.cc.

399  {
400  if (!adr.mask.side) {
401  adr.mask.side = true;
402  for (adr.side = 1; adr.side <= N_SIDES; adr.side++)
403  SetValue(adr, bit, value);
404  return;
405  }
406 
407  if (!adr.mask.station) {
408  adr.mask.station = true;
409  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++)
410  SetValue(adr, bit, value);
411  return;
412  }
413 
414  if (!adr.mask.ring) {
415  adr.mask.ring = true;
416  for (adr.ring = 1; adr.ring <= detector.NumberOfRings(adr.station); adr.ring++)
417  SetValue(adr, bit, value);
418  return;
419  }
420 
421  if (!adr.mask.chamber) {
422  adr.mask.chamber = true;
423  for (adr.chamber = 1; adr.chamber <= detector.NumberOfChambers(adr.station, adr.ring); adr.chamber++)
424  SetValue(adr, bit, value);
425  return;
426  }
427 
428  if (!adr.mask.layer) {
429  adr.mask.layer = true;
430  for (adr.layer = 1; adr.layer <= N_LAYERS; adr.layer++)
431  SetValue(adr, bit, value);
432  return;
433  }
434 
435  if (!adr.mask.cfeb) {
436  adr.mask.cfeb = true;
437  for (adr.cfeb = 1; adr.cfeb <= detector.NumberOfChamberCFEBs(adr.station, adr.ring); adr.cfeb++)
438  SetValue(adr, bit, value);
439  return;
440  }
441 
442  if (!adr.mask.hv) {
443  adr.mask.hv = true;
444  for (adr.hv = 1; adr.hv <= detector.NumberOfChamberHVs(adr.station, adr.ring); adr.hv++)
445  SetValue(adr, bit, value);
446  return;
447  }
448 
449  if (adr.side > 0 && adr.side <= N_SIDES && adr.station > 0 && adr.station <= N_STATIONS && adr.ring > 0 &&
450  adr.ring <= N_RINGS && adr.chamber > 0 && adr.chamber <= N_CHAMBERS && adr.layer > 0 && adr.layer <= N_LAYERS &&
451  adr.cfeb > 0 && adr.cfeb <= N_CFEBS && adr.hv > 0 && adr.hv <= N_HVS) {
452  map[adr.side - 1][adr.station - 1][adr.ring - 1][adr.chamber - 1][adr.layer - 1][adr.cfeb - 1][adr.hv - 1].set(
453  bit, value);
454  }
455  }

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.

◆ SetValue() [2/2]

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 386 of file CSCDQM_Summary.cc.

386  {
387  Address adr;
388  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv =
389  false;
390  SetValue(adr, bit, value);
391  }

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 ReadErrorChambers(), ReadReportingChambers(), ReadReportingChambersRef(), ReSetValue(), setMaskedHWElements(), SetValue(), and cscdqm::EventProcessor::standbyEfficiencyHistos().

◆ Write()

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 225 of file CSCDQM_Summary.cc.

225  {
226  const AddressBox* box;
227  Address adr, tadr;
228  float area_all = 0.0, area_rep = 0.0;
229 
230  if (station < 1 || station > N_STATIONS)
231  return;
232 
233  adr.mask.side = adr.mask.ring = adr.mask.chamber = adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
234  adr.mask.station = true;
235  adr.station = station;
236 
237  unsigned int i = 0;
238 
239  while (detector.NextAddressBox(i, box, adr)) {
240  unsigned int x = 1 + (box->adr.side - 1) * 9 + (box->adr.ring - 1) * 3 + (box->adr.hv - 1);
241  unsigned int y = 1 + (box->adr.chamber - 1) * 5 + (box->adr.cfeb - 1);
242 
243  tadr = box->adr;
245 
246  float area_box = fabs((box->xmax - box->xmin) * (box->ymax - box->ymin));
247 
248  if (status.test(MASKED)) {
249  h2->SetBinContent(x, y, 2.0);
250  } else {
251  area_all += area_box;
252  if (HWSTATUSANYERROR(status)) {
253  h2->SetBinContent(x, y, -1.0);
254  } else {
255  area_rep += area_box;
256  if (status.test(DATA)) {
257  h2->SetBinContent(x, y, 1.0);
258  } else {
259  h2->SetBinContent(x, y, 0.0);
260  }
261  }
262  }
263  }
264 
265  TString title = Form("ME%d Status: Physics Efficiency %.2f%%", station, (area_rep / area_all) * 100.0);
266  h2->SetTitle(title);
267  }

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, overlapproblemtsosanalyzer_cfi::title, cscdqm::AddressBox::xmax, cscdqm::AddressBox::xmin, cscdqm::AddressBox::ymax, and cscdqm::AddressBox::ymin.

Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().

◆ WriteChamberState()

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 333 of file CSCDQM_Summary.cc.

333  {
334  if (h2->GetXaxis()->GetXmin() <= 1 && h2->GetXaxis()->GetXmax() >= 36 && h2->GetYaxis()->GetXmin() <= 1 &&
335  h2->GetYaxis()->GetXmax() >= 18) {
336  unsigned int x, y;
337  Address adr;
338 
339  adr.mask.side = adr.mask.station = adr.mask.ring = adr.mask.chamber = true;
340  adr.mask.layer = adr.mask.cfeb = adr.mask.hv = false;
341 
342  for (adr.side = 1; adr.side <= N_SIDES; adr.side++) {
343  for (adr.station = 1; adr.station <= N_STATIONS; adr.station++) {
344  for (adr.ring = 1; adr.ring <= detector.NumberOfRings(adr.station); adr.ring++) {
345  for (adr.chamber = 1; adr.chamber <= detector.NumberOfChambers(adr.station, adr.ring); adr.chamber++) {
346  if (ChamberAddressToCoords(adr, x, y)) {
347  HWStatusBitSet hwValue = GetValue(adr);
348  bool hit = (op_any ? HWSTATUSANY(hwValue, mask) : HWSTATUSEQUALS(hwValue, mask));
349 
350  // std::cout << "x = " << x << ", y = " << y << ", value = " << GetValue(adr) << std::endl;
351  // std::cout << "adr = " << detector.AddressName(adr) << ", x = " << x << ", y = " << y << ", value = " << GetValue(adr) << std::endl;
352  if (hit) {
353  h2->SetBinContent(x, y, 1.0 * value);
354  } else if (reset) {
355  h2->SetBinContent(x, y, 0.0);
356  }
357  }
358  }
359  }
360  }
361  }
362 
363  } else {
364  LOG_WARN << "cscdqm::Summary.WriteChamberState routine. Wrong histogram dimensions!";
365  }
366  }

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(), reset(), cscdqm::AddressMask::ring, cscdqm::Address::ring, cscdqm::AddressMask::side, cscdqm::Address::side, cscdqm::AddressMask::station, and cscdqm::Address::station.

Referenced by cscdqm::EventProcessor::standbyEfficiencyHistos(), and cscdqm::EventProcessor::writeShifterHistograms().

◆ WriteMap()

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

Write PhysicsReady Map to H2 histogram.

Parameters
h2Histogram to write map to

Definition at line 273 of file CSCDQM_Summary.cc.

273  {
274  unsigned int rep_el = 0, csc_el = 0;
275 
276  if (h2->GetXaxis()->GetXmin() <= 1 && h2->GetXaxis()->GetXmax() >= NTICS && h2->GetYaxis()->GetXmin() <= 1 &&
277  h2->GetYaxis()->GetXmax() >= NTICS) {
278  float xd = 5.0 / NTICS;
279 
280  float xmin, xmax;
281 
282  for (unsigned int x = 0; x < NTICS; x++) {
283  xmin = -2.5 + xd * x;
284  xmax = xmin + xd;
285 
286  for (unsigned int y = 0; y < NTICS; y++) {
287  double value = 0.0;
288 
289  if (xmin == -2.5 || xmax == 2.5)
290  continue;
291  if (xmin >= -1 && xmax <= 1)
292  continue;
293 
294  switch (IsPhysicsReady(x, y)) {
295  case -1:
296  value = -1.0;
297  break;
298  case 0:
299  value = 0.0;
300  rep_el++;
301  break;
302  case 1:
303  value = 1.0;
304  rep_el++;
305  break;
306  case 2:
307  value = 2.0;
308  rep_el++;
309  }
310 
311  h2->SetBinContent(x + 1, y + 1, value);
312  csc_el++;
313  }
314  }
315 
316  } else {
317  LOG_WARN << "cscdqm::Summary.WriteMap routine. Wrong histogram dimensions!";
318  }
319 
320  TString title =
321  Form("EMU Status: Physics Efficiency %.2f%%", (csc_el == 0 ? 0.0 : (1.0 * rep_el) / csc_el) * 100.0);
322  h2->SetTitle(title);
323  }

References IsPhysicsReady(), LOG_WARN, NTICS, overlapproblemtsosanalyzer_cfi::title, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.

Referenced by cscdqm::EventProcessor::updateEfficiencyHistos().

Member Data Documentation

◆ detector

Detector cscdqm::Summary::detector
private

◆ map

HWStatusBitSet cscdqm::Summary::map[2][4][3][36][6][5][5]
private
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
cscdqm::Summary::ChamberCoordsToAddress
const bool ChamberCoordsToAddress(const unsigned int x, const unsigned int y, Address &adr) const
Calculate Address from CSCChamberMap histogram coordinates.
Definition: CSCDQM_Summary.cc:809
cscdqm::HWStatusBit
HWStatusBit
Hardware Status Bit values used in Summary efficiency calculation.
Definition: CSCDQM_Summary.h:45
cscdqm::Detector::NumberOfChambers
const unsigned int NumberOfChambers(const unsigned int station, const unsigned int ring) const
Returns the number of chambers for the given station and ring.
Definition: CSCDQM_Detector.cc:215
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
cscdqm::HWStatusBitSet
std::bitset< 14 > HWStatusBitSet
Hardware Status Bits structure used in Summary efficiency calculation and storage.
Definition: CSCDQM_Summary.h:72
mps_update.status
status
Definition: mps_update.py:69
cscdqm::Detector::NumberOfChamberHVs
const unsigned int NumberOfChamberHVs(const unsigned int station, const unsigned int ring) const
Returns the number of HVs per Chamber on given Station/Ring.
Definition: CSCDQM_Detector.cc:271
relativeConstraints.station
station
Definition: relativeConstraints.py:67
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
HWSTATUSANYERROR
#define HWSTATUSANYERROR(s)
Definition: CSCDQM_Summary.h:36
cscdqm::MASKED
Data available (reporting)
Definition: CSCDQM_Summary.h:48
N_CFEBS
#define N_CFEBS
Definition: CSCDQM_Detector.h:47
N_HVS
#define N_HVS
Definition: CSCDQM_Detector.h:48
cscdqm::Utility::checkError
static bool checkError(const unsigned int N, const unsigned int n, const double threshold, const double sigfail)
Check the hypothesis that error events (n) value above threshold comparing with the expected 0 and st...
Definition: CSCDQM_Utility.cc:331
DDAxes::x
HWSTATUSEQUALS
#define HWSTATUSEQUALS(s, m)
Definition: CSCDQM_Summary.h:34
cscdqm::Summary::ChamberAddressToCoords
const bool ChamberAddressToCoords(const Address &adr, unsigned int &x, unsigned int &y) const
Calculate CSCChamberMap histogram coordinates from Address.
Definition: CSCDQM_Summary.cc:862
N_LAYERS
#define N_LAYERS
Definition: CSCDQM_Detector.h:46
N_CHAMBERS
#define N_CHAMBERS
Definition: CSCDQM_Detector.h:45
cscdqm::Summary::ReSetValue
void ReSetValue(const HWStatusBit bit)
ReSetValue for the whole of detector.
Definition: CSCDQM_Summary.cc:372
N_SIDES
#define N_SIDES
Definition: CSCDQM_Detector.h:42
ctpps_dqm_sourceclient-live_cfg.test
test
Definition: ctpps_dqm_sourceclient-live_cfg.py:7
cscdqm::Detector::NextAddressBoxByPartition
const bool NextAddressBoxByPartition(unsigned int &i, const unsigned int px, const unsigned int py, AddressBox *&box)
Address box iterator by partition.
Definition: CSCDQM_Detector.cc:374
cscdqm::Summary::IsPhysicsReady
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...
Definition: CSCDQM_Summary.cc:465
cscdqm::Detector::NumberOfRings
const unsigned int NumberOfRings(const unsigned int station) const
Returns the number of rings for the given station.
Definition: CSCDQM_Detector.cc:197
DDAxes::z
HWSTATUSANY
#define HWSTATUSANY(s, m)
Definition: CSCDQM_Summary.h:35
cscdqm::Summary::GetReportingArea
const double GetReportingArea(Address adr) const
Calculate the reporting area for the address.
Definition: CSCDQM_Summary.cc:634
N
#define N
Definition: blowfish.cc:9
cscdqm::Detector::NextAddressBox
const bool NextAddressBox(unsigned int &i, const AddressBox *&box, const Address &mask) const
Address box iterator by mask.
Definition: CSCDQM_Detector.cc:355
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
cscdqm::HOT
HW element was masked out (not in readout)
Definition: CSCDQM_Summary.h:50
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cscdqm::Summary::SetValue
void SetValue(const HWStatusBit bit, const int value=1)
SetValue for the whole of detector.
Definition: CSCDQM_Summary.cc:386
cscdqm::DATA
Definition: CSCDQM_Summary.h:47
runTheMatrix.err
err
Definition: runTheMatrix.py:288
HWSTATUSBITSETSIZE
#define HWSTATUSBITSETSIZE
Definition: CSCDQM_Summary.h:32
createfilelist.int
int
Definition: createfilelist.py:10
value
Definition: value.py:1
cscdqm::Detector::NumberOfChamberCFEBs
const unsigned int NumberOfChamberCFEBs(const unsigned int station, const unsigned int ring) const
Returns the number of CFEBs per Chamber on given Station/Ring.
Definition: CSCDQM_Detector.cc:243
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
N_RINGS
#define N_RINGS
Definition: CSCDQM_Detector.h:44
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
cscdqm::Summary::GetValue
const HWStatusBitSet GetValue(Address adr) const
Get value of some address.
Definition: CSCDQM_Summary.cc:727
alignCSCRings.r
r
Definition: alignCSCRings.py:93
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
cscdqm::Summary::isChamberStandby
bool isChamberStandby(unsigned int side, unsigned int station, unsigned int ring, unsigned int chamber) const
Check if chamber is in standby?
Definition: CSCDQM_Summary.cc:696
cscdqm::Summary::GetEfficiencyHW
const double GetEfficiencyHW() const
Get efficiency of the whole detector.
Definition: CSCDQM_Summary.cc:504
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
NTICS
#define NTICS
Definition: CSCDQM_Summary.h:38
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
cscdqm::COLD
HW element is hot by comparing with reference histogram.
Definition: CSCDQM_Summary.h:51
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
cscdqm::Utility::checkOccupancy
static short checkOccupancy(const unsigned int N, const unsigned int n, const double low_threshold, const double high_threshold, const double low_sigfail, const double high_sigfail)
Check the hypothesis that observed events (n) value is too low or too high comparing with the expecte...
Definition: CSCDQM_Utility.cc:302
N_STATIONS
#define N_STATIONS
Definition: CSCDQM_Detector.h:43
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
cscdqm::Summary::GetEfficiencyArea
const double GetEfficiencyArea(const unsigned int station) const
Get Efficiency area for the station.
Definition: CSCDQM_Summary.cc:599
reset
void reset(double vett[256])
Definition: TPedValues.cc:11
cscdqm::Detector::AddressFromString
const bool AddressFromString(const std::string &str_address, Address &adr) const
Construct address from string.
Definition: CSCDQM_Detector.cc:658
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
cscdqm::Summary::detector
Detector detector
Definition: CSCDQM_Summary.h:131
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
cscdqm::Detector::Area
const float Area(const unsigned int station) const
Calculate station area in eta/phi space.
Definition: CSCDQM_Detector.cc:132
LOG_WARN
#define LOG_WARN
Definition: CSCDQM_Logger.h:41
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
cscdqm::Summary::map
HWStatusBitSet map[2][4][3][36][6][5][5]
Definition: CSCDQM_Summary.h:128
hit
Definition: SiStripHitEffFromCalibTree.cc:88
cscdqm::Summary::Reset
void Reset()
Resets all detector map.
Definition: CSCDQM_Summary.cc:36
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316