46 |
|
float StackMax=CollapseStack(stack)->GetMaximum(); |
47 |
|
if(StackMax>hdata->GetMaximum()) hdata->SetMaximum(1.2*StackMax); |
48 |
|
hdata->Draw("e1"); |
49 |
< |
stack.Draw("same"); |
49 |
> |
stack.Draw("histo,same"); |
50 |
|
hdata->Draw("e1,same"); |
51 |
|
|
52 |
|
TLegend *kinleg = allsamples.allbglegend(); |
254 |
|
dout << "RATIO : SF / OF = " << sfdata->Integral() / ofdata->Integral() << " +/- " << (sfdata->Integral()/ofdata->Integral()) * TMath::Sqrt(1/sfdata->Integral()+1/ofdata->Integral()) << " (stat) " << endl; |
255 |
|
|
256 |
|
TriLeptons::Rsfof_CorrectionFactor=ofwz->Integral() / sfwz->Integral(); |
257 |
< |
TriLeptons::Rsfof_CorrectionFactor_Error=(ofwz->Integral()/sfwz->Integral()) * TMath::Sqrt(1/sfwz->Integral()+1/ofwz->Integral()); |
257 |
> |
TriLeptons::Rsfof_CorrectionFactor_Error=(ofwz->Integral()/sfwz->Integral()) * TMath::Sqrt(1/sfwz->GetEntries()+1/ofwz->GetEntries()); |
258 |
|
|
259 |
|
} |
260 |
|
|
462 |
|
|
463 |
|
delete can; |
464 |
|
|
465 |
< |
dout << "SF events: " << sfwz->Integral() << " (pure: " << sfwzpure->Integral() << ")" << endl; |
466 |
< |
dout << "OF events: " << ofwz->Integral() << " (pure: " << ofwzpure->Integral() << ")" << endl; |
465 |
> |
dout << "SF WZ events: " << sfwz->Integral() << " (correctly combined WZ: " << sfwzpure->Integral() << ")" << endl; |
466 |
> |
dout << "OF WZ events: " << ofwz->Integral() << " (correctly combined WZ: " << ofwzpure->Integral() << ")" << endl; |
467 |
|
|
468 |
|
dout << "RATIO : SF / OF = " << sfwz->Integral() / ofwz->Integral() << " +/- " << sfwz->Integral()/ofwz->Integral() * sqrt(1/sfwz->GetEntries() + 1/ofwz->GetEntries()) << endl; |
469 |
|
dout << " PURE: SF / OF = " << sfwzpure->Integral() / ofwzpure->Integral() << " +/- " << sfwzpure->Integral()/ofwzpure->Integral() * sqrt(1/sfwzpure->GetEntries() + 1/ofwzpure->GetEntries()) << endl; |
494 |
|
dout << "SF events: " << sfwz->Integral() << " +/- " << sqrt(sfwz->Integral()) << endl; |
495 |
|
dout << "OF events: " << ofwz->Integral() << " +/- " << sqrt(ofwz->Integral()) << endl; |
496 |
|
|
497 |
+ |
dout << "Correction factor : " << TriLeptons::Rsfof_CorrectionFactor << " +/- " << TriLeptons::Rsfof_CorrectionFactor_Error << endl; |
498 |
+ |
|
499 |
|
float rawstatuncert=sfwz->Integral()/ofwz->Integral() * sqrt(1/sfwz->GetEntries() + 1/ofwz->GetEntries()); |
500 |
|
float rawresult=sfwz->Integral() / ofwz->Integral(); |
501 |
|
dout << "UNCORRECTED RATIO : SF / OF = " << rawresult << " +/- " << rawstatuncert << endl; |
574 |
|
TH1F *data_OF_OFZ = allsamples.Draw("data_OFZ" ,"tri_badsubmll",1,0.0,1000.0,"m_{l_{2}l_{3}} [GeV]", "events", FlavorBlindSelection&&OFZ ,data,luminosity); |
575 |
|
TH1F *data_OF_any = allsamples.Draw("data_OF_any" ,"tri_badsubmll",1,0.0,1000.0,"m_{l_{2}l_{3}} [GeV]", "events", FlavorBlindSelection ,data,luminosity); |
576 |
|
|
577 |
< |
dout << "Miscombination rate in WZ sample with selection in place : " << 100 * WZ_OF_OFZ->Integral() / WZ_OF_any->Integral() << " % (" << WZ_OF_OFZ->Integral() << " / " << WZ_OF_any->Integral() << ")" << endl; |
578 |
< |
dout << "Miscombination rate in DATA with selection in place : " << 100 * data_OF_OFZ->Integral() / data_OF_any->Integral() << " % (" << data_OF_OFZ->Integral() << " / " << data_OF_any->Integral() << ")" << endl; |
577 |
> |
dout << "Miscombination rate in WZ sample with selection in place : " << 100 * WZ_OF_OFZ->Integral() / WZ_OF_any->Integral() << " +/- " << 100*(WZ_OF_OFZ->Integral() / WZ_OF_any->Integral())* sqrt( 1.0/WZ_OF_OFZ->GetEntries() + 1.0/WZ_OF_any->GetEntries())<< " % (" << WZ_OF_OFZ->Integral() << " / " << WZ_OF_any->Integral() << ")" << endl; |
578 |
> |
dout << "Miscombination rate in DATA with selection in place : " << 100 * data_OF_OFZ->Integral() / data_OF_any->Integral() << " +/- " << 100*(data_OF_OFZ->Integral() / data_OF_any->Integral()) * sqrt( 1.0/data_OF_OFZ->Integral() + 1.0/data_OF_any->Integral() ) << " % (" << data_OF_OFZ->Integral() << " / " << data_OF_any->Integral() << ")" << endl; |
579 |
|
|
580 |
|
delete WZ_OF_any; |
581 |
|
delete WZ_OF_OFZ; |
645 |
|
void CarryOutWZStudy() { |
646 |
|
TCut BasicCut("leptonNum>2&&tri_pt1>30&&tri_pt2>20&&tri_pt3>20"); |
647 |
|
TCut Selection("abs(tri_mlll-91)>30 && tri_mT>40 && met[4] > 30 && abs(tri_mll-91)<10 && tri_submll > 10 && abs(tri_submll-91)>5"); |
648 |
< |
|
648 |
> |
/* |
649 |
|
//OptimizeSelection(BasicCut); |
650 |
|
|
651 |
|
//ComputeMiscombinationRate(Selection, BasicCut); |
697 |
|
WZ_kin_plot("tri_pt2",40,0,400,"p_{T}^{2} [GeV]",BasicCut&&Selection,"Pt2"); |
698 |
|
WZ_kin_plot("tri_pt3",40,0,400,"p_{T}^{3} [GeV]",BasicCut&&Selection,"Pt3"); |
699 |
|
|
700 |
< |
|
700 |
> |
*/ |
701 |
|
WZ_kin_plot("tri_submll",40,0,200,"m_{l_{2}l_{3}} [GeV]",BasicCut&&Selection&&TriLepSF,"mllsub_SF"); |
702 |
|
WZ_kin_plot("tri_submll",40,0,200,"m_{l_{2}l_{3}} [GeV]",BasicCut&&Selection&&TriLepOF,"mllsub_OF"); |
703 |
|
WZ_kin_plot("tri_submll",40,0,200,"m_{l_{2}l_{3}} [GeV]",BasicCut&&Selection&&TriLepSF&&TCut("tri_id2==0"),"mllsub_SF_ee"); |
867 |
|
void WZstudy() { |
868 |
|
// ExtractDYMissingResolution(); |
869 |
|
|
870 |
+ |
cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)))"); |
871 |
|
switch_overunderflow(true); |
872 |
|
cout << "Essential cut is " << (const char*) essentialcut << endl; |
873 |
|
cout << "Going to set essential cut to new triggers" << endl; |