ATLAS Offline Software
Loading...
Searching...
No Matches
egammaMonitoring::EfficiencyPlot Class Reference

#include <EfficiencyPlot.h>

Collaboration diagram for egammaMonitoring::EfficiencyPlot:

Public Member Functions

 EfficiencyPlot (std::string name, std::string folder, SmartIF< ITHistSvc > rootHistSvc)
 ~EfficiencyPlot ()
StatusCode divide (IHistograms *pass, IHistograms *total)

Private Attributes

std::string m_name
std::string m_folder
SmartIF< ITHistSvc > m_rootHistSvc

Detailed Description

Definition at line 16 of file EfficiencyPlot.h.

Constructor & Destructor Documentation

◆ EfficiencyPlot()

egammaMonitoring::EfficiencyPlot::EfficiencyPlot ( std::string name,
std::string folder,
SmartIF< ITHistSvc > rootHistSvc )

Definition at line 13 of file EfficiencyPlot.cxx.

13 :
14 m_name(std::move(name)),
15 m_folder(std::move(folder)),
16 m_rootHistSvc(std::move(rootHistSvc)) {
17 }
SmartIF< ITHistSvc > m_rootHistSvc

◆ ~EfficiencyPlot()

egammaMonitoring::EfficiencyPlot::~EfficiencyPlot ( )
inline

Definition at line 20 of file EfficiencyPlot.h.

20{ };

Member Function Documentation

◆ divide()

StatusCode egammaMonitoring::EfficiencyPlot::divide ( IHistograms * pass,
IHistograms * total )

Definition at line 19 of file EfficiencyPlot.cxx.

19 {
20
21 for (const auto &p : total->histoMap){
22 TH1D *efficiency = (TH1D*) pass->histoMap[p.first]->Clone(Form("%s_%s",m_name.c_str(),p.first.c_str()));
23 efficiency->Divide(pass->histoMap[p.first], p.second, 1, 1, "B");
24 efficiency->GetYaxis()->SetTitle("Efficiency");
25 efficiency->GetYaxis()->SetRangeUser(0,1.1);
26 efficiency->SetStats(0);
27 ATH_CHECK(m_rootHistSvc->regHist(Form("%sEff_%s", m_folder.c_str(), p.first.c_str()), efficiency));
28 }
29
30 return StatusCode::SUCCESS;
31
32 } //
#define ATH_CHECK
Evaluate an expression and check for errors.
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")

Member Data Documentation

◆ m_folder

std::string egammaMonitoring::EfficiencyPlot::m_folder
private

Definition at line 25 of file EfficiencyPlot.h.

◆ m_name

std::string egammaMonitoring::EfficiencyPlot::m_name
private

Definition at line 24 of file EfficiencyPlot.h.

◆ m_rootHistSvc

SmartIF<ITHistSvc> egammaMonitoring::EfficiencyPlot::m_rootHistSvc
private

Definition at line 26 of file EfficiencyPlot.h.


The documentation for this class was generated from the following files: