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.9 by cgoetzma, Thu Dec 1 13:46:25 2011 UTC vs.
Revision 1.10 by cgoetzma, Wed Dec 7 18:31:52 2011 UTC

# Line 2 | Line 2
2   #include <sstream>
3   #include <TPaveText.h>
4   #include <TLatex.h>
5 + #include <iostream>
6 + using namespace std;
7  
8   void Layout::DrawInit()
9   {
# Line 125 | Line 127 | void Layout::Draw(const std::string titl
127      std::vector<double> errors;
128      for (unsigned int i=0;i<histos.size();i++)
129      {
130 <      TF1* fitter = new TF1(dummy().c_str(),"gaus",xmin,xmax);
130 >      TF1* fitter = new TF1(dummy().c_str(),"gaus",-900,900); //or xmin, xmax...
131        fitter->SetParameter(0,K);
132        fitter->SetParameter(1,MU);
133        fitter->SetParameter(2,SIG);
# Line 142 | Line 144 | void Layout::Draw(const std::string titl
144      {
145        std::stringstream str;
146        str << "#sigma_{" << histos[i].shortName <<"} = ";
147 <      str.precision(3); str << sigmas[i];
147 >      str.precision(2); str.setf(ios_base::scientific); str << sigmas[i];
148        str << " #pm ";
149 <      str.precision(3); str << errors[i];
149 >      str.precision(1); str.setf(ios_base::scientific); str << errors[i];
150        TText* mytext = myblock->AddText(str.str().c_str());
151        mytext->SetTextColor(histos[i].linecolor);
152        mytext->SetTextAlign(11);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines