#include <Histograms.h>
Public Member Functions | |
void | ComputeEfficiency () |
void | Fill (float etaSimSegm, float phiSimSegm, float posSimSegm, float angleSimSegm, bool fillRecHit) |
HEff2DHit (std::string name_, DQMStore *dbe_) | |
~HEff2DHit () | |
Public Attributes | |
MonitorElement * | hAngleRecHit |
MonitorElement * | hAngleSimSegm |
TH1F * | hEffVsAngle |
TH1F * | hEffVsEta |
TH1F * | hEffVsPhi |
TH1F * | hEffVsPos |
MonitorElement * | hEtaRecHit |
MonitorElement * | hEtaSimSegm |
MonitorElement * | hPhiRecHit |
MonitorElement * | hPhiSimSegm |
MonitorElement * | hPosRecHit |
MonitorElement * | hPosSimSegm |
TString | name |
Definition at line 456 of file Histograms.h.
HEff2DHit::HEff2DHit | ( | std::string | name_, |
DQMStore * | dbe_ | ||
) | [inline] |
Definition at line 458 of file Histograms.h.
References DQMStore::book1D(), hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, name, Pi, and DQMStore::setCurrentFolder().
{ std::string pre ="2D_"; pre += name_; name = pre; dbe_->setCurrentFolder("DT/2DSegments/"); 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 2D 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 2D RecHit", 100, -TMath::Pi(),TMath::Pi()); //hEffVsPhi = 0; hPosSimSegm=0;hPosSimSegm = dbe_->book1D(pre+"_hPosSimSegm", "Position in SL of SimHit segment (cm)", 100, -250, 250); hPosRecHit=0;hPosRecHit = dbe_->book1D(pre+"_hPosRecHit", "Position in SL of SimHit segment with 2D RecHit (cm)", 100, -250, 250); //hEffVsPos = 0; hAngleSimSegm=0;hAngleSimSegm = dbe_->book1D(pre+"_hAngleSimSegm", "Angle of SimHit segment (rad)", 100, -2, 2); hAngleRecHit=0;hAngleRecHit = dbe_->book1D(pre+"_hAngleRecHit", "Angle of SimHit segment with 2D RecHit (rad)", 100, -2, 2); hEffVsAngle=0;hEffVsAngle = 0; }
HEff2DHit::~HEff2DHit | ( | ) | [inline] |
Definition at line 510 of file Histograms.h.
{ //delete hEtaSimSegm; //delete hEtaRecHit; //if(hEffVsEta != 0) // delete hEffVsEta; //delete hPhiSimSegm; //delete hPhiRecHit; //if(hEffVsPhi != 0) // delete hEffVsPhi; //delete hPosSimSegm; //delete hPosRecHit; //if(hEffVsPos != 0) // delete hEffVsPos; //delete hAngleSimSegm; //delete hAngleRecHit; //if(hEffVsAngle != 0) // delete hEffVsAngle; }
void HEff2DHit::ComputeEfficiency | ( | ) | [inline] |
Definition at line 552 of file Histograms.h.
References newFWLiteAna::bin, error, MonitorElement::getTH1(), hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, name, and mathSSE::sqrt().
{ //hEffVsEta = (TH1F *) hEtaRecHit->Clone(); hEffVsEta = (TH1F *) hEtaRecHit->getTH1(); TH1F * hEffEtaSimSegm = (TH1F *) hEtaSimSegm->getTH1(); hEffVsEta->SetTitle("2D RecHit Efficiency as a function of Eta"); hEffVsEta->SetName(name+"_hEffVsEta"); 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->Clone(); hEffVsPhi = (TH1F *) hPhiRecHit->getTH1(); TH1F * hEffPhiSimSegm = (TH1F *) hPhiSimSegm->getTH1(); hEffVsPhi->SetTitle("2D RecHit Efficiency as a function of Phi"); hEffVsPhi->SetName(name+"_hEffVsPhi"); 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); } hEffVsPos = (TH1F *) hPosRecHit->getTH1(); TH1F * hEffPosSimSegm = (TH1F *) hPosSimSegm->getTH1(); //hEffVsPos = (TH1F *) hPosRecHit->Clone(); hEffVsPos->SetName(name+"_hEffVsPos"); hEffVsPos->SetTitle("2D RecHit Efficiency as a function of position in SL"); hEffVsPos->Divide(hEffPosSimSegm); // Set the error accordingly to binomial statistics int nBinsPos = hEffVsPos->GetNbinsX(); for(int bin = 1; bin <= nBinsPos; bin++) { float nSimHit = hEffPosSimSegm->GetBinContent(bin); float eff = hEffVsPos->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsPos->SetBinError(bin, error); } //hEffVsAngle = (TH1F *) hAngleRecHit->Clone(); hEffVsAngle = (TH1F *) hAngleRecHit->getTH1(); TH1F * hEffAngleSimSegm = (TH1F *) hAngleSimSegm->getTH1(); hEffVsAngle->SetTitle("2D RecHit Efficiency as a function of angle"); hEffVsAngle->SetName(name+"_hEffVsAngle"); hEffVsAngle->Divide(hEffAngleSimSegm); // Set the error accordingly to binomial statistics int nBinsAngle = hEffVsAngle->GetNbinsX(); for(int bin = 1; bin <= nBinsAngle; bin++) { float nSimHit = hEffAngleSimSegm->GetBinContent(bin); float eff = hEffVsAngle->GetBinContent(bin); float error = 0; if(nSimHit != 0) { error = sqrt(eff*(1-eff)/nSimHit); } hEffVsAngle->SetBinError(bin, error); } }
void HEff2DHit::Fill | ( | float | etaSimSegm, |
float | phiSimSegm, | ||
float | posSimSegm, | ||
float | angleSimSegm, | ||
bool | fillRecHit | ||
) | [inline] |
Definition at line 532 of file Histograms.h.
References MonitorElement::Fill(), hAngleRecHit, hAngleSimSegm, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, and hPosSimSegm.
Referenced by DTSegment2DQuality::analyze().
{ hEtaSimSegm->Fill(etaSimSegm); hPhiSimSegm->Fill(phiSimSegm); hPosSimSegm->Fill(posSimSegm); hAngleSimSegm->Fill(angleSimSegm); if(fillRecHit) { hEtaRecHit->Fill(etaSimSegm); hPhiRecHit->Fill(phiSimSegm); hPosRecHit->Fill(posSimSegm); hAngleRecHit->Fill(angleSimSegm); } }
Definition at line 660 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 659 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
TH1F* HEff2DHit::hEffVsAngle |
Definition at line 661 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff2DHit().
TH1F* HEff2DHit::hEffVsEta |
Definition at line 652 of file Histograms.h.
Referenced by ComputeEfficiency().
TH1F* HEff2DHit::hEffVsPhi |
Definition at line 655 of file Histograms.h.
Referenced by ComputeEfficiency().
TH1F* HEff2DHit::hEffVsPos |
Definition at line 658 of file Histograms.h.
Referenced by ComputeEfficiency().
Definition at line 651 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 650 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 654 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 653 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 657 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
Definition at line 656 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), and HEff2DHit().
TString HEff2DHit::name |
Definition at line 663 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff2DHit().