CMS 3D CMS Logo

Public Member Functions | Public Attributes

EtaPhiHists Class Reference

#include <HcalEtaPhiHists.h>

List of all members.

Public Member Functions

 EtaPhiHists ()
void Fill (HcalDetId &id, double val=1)
int getEtaBins (int depth)
int getPhiBins (int depth)
void Reset (void)
void setBinLabels ()
void setup (DQMStore *&m_dbe, std::string Name, std::string Units="")
 ~EtaPhiHists ()

Public Attributes

std::vector< MonitorElement * > depth

Detailed Description

Definition at line 18 of file HcalEtaPhiHists.h.


Constructor & Destructor Documentation

EtaPhiHists::EtaPhiHists ( ) [inline]

Definition at line 21 of file HcalEtaPhiHists.h.

{};
EtaPhiHists::~EtaPhiHists ( ) [inline]

Definition at line 22 of file HcalEtaPhiHists.h.

{};

Member Function Documentation

void EtaPhiHists::Fill ( HcalDetId id,
double  val = 1 
) [inline]

Definition at line 170 of file HcalEtaPhiHists.h.

References depth, and HcalForward.

    { 
      // If in HF, need to shift by 1 bin (-1 bin lower in -HF, +1 bin higher in +HF)
      if (id.subdet()==HcalForward)
        depth[id.depth()-1]->Fill(id.ieta()<0 ? id.ieta()-1 : id.ieta()+1, id.iphi(), val);
      else 
        depth[id.depth()-1]->Fill(id.ieta(),id.iphi(),val);
    };
int EtaPhiHists::getEtaBins ( int  depth) [inline]

Definition at line 79 of file HcalEtaPhiHists.h.

  {
    if (depth==1) return 85;
    if (depth==2) return 57;
    if (depth==3) return 9;
    if (depth==4) return 31;
    return 0;
  }
int EtaPhiHists::getPhiBins ( int  depth) [inline]

Definition at line 88 of file HcalEtaPhiHists.h.

  {
    if (depth>0 && depth<5)
      return 72;
    return 0;
  }
void EtaPhiHists::Reset ( void  ) [inline]

Definition at line 179 of file HcalEtaPhiHists.h.

References depth.

Referenced by HcalHotCellMonitor::periodicReset(), HcalMonitorClient::PlotPedestalValues(), HcalDeadCellMonitor::reset(), HcalHotCellMonitor::reset(), HcalDigiMonitor::reset(), and HcalCoarsePedestalMonitor::reset().

    {
      for (unsigned int d=0;d<depth.size();d++)
        if(depth[d]) depth[d]->Reset();
    }; // void Reset(void)
void EtaPhiHists::setBinLabels ( ) [inline]

Definition at line 95 of file HcalEtaPhiHists.h.

References depth, i, and diffTwoXMLs::label.

Referenced by setup().

    {
      // Set labels for all depth histograms
      for (unsigned int i=0;i<depth.size();++i)
        {
          depth[i]->setAxisTitle("i#eta",1);
          depth[i]->setAxisTitle("i#phi",2);
        }

      std::stringstream label;
      // set label on every other bin
      for (int i=-41;i<=-29;i=i+2)
        {
          label<<i;
          depth[0]->setBinLabel(i+42,label.str().c_str());
          depth[1]->setBinLabel(i+42,label.str().c_str());
          label.str("");
        }
      depth[0]->setBinLabel(14,"-29HE");
      depth[1]->setBinLabel(14,"-29HE");

      // offset by one for HE
      for (int i=-27;i<=27;i=i+2)
        {
          label<<i;
          depth[0]->setBinLabel(i+43,label.str().c_str());
          label.str("");
        }
      depth[0]->setBinLabel(72,"29HE");
      for (int i=29;i<=41;i=i+2)
        {
          label<<i;
          depth[0]->setBinLabel(i+44,label.str().c_str());
          label.str("");
        }
      for (int i=16;i<=28;i=i+2)
        {
          label<<i-43;
          depth[1]->setBinLabel(i,label.str().c_str());
          label.str("");
        }
      depth[1]->setBinLabel(29,"NULL");
      for (int i=15;i<=27;i=i+2)
        {
          label<<i;
          depth[1]->setBinLabel(i+15,label.str().c_str());
          label.str("");
        }

      depth[1]->setBinLabel(44,"29HE");
      for (int i=29;i<=41;i=i+2)
        {
          label<<i;
          depth[1]->setBinLabel(i+16,label.str().c_str());
          label.str("");
        }

      // HE depth 3 labels;
      depth[2]->setBinLabel(1,"-28");
      depth[2]->setBinLabel(2,"-27");
      depth[2]->setBinLabel(3,"Null");
      depth[2]->setBinLabel(4,"-16");
      depth[2]->setBinLabel(5,"Null");
      depth[2]->setBinLabel(6,"16");
      depth[2]->setBinLabel(7,"Null");
      depth[2]->setBinLabel(8,"27");
      depth[2]->setBinLabel(9,"28");
     
      for (int d=0;d<4;++d)
        {
          depth[d]->setAxisTitle("i#eta",1);
          depth[d]->setAxisTitle("i#phi",2); 
        }
    };
