![]() |
![]() |
#include <Validation/DTRecHits/plugins/Histograms.h>
Public Member Functions | |
void | ComputeEfficiency () |
void | Fill (float etaSimSegm, float phiSimSegm, float posSimSegm, float angleSimSegm, bool fillRecHit) |
HEff2DHit (TString name_, TFile *file) | |
HEff2DHit (std::string name_) | |
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, N, name, and Pi.
00429 { 00430 TString N = name_.c_str(); 00431 name=N; 00432 00433 hEtaSimSegm = new TH1F("2D_"+N+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); 00434 hEtaRecHit = new TH1F("2D_"+N+"_hEtaRecHit", "Eta distribution of SimHit segment with 2D RecHit", 00435 100, -1.5, 1.5); 00436 hEffVsEta = 0; 00437 00438 hPhiSimSegm = new TH1F("2D_"+N+"_hPhiSimSegm", "Phi of SimHit segment", 00439 100, -TMath::Pi(),TMath::Pi()); 00440 hPhiRecHit = new TH1F("2D_"+N+"_hPhiRecHit", "Phi distribution of SimHit segment with 2D RecHit", 00441 100, -TMath::Pi(),TMath::Pi()); 00442 hEffVsPhi = 0; 00443 00444 00445 hPosSimSegm = new TH1F("2D_"+N+"_hPosSimSegm", "Position in SL of SimHit segment (cm)", 00446 100, -250, 250); 00447 hPosRecHit = new TH1F("2D_"+N+"_hPosRecHit", "Position in SL of SimHit segment with 2D RecHit (cm)", 00448 100, -250, 250); 00449 hEffVsPos = 0; 00450 00451 00452 hAngleSimSegm = new TH1F("2D_"+N+"_hAngleSimSegm", "Angle of SimHit segment (rad)", 00453 100, -2, 2); 00454 hAngleRecHit = new TH1F("2D_"+N+"_hAngleRecHit", "Angle of SimHit segment with 2D RecHit (rad)", 00455 100, -2, 2); 00456 hEffVsAngle = 0; 00457 00458 }
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.
00460 { 00461 name=name_; 00462 hEtaSimSegm = (TH1F *) file->Get("2D_"+name+"_hEtaSimSegm"); 00463 hEtaRecHit = (TH1F *) file->Get("2D_"+name+"_hEtaRecHit"); 00464 hEffVsEta = (TH1F *) file->Get("2D_"+name+"_hEffVsEta"); 00465 00466 hPhiSimSegm = (TH1F *) file->Get("2D_"+name+"_hPhiSimSegm"); 00467 hPhiRecHit = (TH1F *) file->Get("2D_"+name+"_hPhiRecHit"); 00468 hEffVsPhi = (TH1F *) file->Get("2D_"+name+"_hEffVsPhi"); 00469 00470 hPosSimSegm = (TH1F *) file->Get("2D_"+name+"_hPosSimSegm"); 00471 hPosRecHit = (TH1F *) file->Get("2D_"+name+"_hPosRecHit"); 00472 hEffVsPos = (TH1F *) file->Get("2D_"+name+"_hEffVsPos"); 00473 00474 hAngleSimSegm = (TH1F *) file->Get("2D_"+name+"_hAngleSimSegm"); 00475 hAngleRecHit = (TH1F *) file->Get("2D_"+name+"_hAngleRecHit"); 00476 hEffVsAngle = (TH1F *) file->Get("2D_"+name+"_hEffVsAngle"); 00477 }
HEff2DHit::~HEff2DHit | ( | ) | [inline] |
Definition at line 480 of file Histograms.h.
00480 { 00481 //delete hEtaSimSegm; 00482 //delete hEtaRecHit; 00483 //if(hEffVsEta != 0) 00484 // delete hEffVsEta; 00485 00486 //delete hPhiSimSegm; 00487 //delete hPhiRecHit; 00488 //if(hEffVsPhi != 0) 00489 // delete hEffVsPhi; 00490 00491 //delete hPosSimSegm; 00492 //delete hPosRecHit; 00493 //if(hEffVsPos != 0) 00494 // delete hEffVsPos; 00495 00496 //delete hAngleSimSegm; 00497 //delete hAngleRecHit; 00498 //if(hEffVsAngle != 0) 00499 // delete hEffVsAngle; 00500 }
void HEff2DHit::ComputeEfficiency | ( | ) | [inline] |
Definition at line 523 of file Histograms.h.
References error, hAngleRecHit, hAngleSimSegm, hEffVsAngle, hEffVsEta, hEffVsPhi, hEffVsPos, hEtaRecHit, hEtaSimSegm, hPhiRecHit, hPhiSimSegm, hPosRecHit, hPosSimSegm, name, and funct::sqrt().
Referenced by DTSegment2DSLPhiQuality::endJob(), and DTSegment2DQuality::endJob().
00523 { 00524 00525 hEffVsEta = (TH1F *) hEtaRecHit->Clone(); 00526 hEffVsEta->SetName("2D_"+name+"_hEffVsEta"); 00527 hEffVsEta->SetTitle("2D RecHit Efficiency as a function of Eta"); 00528 hEffVsEta->Divide(hEtaSimSegm); 00529 // Set the error accordingly to binomial statistics 00530 int nBinsEta = hEffVsEta->GetNbinsX(); 00531 for(int bin = 1; bin <= nBinsEta; bin++) { 00532 float nSimHit = hEtaSimSegm->GetBinContent(bin); 00533 float eff = hEffVsEta->GetBinContent(bin); 00534 float error = 0; 00535 if(nSimHit != 0) { 00536 error = sqrt(eff*(1-eff)/nSimHit); 00537 } 00538 hEffVsEta->SetBinError(bin, error); 00539 } 00540 00541 hEffVsPhi = (TH1F *) hPhiRecHit->Clone(); 00542 hEffVsPhi->SetName("2D_"+name+"_hEffVsPhi"); 00543 hEffVsPhi->SetTitle("2D RecHit Efficiency as a function of Phi"); 00544 hEffVsPhi->Divide(hPhiSimSegm); 00545 // Set the error accordingly to binomial statistics 00546 int nBinsPhi = hEffVsPhi->GetNbinsX(); 00547 for(int bin = 1; bin <= nBinsPhi; bin++) { 00548 float nSimHit = hPhiSimSegm->GetBinContent(bin); 00549 float eff = hEffVsPhi->GetBinContent(bin); 00550 float error = 0; 00551 if(nSimHit != 0) { 00552 error = sqrt(eff*(1-eff)/nSimHit); 00553 } 00554 hEffVsPhi->SetBinError(bin, error); 00555 } 00556 00557 hEffVsPos = (TH1F *) hPosRecHit->Clone(); 00558 hEffVsPos->SetName("2D_"+name+"_hEffVsPos"); 00559 hEffVsPos->SetTitle("2D RecHit Efficiency as a function of position in SL"); 00560 hEffVsPos->Divide(hPosSimSegm); 00561 // Set the error accordingly to binomial statistics 00562 int nBinsPos = hEffVsPos->GetNbinsX(); 00563 for(int bin = 1; bin <= nBinsPos; bin++) { 00564 float nSimHit = hPosSimSegm->GetBinContent(bin); 00565 float eff = hEffVsPos->GetBinContent(bin); 00566 float error = 0; 00567 if(nSimHit != 0) { 00568 error = sqrt(eff*(1-eff)/nSimHit); 00569 } 00570 hEffVsPos->SetBinError(bin, error); 00571 } 00572 00573 hEffVsAngle = (TH1F *) hAngleRecHit->Clone(); 00574 hEffVsAngle->SetName("2D_"+name+"_hEffVsAngle"); 00575 hEffVsAngle->SetTitle("2D RecHit Efficiency as a function of angle"); 00576 hEffVsAngle->Divide(hAngleSimSegm); 00577 // Set the error accordingly to binomial statistics 00578 int nBinsAngle = hEffVsAngle->GetNbinsX(); 00579 for(int bin = 1; bin <= nBinsAngle; bin++) { 00580 float nSimHit = hAngleSimSegm->GetBinContent(bin); 00581 float eff = hEffVsAngle->GetBinContent(bin); 00582 float error = 0; 00583 if(nSimHit != 0) { 00584 error = sqrt(eff*(1-eff)/nSimHit); 00585 } 00586 hEffVsAngle->SetBinError(bin, error); 00587 } 00588 00589 }
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(), and DTSegment2DSLPhiQuality::analyze().
00506 { 00507 00508 hEtaSimSegm->Fill(etaSimSegm); 00509 hPhiSimSegm->Fill(phiSimSegm); 00510 hPosSimSegm->Fill(posSimSegm); 00511 hAngleSimSegm->Fill(angleSimSegm); 00512 00513 if(fillRecHit) { 00514 hEtaRecHit->Fill(etaSimSegm); 00515 hPhiRecHit->Fill(phiSimSegm); 00516 hPosRecHit->Fill(posSimSegm); 00517 hAngleRecHit->Fill(angleSimSegm); 00518 } 00519 }
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.
Referenced by DTSegment2DSLPhiQuality::endJob(), and DTSegment2DQuality::endJob().
00591 { 00592 hEtaSimSegm->Write(); 00593 hEtaRecHit->Write(); 00594 if(hEffVsEta != 0) 00595 hEffVsEta->Write(); 00596 hPhiSimSegm->Write(); 00597 hPhiRecHit->Write(); 00598 if(hEffVsPhi != 0) 00599 hEffVsPhi->Write(); 00600 hPosSimSegm->Write(); 00601 hPosRecHit->Write(); 00602 if(hEffVsPos != 0) 00603 hEffVsPos->Write(); 00604 hAngleSimSegm->Write(); 00605 hAngleRecHit->Write(); 00606 if(hEffVsAngle != 0) 00607 hEffVsAngle->Write(); 00608 00609 }
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 |