CMS 3D CMS Logo

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

#include <HcalEtaPhiHists.h>

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.

21 {};
EtaPhiHists::~EtaPhiHists ( )
inline

Definition at line 22 of file HcalEtaPhiHists.h.

22 {};

Member Function Documentation

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

Definition at line 170 of file HcalEtaPhiHists.h.

References depth, and HcalForward.

171  {
172  // If in HF, need to shift by 1 bin (-1 bin lower in -HF, +1 bin higher in +HF)
173  if (id.subdet()==HcalForward)
174  depth[id.depth()-1]->Fill(id.ieta()<0 ? id.ieta()-1 : id.ieta()+1, id.iphi(), val);
175  else
176  depth[id.depth()-1]->Fill(id.ieta(),id.iphi(),val);
177  };
std::vector< MonitorElement * > depth
int EtaPhiHists::getEtaBins ( int  depth)
inline

Definition at line 79 of file HcalEtaPhiHists.h.

80  {
81  if (depth==1) return 85;
82  if (depth==2) return 57;
83  if (depth==3) return 9;
84  if (depth==4) return 31;
85  return 0;
86  }
std::vector< MonitorElement * > depth
int EtaPhiHists::getPhiBins ( int  depth)
inline

Definition at line 88 of file HcalEtaPhiHists.h.

89  {
90  if (depth>0 && depth<5)
91  return 72;
92  return 0;
93  }
std::vector< MonitorElement * > depth
void EtaPhiHists::Reset ( void  )
inline

Definition at line 179 of file HcalEtaPhiHists.h.

References depth.

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

180  {
181  for (unsigned int d=0;d<depth.size();d++)
182  if(depth[d]) depth[d]->Reset();
183  }; // void Reset(void)
std::vector< MonitorElement * > depth
void EtaPhiHists::setBinLabels ( )
inline

Definition at line 95 of file HcalEtaPhiHists.h.

References depth, i, and diffTwoXMLs::label.

Referenced by setup().

96  {
97  // Set labels for all depth histograms
98  for (unsigned int i=0;i<depth.size();++i)
99  {
100  depth[i]->setAxisTitle("i#eta",1);
101  depth[i]->setAxisTitle("i#phi",2);
102  }
103 
104  std::stringstream label;
105  // set label on every other bin
106  for (int i=-41;i<=-29;i=i+2)
107  {
108  label<<i;
109  depth[0]->setBinLabel(i+42,label.str().c_str());
110  depth[1]->setBinLabel(i+42,label.str().c_str());
111  label.str("");
112  }
113  depth[0]->setBinLabel(14,"-29HE");
114  depth[1]->setBinLabel(14,"-29HE");
115 
116  // offset by one for HE
117  for (int i=-27;i<=27;i=i+2)
118  {
119  label<<i;
120  depth[0]->setBinLabel(i+43,label.str().c_str());
121  label.str("");
122  }
123  depth[0]->setBinLabel(72,"29HE");
124  for (int i=29;i<=41;i=i+2)
125  {
126  label<<i;
127  depth[0]->setBinLabel(i+44,label.str().c_str());
128  label.str("");
129  }
130  for (int i=16;i<=28;i=i+2)
131  {
132  label<<i-43;
133  depth[1]->setBinLabel(i,label.str().c_str());
134  label.str("");
135  }
136  depth[1]->setBinLabel(29,"NULL");
137  for (int i=15;i<=27;i=i+2)
138  {
139  label<<i;
140  depth[1]->setBinLabel(i+15,label.str().c_str());
141  label.str("");
142  }
143 
144  depth[1]->setBinLabel(44,"29HE");
145  for (int i=29;i<=41;i=i+2)
146  {
147  label<<i;
148  depth[1]->setBinLabel(i+16,label.str().c_str());
149  label.str("");
150  }
151 
152  // HE depth 3 labels;
153  depth[2]->setBinLabel(1,"-28");
154  depth[2]->setBinLabel(2,"-27");
155  depth[2]->setBinLabel(3,"Null");
156  depth[2]->setBinLabel(4,"-16");
157  depth[2]->setBinLabel(5,"Null");
158  depth[2]->setBinLabel(6,"16");
159  depth[2]->setBinLabel(7,"Null");
160  depth[2]->setBinLabel(8,"27");
161  depth[2]->setBinLabel(9,"28");
162 
163  for (int d=0;d<4;++d)
164  {
165  depth[d]->setAxisTitle("i#eta",1);
166  depth[d]->setAxisTitle("i#phi",2);
167  }
168  };
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > depth
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 HcalBeamClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalDigiClient::beginRun(), HcalHotCellClient::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalTrigPrimClient::beginRun(), HcalNZSClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalRecHitClient::beginRun(), HcalSummaryClient::beginRun(), HcalRawDataClient::beginRun(), HcalMonitorClient::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalDetDiagLaserMonitor::beginRun(), HcalDetDiagLEDMonitor::setup(), HcalBaseMonitor::SetupEtaPhiHists(), and HcalBaseDQMonitor::SetupEtaPhiHists().

