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

Comparing UserCode/Jeng/scripts/ikstest.cc (file contents):
Revision 1.2 by jengbou, Thu Sep 2 04:50:39 2010 UTC vs.
Revision 1.3 by jengbou, Thu Sep 2 05:36:21 2010 UTC

# Line 54 | Line 54 | vector<testMC> doKStest(Double_t NsS, Do
54      test -> Sumw2();
55      test -> Add(s1,s2,sf1,sf2);
56      //test->Scale(1./(1.*test->Integral()));
57 <    TString option = (!useInv && !realData) ? "N" : "";
58 <    Double_t probability = mixS -> KolmogorovTest(test,option);
57 >    Double_t probability = mixS -> KolmogorovTest(test,"");
58      testMC temp = testMC(probability,sf1,sf2);
59      output.push_back(temp);
60   //     cout << "probability = " << setw(15) << temp.prob
61   //       << "; sfQCD = "     << setw(10) << temp.scaleF_backg
62 < //       << "; sfWjets = "   << setw(6)  << temp.scaleF_sample << endl;
62 > //       << "; sfWjets = "   << setw(6)  << temp.scaleF_sample << endl;
63      delete test;
64      sf2 = sf2 + stepsize;
65    } while(sf1 > 0 && sf2 <= 2.0);
# Line 191 | Line 190 | void ikstest() {
190    double corr_Nevmix            = procQCD*corr_NevQCD+procWjets*corr_NevWjets;
191    //double corr_Nevmix            = procQCD*corr_NevQCD+procWjets*corr_NevWjets+procttjets*corr_Nevttjets;
192    if (!realData)
193 <    outprint << "Events mix sample = " << corr_Nevmix << endl;
193 >    outprint << "Events mix sample    = " << corr_Nevmix << endl;
194    else
195 <    outprint << "Events in Data = " << NevData << endl;
196 <  outprint << "Events QCD sample = " << corr_NevQCD << endl;
197 <  outprint << "Events Wjets sample = " << corr_NevWjets << endl;
198 <  outprint << "Events InvSel QCD sample = " << corr_NevQCD_NEW << endl;
195 >    outprint << "Events in Data       = " << NevData << endl;
196 >  outprint << "Events QCD sample    = " << corr_NevQCD << endl;
197 >  outprint << "Events Wjets sample  = " << corr_NevWjets << endl;
198 >  outprint << "Events InvSel sample = " << corr_NevQCD_NEW << endl;
199  
200    //define the containers for chosen numbers (coressponding to the max KStest result)
201    testMC maxProb[3];
# Line 248 | Line 247 | void ikstest() {
247    SFbackg = sumSFbackg/allKS;
248    SFsample = sumSFsample/allKS;
249    outprint << "allKS = " << allKS << "\tbackground = " << SFbackg << "\tsample = " << SFsample << endl;
250 <  outprint << "\tcombined percent_B of Data = "
250 >  outprint << "==> Scale Factor for QCD MC = " << SFbackg*corr_NevQCD_NEW/corr_NevQCD << endl;
251 >  outprint << "\tcombined percent_B of Data = "
252             << SFbackg*corr_NevQCD_NEW*100/(realData ? NevData : corr_Nevmix) << endl;
253 <  outprint << "\tcombined percent_S of Data = "
253 >  outprint << "\tcombined percent_S of Data = "
254             << SFsample*corr_NevWjets*100/(realData ? NevData : corr_Nevmix) << endl;
255    outprint << "\n" << endl;
256    outprint << "=================================" << endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines