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) |
HEff4DHit (std::string name_, DQMStore *dbe_) | |
~HEff4DHit () | |
Public Attributes | |
MonitorElement * | hAlphaRecHit |
MonitorElement * | hAlphaSimSegm |
MonitorElement * | hBetaRecHit |
MonitorElement * | hBetaSimSegm |
TH1F * | hEffVsAlpha |
TH1F * | hEffVsBeta |
TH1F * | hEffVsEta |
TH1F * | hEffVsPhi |
TH1F * | hEffVsX |
TH1F * | hEffVsY |
MonitorElement * | hEtaRecHit |
MonitorElement * | hEtaSimSegm |
MonitorElement * | hPhiRecHit |
MonitorElement * | hPhiSimSegm |
MonitorElement * | hXRecHit |
MonitorElement * | hXSimSegm |
MonitorElement * | hYRecHit |
MonitorElement * | hYSimSegm |
TString | name |
A set of histograms for efficiency 4D RecHits.
Definition at line 1120 of file Histograms.h.
HEff4DHit::HEff4DHit | ( | std::string | name_, |
DQMStore * | dbe_ | ||
) | [inline] |
Definition at line 1122 of file Histograms.h.
References DQMStore::book1D(), hAlphaRecHit, hAlphaSimSegm, hBetaRecHit, hBetaSimSegm, hEffVsAlpha, hEffVsBeta, hEffVsEta, hEffVsPhi, hEffVsX, hEffVsY, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hXRecHit, hXSimSegm, hYRecHit, hYSimSegm, name, Pi, and DQMStore::setCurrentFolder().
{ std::string pre ="4D_"; pre += name_; name = pre; dbe_->setCurrentFolder("DT/4DSegments/"); hEtaSimSegm=0;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); hEtaRecHit=0;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 4D RecHit", 100, -1.5, 1.5); hEffVsEta = 0; hPhiSimSegm=0;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment", 100, -TMath::Pi(),TMath::Pi()); hPhiRecHit=0;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 4D RecHit", 100, -TMath::Pi(),TMath::Pi()); hEffVsPhi = 0; hXSimSegm=0;hXSimSegm = dbe_->book1D(pre+"_hXSimSegm", "X position in Chamber of SimHit segment (cm)", 100, -200, 200); hXRecHit=0;hXRecHit = dbe_->book1D(pre+"_hXRecHit", "X position in Chamber of SimHit segment with 4D RecHit (cm)", 100, -200, 200); hEffVsX = 0; hYSimSegm=0;hYSimSegm = dbe_->book1D(pre+"_hYSimSegm", "Y position in Chamber of SimHit segment (cm)", 100, -200, 200); hYRecHit=0;hYRecHit = dbe_->book1D(pre+"_hYRecHit", "Y position in Chamber of SimHit segment with 4D RecHit (cm)", 100, -200, 200); hEffVsY = 0; hAlphaSimSegm=0;hAlphaSimSegm = dbe_->book1D(pre+"_hAlphaSimSegm", "Alpha of SimHit segment (rad)", 100, -1.5, 1.5); hAlphaRecHit=0;hAlphaRecHit = dbe_->book1D(pre+"_hAlphaRecHit", "Alpha of SimHit segment with 4D RecHit (rad)", 100, -1.5, 1.5); hEffVsAlpha = 0; hBetaSimSegm=0;hBetaSimSegm = dbe_->book1D(pre+"_hBetaSimSegm", "Beta of SimHit segment (rad)", 100, -2, 2); hBetaRecHit=0;hBetaRecHit = dbe_->book1D(pre+"_hBetaRecHit", "Beta of SimHit segment with 4D RecHit (rad)", 100, -2, 2); hEffVsBeta = 0; }
HEff4DHit::~HEff4DHit | ( | ) | [inline] |
Definition at line 1193 of file Histograms.h.
{ /*delete hEtaSimSegm; delete hEtaRecHit; delete hEffVsEta; delete hPhiSimSegm; delete hPhiRecHit; delete hEffVsPhi; delete hXSimSegm; delete hXRecHit; delete hEffVsX; delete hYSimSegm; delete hYRecHit; delete hEffVsY; delete hAlphaSimSegm; delete hAlphaRecHit; delete hEffVsAlpha; delete hBetaSimSegm; delete hBetaRecHit; delete hEffVsBeta;*/ }
void HEff4DHit::ComputeEfficiency | ( | ) | [inline] |
Definition at line 1242 of file Histograms.h.
References newFWLiteAna::bin, 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().
{ //hEffVsEta = (TH1F *) hEtaRecHit->Clone(); hEffVsEta = (TH1F *) hEtaRecHit->getTH1(); TH1F * hEffEtaSimSegm = (TH1F *) hEtaSimSegm->getTH1(); hEffVsEta->SetName(name+"_hEffVsEta"); hEffVsEta->SetTitle("4D RecHit Efficiency as a function of Eta"); hEffVsEta->Divide(hEffEtaSimSegm); // Set the error accordingly to binomial statistics int nBinsEta = hEffVsEta->GetNbinsX(); for(int bin = 1; bin <= nBinsEta; bin++) { float nSimHit = hEffEtaSimSegm->GetBinContent(bin); float eff = hEffVsEta->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsEta->SetBinError(bin, error); } hEffVsPhi = (TH1F *) hPhiRecHit->getTH1(); TH1F * hEffPhiSimSegm = (TH1F *) hPhiSimSegm->getTH1(); hEffVsPhi->SetName(name+"_hEffVsPhi"); hEffVsPhi->SetTitle("4D RecHit Efficiency as a function of Phi"); hEffVsPhi->Divide(hEffPhiSimSegm); // Set the error accordingly to binomial statistics int nBinsPhi = hEffVsPhi->GetNbinsX(); for(int bin = 1; bin <= nBinsPhi; bin++) { float nSimHit = hEffPhiSimSegm->GetBinContent(bin); float eff = hEffVsPhi->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsPhi->SetBinError(bin, error); } hEffVsX = (TH1F *) hXRecHit->getTH1(); TH1F * hEffXSimSegm = (TH1F *) hXSimSegm->getTH1(); hEffVsX->SetName(name+"_hEffVsX"); hEffVsX->SetTitle("4D RecHit Efficiency as a function of x position in Chamber"); hEffVsX->Divide(hEffXSimSegm); // Set the error accordingly to binomial statistics int nBinsX = hEffVsX->GetNbinsX(); for(int bin = 1; bin <= nBinsX; bin++) { float nSimHit = hEffXSimSegm->GetBinContent(bin); float eff = hEffVsX->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsX->SetBinError(bin, error); } hEffVsY = (TH1F *) hYRecHit->getTH1(); TH1F * hEffYSimSegm = (TH1F *) hYSimSegm->getTH1(); hEffVsY->SetName(name+"_hEffVsY"); hEffVsY->SetTitle("4D RecHit Efficiency as a function of y position in Chamber"); hEffVsY->Divide(hEffYSimSegm); // Set the error accordingly to binomial statistics int nBinsY = hEffVsY->GetNbinsX(); for(int bin = 1; bin <= nBinsY; bin++) { float nSimHit = hEffYSimSegm->GetBinContent(bin); float eff = hEffVsY->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsY->SetBinError(bin, error); } hEffVsAlpha = (TH1F *) hAlphaRecHit->getTH1(); TH1F * hEffAlphaSimSegm = (TH1F *) hAlphaSimSegm->getTH1(); hEffVsAlpha->SetName(name+"_hEffVsAlpha"); hEffVsAlpha->SetTitle("4D RecHit Efficiency as a function of alpha"); hEffVsAlpha->Divide(hEffAlphaSimSegm); // Set the error accordingly to binomial statistics int nBinsAlpha = hEffVsAlpha->GetNbinsX(); for(int bin = 1; bin <= nBinsAlpha; bin++) { float nSimHit = hEffAlphaSimSegm->GetBinContent(bin); float eff = hEffVsAlpha->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsAlpha->SetBinError(bin, error); } hEffVsBeta = (TH1F *) hBetaRecHit->getTH1(); TH1F * hEffBetaSimSegm = (TH1F *) hBetaSimSegm->getTH1(); hEffVsBeta->SetName(name+"_hEffVsBeta"); hEffVsBeta->SetTitle("4D RecHit Efficiency as a function of beta"); hEffVsBeta->Divide(hEffBetaSimSegm); // Set the error accordingly to binomial statistics int nBinsBeta = hEffVsBeta->GetNbinsX(); for(int bin = 1; bin <= nBinsBeta; bin++) { float nSimHit = hEffBetaSimSegm->GetBinContent(bin); float eff = hEffVsBeta->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsBeta->SetBinError(bin, error); } }
void HEff4DHit::Fill | ( | float | etaSimSegm, |
float | phiSimSegm, | ||
float | xSimSegm, | ||
float | ySimSegm, | ||
float | alphaSimSegm, | ||
float | betaSimSegm, | ||
bool | fillRecHit | ||
) | [inline] |
Definition at line 1215 of file Histograms.h.
References MonitorElement::Fill(), hAlphaRecHit, hAlphaSimSegm, hBetaRecHit, hBetaSimSegm, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hXRecHit, hXSimSegm, hYRecHit, and hYSimSegm.
Referenced by DTSegment4DQuality::analyze().
{ hEtaSimSegm->Fill(etaSimSegm); hPhiSimSegm->Fill(phiSimSegm); hXSimSegm->Fill(xSimSegm); hYSimSegm->Fill(ySimSegm); hAlphaSimSegm->Fill(alphaSimSegm); hBetaSimSegm->Fill(betaSimSegm); if(fillRecHit) { hEtaRecHit->Fill(etaSimSegm); hPhiRecHit->Fill(phiSimSegm); hXRecHit->Fill(xSimSegm); hYRecHit->Fill(ySimSegm); hAlphaRecHit->Fill(alphaSimSegm); hBetaRecHit->Fill(betaSimSegm); } }
Definition at line 1391 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1390 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1394 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1393 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsAlpha |
Definition at line 1392 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsBeta |
Definition at line 1395 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsEta |
Definition at line 1380 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsPhi |
Definition at line 1383 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsX |
Definition at line 1386 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
TH1F* HEff4DHit::hEffVsY |
Definition at line 1389 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().
Definition at line 1379 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1378 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1382 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1381 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1385 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1384 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1388 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
Definition at line 1387 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff4DHit().
TString HEff4DHit::name |
Definition at line 1397 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff4DHit().