18 std::cout <<
"Configuring VtxHistoProcessor" << std::endl;
21 debug_ = parameters.getInteger(
"debug");
22 rebin_ = parameters.getInteger(
"rebin");
26 catch (std::runtime_error& error)
28 std::cout << error.what() << std::endl;
34 inF_ =
new TFile(inFilename.c_str());
35 outF_ =
new TFile(outFilename.c_str(),
"RECREATE");
45 std::cout<<
"Getting... " <<(std::string(
"/")+selection_+
"/"+selection_+
"_"+projection_).c_str() << std::endl;
48 TH2F* proj2d = (TH2F*)
inF_->Get((std::string(
"/")+selection_+
"/"+selection_+
"_"+projection_).c_str());
51 _histos2d[selection_+
"_"+projection_] = (TH2F*)
inF_->Get((std::string(
"/")+selection_+
"/"+selection_+
"_"+projection_).c_str());
52 _histos2d[selection_+
"_"+projection_]->SetDirectory(0);
56 std::cout<<
"histo::"<<(std::string(
"/")+selection_+
"/"+selection_+
"_"+projection_).c_str()<<
" does not exists."<<std::endl;
65 (it->first+
"_mu").c_str(),
66 (it->first+
"_mu").c_str(),
67 it->second->GetXaxis()->GetNbins(),
68 it->second->GetXaxis()->GetXmin(),
69 it->second->GetXaxis()->GetXmax());
72 (it->first+
"_sigma").c_str(),
73 (it->first+
"_sigma").c_str(),
74 it->second->GetXaxis()->GetNbins(),
75 it->second->GetXaxis()->GetXmin(),
76 it->second->GetXaxis()->GetXmax());
81 std::cout<<
"Fitting::"<<it->first<<std::endl;
#define DECLARE_PROCESSOR(CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
Base class for all event processing components.
Insert description here. more details.
VtxHistoProcessor(const std::string &name, Process &process)
Constructor.
virtual void configure(const ParameterSet ¶meters)
description
virtual void finalize()
description
std::map< std::string, TH2F * >::iterator it2d_
std::map< std::string, TH2F * > _histos2d
Map storing the 2D histograms.
std::map< std::string, TH1F * >::iterator it1d_
virtual void initialize(std::string inFilename, std::string outFilename)
description
std::map< std::string, TH1F * > _histos1d
Map storing the 1D biases and resolutions.
std::vector< std::string > projections_
2D histos to project
virtual bool process()
description
std::vector< std::string > selections_
Selection folder.
void profileYwithIterativeGaussFit(TH2 *hist, TH1 *mu_graph, TH1 *sigma_graph, int num_bins=1, int m_PrintLevel=0)
description
void OpenProjectionFile()
description
void CloseProjectionFile()
description