#include <Histograms.h>
Public Member Functions | |
void | ComputeEfficiency () |
void | Fill (float etaSimSegm, float phiSimSegm, float posSimSegm, float angleSimSegm, bool fillRecHit) |
HEff2DHit (std::string name_) | |
HEff2DHit (TString name_, TFile *file) | |
void | Write () |
~HEff2DHit () | |
Public Attributes | |
TH1F * | hAngleRecHit |
TH1F * | hAngleSimSegm |
TH1F * | hEffVsAngle |
TH1F * | hEffVsEta |
TH1F * | hEffVsPhi |
TH1F * | hEffVsPos |
TH1F * | hEtaRecHit |
TH1F * | hEtaSimSegm |
TH1F * | hPhiRecHit |
TH1F * | hPhiSimSegm |
TH1F * | hPosRecHit |
TH1F * | hPosSimSegm |
TString | name |
Definition at line 427 of file Histograms.h.
HEff2DHit::HEff2DHit | ( | std::string | name_ | ) | [inline] |
Definition at line 429 of file Histograms.h.
References hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, MultiGaussianStateTransform::N, name, and Pi.
{ TString N = name_.c_str(); name=N; hEtaSimSegm = new TH1F("2D_"+N+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); hEtaRecHit = new TH1F("2D_"+N+"_hEtaRecHit", "Eta distribution of SimHit segment with 2D RecHit", 100, -1.5, 1.5); hEffVsEta = 0; hPhiSimSegm = new TH1F("2D_"+N+"_hPhiSimSegm", "Phi of SimHit segment", 100, -TMath::Pi(),TMath::Pi()); hPhiRecHit = new TH1F("2D_"+N+"_hPhiRecHit", "Phi distribution of SimHit segment with 2D RecHit", 100, -TMath::Pi(),TMath::Pi()); hEffVsPhi = 0; hPosSimSegm = new TH1F("2D_"+N+"_hPosSimSegm", "Position in SL of SimHit segment (cm)", 100, -250, 250); hPosRecHit = new TH1F("2D_"+N+"_hPosRecHit", "Position in SL of SimHit segment with 2D RecHit (cm)", 100, -250, 250); hEffVsPos = 0; hAngleSimSegm = new TH1F("2D_"+N+"_hAngleSimSegm", "Angle of SimHit segment (rad)", 100, -2, 2); hAngleRecHit = new TH1F("2D_"+N+"_hAngleRecHit", "Angle of SimHit segment with 2D RecHit (rad)", 100, -2, 2); hEffVsAngle = 0; }
HEff2DHit::HEff2DHit | ( | TString | name_, |
TFile * | file | ||
) | [inline] |
Definition at line 460 of file Histograms.h.
References hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, and name.
{ name=name_; hEtaSimSegm = (TH1F *) file->Get("2D_"+name+"_hEtaSimSegm"); hEtaRecHit = (TH1F *) file->Get("2D_"+name+"_hEtaRecHit"); hEffVsEta = (TH1F *) file->Get("2D_"+name+"_hEffVsEta"); hPhiSimSegm = (TH1F *) file->Get("2D_"+name+"_hPhiSimSegm"); hPhiRecHit = (TH1F *) file->Get("2D_"+name+"_hPhiRecHit"); hEffVsPhi = (TH1F *) file->Get("2D_"+name+"_hEffVsPhi"); hPosSimSegm = (TH1F *) file->Get("2D_"+name+"_hPosSimSegm"); hPosRecHit = (TH1F *) file->Get("2D_"+name+"_hPosRecHit"); hEffVsPos = (TH1F *) file->Get("2D_"+name+"_hEffVsPos"); hAngleSimSegm = (TH1F *) file->Get("2D_"+name+"_hAngleSimSegm"); hAngleRecHit = (TH1F *) file->Get("2D_"+name+"_hAngleRecHit"); hEffVsAngle = (TH1F *) file->Get("2D_"+name+"_hEffVsAngle"); }
HEff2DHit::~HEff2DHit | ( | ) | [inline] |
Definition at line 480 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 523 of file Histograms.h.
References newFWLiteAna::bin, error, hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, name, and mathSSE::sqrt().
{ hEffVsEta = (TH1F *) hEtaRecHit->Clone(); hEffVsEta->SetName("2D_"+name+"_hEffVsEta"); hEffVsEta->SetTitle("2D RecHit Efficiency as a function of Eta"); hEffVsEta->Divide(hEtaSimSegm); // Set the error accordingly to binomial statistics int nBinsEta = hEffVsEta->GetNbinsX(); for(int bin = 1; bin <= nBinsEta; bin++) { float nSimHit = hEtaSimSegm->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->SetName("2D_"+name+"_hEffVsPhi"); hEffVsPhi->SetTitle("2D RecHit Efficiency as a function of Phi"); hEffVsPhi->Divide(hPhiSimSegm); // Set the error accordingly to binomial statistics int nBinsPhi = hEffVsPhi->GetNbinsX(); for(int bin = 1; bin <= nBinsPhi; bin++) { float nSimHit = hPhiSimSegm->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->Clone(); hEffVsPos->SetName("2D_"+name+"_hEffVsPos"); hEffVsPos->SetTitle("2D RecHit Efficiency as a function of position in SL"); hEffVsPos->Divide(hPosSimSegm); // Set the error accordingly to binomial statistics int nBinsPos = hEffVsPos->GetNbinsX(); for(int bin = 1; bin <= nBinsPos; bin++) { float nSimHit = hPosSimSegm->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->SetName("2D_"+name+"_hEffVsAngle"); hEffVsAngle->SetTitle("2D RecHit Efficiency as a function of angle"); hEffVsAngle->Divide(hAngleSimSegm); // Set the error accordingly to binomial statistics int nBinsAngle = hEffVsAngle->GetNbinsX(); for(int bin = 1; bin <= nBinsAngle; bin++) { float nSimHit = hAngleSimSegm->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 502 of file Histograms.h.
References 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); } }
void HEff2DHit::Write | ( | ) | [inline] |
Definition at line 591 of file Histograms.h.
References hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, and hPosSimSegm.
{ hEtaSimSegm->Write(); hEtaRecHit->Write(); if(hEffVsEta != 0) hEffVsEta->Write(); hPhiSimSegm->Write(); hPhiRecHit->Write(); if(hEffVsPhi != 0) hEffVsPhi->Write(); hPosSimSegm->Write(); hPosRecHit->Write(); if(hEffVsPos != 0) hEffVsPos->Write(); hAngleSimSegm->Write(); hAngleRecHit->Write(); if(hEffVsAngle != 0) hEffVsAngle->Write(); }
TH1F* HEff2DHit::hAngleRecHit |
Definition at line 623 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hAngleSimSegm |
Definition at line 622 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEffVsAngle |
Definition at line 624 of file Histograms.h.
Referenced by ComputeEfficiency(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEffVsEta |
Definition at line 615 of file Histograms.h.
Referenced by ComputeEfficiency(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEffVsPhi |
Definition at line 618 of file Histograms.h.
Referenced by ComputeEfficiency(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEffVsPos |
Definition at line 621 of file Histograms.h.
Referenced by ComputeEfficiency(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEtaRecHit |
Definition at line 614 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hEtaSimSegm |
Definition at line 613 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hPhiRecHit |
Definition at line 617 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hPhiSimSegm |
Definition at line 616 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hPosRecHit |
Definition at line 620 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TH1F* HEff2DHit::hPosSimSegm |
Definition at line 619 of file Histograms.h.
Referenced by ComputeEfficiency(), Fill(), HEff2DHit(), and Write().
TString HEff2DHit::name |
Definition at line 626 of file Histograms.h.
Referenced by ComputeEfficiency(), and HEff2DHit().