38 |
|
TH1F *SBOSOFN; |
39 |
|
|
40 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
41 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
41 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
42 |
|
SBOSSFP = allsamples.Draw("SBOSSFP",datajzb,1,cut,14000, xlabel, "events",cutOSSF&&cutnJets&&basiccut&&sidebandcut,mcordata,luminosity); |
43 |
|
SBOSOFP = allsamples.Draw("SBOSOFP",datajzb,1,cut,14000, xlabel, "events",cutOSOF&&cutnJets&&basiccut&&sidebandcut,mcordata,luminosity); |
44 |
|
SBOSSFN = allsamples.Draw("SBOSSFN","-"+datajzb,1,cut,14000, xlabel, "events",cutOSSF&&cutnJets&&basiccut&&sidebandcut,mcordata,luminosity); |
47 |
|
|
48 |
|
|
49 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
50 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
50 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
51 |
|
dout << " Observed : " << ZOSSFP->Integral() << endl; |
52 |
|
dout << " Predicted: " << ZOSSFN->Integral() << " + (1/3)*(" << ZOSOFP->Integral() << "-" << ZOSOFN->Integral()<<") + (1/3)*(" << SBOSSFP->Integral() << "-" << SBOSSFN->Integral()<<") + (1/3)*(" << SBOSOFP->Integral() << "-" << SBOSOFN->Integral()<<")" << endl; |
53 |
|
dout << " P(ZJets ) \t " << ZOSSFN->Integral() << endl; |
76 |
|
void look_at_sidebands(string mcjzb, string datajzb, bool includejetcut, float cutat=0) { |
77 |
|
|
78 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak -- this funciton is meaningless for the offpeak case |
79 |
< |
if(!PlottingSetup::RestrictToMassPeak) return; |
79 |
> |
if(!PlottingSetup::RestrictToMassPeak||!PlottingSetup::UseSidebandsForcJZB) return; |
80 |
|
dout << "Looking at sidebands ... " << endl; |
81 |
|
int mcordata=data;//data // you can perform this study for mc or data ... |
82 |
|
|
246 |
|
|
247 |
|
void find_sideband_definition() { |
248 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
249 |
< |
if(!PlottingSetup::RestrictToMassPeak) return; // this function is meaningless for the offpeak analysis |
249 |
> |
if(!PlottingSetup::RestrictToMassPeak||!PlottingSetup::UseSidebandsForcJZB) return; // this function is meaningless for the offpeak analysis |
250 |
|
|
251 |
|
TH1F *mllttbar = allsamples.Draw("mllttbar","mll",145,55,200, "mll [GeV]", "events",cutOSSF&&cutnJets&&!cutmass,mc,luminosity,allsamples.FindSample("TTJets")); |
252 |
|
TH1F *mllttbarz = allsamples.Draw("mllttbarz","mll",1,50,200, "mll [GeV]", "events",cutOSSF&&cutnJets&&cutmass,mc,luminosity,allsamples.FindSample("TTJets")); |
320 |
|
TCanvas *c1 = new TCanvas("runnum","runnum",800,1000); |
321 |
|
c1->Divide(2,4); |
322 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
323 |
< |
if(PlottingSetup::RestrictToMassPeak) c1->Divide(2,2); // there are only four regions ... |
323 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) c1->Divide(2,2); // there are only four regions ... |
324 |
|
|
325 |
|
c1->cd(1); |
326 |
|
TH1F *ossfp = runcheckhisto((const char*)(cutmass&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)")); |
342 |
|
TText *t4 = write_title("OSOF,N");t4->Draw(); |
343 |
|
|
344 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
345 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
345 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
346 |
|
c1->cd(5); |
347 |
|
TH1F *sbofp = runcheckhisto((const char*)(sidebandcut&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)")); |
348 |
|
sbofp->Draw(); |
378 |
|
TH1F *jzbpss; |
379 |
|
|
380 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
381 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
381 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
382 |
|
jzbnos = allsamples.Draw("jzbnos","-"+mcjzb,nbins,0,350, "JZB [GeV]", "events",bcut&&cutOSOF&&cutnJets&&sidebandcut,mc,luminosity,allsamples.FindSample("VVJetsTo4L_TuneD6T_7TeV")); |
383 |
|
jzbpos = allsamples.Draw("jzbpos",mcjzb,nbins,0,350, "JZB [GeV]", "events", bcut&&cutOSOF&&cutnJets&&sidebandcut,mc,luminosity,allsamples.FindSample("VVJetsTo4L_TuneD6T_7TeV")); |
384 |
|
jzbnss = allsamples.Draw("jzbnss","-"+mcjzb,nbins,0,350, "JZB [GeV]", "events",bcut&&cutOSSF&&cutnJets&&sidebandcut,mc,luminosity,allsamples.FindSample("VVJetsTo4L_TuneD6T_7TeV")); |
388 |
|
|
389 |
|
TH1F *pred = (TH1F*)jzbn->Clone("pred"); |
390 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
391 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
391 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
392 |
|
pred->Add(jzbno,-1.0/3); |
393 |
|
pred->Add(jzbpo,1.0/3); |
394 |
|
pred->Add(jzbnos,-1.0/3); |
612 |
|
TH1F *jzbnss; |
613 |
|
TH1F *jzbpss; |
614 |
|
|
615 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
615 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
616 |
|
jzbnos = signalsamples.Draw("jzbnos","-"+mcjzb,nbins,0,350, "JZB [GeV]", "events",cutOSOF&&cutnJets&&sidebandcut,mc,luminosity,signalsamples.FindSample("LM0")); |
617 |
|
jzbpos = signalsamples.Draw("jzbpos",mcjzb,nbins,0,350, "JZB [GeV]", "events", cutOSOF&&cutnJets&&sidebandcut,mc,luminosity,signalsamples.FindSample("LM0")); |
618 |
|
jzbnss = signalsamples.Draw("jzbnss","-"+mcjzb,nbins,0,350, "JZB [GeV]", "events",cutOSSF&&cutnJets&&sidebandcut,mc,luminosity,signalsamples.FindSample("LM0")); |
621 |
|
|
622 |
|
TH1F *pred = (TH1F*)jzbn->Clone("pred"); |
623 |
|
flag_this_change(__FUNCTION__,__LINE__,false);//PlottingSetup::RestrictToMassPeak |
624 |
< |
if(PlottingSetup::RestrictToMassPeak) { |
624 |
> |
if(PlottingSetup::RestrictToMassPeak&&PlottingSetup::UseSidebandsForcJZB) { |
625 |
|
pred->Add(jzbno,-1.0/3); |
626 |
|
pred->Add(jzbpo,1.0/3); |
627 |
|
pred->Add(jzbnos,-1.0/3); |
765 |
|
|
766 |
|
//uncomment whichever one you want to see :-) |
767 |
|
|
768 |
– |
|
769 |
– |
GenLevelStudy::X_vs_generation_lm4(); |
768 |
|
/* |
769 |
+ |
GenLevelStudy::X_vs_generation_lm4(); |
770 |
|
GenLevelStudy::compare_sms_lm4(); |
771 |
< |
GenLevelStudy::MomentumFraction(); |
771 |
> |
*/ |
772 |
> |
|
773 |
> |
///GenLevelStudy::MomentumFraction(); |
774 |
> |
///GenLevelStudy::AngleLSPLSP(); |
775 |
> |
///GenLevelStudy::DeltaLSPmomentum(); |
776 |
> |
///GenLevelStudy::ZDecayIllustration(); |
777 |
> |
/* |
778 |
|
GenLevelStudy::AngleMETsumLSP(); |
779 |
|
GenLevelStudy::RatioMETsumLSP(); |
775 |
– |
GenLevelStudy::AngleLSPLSP(); |
780 |
|
GenLevelStudy::AngleLSPZ(); |
781 |
|
GenLevelStudy::WidthIllustration(); |
782 |
< |
GenLevelStudy::ZDecayIllustration(); |
783 |
< |
GenLevelStudy::DeltaLSPmomentum(); |
782 |
> |
|
783 |
> |
|
784 |
|
GenLevelStudy::pStarIllustration(0.5); |
785 |
< |
GenLevelStudy::pStarIllustration(0.25); |
786 |
< |
GenLevelStudy::pStarIllustration(0.75);*/ |
783 |
< |
GenLevelStudy::pStarDistributions();/* |
785 |
> |
//GenLevelStudy::pStarIllustration(0.25); |
786 |
> |
//GenLevelStudy::pStarIllustration(0.75); |
787 |
|
GenLevelStudy::DrawJetBand(); |
788 |
< |
GenLevelStudy::DrawOnly100to150inJetBand(); |
788 |
> |
GenLevelStudy::DrawOnly100to150inJetBand();*/ |
789 |
|
GenLevelStudy::ImpactOfGluinoChi2MassDifference(); |
790 |
< |
*/ |
790 |
> |
|
791 |
|
} |
792 |
|
|
793 |
|
|
876 |
|
|
877 |
|
} |
878 |
|
|
876 |
– |
string ReplaceCharacter(string originalstring,string replacethis,string replacewiththis) |
877 |
– |
{ |
878 |
– |
int pos = originalstring.find(replacethis); |
879 |
– |
if(pos == -1) return originalstring; |
880 |
– |
originalstring.replace(pos, replacewiththis.length(), replacewiththis); |
881 |
– |
return originalstring; |
882 |
– |
} |
883 |
– |
string removefunnystring(string name) { |
884 |
– |
name=ReplaceCharacter(name,"[","_"); |
885 |
– |
name=ReplaceCharacter(name,"]","_"); |
886 |
– |
name=ReplaceCharacter(name,"{","_"); |
887 |
– |
name=ReplaceCharacter(name,"}","_"); |
888 |
– |
name=ReplaceCharacter(name,".","_"); |
889 |
– |
name=ReplaceCharacter(name,",","_"); |
890 |
– |
name=ReplaceCharacter(name,";","_"); |
891 |
– |
name=ReplaceCharacter(name,":","_"); |
892 |
– |
name=ReplaceCharacter(name,"'","_"); |
893 |
– |
name=ReplaceCharacter(name,"$","_"); |
894 |
– |
name=ReplaceCharacter(name,"@","_"); |
895 |
– |
return name; |
896 |
– |
} |
897 |
– |
|
879 |
|
void compare_lm4_sms_variable(TTree *eventsLM4, TTree *eventsSMS, string variable, int nbins, float xmin, float xmax, TCut cut, string saveas, bool dology=false) { |
880 |
|
TCanvas *can = new TCanvas("can","can"); |
881 |
|
can->SetLogy(dology); |