25  {
26  std::stringstream name;
27  name<<Name;
28 
29  std::stringstream unitname;
30  std::stringstream unittitle;
31  std::string s(Units);
32  if (s.empty())
33  {
34  unitname<<Units;
35  unittitle<<"No Units";
36  }
37  else
38  {
39  unitname<<" "<<Units;
40  unittitle<<Units;
41  }
42 
43  // Push back depth plots
44  depth.push_back(m_dbe->book2D(("HB HE HF Depth 1 "+name.str()+unitname.str()).c_str(),
45  (name.str()+" Depth 1 -- HB HE HF ("+unittitle.str().c_str()+")"),
46  85,-42.5,42.5,
47  72,0.5,72.5));
48  float ybins[73];
49  for (int i=0;i<=72;i++) ybins[i]=(float)(i+0.5);
50  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,
51  -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,
52  -15.5,-14.5,
53  14.5, 15.5,
54  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,
55  31.5,32.5,33.5,34.5,35.5,36.5,37.5,38.5,39.5,40.5,41.5,42.5};
56  depth.push_back(m_dbe->book2D(("HB HE HF Depth 2 "+name.str()+unitname.str()).c_str(),
57  (name.str()+" Depth 2 -- HB HE HF ("+unittitle.str().c_str()+")"),
58  57, xbinsd2, 72, ybins));
59 
60  // Set up variable-sized bins for HE depth 3 (MonitorElement also requires phi bins to be entered in array format)
61  float xbins[]={-28.5,-27.5,-26.5,-16.5,-15.5,
62  15.5,16.5,26.5,27.5,28.5};
63 
64  depth.push_back(m_dbe->book2D(("HE Depth 3 "+name.str()+unitname.str()).c_str(),
65  (name.str()+" Depth 3 -- HE ("+unittitle.str().c_str()+")"),
66  // Use variable-sized eta bins
67  9, xbins, 72, ybins));
68  // HO bins are fixed width, but cover a smaller eta range (-15 -> 15)
69  depth.push_back(m_dbe->book2D(("HO Depth 4 "+name.str()+unitname.str()).c_str(),
70  (name.str()+" Depth 4 -- HO ("+unittitle.str().c_str()+")"),
71  31,-15.5,15.5,
72  72,0.5,72.5));
73  for (unsigned int i=0;i<depth.size();++i)
74  (depth[i]->getTH2F())->SetOption("colz");
75  setBinLabels(); // set axis titles, special bins
76 
77  } // void setup(...)
int i
Definition: DBlmapReader.cc:9
const double xbins[]
void setBinLabels()
std::vector< MonitorElement * > depth
TH2F * getTH2F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000

Member Data Documentation

std::vector<MonitorElement*> EtaPhiHists::depth

Definition at line 183 of file HcalEtaPhiHists.h.

Referenced by dqm_interfaces.DirID::__eq__(), dqm_interfaces.DirID::__repr__(), HcalRecHitClient::analyze(), HcalSummaryClient::analyze(), HcalNoiseMonitor::analyze(), HcalNZSClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalBeamClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalDigiClient::beginRun(), HcalTrigPrimClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalHotCellClient::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalRecHitClient::beginRun(), HcalSummaryClient::beginRun(), HcalRawDataClient::beginRun(), HcalMonitorClient::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalDetDiagLaserMonitor::beginRun(), HcalCoarsePedestalClient::calculateProblems(), HcalDetDiagPedestalClient::calculateProblems(), HcalDeadCellClient::calculateProblems(), HcalDetDiagTimingClient::calculateProblems(), HcalTrigPrimClient::calculateProblems(), HcalDigiClient::calculateProblems(), HcalBeamClient::calculateProblems(), HcalHotCellClient::calculateProblems(), HcalDetDiagNoiseMonitorClient::calculateProblems(), HcalNZSClient::calculateProblems(), HcalRecHitClient::calculateProblems(), HcalRawDataClient::calculateProblems(), HcalDetDiagLEDMonitor::CheckStatus(), HcalDetDiagPedestalMonitor::CheckStatus(), Fill(), HcalDetDiagLEDMonitor::fill_channel_status(), HcalDetDiagLEDMonitor::fill_energy(), HcalCoarsePedestalMonitor::fill_Nevents(), HcalRecHitMonitor::fill_Nevents(), HcalDigiMonitor::fill_Nevents(), HcalHotCellMonitor::fillNevents_energy(), HcalHotCellMonitor::fillNevents_neighbor(), HcalHotCellMonitor::fillNevents_persistentenergy(), HcalDeadCellMonitor::fillNevents_problemCells(), HcalHotCellMonitor::fillNevents_problemCells(), HcalDeadCellMonitor::fillNevents_recentdigis(), HcalDeadCellMonitor::fillNevents_recentrechits(), HcalDetDiagLaserMonitor::fillProblems(), FillUnphysicalHEHFBins(), HcalDetDiagLEDMonitor::get_energy(), HcalDetDiagPedestalClient::hasErrors_Temp(), HcalDetDiagNoiseMonitorClient::hasErrors_Temp(), HcalBeamClient::hasErrors_Temp(), HcalDeadCellClient::hasErrors_Temp(), HcalDetDiagTimingClient::hasErrors_Temp(), HcalTrigPrimClient::hasErrors_Temp(), HcalDigiClient::hasErrors_Temp(), HcalHotCellClient::hasErrors_Temp(), HcalCoarsePedestalClient::hasErrors_Temp(), HcalNZSClient::hasErrors_Temp(), HcalRecHitClient::hasErrors_Temp(), HcalRawDataClient::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(), HcalDeadCellMonitor::reset(), Reset(), dqm_interfaces.DirWalkerDB::run(), setBinLabels(), HcalCoarsePedestalMonitor::setup(), setup(), HcalHotCellMonitor::setup(), HcalDeadCellMonitor::setup(), HcalHotCellClient::updateChannelStatus(), and HcalDeadCellClient::updateChannelStatus().