File indexing completed on 2024-04-06 12:22:43
0001 #include "Smoother.C"
0002 #include "TFile.h"
0003 #include "TDirectory.h"
0004
0005 void ApplySmoother()
0006 {
0007 Smoother smoother(0.2);
0008
0009 TFile* inputFile = new TFile("Sherpa_Zeta.root");
0010 TDirectory* inputDir = (TDirectory*)inputFile->Get("TestHepMCEvt");
0011 TH1F* inputHisto = (TH1F*)inputDir->Get("HistZMass");
0012
0013 const int iterations = 4;
0014 bool single[iterations] = { false, true, false, true };
0015 TH1F* smoothedHisto = smoother.smooth(inputHisto, iterations, single);
0016
0017 TFile* outputFile = new TFile("SmoothedHisto.root", "RECREATE");
0018 outputFile->cd();
0019 smoothedHisto->Write();
0020 outputFile->Close();
0021 }