ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/analysis/Layout.cpp
(Generate patch)

Comparing UserCode/IPHCalignment2/analysis/Layout.cpp (file contents):
Revision 1.1 by econte, Sun Nov 27 09:57:20 2011 UTC vs.
Revision 1.2 by econte, Sun Nov 27 11:11:48 2011 UTC

# Line 73 | Line 73 | void Layout::DrawInit()
73  
74   }
75  
76 struct HistoDescription
77 {
78  unsigned int linecolor;
79  std::string algoName;
80 };
81
82
76  
77   void Layout::Draw(const std::vector<HistoBlock>& histos,
78 <                  std::string& xlabel, float K, float MU, float SIG)
78 >                  const std::string& xlabel, float K, float MU, float SIG)
79   {
80    // safety
81    if (histos.empty()) return;
# Line 95 | Line 88 | void Layout::Draw(const std::vector<Hist
88    // SetLineColor
89    for (unsigned int i=0;i<histos.size();i++)
90    {
91 +    std::cout << "TEST : " << histos[i].linecolor << std::endl;
92      histos[i].histo->SetLineColor( histos[i].linecolor );
93    }
94  
# Line 125 | Line 119 | void Layout::Draw(const std::vector<Hist
119    // To Fit
120    for (unsigned int i=0;i<histos.size();i++)
121    {
122 <    TF1* fitter = new TF1(dummy().c_str(),dummy().c_str(),xmin,xmax);
122 >    TF1* fitter = new TF1(dummy().c_str(),"gaus",xmin,xmax);
123      fitter->SetParameter(0,K);
124      fitter->SetParameter(1,MU);
125      fitter->SetParameter(2,SIG);
126 <    histos[i].histo->Fit(fitter,"R+");
126 >    histos[i].histo->Fit(fitter,"0");
127    }
128  
129    // Save
130    std::string filename = GetFileName(histos[0].histo->GetTitle());
131    mycanvas->SaveAs((filename+".gif").c_str());
132 +  mycanvas->SaveAs((filename+".root").c_str());
133 +
134   }
135  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines