ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/Plotting_Functions.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/Plotting_Functions.C (file contents):
Revision 1.17 by buchmann, Thu May 17 19:56:51 2012 UTC vs.
Revision 1.18 by buchmann, Tue May 22 16:28:11 2012 UTC

# Line 1093 | Line 1093 | void do_prediction_plot(string jzb, TCan
1093      Bpred->Draw("hist,same");
1094      RcorrJZBeemm->Draw("e1x0,same");//HAVE IT ON TOP!
1095      legBpred->AddEntry(RcorrJZBeemm,"MC true","p");
1096 <    legBpred->AddEntry(Bpred,"MC predicted","l");
1096 >    legBpred->AddEntry(Bpred,"MC predicted","l");    
1097      if(versok) legBpred->AddEntry((TObject*)0,"",""); // Just for alignment // causes seg fault on root v5.18
1098      if(versok) legBpred->AddEntry((TObject*)0,"",""); // causes seg fault on root v5.18
1099      if ( overlay_signal ) legBpred->AddEntry(lm4RcorrJZBeemm,"LM4","l");
# Line 2072 | Line 2072 | void find_correction_factors(string &jzb
2072    cancorr->SetRightMargin(0.13);
2073    flag_this_change(__FUNCTION__,__LINE__,true);//PlottingSetup::RestrictToMassPeak
2074    TCut zptforresponsepresentation("pt<600"&&cutmass&&cutOSSF&&"((sumJetPt[1]/pt)<5.0)");
2075 +  if(PlottingSetup::DoBTag) zptforresponsepresentation=zptforresponsepresentation&&PlottingSetup::bTagRequirement;
2076    TH2F *niceresponseplotd = new TH2F("niceresponseplotd","",100,0,600,100,0,5);
2077    (allsamples.collection)[allsamples.FindSample("Data")[0]].events->Draw("sumJetPt[1]/pt:pt>>niceresponseplotd",zptforresponsepresentation);
2078    niceresponseplotd->SetStats(0);
# Line 2082 | Line 2083 | void find_correction_factors(string &jzb
2083    niceresponseplotd->Draw("COLZ");
2084    TProfile * profd = (TProfile*)niceresponseplotd->ProfileX();
2085    profd->SetMarkerSize(DataMarkerSize);
2086 <  profd->Fit("pol0","","same,e1",30,400);
2086 >  profd->Fit("pol0","","same,e1",100,400);
2087    DrawPrelim();
2088    TText* title = write_text(0.5,0.7,"Data");
2089    title->SetTextAlign(12);
# Line 2108 | Line 2109 | void find_correction_factors(string &jzb
2109    (allsamples.collection)[allsamples.FindSample("DY")[0]].events->Draw("sumJetPt[1]/pt:pt",zptforresponsepresentation,"PROF,same");
2110    TProfile * profm = (TProfile*)niceresponseplotm->ProfileX();
2111    profm->SetMarkerSize(DataMarkerSize);
2112 <  profm->Fit("pol0","","same,e1",30,400);
2112 >  profm->Fit("pol0","","same,e1",100,400);
2113    DrawMCPrelim();
2114    title = write_text(0.5,0.7,"MC simulation");
2115    title->SetTextAlign(12);
# Line 2144 | Line 2145 | void pick_up_events(string cut) {
2145    allsamples.PickUpEvents(cut);
2146   }
2147  
2148 < void save_template(string mcjzb, string datajzb,vector<float> jzb_cuts,float MCPeakError,float DataPeakError) {
2148 > void save_template(string mcjzb, string datajzb,vector<float> jzb_cuts,float MCPeakError,float DataPeakError, vector<float> jzb_shape_limit_bins) {
2149    dout << "Saving configuration template!" << endl;
2150    ofstream configfile;
2151    configfile.open("../DistributedModelCalculations/last_configuration.C");
# Line 2164 | Line 2165 | void save_template(string mcjzb, string
2165    configfile<<"string datajzb=\"datajzb_ERROR\";\n";
2166    configfile<<"string mcjzb=\"mcjzb_ERROR\";\n";
2167    configfile<<"vector<float>jzb_cuts;\n";
2168 +  configfile<<"vector<float>jzb_shape_limit_bins;\n";
2169    configfile<<"float MCPeakError=-999;\n";
2170    configfile<<"float DataPeakError=-999;\n";
2171    configfile<<"}\n\n";
# Line 2181 | Line 2183 | void save_template(string mcjzb, string
2183    configfile<<"\n\n";
2184    for(int i=0;i<(int)flippedNobs.size();i++) configfile<<"flippedNobs.push_back("<<flippedNobs[i]<<"); // JZB cut at " << jzb_cuts[i] << "\n";
2185    for(int i=0;i<(int)flippedNpred.size();i++) configfile<<"flippedNpred.push_back("<<flippedNpred[i]<<"); // JZB cut at " << jzb_cuts[i] << "\n";
2186 <  for(int i=0;i<(int)flippedNprederr.size();i++) configfile<<"flippedNprederr.push_back("<<flippedNprederr[i]<<"); // JZB cut at " << jzb_cuts[i] << "\n";
2186 >  for(int i=0;i<(int)flippedNprederr.size();i++) configfile<<"flippedNprederr.push_back("<<flippedNprederr[i]<<"); // JZB cut at " << jzb_cuts[i] << "\n\n";
2187 >  for(int i=0;i<(int)jzb_shape_limit_bins.size();i++) configfile<<"jzb_shape_limit_bins.push_back("<<jzb_shape_limit_bins[i]<<"); // JZB shape bin boundary at " << jzb_shape_limit_bins[i] << "\n";
2188 >  configfile<<"\n\n";
2189    configfile<<"\n\n";
2190    configfile<<"luminosity="<<luminosity<<";\n";
2191    configfile<<"RestrictToMassPeak="<<RestrictToMassPeak<<";//defines the type of analysis we're running\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines