ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/scripts/fitRelIso_Data.C
(Generate patch)

Comparing UserCode/Jeng/scripts/fitRelIso_Data.C (file contents):
Revision 1.1 by jengbou, Thu Jun 24 02:16:25 2010 UTC vs.
Revision 1.2 by jengbou, Thu Jun 24 02:35:14 2010 UTC

# Line 27 | Line 27 | double sf_mc = 1.;
27   // Dynamic(true) or static(false) range
28   bool dynamic      = true;
29   TString isoname   = "New";
30 < TString s0        = "fuser";
30 > TString s0        = "fuser";//fuser,Landau,gauss
31   TString fitOpt    = "QLM0";
32   bool debug        = true;
33   double yMax       = 0.;
# Line 110 | Line 110 | void fitRelIso_Data()
110  
111    // Output file
112    TString outFile = "Plots/20100623/QCD_data_LandauFit_3_";
113 < //   TString outFile = "Plots/20100623/QCD_data_GaussFit_3_";
113 >  //  TString outFile = "Plots/20100623/QCD_data_GaussFit_3_";
114    ofstream outTxtFile;
115    outTxtFile.open(TString(outFile+"Results.txt"));
116  
# Line 650 | Line 650 | void fitRelIso_Data()
650        tps1 = (TPaveStats*) cvs[TString("cv"+suffix2.str())]->GetPrimitive("stats");
651      }
652  
653 <    tps1->SetName(TString("Landau fit"+suffix2.str()));
654 <
653 >    tps1->SetName(TString(s0+" fit"+suffix2.str()));
654  
655      TList *list = tps1->GetListOfLines();
656      //   TText *tconst = tps1->GetLineWith("Constant");
657      //   list->Remove(tconst);
658 <    TLatex *myt = new TLatex(0,0,"Landau Fit");
658 >    TString mytxt;
659 >    if (isoname == "New") mytxt = "Landau Fit";
660 >    if (isoname == "Old") mytxt = "Gaussian Fit";
661 >    TLatex *myt = new TLatex(0,0,mytxt);
662      //TLatex *myt = new TLatex(0,0,"#font[22]{Landau Fit}");
663      list->AddFirst(myt);
664      hs["data_all_clone"]->SetStats(0);
# Line 755 | Line 757 | void fitRelIso_Data()
757  
758      cvs[TString("cv1"+suffix2.str())] = new TCanvas(TString("cv1"+suffix2.str()),TString("cv1"+suffix2.str()),600,600);
759      cvs[TString("cv1"+suffix2.str())]->cd();
760 <    if (isoname == "New")
760 >    if (isoname == "New") {
761        hs["data_tmp_clone"]->GetXaxis()->SetRangeUser(0.,0.1);
762 +      hs["data_tmp_clone"]->GetYaxis()->SetRangeUser(0.,yMax);
763 +    }
764      if (isoname == "Old")
765        hs["data_tmp_clone"]->GetXaxis()->SetRangeUser(0.9,axf);
762    hs["data_tmp_clone"]->GetYaxis()->SetRangeUser(0.,yMax);
766      hs["data_tmp_clone"]->Draw("e");
767      hst[TString("Data"+suffix2.str())]->Draw("sames hist");
768      hs["data_tmp_clone"]->Draw("esame");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines