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
HEff4DHit Class Reference

A set of histograms for efficiency 4D RecHits. More...

#include <Histograms.h>

Public Member Functions

void ComputeEfficiency ()
 
void Fill (float etaSimSegm, float phiSimSegm, float xSimSegm, float ySimSegm, float alphaSimSegm, float betaSimSegm, bool fillRecHit, int nSeg)
 
 HEff4DHit (std::string name_, DQMStore *dbe_)
 
 ~HEff4DHit ()
 

Public Attributes

MonitorElementhAlphaRecHit
 
MonitorElementhAlphaSimSegm
 
MonitorElementhBetaRecHit
 
MonitorElementhBetaSimSegm
 
TH1F * hEffVsAlpha
 
TH1F * hEffVsBeta
 
TH1F * hEffVsEta
 
TH1F * hEffVsPhi
 
TH1F * hEffVsX
 
TH1F * hEffVsY
 
MonitorElementhEtaRecHit
 
MonitorElementhEtaSimSegm
 
MonitorElementhNSeg
 
MonitorElementhPhiRecHit
 
MonitorElementhPhiSimSegm
 
MonitorElementhXRecHit
 
MonitorElementhXSimSegm
 
MonitorElementhYRecHit
 
MonitorElementhYSimSegm
 
TString name
 

Detailed Description

A set of histograms for efficiency 4D RecHits.

Definition at line 1006 of file Histograms.h.

Constructor & Destructor Documentation

HEff4DHit::HEff4DHit ( std::string  name_,
DQMStore dbe_ 
)
inline

Definition at line 1008 of file Histograms.h.

References DQMStore::book1D(), hAlphaRecHit, hAlphaSimSegm, hBetaRecHit, hBetaSimSegm, hEffVsAlpha, hEffVsBeta, hEffVsEta, hEffVsPhi, hEffVsX, hEffVsY, hEtaRecHit, hEtaSimSegm, hNSeg, hPhiRecHit, hPhiSimSegm, hXRecHit, hXSimSegm, hYRecHit, hYSimSegm, name, Pi, DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

1008  {
1009  std::string pre ="4D_";
1010  pre += name_;
1011  name = pre;
1012  dbe_->setCurrentFolder("DT/4DSegments/");
1013  hEtaSimSegm=0;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5);
1014  hEtaRecHit=0;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 4D RecHit",
1015  100, -1.5, 1.5);
1016  hEffVsEta = 0;
1017 
1018  hPhiSimSegm=0;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment",
1019  100, -TMath::Pi(),TMath::Pi());
1020  hPhiRecHit=0;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 4D RecHit",
1021  100, -TMath::Pi(),TMath::Pi());
1022  hEffVsPhi = 0;
1023 
1024 
1025  hXSimSegm=0;hXSimSegm = dbe_->book1D(pre+"_hXSimSegm", "X position in Chamber of SimHit segment (cm)",
1026  100, -200, 200);
1027  hXRecHit=0;hXRecHit = dbe_->book1D(pre+"_hXRecHit", "X position in Chamber of SimHit segment with 4D RecHit (cm)",
1028  100, -200, 200);
1029  hEffVsX = 0;
1030 
1031  hYSimSegm=0;hYSimSegm = dbe_->book1D(pre+"_hYSimSegm", "Y position in Chamber of SimHit segment (cm)",
1032  100, -200, 200);
1033  hYRecHit=0;hYRecHit = dbe_->book1D(pre+"_hYRecHit", "Y position in Chamber of SimHit segment with 4D RecHit (cm)",
1034  100, -200, 200);
1035  hEffVsY = 0;
1036 
1037  hAlphaSimSegm=0;hAlphaSimSegm = dbe_->book1D(pre+"_hAlphaSimSegm", "Alpha of SimHit segment (rad)",
1038  100, -1.5, 1.5);
1039  hAlphaRecHit=0;hAlphaRecHit = dbe_->book1D(pre+"_hAlphaRecHit", "Alpha of SimHit segment with 4D RecHit (rad)",
1040  100, -1.5, 1.5);
1041  hEffVsAlpha = 0;
1042 
1043  hBetaSimSegm=0;hBetaSimSegm = dbe_->book1D(pre+"_hBetaSimSegm", "Beta of SimHit segment (rad)",
1044  100, -2, 2);
1045  hBetaRecHit=0;hBetaRecHit = dbe_->book1D(pre+"_hBetaRecHit", "Beta of SimHit segment with 4D RecHit (rad)",
1046  100, -2, 2);
1047  hEffVsBeta = 0;
1048 
1049  hNSeg =0; hNSeg = dbe_->book1D(pre+"_hNSeg", "Number of rec segment per sim seg",
1050  20, 0, 20);
1051 
1052  }
const double Pi
MonitorElement * hAlphaRecHit
Definition: Histograms.h:1208
TH1F * hEffVsEta
Definition: Histograms.h:1197
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
MonitorElement * hBetaSimSegm
Definition: Histograms.h:1210
TH1F * hEffVsX
Definition: Histograms.h:1203
MonitorElement * hXRecHit
Definition: Histograms.h:1202
MonitorElement * hEtaSimSegm
Definition: Histograms.h:1195
MonitorElement * hPhiRecHit
Definition: Histograms.h:1199
TH1F * hEffVsBeta
Definition: Histograms.h:1212
MonitorElement * hPhiSimSegm
Definition: Histograms.h:1198
TString name
Definition: Histograms.h:1215
MonitorElement * hEtaRecHit
Definition: Histograms.h:1196
TH1F * hEffVsAlpha
Definition: Histograms.h:1209
MonitorElement * hBetaRecHit
Definition: Histograms.h:1211
MonitorElement * hNSeg
Definition: Histograms.h:1213
MonitorElement * hAlphaSimSegm
Definition: Histograms.h:1207
MonitorElement * hYSimSegm
Definition: Histograms.h:1204
TH1F * hEffVsY
Definition: Histograms.h:1206
TH1F * hEffVsPhi
Definition: Histograms.h:1200
MonitorElement * hYRecHit
Definition: Histograms.h:1205
MonitorElement * hXSimSegm
Definition: Histograms.h:1201
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
HEff4DHit::~HEff4DHit ( )
inline

Definition at line 1054 of file Histograms.h.

1054  {
1055 
1056  }

Member Function Documentation

void HEff4DHit::ComputeEfficiency ( )
inline

Definition at line 1087 of file Histograms.h.

References newFWLiteAna::bin, relativeConstraints::error, MonitorElement::getTH1(), hAlphaRecHit, hAlphaSimSegm, hBetaRecHit, hBetaSimSegm, hEffVsAlpha, hEffVsBeta, hEffVsEta, hEffVsPhi, hEffVsX, hEffVsY, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hXRecHit, hXSimSegm, hYRecHit, hYSimSegm, name, and mathSSE::sqrt().

1087  {
1088  //hEffVsEta = (TH1F *) hEtaRecHit->Clone();
1089  hEffVsEta = (TH1F *) hEtaRecHit->getTH1();
1090  TH1F * hEffEtaSimSegm = (TH1F *) hEtaSimSegm->getTH1();
1091  hEffVsEta->SetName(name+"_hEffVsEta");
1092  hEffVsEta->SetTitle("4D RecHit Efficiency as a function of Eta");
1093  hEffVsEta->Divide(hEffEtaSimSegm);
1094  // Set the error accordingly to binomial statistics
1095  int nBinsEta = hEffVsEta->GetNbinsX();
1096  for(int bin = 1; bin <= nBinsEta; bin++) {
1097  float nSimHit = hEffEtaSimSegm->GetBinContent(bin);
1098  float eff = hEffVsEta->GetBinContent(bin);
1099  float error = 0;
1100  if(nSimHit != 0) {
1101  error = sqrt(eff*(1-eff)/nSimHit);
1102  }
1103  hEffVsEta->SetBinError(bin, error);
1104  }
1105 
1106  hEffVsPhi = (TH1F *) hPhiRecHit->getTH1();
1107  TH1F * hEffPhiSimSegm = (TH1F *) hPhiSimSegm->getTH1();
1108  hEffVsPhi->SetName(name+"_hEffVsPhi");
1109  hEffVsPhi->SetTitle("4D RecHit Efficiency as a function of Phi");
1110  hEffVsPhi->Divide(hEffPhiSimSegm);
1111  // Set the error accordingly to binomial statistics
1112  int nBinsPhi = hEffVsPhi->GetNbinsX();
1113  for(int bin = 1; bin <= nBinsPhi; bin++) {
1114  float nSimHit = hEffPhiSimSegm->GetBinContent(bin);
1115  float eff = hEffVsPhi->GetBinContent(bin);
1116  float error = 0;
1117  if(nSimHit != 0) {
1118  error = sqrt(eff*(1-eff)/nSimHit);
1119  }
1120  hEffVsPhi->SetBinError(bin, error);
1121  }
1122 
1123  hEffVsX = (TH1F *) hXRecHit->getTH1();
1124  TH1F * hEffXSimSegm = (TH1F *) hXSimSegm->getTH1();
1125  hEffVsX->SetName(name+"_hEffVsX");
1126  hEffVsX->SetTitle("4D RecHit Efficiency as a function of x position in Chamber");
1127  hEffVsX->Divide(hEffXSimSegm);
1128  // Set the error accordingly to binomial statistics
1129  int nBinsX = hEffVsX->GetNbinsX();
1130  for(int bin = 1; bin <= nBinsX; bin++) {
1131  float nSimHit = hEffXSimSegm->GetBinContent(bin);
1132  float eff = hEffVsX->GetBinContent(bin);
1133  float error = 0;
1134  if(nSimHit != 0) {
1135  error = sqrt(eff*(1-eff)/nSimHit);
1136  }
1137  hEffVsX->SetBinError(bin, error);
1138  }
1139 
1140 
1141  hEffVsY = (TH1F *) hYRecHit->getTH1();
1142  TH1F * hEffYSimSegm = (TH1F *) hYSimSegm->getTH1();
1143  hEffVsY->SetName(name+"_hEffVsY");
1144  hEffVsY->SetTitle("4D RecHit Efficiency as a function of y position in Chamber");
1145  hEffVsY->Divide(hEffYSimSegm);
1146  // Set the error accordingly to binomial statistics
1147  int nBinsY = hEffVsY->GetNbinsX();
1148  for(int bin = 1; bin <= nBinsY; bin++) {
1149  float nSimHit = hEffYSimSegm->GetBinContent(bin);
1150  float eff = hEffVsY->GetBinContent(bin);
1151  float error = 0;
1152  if(nSimHit != 0) {
1153  error = sqrt(eff*(1-eff)/nSimHit);
1154  }
1155  hEffVsY->SetBinError(bin, error);
1156  }
1157 
1158  hEffVsAlpha = (TH1F *) hAlphaRecHit->getTH1();
1159  TH1F * hEffAlphaSimSegm = (TH1F *) hAlphaSimSegm->getTH1();
1160  hEffVsAlpha->SetName(name+"_hEffVsAlpha");
1161  hEffVsAlpha->SetTitle("4D RecHit Efficiency as a function of alpha");
1162  hEffVsAlpha->Divide(hEffAlphaSimSegm);
1163  // Set the error accordingly to binomial statistics
1164  int nBinsAlpha = hEffVsAlpha->GetNbinsX();
1165  for(int bin = 1; bin <= nBinsAlpha; bin++) {
1166  float nSimHit = hEffAlphaSimSegm->GetBinContent(bin);
1167  float eff = hEffVsAlpha->GetBinContent(bin);
1168  float error = 0;
1169  if(nSimHit != 0) {
1170  error = sqrt(eff*(1-eff)/nSimHit);
1171  }
1172  hEffVsAlpha->SetBinError(bin, error);
1173  }
1174 
1175 
1176  hEffVsBeta = (TH1F *) hBetaRecHit->getTH1();
1177  TH1F * hEffBetaSimSegm = (TH1F *) hBetaSimSegm->getTH1();
1178  hEffVsBeta->SetName(name+"_hEffVsBeta");
1179  hEffVsBeta->SetTitle("4D RecHit Efficiency as a function of beta");
1180  hEffVsBeta->Divide(hEffBetaSimSegm);
1181  // Set the error accordingly to binomial statistics
1182  int nBinsBeta = hEffVsBeta->GetNbinsX();
1183  for(int bin = 1; bin <= nBinsBeta; bin++) {
1184  float nSimHit = hEffBetaSimSegm->GetBinContent(bin);
1185  float eff = hEffVsBeta->GetBinContent(bin);
1186  float error = 0;
1187  if(nSimHit != 0) {
1188  error = sqrt(eff*(1-eff)/nSimHit);
1189  }
1190  hEffVsBeta->SetBinError(bin, error);
1191  }
1192  }
MonitorElement * hAlphaRecHit
Definition: Histograms.h:1208
TH1F * hEffVsEta
Definition: Histograms.h:1197
MonitorElement * hBetaSimSegm
Definition: Histograms.h:1210
TH1F * hEffVsX
Definition: Histograms.h:1203
MonitorElement * hXRecHit
Definition: Histograms.h:1202
MonitorElement * hEtaSimSegm
Definition: Histograms.h:1195
MonitorElement * hPhiRecHit
Definition: Histograms.h:1199
TH1F * hEffVsBeta
Definition: Histograms.h:1212
MonitorElement * hPhiSimSegm
Definition: Histograms.h:1198
TString name
Definition: Histograms.h:1215
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * hEtaRecHit
Definition: Histograms.h:1196
TH1 * getTH1(void) const
TH1F * hEffVsAlpha
Definition: Histograms.h:1209
MonitorElement * hBetaRecHit
Definition: Histograms.h:1211
MonitorElement * hAlphaSimSegm
Definition: Histograms.h:1207
MonitorElement * hYSimSegm
Definition: Histograms.h:1204
TH1F * hEffVsY
Definition: Histograms.h:1206
TH1F * hEffVsPhi
Definition: Histograms.h:1200
MonitorElement * hYRecHit
Definition: Histograms.h:1205
MonitorElement * hXSimSegm
Definition: Histograms.h:1201
void HEff4DHit::Fill ( float  etaSimSegm,
float  phiSimSegm,
float  xSimSegm,
float  ySimSegm,
float  alphaSimSegm,
float  betaSimSegm,
bool  fillRecHit,
int  nSeg 
)
inline

Definition at line 1058 of file Histograms.h.

References MonitorElement::Fill(), hAlphaRecHit, hAlphaSimSegm, hBetaRecHit, hBetaSimSegm, hEtaRecHit, hEtaSimSegm, hNSeg, hPhiRecHit, hPhiSimSegm, hXRecHit, hXSimSegm, hYRecHit, and hYSimSegm.

Referenced by DTSegment4DQuality::analyze().

1065  {
1066 
1067  hEtaSimSegm->Fill(etaSimSegm);
1068  hPhiSimSegm->Fill(phiSimSegm);
1069  hXSimSegm->Fill(xSimSegm);
1070  hYSimSegm->Fill(ySimSegm);
1071  hAlphaSimSegm->Fill(alphaSimSegm);
1072  hBetaSimSegm->Fill(betaSimSegm);
1073  hNSeg->Fill(nSeg);
1074 
1075  if(fillRecHit) {
1076  hEtaRecHit->Fill(etaSimSegm);
1077  hPhiRecHit->Fill(phiSimSegm);
1078  hXRecHit->Fill(xSimSegm);
1079  hYRecHit->Fill(ySimSegm);
1080  hAlphaRecHit->Fill(alphaSimSegm);
1081  hBetaRecHit->Fill(betaSimSegm);
1082  }
1083  }
MonitorElement * hAlphaRecHit
Definition: Histograms.h:1208
MonitorElement * hBetaSimSegm
Definition: Histograms.h:1210
MonitorElement * hXRecHit
Definition: Histograms.h:1202
MonitorElement * hEtaSimSegm
Definition: Histograms.h:1195
MonitorElement * hPhiRecHit
Definition: Histograms.h:1199
void Fill(long long x)
MonitorElement * hPhiSimSegm
Definition: Histograms.h:1198
MonitorElement * hEtaRecHit
Definition: Histograms.h:1196
MonitorElement * hBetaRecHit
Definition: Histograms.h:1211
MonitorElement * hNSeg
Definition: Histograms.h:1213
MonitorElement * hAlphaSimSegm
Definition: Histograms.h:1207
MonitorElement * hYSimSegm
Definition: Histograms.h:1204
MonitorElement * hYRecHit
Definition: Histograms.h:1205
MonitorElement * hXSimSegm
Definition: Histograms.h:1201

Member Data Documentation

MonitorElement* HEff4DHit::hAlphaRecHit

Definition at line 1208 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hAlphaSimSegm

Definition at line 1207 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hBetaRecHit

Definition at line 1211 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hBetaSimSegm

Definition at line 1210 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsAlpha

Definition at line 1209 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsBeta

Definition at line 1212 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsEta

Definition at line 1197 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsPhi

Definition at line 1200 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsX

Definition at line 1203 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

TH1F* HEff4DHit::hEffVsY

Definition at line 1206 of file Histograms.h.

Referenced by ComputeEfficiency(), and HEff4DHit().

MonitorElement* HEff4DHit::hEtaRecHit

Definition at line 1196 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hEtaSimSegm

Definition at line 1195 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hNSeg

Definition at line 1213 of file Histograms.h.

Referenced by Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hPhiRecHit

Definition at line 1199 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hPhiSimSegm

Definition at line 1198 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hXRecHit

Definition at line 1202 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hXSimSegm

Definition at line 1201 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hYRecHit

Definition at line 1205 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

MonitorElement* HEff4DHit::hYSimSegm

Definition at line 1204 of file Histograms.h.

Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().

TString HEff4DHit::name