void EtaPhiHists::setup ( DQMStore *&  m_dbe,
std::string  Name,
std::string  Units = "" 
) [inline]

Definition at line 24 of file HcalEtaPhiHists.h.

References DQMStore::book2D(), depth, getTH2F(), i, mergeVDriftHistosByStation::name, alignCSCRings::s, setBinLabels(), AlCaHLTBitMon_QueryRunRegistry::string, and fw3dlego::xbins.

Referenced by HcalHotCellClient::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalDigiClient::beginRun(), HcalRecHitClient::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalNZSClient::beginRun(), HcalRawDataClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalSummaryClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalMonitorClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalDetDiagLaserMonitor::beginRun(), HcalTrigPrimClient::beginRun(), HcalBeamClient::beginRun(), HcalDetDiagLEDMonitor::setup(), HcalBaseDQMonitor::SetupEtaPhiHists(), and HcalBaseMonitor::SetupEtaPhiHists().

    {
      std::stringstream name;
      name<<Name;

      std::stringstream unitname;
      std::stringstream unittitle;
      std::string s(Units);
      if (s.empty())
        {
          unitname<<Units;
          unittitle<<"No Units";
        }
      else
        {
          unitname<<" "<<Units;
          unittitle<<Units;
        }
      
      // Push back depth plots
      depth.push_back(m_dbe->book2D(("HB HE HF Depth 1 "+name.str()+unitname.str()).c_str(),
                                    (name.str()+" Depth 1 -- HB HE HF ("+unittitle.str().c_str()+")"),
                                    85,-42.5,42.5,
                                    72,0.5,72.5));
      float ybins[73];
      for (int i=0;i<=72;i++) ybins[i]=(float)(i+0.5);
      float xbinsd2[]={-42.5,-41.5,-40.5,-39.5,-38.5,-37.5,-36.5,-35.5,-34.5,-33.5,-32.5,-31.5,-30.5,-29.5,
                       -28.5,-27.5,-26.5,-25.5,-24.5,-23.5,-22.5,-21.5,-20.5,-19.5,-18.5,-17.5,-16.5,
                       -15.5,-14.5,
                       14.5, 15.5,
                       16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5,28.5,29.5,30.5,
                       31.5,32.5,33.5,34.5,35.5,36.5,37.5,38.5,39.5,40.5,41.5,42.5};
      depth.push_back(m_dbe->book2D(("HB HE HF Depth 2 "+name.str()+unitname.str()).c_str(),
                                    (name.str()+" Depth 2 -- HB HE HF ("+unittitle.str().c_str()+")"),
                                    57, xbinsd2, 72, ybins));
      
      // Set up variable-sized bins for HE depth 3 (MonitorElement also requires phi bins to be entered in array format)
      float xbins[]={-28.5,-27.5,-26.5,-16.5,-15.5,
                     15.5,16.5,26.5,27.5,28.5};
      
      depth.push_back(m_dbe->book2D(("HE Depth 3 "+name.str()+unitname.str()).c_str(),
                                    (name.str()+" Depth 3 -- HE ("+unittitle.str().c_str()+")"),
                                    // Use variable-sized eta bins 
                                    9, xbins, 72, ybins));
      // HO bins are fixed width, but cover a smaller eta range (-15 -> 15)
      depth.push_back(m_dbe->book2D(("HO Depth 4 "+name.str()+unitname.str()).c_str(),
                                    (name.str()+" Depth 4 -- HO ("+unittitle.str().c_str()+")"),
                                    31,-15.5,15.5,
                                    72,0.5,72.5));
      for (unsigned int i=0;i<depth.size();++i)
        (depth[i]->getTH2F())->SetOption("colz");
      setBinLabels(); // set axis titles, special bins
      
    } // void setup(...)

