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

Comparing UserCode/cbrown/Development/Plotting/Modules/ZbTools.C (file contents):
Revision 1.26 by buchmann, Mon Mar 18 16:05:04 2013 UTC vs.
Revision 1.28 by buchmann, Fri Apr 26 06:52:09 2013 UTC

# Line 88 | Line 88 | class ZbResultContainer {
88   public:
89    string name;  
90    vector<ZbPointResult> MPF_Rabs_location;
91 +  
92    Value MPF_Result_FaceValue;
93    Value Rabs_Result_FaceValue;
94    Value MPF_Result_Extrapolated;
95    Value Rabs_Result_Extrapolated;
96 +  
97 +  vector<Value> MPF_Result_FaceValue_Bins;
98 +  vector<Value> Rabs_Result_FaceValue_Bins;
99 +  vector<Value> MPF_Result_Extrapolated_Bins;
100 +  vector<Value> Rabs_Result_Extrapolated_Bins;
101 +  
102    void Print();
103    
104    ZbResultContainer(string name);
# Line 101 | Line 108 | public:
108   ZbResultContainer::ZbResultContainer(string _name) {
109    name=_name;
110    dout<< "Result Container for \"" << name << "\" has been initialized" << endl;
104  
111   }
112  
113   void ZbResultContainer::Print()
# Line 112 | Line 118 | void ZbResultContainer::Print()
118    dout << " Results: " << endl;
119    dout << "   Face Value: " << endl;
120    dout << "     MPF " << this->MPF_Result_FaceValue << endl;
121 +  dout << "        Bins: [ ";
122 +  if(MPF_Result_FaceValue_Bins.size()>0) {
123 +    for(int i=0;i<MPF_Result_FaceValue_Bins.size()-1;i++) dout << MPF_Result_FaceValue_Bins[i] << " , ";
124 +    if(MPF_Result_FaceValue_Bins.size()>0) dout << MPF_Result_FaceValue_Bins[MPF_Result_FaceValue_Bins.size()-1] << " ]" << endl;                                                                                                  
125 +  }
126 +  
127    dout << "     Rabs " << this->Rabs_Result_FaceValue << endl;
128 +  if(Rabs_Result_FaceValue_Bins.size()>0) {
129 +    dout << "        Bins: [ ";                                                                                                                                                    
130 +    for(int i=0;i<Rabs_Result_FaceValue_Bins.size()-1;i++) dout << Rabs_Result_FaceValue_Bins[i] << " , ";                                                                          
131 +    if(Rabs_Result_FaceValue_Bins.size()>0) dout << Rabs_Result_FaceValue_Bins[Rabs_Result_FaceValue_Bins.size()-1] << " ]" << endl;                                                                                                
132 +  }
133 +  
134    dout << "   Extrapolated: " << endl;
135    dout << "     MPF " << this->MPF_Result_Extrapolated << endl;
136 +  if(MPF_Result_Extrapolated_Bins.size()>0) {
137 +    dout << "        Bins: [ ";
138 +    for(int i=0;i<MPF_Result_Extrapolated_Bins.size()-1;i++) dout << MPF_Result_Extrapolated_Bins[i] << " , ";
139 +    if(MPF_Result_Extrapolated_Bins.size()>0) dout << MPF_Result_Extrapolated_Bins[MPF_Result_Extrapolated_Bins.size()-1] << " ]" << endl;
140 +  }
141 +  
142    dout << "             Rabs " << this->Rabs_Result_Extrapolated << endl;
143 +  if(Rabs_Result_Extrapolated_Bins.size()>0) {
144 +    dout << "        Bins: [ ";
145 +    for(int i=0;i<Rabs_Result_Extrapolated_Bins.size()-1;i++) dout << Rabs_Result_Extrapolated_Bins[i] << " , ";
146 +    if(Rabs_Result_Extrapolated_Bins.size()>0) dout << Rabs_Result_Extrapolated_Bins[Rabs_Result_Extrapolated_Bins.size()-1] << " ]" << endl;
147 +  }
148   }
149  
150  
# Line 369 | Line 398 | void DrawEvilCutFlow() {
398  
399   void draw_Zb_kin_vars() {
400    
401 <   draw_kin_variable("pt",ZplusBsel&&LeadingB&&EtaB&&PhiZcut&&TCut("pt>30&&pt<1000"),25,0,200,"Z p_{T}","Official/Zpt",0);
401 >   draw_kin_variable("pt",ZplusBsel&&LeadingB&&EtaB&&PhiZcut&&TCut("pt>30&&pt<1000"),25,0,200,"Z p_{T}","Official/Zpt",1);
402     draw_kin_variable("pt",ZplusBsel&&LeadingB&&EtaB&&PhiZcut&&TCut("pt>30&&pt<1000&&id1==0"),25,0,200,"Z p_{T}","Official/Zpt_ee",1);
403     draw_kin_variable("pt",ZplusBsel&&LeadingB&&EtaB&&PhiZcut&&TCut("pt>30&&pt<1000&&id1==1"),25,0,200,"Z p_{T}","Official/Zpt_mm",1);
404     draw_kin_variable("pt",ZplusBsel&&EtaB&&PhiZcut&&TCut("pt>30&&pt<1000"),25,0,200,"Z p_{T}","Official/Zpt__nonBtagged",1);
# Line 457 | Line 486 | void make_RooFit(string ContainerName, T
486    string saveasFinal = saveas + "_Fit";
487    fcan->cd() ; gPad->SetLeftMargin(0.15) ; frame->GetYaxis()->SetTitleOffset(1.4) ; frame2->Draw();
488    
489 <  if(h->GetName()=="hdata") DrawPrelim();
489 >  if(Contains(saveas,"_data")) DrawPrelim();
490    else DrawMCPrelim();
491  
492    CompleteSave(fcan, ContainerName+"/Fit/"+saveasFinal);
# Line 468 | Line 497 | void make_RooFit(string ContainerName, T
497    delete thePeak;
498   }
499  
500 + float bother=0.1;
501 + float bother2=1;
502   Value get_Zb_data_over_mc(string ContainerName, ZbResultContainer &res, string variable, string variable2, TCut cut, string saveas, float pt1, float pt2, float a1, float a2) {
472 //  write_warning(__FUNCTION__,"Debugging this function, therefore always returning 3.1415+/-1.010101"); return Value(3.1415,1.010101);
503    TCanvas *cn = new TCanvas("cn","cn");
504    string varname="MPF";
505    
506 +  if(a2<15.0/pt2 && a1>0) dout << "this bin ( " << a1 << " < alpha < " << a2 <<" and " << pt1 << " < p_{T}^{Z} < " << pt2 <<" ) is not expected to do a lot." << endl;
507 +  //note that "15.0" here is the subleading jet cut.
508 +  
509    bool DoFit=false;
510    bool UseFit=false;
511    bool DoRooFit=false;
# Line 481 | Line 514 | Value get_Zb_data_over_mc(string Contain
514    if(Contains(variable,"pfJetGood")) varname="R_{abs}";
515   //  TH1F *hdata  = allsamples.Draw("hdata",variable,1200,0,30, varname, "events",  cut,data,luminosity);
516   //  TH1F *hmc    = allsamples.Draw("hmc" , variable,1200,0,30, varname, "events", cut, mc,  luminosity);
517 <  TH1F *hdata, hmc;
517 >  TH1F *hdata, *hmc;
518    if(!DoRooFit) {
519      hdata = allsamples.Draw("hdata",variable,1200,ZbData::LowerHistoBoundary,ZbData::UpperHistoBoundary, varname, "events",  cut,data,luminosity); // making it more precise
520      hmc    = allsamples.Draw("hmc" , variable,1200,ZbData::LowerHistoBoundary,ZbData::UpperHistoBoundary, varname, "events", cut, mc,  luminosity); // making it more precise
521 +  } else {
522 +    hdata  = allsamples.Draw("hdata",variable,7200,0.0,6.0, varname, "events",  cut,data,luminosity); // making it more precise
523 +    hmc    = allsamples.Draw("hmc" , variable,7200,0.0,6.0, varname, "events", cut, mc,  luminosity); // making it more precise
524    }
525    
526    hmc->SetLineColor(kBlue);
# Line 510 | Line 546 | Value get_Zb_data_over_mc(string Contain
546      hmc->Fit(gaus_mc);
547    }
548    if(DoRooFit) {
549 <    hdata  = allsamples.Draw("hdata",variable,7200,0.0,6.0, varname, "events",  cut,data,luminosity); // making it more precise
514 <    hmc    = allsamples.Draw("hmc" , variable,7200,0.0,6.0, varname, "events", cut, mc,  luminosity); // making it more precise
549 >    
550        if(hdata->Integral()>10) {
551          make_RooFit(ContainerName, hdata, a, da, saveas+"_data");
552          make_RooFit(ContainerName, hmc, b, db, saveas+"_mc");
# Line 712 | Line 747 | ZbResultContainer new_data_mc_agreement_
747        RABS_Results[ia][ipt]=RABS_data_over_mc.getValue();
748        RABS_Errors[ia][ipt]=RABS_data_over_mc.getError();
749        
750 <      dout << "alpha cut at " << alphacuts[ia+1] << " and pt range " << ptcuts[ipt] << " , " << ptcuts[ipt+1] << " \t : \t" << specialcut.str() << " \t \t --> " << MPF_data_over_mc << " (MPF) " << RABS_data_over_mc << " (RABS)" << endl;
750 >      dout << "alpha in [" << alow << " , " << ahigh << " and pt range [" << ptcuts[ipt] << " , " << ptcuts[ipt+1] << "] \t : \t" << specialcut.str() << " \t \t --> " << MPF_data_over_mc << " (MPF) " << RABS_data_over_mc << " (RABS)" << endl;
751      }
752    }
753    
# Line 734 | Line 769 | ZbResultContainer new_data_mc_agreement_
769      dout << "Going to create histo for " << filename.str() << endl;
770      TGraphErrors *mpf_gr =new TGraphErrors();
771      TGraphErrors *rabs_gr =new TGraphErrors();
772 +    mpf_gr->SetName("MPF_Graph");
773 +    rabs_gr->SetName("Rabs_Graph");
774      
775      int rabs_counter=0;
776      int mpf_counter=0;
# Line 779 | Line 816 | ZbResultContainer new_data_mc_agreement_
816        mpf_gr->SetMarkerColor(kBlue);
817        mpf_gr->Draw("AP");
818        
819 <      TF1 *mpf_pol = new TF1("mpf_pol","[0]+[1]*x",ZbData::LowerHistoBoundary,ZbData::UpperHistoBoundary);
819 >      TF1 *mpf_pol = new TF1("mpf_pol","[0]+[1]*x",0.0,0.4);
820        
821 <      mpf_gr->Fit(mpf_pol,"E"); // better error estimation using MINOS (E), quiet (Q) and using loglikelihood method
821 >      mpf_gr->Fit(mpf_pol); // better error estimation using MINOS (E), quiet (Q) and using loglikelihood method
822 >      mpf_band = getBand(mpf_pol,"MPF_band");
823        mpf_gr->GetXaxis()->SetTitle("#alpha");
824        mpf_gr->GetXaxis()->CenterTitle();
825        mpf_gr->GetYaxis()->SetTitle("<MPF>_{data}/<MPF>_{mc}");
826        mpf_gr->GetYaxis()->CenterTitle();
827 <      //TF1 *mpf_pol=(TF1*)mpf_gr->GetFunction("pol1");
790 <      mpf_band = getBand(mpf_pol,"MPF_band");
827 >      mpf_band->SetMarkerSize(0);
828        mpf_pol->SetLineWidth(0);
829 +      mpf_pol->SetLineColor(mpf_band->GetFillColor());
830        TF1 *mpf_pol_complete = new TF1("mpf_pol_complete","[0]+[1]*x");
831        mpf_pol_complete->SetParameters(mpf_pol->GetParameters());
832 +      
833        mpf_pol_complete->SetLineWidth(1);
834        mpf_pol_complete->SetLineColor(kBlue);
835        
# Line 823 | Line 862 | ZbResultContainer new_data_mc_agreement_
862        
863        float mpf_a=mpf_pol->GetParameter(0);
864        float mpf_b=mpf_pol->GetParameter(1);
865 <      MPF_FinalGraph->SetPoint(ipt,0.5*(ptcuts[ipt]+ptcuts[ipt+1]),mpf_a);
866 <      MPF_FinalGraph->SetPointError(ipt,0,mpf_pol->GetParError(0));
865 >      MPF_FinalGraph->SetPoint(ipt,0.5*(ptcuts[ipt]+ptcuts[ipt+1]),mpf_pol->GetParameter(0));
866 >      MPF_FinalGraph->SetPointError(ipt,0,mpf_band->GetBinError(mpf_band->FindBin(0)));
867        
868        MPF_ExtraPolatedResults[ipt]=mpf_a;
869        
# Line 845 | Line 884 | ZbResultContainer new_data_mc_agreement_
884        
885        filename.str("");
886        
887 <      TF1 *rabs_pol = new TF1("rabs_pol","[0]+[1]*x",ZbData::LowerHistoBoundary,ZbData::UpperHistoBoundary);
887 >      TF1 *rabs_pol = new TF1("rabs_pol","[0]+[1]*x",0.0,0.4);
888 >      rabs_gr->Fit(rabs_pol,"E");
889 >      rabs_band = getBand(rabs_pol,"Rabs_band");
890 >      rabs_pol->SetLineColor(rabs_band->GetFillColor());
891        rabs_gr->SetMarkerStyle(21);
892        rabs_gr->SetMarkerColor(kRed);
893        rabs_gr->Draw("AP");
894        //rabs_gr->Fit("pol1","E");
895 <      rabs_gr->Fit(rabs_pol,"E");
854 <      rabs_band = getBand(rabs_pol,"Rabs_band");
895 >      rabs_band->SetMarkerSize(0);
896        
897        
898        rabs_gr->GetXaxis()->SetTitle("#alpha");
# Line 870 | Line 911 | ZbResultContainer new_data_mc_agreement_
911        //TPolyLine *rabs_fit_uncert = GetFitUncertaintyShape(rabs_gr, "pol1", min, max,0.0,0.4);
912        rabs_pol->SetLineColor(TColor::GetColor("#F99C9C"));
913        rabs_pol->SetFillColor(TColor::GetColor("#F99C9C"));
914 <      rabs_band->SetLineColor(TColor::GetColor("#F99C9C"));
914 > //      rabs_band->SetLineColor(TColor::GetColor("#F99C9C"));
915        rabs_band->SetFillColor(TColor::GetColor("#F99C9C"));
916        //rabs_fit_uncert->SetLineColor(TColor::GetColor("#F99C9C"));
917        //rabs_fit_uncert->SetFillColor(TColor::GetColor("#F99C9C"));
# Line 884 | Line 925 | ZbResultContainer new_data_mc_agreement_
925        
926        float rabs_a=rabs_pol->GetParameter(0);
927        float rabs_b=rabs_pol->GetParameter(1);
928 +      
929        RABS_FinalGraph->SetPoint(ipt,0.5*(ptcuts[ipt]+ptcuts[ipt+1]),rabs_a);
930 <      RABS_FinalGraph->SetPointError(ipt,0,rabs_pol->GetParError(0));
930 >      RABS_FinalGraph->SetPointError(ipt,0,rabs_band->GetBinError(rabs_band->FindBin(0)));
931        
932 <      dout << "!+!+!+!+!+!+!+!+!+ Just added a point to the final plot : " << rabs_a << " +/- " << rabs_pol->GetParError(0) << endl;
932 >      dout << "!+!+!+!+!+!+!+!+!+ Just added a point to the final plot : " << rabs_a << " +/- " << rabs_band->GetBinError(rabs_band->FindBin(0)) << endl;
933        
934        stringstream rabs_info;
935        rabs_info << "#splitline{#splitline{#splitline{" << ptcuts[ipt] << " GeV < p_{T}^{Z} < " << ptcuts[ipt+1] << " GeV }{ (R_{abs}) }}{Extrapolated value: " << std::setprecision(4) << rabs_a << "}}{#chi^{2}/NDF : " << rabs_pol->GetChisquare() << " / " << rabs_pol->GetNDF() << "}";
# Line 902 | Line 944 | ZbResultContainer new_data_mc_agreement_
944        DrawPrelim();
945        CompleteSave(can,ContainerName+"/"+filename.str());
946        dout << "RABS : " << rabs_a << " + " << rabs_b << " * alpha " << endl;
947 +      
948 +      delete mpf_band;
949 +      delete rabs_band;
950      }
951    }
952    
# Line 1045 | Line 1090 | ZbResultContainer new_data_mc_agreement_
1090    
1091    delete can;
1092    
1093 +  
1094 +  
1095 +  for(unsigned int i=0;i<MPF_FinalGraph->GetN();i++) {
1096 +    double x,y,dy;
1097 +    MPF_FinalGraph->GetPoint(i,x,y);
1098 +    dy = MPF_FinalGraph->GetErrorY(i);
1099 +    results.MPF_Result_Extrapolated_Bins.push_back(Value(y,dy));
1100 +  }
1101 +  
1102 +  for(unsigned int i=0;i<MPF_FaceValueAtPoint3->GetN();i++) {
1103 +    double x,y,dy;
1104 +    MPF_FaceValueAtPoint3->GetPoint(i,x,y);
1105 +    dy = MPF_FaceValueAtPoint3->GetErrorY(i);
1106 +    results.MPF_Result_FaceValue_Bins.push_back(Value(y,dy));
1107 +  }
1108 +
1109 +  for(unsigned int i=0;i<RABS_FinalGraph->GetN();i++) {
1110 +    double x,y,dy;
1111 +    RABS_FinalGraph->GetPoint(i,x,y);
1112 +    dy = RABS_FinalGraph->GetErrorY(i);
1113 +    results.Rabs_Result_Extrapolated_Bins.push_back(Value(y,dy));
1114 +  }
1115 +  
1116 +  for(unsigned int i=0;i<RABS_FaceValueAtPoint3->GetN();i++) {
1117 +    double x,y,dy;
1118 +    RABS_FaceValueAtPoint3->GetPoint(i,x,y);
1119 +    dy = RABS_FaceValueAtPoint3->GetErrorY(i);
1120 +    results.Rabs_Result_FaceValue_Bins.push_back(Value(y,dy));
1121 +  }
1122 +  
1123 +  
1124    results.MPF_Result_FaceValue=Value(FaceValResult,FaceValResultError);
1125    results.Rabs_Result_FaceValue=Value(RABSFaceValResult,RABSFaceValResultError);
1126    if(!gofast) results.MPF_Result_Extrapolated=Value(MPFResult,MPFResultError);
# Line 1549 | Line 1625 | void MetSpectrumDepletionIllustration(in
1625    CleanLegends();
1626   }
1627      
1628 + string PrintVector(vector<float> Systematics) {
1629 +  stringstream fullanswer;
1630 +  fullanswer << " [ ";
1631 +  if(Systematics.size()>0) fullanswer << Systematics[0];
1632 +  for(unsigned int is=1;is<Systematics.size();is++) fullanswer << " , " << Systematics[is];
1633 +  fullanswer << " ] ";
1634 +  return fullanswer.str();
1635 + }
1636 +  
1637 +    
1638   void do_basic_ZB_analysis(bool DoCompleteAnalysis) {
1639    STDWEIGHT=TCut(cutWeight);
1640    cutWeight=TCut(STDWEIGHT*TCut("ZbCHS3010_BTagWgtT"));
# Line 1626 | Line 1712 | void do_basic_ZB_analysis(bool DoComplet
1712      ZbResultContainer AlphaThresholdVariationUp10inc =   new_data_mc_agreement_2d(fast,"ZbCHS3010_alpha","AlphaThresholdVariationUp10inc",  TCut("mll>0"),                              TCut("1.0"),0.3+0.1*0.3);
1713      ZbResultContainer AlphaThresholdVariationDown30inc = new_data_mc_agreement_2d(fast,"ZbCHS3010_alpha","AlphaThresholdVariationDown30inc",TCut("mll>0"),                              TCut("1.0"),0.3-0.3*0.3);
1714      ZbResultContainer AlphaThresholdVariationUp30inc =   new_data_mc_agreement_2d(fast,"ZbCHS3010_alpha","AlphaThresholdVariationUp30inc",  TCut("mll>0"),                              TCut("1.0"),0.3+0.3*0.3);
1715 +    
1716 +    
1717 +    ZbResultContainer OnlyOneJet   = new_data_mc_agreement_2d(slow,"ZbCHS3010_alpha","reference",TCut("ZbCHS3010_bTagProbCSVBP[0]>0.898&&ZbCHS3010_pfJetGoodNum==1"),TCut("ZbCHS3010_BTagWgtT"),0.3);
1718 +    ZbResultContainer MultipleJets = new_data_mc_agreement_2d(slow,"ZbCHS3010_alpha","reference",TCut("ZbCHS3010_bTagProbCSVBP[0]>0.898&&ZbCHS3010_pfJetGoodNum>1"),TCut("ZbCHS3010_BTagWgtT"),0.3);
1719 +
1720 +    ZbResultContainer OnlyOneJetinc   = new_data_mc_agreement_2d(slow,"ZbCHS3010_alpha","reference",TCut("ZbCHS3010_pfJetGoodNum==1"),TCut("1.0"),0.3);
1721 +    ZbResultContainer MultipleJetsinc = new_data_mc_agreement_2d(slow,"ZbCHS3010_alpha","reference",TCut("ZbCHS3010_pfJetGoodNum>1"),TCut("1.0"),0.3);
1722  
1723      //and now let's compute some systematics!
1724      //1 alpha variation
1725      float SysMPF_Alpha_down = Reference.MPF_Result_FaceValue.getValue()-AlphaDown.MPF_Result_FaceValue.getValue();
1726      float SysMPF_Alpha_up = Reference.MPF_Result_FaceValue.getValue()-AlphaUp.MPF_Result_FaceValue.getValue();
1727      
1728 +    vector<float> SysMPF_Alpha_down_Bins;
1729 +    vector<float> SysMPF_Alpha_up_Bins;
1730 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_Alpha_down_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-AlphaDown.MPF_Result_FaceValue_Bins[iFV].getValue());
1731 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_Alpha_up_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-AlphaUp.MPF_Result_FaceValue_Bins[iFV].getValue());
1732 +    
1733 +    
1734      //2 btagging efficiency/mistag correction
1735      float SysMPF_EFF_down = Reference.MPF_Result_FaceValue.getValue()-effmistagDown.MPF_Result_FaceValue.getValue();
1736      float SysMPF_EFF_up = Reference.MPF_Result_FaceValue.getValue()-effmistagUp.MPF_Result_FaceValue.getValue();
1737      
1738 +    vector<float> SysMPF_EFF_down_Bins;
1739 +    vector<float> SysMPF_EFF_up_Bins;
1740 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_EFF_down_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-effmistagDown.MPF_Result_FaceValue_Bins[iFV].getValue());
1741 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_EFF_up_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-effmistagUp.MPF_Result_FaceValue_Bins[iFV].getValue());
1742 +    
1743      //3 Presence of soft muons (->neutrino question)
1744      float SysMPF_Neutrino_up = Reference.MPF_Result_FaceValue.getValue()-NeutrinoQ.MPF_Result_FaceValue.getValue();
1745      float SysMPF_Neutrino_down = Reference.MPF_Result_FaceValue.getValue()-ANeutrinoQ.MPF_Result_FaceValue.getValue();
1746      
1747 +    vector<float> SysMPF_Neutrino_up_Bins;
1748 +    vector<float> SysMPF_Neutrino_down_Bins;
1749 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_Neutrino_up_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-NeutrinoQ.MPF_Result_FaceValue_Bins[iFV].getValue());
1750 +    for(unsigned int iFV=0;iFV<Reference.MPF_Result_FaceValue_Bins.size();iFV++) SysMPF_Neutrino_down_Bins.push_back(Reference.MPF_Result_FaceValue_Bins[iFV].getValue()-ANeutrinoQ.MPF_Result_FaceValue_Bins[iFV].getValue());
1751 +    
1752 +    
1753      //4 purity
1754      zbcanvas->cd();
1755      gStyle->SetOptFit(0);
# Line 1702 | Line 1812 | void do_basic_ZB_analysis(bool DoComplet
1812      
1813      CompleteSave(zbcanvas,"Systematics/Purity");
1814      
1815 +    dout << "Bin-by-bin systematics : " << endl;
1816 +    dout << "    Oversmearing : " << endl;
1817 +    dout << "      down: " << PrintVector(SysMPF_Alpha_down_Bins) << endl;
1818 +    dout << "      up  : " << PrintVector(SysMPF_Alpha_up_Bins) << endl;
1819 +    dout << "    eff/mistag variation: " << endl;
1820 +    dout << "      down: " << PrintVector(SysMPF_EFF_down_Bins) << endl;
1821 +    dout << "      up  : " << PrintVector(SysMPF_EFF_up_Bins) << endl;
1822 +    dout << "    neutrinos: " << endl;
1823 +    dout << "      down: " << PrintVector(SysMPF_Neutrino_down_Bins) << endl;
1824 +    dout << "      up  : " << PrintVector(SysMPF_Neutrino_up_Bins) << endl;
1825      
1826  
1827      float SysMPF_Purity = abs(ExtrapolatedResult-Reference.MPF_Result_FaceValue.getValue());
# Line 1746 | Line 1866 | void do_basic_ZB_analysis(bool DoComplet
1866      dout << "             +30%: " << AlphaThresholdVariationUp30.Rabs_Result_FaceValue/AlphaThresholdVariationUp30inc.Rabs_Result_FaceValue << " (stat)" << endl;
1867  
1868      
1869 +    dout << "  Also checked what happens when you only use events with one jet and only with more than one jets: " << endl;
1870 +    dout << "      Only 1      : " << OnlyOneJet.MPF_Result_FaceValue/OnlyOneJetinc.MPF_Result_FaceValue << " (stat) " << endl;
1871 +    dout << "      More than 1 : " << MultipleJets.MPF_Result_FaceValue/MultipleJetsinc.MPF_Result_FaceValue << " (stat) " << endl;
1872 +    
1873      float sys_alphavar_up   = abs(AlphaThresholdVariationUp30.MPF_Result_FaceValue.getValue()/AlphaThresholdVariationUp30inc.MPF_Result_FaceValue.getValue() - Reference.MPF_Result_FaceValue.getValue()/inclusive.MPF_Result_FaceValue.getValue());
1874      float sys_alphavar_down = abs(AlphaThresholdVariationDown30.MPF_Result_FaceValue.getValue()/AlphaThresholdVariationDown30inc.MPF_Result_FaceValue.getValue() - Reference.MPF_Result_FaceValue.getValue()/inclusive.MPF_Result_FaceValue.getValue());
1875      float sys_alphavar = sys_alphavar_up>sys_alphavar_down?sys_alphavar_up:sys_alphavar_down;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines