File indexing completed on 2026-05-23 08:10:29
0001 #ifndef TRIVIAL_EFFICIENCY_CORRECTION_H
0002 #define TRIVIAL_EFFICIENCY_CORRECTION_H
0003
0004 #include "CorrectionHistogram1D.h"
0005
0006 struct TrivialEfficiencyCorrection : CorrectionHistogram1D
0007 {
0008 std::vector<float> hist_bins = {0.5,0.8,1.1,1.4,1.8,2.2,3.,4.};
0009
0010 TrivialEfficiencyCorrection(std::string a)
0011 {
0012 h_corr = new TH1F(a.c_str(),"efficiency",1,-10.,10.);
0013
0014 for(int i=1; i<=h_corr->GetNbinsX(); i++)
0015 {
0016 h_corr->SetBinContent(1,1.);
0017 h_corr->SetBinError(1,0.);
0018 }
0019 h_corr->SetDirectory(nullptr);
0020 name = "eff";
0021 title = "efficiency";
0022 }
0023
0024 TrivialEfficiencyCorrection(const TrivialEfficiencyCorrection& e)
0025 {
0026 h_corr = e.h_corr;
0027 name = e.name;
0028 title = e.title;
0029 }
0030
0031 void apply_correction(float xlow, float xhigh, TH1F* h, int bin) override
0032 {
0033 }
0034 };
0035
0036 #endif