CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Private Attributes
RPCValidHistograms Struct Reference

#include <RPCValidHistograms.h>

Public Types

typedef MonitorElementMEP
 

Public Member Functions

void bookHistograms (DQMStore *dbe, const std::string subDir)
 
 RPCValidHistograms ()
 

Public Attributes

MEP clusterSize
 
MEP nMatchedRefHit_D
 
MEP nMatchedRefHit_DvsR
 
MEP nMatchedRefHit_W
 
MEP nMatchedRefHit_WvsR
 
MEP nRecHit_D
 
MEP nRecHit_DvsR
 
MEP nRecHit_W
 
MEP nRecHit_WvsR
 
MEP nRefHit_D
 
MEP nRefHit_DvsR
 
MEP nRefHit_W
 
MEP nRefHit_WvsR
 
MEP nUnMatchedRecHit_D
 
MEP nUnMatchedRecHit_DvsR
 
MEP nUnMatchedRecHit_W
 
MEP nUnMatchedRecHit_WvsR
 
MEP nUnMatchedRefHit_D
 
MEP nUnMatchedRefHit_DvsR
 
MEP nUnMatchedRefHit_W
 
MEP nUnMatchedRefHit_WvsR
 
MEP pull2_D
 
MEP pull2_DR
 
MEP pull2_W
 
MEP pull2_WR
 
MEP pull_D
 
MEP pull_W
 
MEP res2_D
 
MEP res2_DR
 
MEP res2_W
 
MEP res2_WR
 
MEP res_D
 
MEP res_W
 

Private Attributes

bool booked_
 

Detailed Description

Definition at line 10 of file RPCValidHistograms.h.

Member Typedef Documentation

Definition at line 12 of file RPCValidHistograms.h.

Constructor & Destructor Documentation

RPCValidHistograms::RPCValidHistograms ( )
inline

Definition at line 14 of file RPCValidHistograms.h.

References booked_.

15  {
16  booked_ = false;
17  };

Member Function Documentation

void RPCValidHistograms::bookHistograms ( DQMStore dbe,
const std::string  subDir 
)

Definition at line 5 of file RPCValidHistograms.cc.

References DQMStore::book1D(), DQMStore::book2D(), booked_, clusterSize, MonitorElement::getTH1F(), MonitorElement::getTH2F(), i, nMatchedRefHit_D, nMatchedRefHit_DvsR, nMatchedRefHit_W, nMatchedRefHit_WvsR, nRecHit_D, nRecHit_DvsR, nRecHit_W, nRecHit_WvsR, nRefHit_D, nRefHit_DvsR, nRefHit_W, nRefHit_WvsR, nUnMatchedRecHit_D, nUnMatchedRecHit_DvsR, nUnMatchedRecHit_W, nUnMatchedRecHit_WvsR, nUnMatchedRefHit_D, nUnMatchedRefHit_DvsR, nUnMatchedRefHit_W, nUnMatchedRefHit_WvsR, pull2_D, pull2_DR, pull2_W, pull2_WR, pull_D, pull_W, DQMStore::pwd(), createBeamHaloJobs::pwd, res2_D, res2_DR, res2_W, res2_WR, res_D, res_W, and DQMStore::setCurrentFolder().

