55 |
|
if(gaus->Integral(0,currentpoint)>((points.size()+1.0)/(npoints+2.0))) { |
56 |
|
if(Verbosity>0) dout << "Added points for calculation at " << currentpoint << " (integral is " << gaus->Integral(0,currentpoint) << ")" << endl; |
57 |
|
points.push_back(currentpoint); |
58 |
< |
if(points.size()==npoints) break; |
58 |
> |
if((int)points.size()==npoints) break; |
59 |
|
} |
60 |
|
currentpoint+=stepsize; |
61 |
|
} |
352 |
|
mbinning.push_back(-8000); |
353 |
|
for(int i=binning.size()-1;i>=0;i--) mbinning.push_back(-binning[i]); |
354 |
|
mbinning.push_back(0); |
355 |
< |
for(int i=0;i<binning.size();i++) mbinning.push_back(binning[i]); |
355 |
> |
for(int i=0;i<(int)binning.size();i++) mbinning.push_back(binning[i]); |
356 |
|
mbinning.push_back(8000); |
357 |
|
|
358 |
|
|
467 |
|
TH2F *SBOSSFN2d; |
468 |
|
TH2F *SBOSOFN2d; |
469 |
|
|
470 |
< |
if(PlottingSetup::RestrictToMassPeak&&!PlottingSetup::FullMCAnalysis) { |
470 |
> |
if(PlottingSetup::RestrictToMassPeak&&!PlottingSetup::FullMCAnalysis&&PlottingSetup::UseSidebandsForcJZB) { |
471 |
|
SBOSSFP = QuickDraw(signalevents,"SBOSSFP",mcjzb,binning, "JZB", "events",cutOSSF&&limitnJetcut&&basiccut&&sidebandcut,addcut,mc,luminosity,xsec); |
472 |
|
SBOSOFP = QuickDraw(signalevents,"SBOSOFP",mcjzb,binning, "JZB", "events",cutOSOF&&limitnJetcut&&basiccut&&sidebandcut,addcut,mc,luminosity,xsec); |
473 |
|
SBOSSFN = QuickDraw(signalevents,"SBOSSFN","-"+mcjzb,binning, "JZB", "events",cutOSSF&&limitnJetcut&&basiccut&&sidebandcut,addcut,mc,luminosity,xsec); |
508 |
|
dout << " OSSF JZB> 0 : " << ZOSSFP->Integral() << " JZB < 0 :" << ZOSSFN->Integral() << endl; |
509 |
|
dout << " OSOF JZB> 0 : " << ZOSOFP->Integral() << " JZB < 0 :" << ZOSOFN->Integral() << endl; |
510 |
|
|
511 |
< |
if(PlottingSetup::RestrictToMassPeak&&!PlottingSetup::FullMCAnalysis) { |
511 |
> |
if(PlottingSetup::RestrictToMassPeak&&!PlottingSetup::FullMCAnalysis&&PlottingSetup::UseSidebandsForcJZB) { |
512 |
|
dout << " OSSF SB JZB> 0 : " << SBOSSFP->Integral() << " JZB < 0 :" << SBOSSFN->Integral() << endl; |
513 |
|
dout << " OSOF SB JZB> 0 : " << SBOSOFP->Integral() << " JZB < 0 :" << SBOSOFN->Integral() << endl; |
514 |
|
} |
523 |
|
} |
524 |
|
|
525 |
|
if(!PlottingSetup::FullMCAnalysis) { |
526 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
526 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
527 |
|
Lpred->Add(ZOSOFP,1.0/3); |
528 |
|
Lpred->Add(ZOSOFN,-1.0/3); |
529 |
|
Lpred->Add(SBOSSFP,1.0/3); |
685 |
|
delete ZOSSFN; |
686 |
|
delete ZOSOFN; |
687 |
|
|
688 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
688 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
689 |
|
delete SBOSSFP; |
690 |
|
delete SBOSOFP; |
691 |
|
delete SBOSSFN; |
711 |
|
TH1F *SBOSSFN; |
712 |
|
TH1F *SBOSOFN; |
713 |
|
|
714 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
714 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
715 |
|
SBOSSFP = allsamples.Draw("SBOSSFP",datajzb,binning, "JZB", "events",cutOSSF&&limitnJetcut&&basiccut&&sidebandcut,data,luminosity); |
716 |
|
SBOSOFP = allsamples.Draw("SBOSOFP",datajzb,binning, "JZB", "events",cutOSOF&&limitnJetcut&&basiccut&&sidebandcut,data,luminosity); |
717 |
|
SBOSSFN = allsamples.Draw("SBOSSFN","-"+datajzb,binning, "JZB", "events",cutOSSF&&limitnJetcut&&basiccut&&sidebandcut,data,luminosity); |
746 |
|
TH1F *flippedZpred = (TH1F*)ZOSSFP->Clone("flipped_ZJetsprediction"); |
747 |
|
|
748 |
|
TH1F *flippedpred = (TH1F*)ZOSSFP->Clone("flipped_prediction"); |
749 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
749 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
750 |
|
pred->Add(ZOSOFP,1.0/3); |
751 |
|
pred->Add(ZOSOFN,-1.0/3); |
752 |
|
pred->Add(SBOSSFP,1.0/3); |
817 |
|
if(identifier=="") { |
818 |
|
float stretchfactor=1.0; |
819 |
|
bool isonpeak=false; |
820 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
820 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
821 |
|
stretchfactor=1.0/3.0; |
822 |
|
isonpeak=true; |
823 |
|
} |
1056 |
|
delete ZOSSFN; |
1057 |
|
delete ZOSOFN; |
1058 |
|
|
1059 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
1059 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
1060 |
|
delete SBOSSFP; |
1061 |
|
delete SBOSOFP; |
1062 |
|
delete SBOSSFN; |
1110 |
|
RealScript << "time for i in {"; |
1111 |
|
RealScript << epoints[0]/4 << ","; // adding a VERY VERY low point just to be totally safe |
1112 |
|
RealScript << epoints[0]/2 << ","; // adding a VERY low point just to be safe |
1113 |
< |
for(int i=0;i<epoints.size();i++) RealScript << epoints[i] << ","; |
1113 |
> |
for(int i=0;i<(int)epoints.size();i++) RealScript << epoints[i] << ","; |
1114 |
|
RealScript << 2*epoints[epoints.size()-1] << ","; // adding a VERY high point just to be safe |
1115 |
|
RealScript << 4*epoints[epoints.size()-1]; // adding a VERY VERY high point just to be totally safe |
1116 |
|
RealScript << "}; do \n"; |