Member Data Documentation

Definition at line 183 of file HcalEtaPhiHists.h.

Referenced by HcalRecHitClient::analyze(), HcalSummaryClient::analyze(), HcalNoiseMonitor::analyze(), HcalHotCellClient::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalDigiClient::beginRun(), HcalRecHitClient::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalNZSClient::beginRun(), HcalRawDataClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalSummaryClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalMonitorClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalDetDiagLaserMonitor::beginRun(), HcalTrigPrimClient::beginRun(), HcalBeamClient::beginRun(), HcalDeadCellClient::calculateProblems(), HcalCoarsePedestalClient::calculateProblems(), HcalDetDiagPedestalClient::calculateProblems(), HcalDigiClient::calculateProblems(), HcalRecHitClient::calculateProblems(), HcalDetDiagNoiseMonitorClient::calculateProblems(), HcalTrigPrimClient::calculateProblems(), HcalDetDiagTimingClient::calculateProblems(), HcalNZSClient::calculateProblems(), HcalBeamClient::calculateProblems(), HcalHotCellClient::calculateProblems(), HcalRawDataClient::calculateProblems(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), Fill(), HcalDetDiagLEDMonitor::fill_channel_status(), HcalDetDiagLEDMonitor::fill_energy(), HcalRecHitMonitor::fill_Nevents(), HcalCoarsePedestalMonitor::fill_Nevents(), HcalDigiMonitor::fill_Nevents(), HcalHotCellMonitor::fillNevents_energy(), HcalHotCellMonitor::fillNevents_neighbor(), HcalHotCellMonitor::fillNevents_persistentenergy(), HcalHotCellMonitor::fillNevents_problemCells(), HcalDeadCellMonitor::fillNevents_problemCells(), HcalDeadCellMonitor::fillNevents_recentdigis(), HcalDeadCellMonitor::fillNevents_recentrechits(), HcalDetDiagLaserMonitor::fillProblems(), FillUnphysicalHEHFBins(), HcalDetDiagLEDMonitor::get_energy(), HcalDetDiagNoiseMonitorClient::hasErrors_Temp(), HcalTrigPrimClient::hasErrors_Temp(), HcalDeadCellClient::hasErrors_Temp(), HcalRawDataClient::hasErrors_Temp(), HcalRecHitClient::hasErrors_Temp(), HcalDetDiagPedestalClient::hasErrors_Temp(), HcalDigiClient::hasErrors_Temp(), HcalNZSClient::hasErrors_Temp(), HcalBeamClient::hasErrors_Temp(), HcalCoarsePedestalClient::hasErrors_Temp(), HcalDetDiagTimingClient::hasErrors_Temp(), HcalHotCellClient::hasErrors_Temp(), HcalBaseMonitor::hideKnownBadCells(), HcalBaseDQClient::htmlOutput(), HcalBaseMonitor::periodicReset(), HcalMonitorClient::PlotPedestalValues(), HcalDeadCellMonitor::process_Digi(), HcalDeadCellMonitor::process_RecHit(), HcalDeadCellMonitor::processEvent(), HcalDigiMonitor::processEvent(), HcalRecHitMonitor::processEvent_rechit(), HcalHotCellMonitor::processEvent_rechitenergy(), Reset(), HcalDeadCellMonitor::reset(), setBinLabels(), HcalCoarsePedestalMonitor::setup(), setup(), HcalDeadCellMonitor::setup(), HcalHotCellMonitor::setup(), HcalHotCellClient::updateChannelStatus(), and HcalDeadCellClient::updateChannelStatus().