6 {
7  if ( !dbe )
8  {
9  edm::LogError("RPCValidHistograms") << "DBE not initialized\n";
10  return;
11  }
12  if ( booked_ )
13  {
14  edm::LogError("RPCValidHistograms") << "Histogram is already booked\n";
15  return;
16  }
17 
18  const std::string pwd = dbe->pwd();
19  dbe->setCurrentFolder(subDir);
20 
21  // Book histograms
22  clusterSize = dbe->book1D("ClusterSize", "Cluster size;Cluster size", 11, -0.5, 10.5);
23 
24  // Number of hits
25  dbe->setCurrentFolder(subDir+"/Occupancy");
26  nRefHit_W = dbe->book1D("NRefHit_Wheel", "Number of reference Hits;Wheel", 5, -2.5, 2.5);
27  nRefHit_D = dbe->book1D("NRefHit_Disk", "Number of reference Hits;Disk", 7, -3.5, 3.5);
28  nRecHit_W = dbe->book1D("NRecHit_Wheel", "Number of recHits;Wheel", 5, -2.5, 2.5);
29  nRecHit_D = dbe->book1D("NRecHit_Disk", "Number of recHits;Disk", 7, -3.5, 3.5);
30 
31  nRefHit_WvsR = dbe->book2D("NRefHit_WvsR", "Number of reference Hits;Wheel;Station", 5, -2.5, 2.5, 4, 1, 5);
32  nRecHit_WvsR = dbe->book2D("NRecHit_WvsR", "Number of recHits;Wheel;Station", 5, -2.5, 2.5, 4, 1, 5);
33  nRefHit_DvsR = dbe->book2D("NRefHit_DvsR", "Number of reference Hits;Disk;Ring", 7, -3.5, 3.5, 4, 1, 5);
34  nRecHit_DvsR = dbe->book2D("NRecHit_DvsR", "Number of recHits;Disk;Ring", 7, -3.5, 3.5, 4, 1, 5);
35 
36  nMatchedRefHit_W = dbe->book1D("NMatchedRefHit_Wheel", "Number of matched reference Hits;Wheel", 5, -2.5, 2.5);
37  nMatchedRefHit_D = dbe->book1D("NMatchedRefHit_Disk", "Number of matched reference Hits;Disk", 7, -3.5, 3.5);
38 
39  nMatchedRefHit_WvsR = dbe->book2D("NMatchedRefHit_WvsR", "Number of matched reference Hits;Wheel;Station", 5, -2.5, 2.5, 4, 1, 5);
40  nMatchedRefHit_DvsR = dbe->book2D("NMatchedRefHit_DvsR", "Number of matched reference Hits;Disk;Ring", 7, -3.5, 3.5, 4, 1, 5);
41 
42  nUnMatchedRefHit_W = dbe->book1D("NUnMatchedRefHit_Wheel", "Number of un-matched reference Hits;Wheel", 5, -2.5, 2.5);
43  nUnMatchedRefHit_D = dbe->book1D("NUnMatchedRefHit_Disk", "Number of un-matched reference Hits;Disk", 7, -3.5, 3.5);
44  nUnMatchedRecHit_W = dbe->book1D("NUnMatchedRecHit_Wheel", "Number of un-matched recHits;Wheel", 5, -2.5, 2.5);
45  nUnMatchedRecHit_D = dbe->book1D("NUnMatchedRecHit_Disk", "Number of un-matched recHits;Disk", 7, -3.5, 3.5);
46 
47  nUnMatchedRefHit_WvsR = dbe->book2D("NUnMatchedRefHit_WvsR", "Number of un-matched reference Hits;Wheel;Station", 5, -2.5, 2.5, 4, 1, 5);
48  nUnMatchedRecHit_WvsR = dbe->book2D("NUnMatchedRecHit_WvsR", "Number of un-matched recHits;Wheel;Station", 5, -2.5, 2.5, 4, 1, 5);
49  nUnMatchedRefHit_DvsR = dbe->book2D("NUnMatchedRefHit_DvsR", "Number of un-matched reference Hits;Disk;Ring", 7, -3.5, 3.5, 4, 1, 5);
50  nUnMatchedRecHit_DvsR = dbe->book2D("NUnMatchedRecHit_DvsR", "Number of un-matched recHits;Disk;Ring", 7, -3.5, 3.5, 4, 1, 5);
51 
52  // Residuals
53  dbe->setCurrentFolder(subDir+"/Residual");
54  res_W = dbe->book1D("Res_W", "Global Residuals for Wheel;Residual [cm]", 100, -8, 8);
55  res_D = dbe->book1D("Res_D", "Global Residuals for Disk;Residual [cm]", 100, -8, 8);
56 
57  res2_W = dbe->book2D("Res2_W", "Residuals for Wheel;Wheel;Residual [cm]", 5, -2.5, 2.5, 50, -8, 8);
58  res2_D = dbe->book2D("Res2_D", "Residuals for Disk;Disk;Residual [cm]", 7, -3.5, 3.5, 50, -8, 8);
59 
60  res2_WR = dbe->book2D("Res2_WR", "Redisuals for Wheel;Station;Residual [cm]", 4, 0, 4, 50, -8, 8);
61  res2_DR = dbe->book2D("Res2_DR", "Redisuals for Disk;Ring;Residual [cm]", 4, 1, 5, 50, -8, 8);
62 
63  // Pulls
64  pull_W = dbe->book1D("Pull_W", "Pull for Wheel;Pull", 100, -3, 3);
65  pull_D = dbe->book1D("Pull_D", "Pull for Disk;Pull", 100, -3, 3);
66 
67  pull2_W = dbe->book2D("Pull2_W", "Pull for Wheel;Wheel;Pull", 5, -2.5, 2.5, 50, -3, 3);
68  pull2_D = dbe->book2D("Pull2_D", "Pull for Disk;Disk;Pull", 7, -3.5, 3.5, 50, -3, 3);
69 
70  pull2_WR = dbe->book2D("Pull2_WR", "Pull for Wheel;Station;Pull", 4, 0, 4, 50, -3, 3);
71  pull2_DR = dbe->book2D("Pull2_DR", "Pull for Disk;Ring;Pull", 4, 1, 5, 50, -3, 3);
72 
73  // Set bin labels
74  for ( int i=1; i<=5; ++i )
75  {
76  TString binLabel = Form("Wheel %d", i-3);
77 
78  nRefHit_W->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
79  nRecHit_W->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
80  nRefHit_WvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
81  nRecHit_WvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
82  nMatchedRefHit_W->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
83  nMatchedRefHit_WvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
84  nUnMatchedRefHit_W->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
85  nUnMatchedRecHit_W->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
86  nUnMatchedRefHit_WvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
87  nUnMatchedRecHit_WvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
88 
89  res2_W->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
90  pull2_W->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
91  }
92 
93  for ( int i=1; i<=7; ++i )
94  {
95  TString binLabel = Form("Disk %d", i-4);
96 
97  nRefHit_D->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
98  nRecHit_D->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
99  nRefHit_DvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
100  nRecHit_DvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
101  nMatchedRefHit_D->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
102  nMatchedRefHit_DvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
103  nUnMatchedRefHit_D->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
104  nUnMatchedRecHit_D->getTH1F()->GetXaxis()->SetBinLabel(i, binLabel);
105  nUnMatchedRefHit_DvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
106  nUnMatchedRecHit_DvsR->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
107 
108  res2_D->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
109  pull2_D->getTH2F()->GetXaxis()->SetBinLabel(i, binLabel);
110  }
111 
112  for ( int i=1; i<=4; ++i )
113  {
114  TString binLabel = Form("Station %d", i);
115 
116  nRefHit_WvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
117  nRecHit_WvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
118  nMatchedRefHit_WvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
119  nUnMatchedRefHit_WvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
120  nUnMatchedRecHit_WvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
121  }
122 
123  for ( int i=1; i<=4; ++i )
124  {
125  TString binLabel = Form("Ring %d", i);
126 
127  nRefHit_DvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
128  nRecHit_DvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
129  nMatchedRefHit_DvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
130  nUnMatchedRefHit_DvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
131  nUnMatchedRecHit_DvsR->getTH2F()->GetYaxis()->SetBinLabel(i, binLabel);
132  }
133 
134  dbe->setCurrentFolder(pwd);
135  booked_ = true;
136 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
TH1F * getTH1F(void) const
TH2F * getTH2F(void) const
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:642
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
const std::string & pwd(void) const
Definition: DQMStore.cc:204

Member Data Documentation

bool RPCValidHistograms::booked_
private

Definition at line 53 of file RPCValidHistograms.h.

Referenced by bookHistograms(), and RPCValidHistograms().

MEP RPCValidHistograms::clusterSize

Definition at line 21 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nMatchedRefHit_D

Definition at line 30 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nMatchedRefHit_DvsR

Definition at line 34 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nMatchedRefHit_W

Definition at line 30 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nMatchedRefHit_WvsR

Definition at line 33 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRecHit_D

Definition at line 25 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRecHit_DvsR

Definition at line 28 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRecHit_W

Definition at line 25 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRecHit_WvsR

Definition at line 28 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRefHit_D

Definition at line 24 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRefHit_DvsR

Definition at line 27 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRefHit_W

Definition at line 24 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nRefHit_WvsR

Definition at line 27 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRecHit_D

Definition at line 37 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRecHit_DvsR

Definition at line 40 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRecHit_W

Definition at line 37 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRecHit_WvsR

Definition at line 39 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRefHit_D

Definition at line 36 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRefHit_DvsR

Definition at line 40 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRefHit_W

Definition at line 36 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::nUnMatchedRefHit_WvsR

Definition at line 39 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull2_D

Definition at line 49 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull2_DR

Definition at line 50 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull2_W

Definition at line 49 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull2_WR

Definition at line 50 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull_D

Definition at line 48 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::pull_W

Definition at line 48 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res2_D

Definition at line 44 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res2_DR

Definition at line 45 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res2_W

Definition at line 44 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res2_WR

Definition at line 45 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res_D

Definition at line 43 of file RPCValidHistograms.h.

Referenced by bookHistograms().

MEP RPCValidHistograms::res_W

Definition at line 43 of file RPCValidHistograms.h.

Referenced by bookHistograms().