CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ZeeRescaleFactorPlots.cc
Go to the documentation of this file.
1 
3 
19 #include "TFile.h"
20 #include "TH1.h"
21 #include "TH2.h"
22 #include "TF1.h"
23 #include "TRandom.h"
24 
25 #include <iostream>
26 #include <string>
27 #include <stdexcept>
28 #include <vector>
29 
31 
34  file_ = new TFile(fileName_, "RECREATE");
35 }
36 
38  file_->Close();
39 
40  delete file_;
41 }
42 
43 //========================================================================
44 
46  file_->cd();
47 
49 
50  for (int iIteration = 0; iIteration < theAlgorithm_->getNumberOfIterations(); iIteration++)
51  for (int iChannel = 0; iChannel < theAlgorithm_->getNumberOfChannels(); iChannel++) {
52  if (iChannel % 20 == 0) {
53  file_->cd();
54 
55  algoHistos->weightedRescaleFactor[iIteration][iChannel]->Write();
56  algoHistos->unweightedRescaleFactor[iIteration][iChannel]->Write();
57  algoHistos->weight[iIteration][iChannel]->Write();
58  }
59  }
60 }
const ZIterativeAlgorithmWithFitPlots * getHistos() const
void writeHistograms(ZIterativeAlgorithmWithFit *)