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

Comparing UserCode/cbrown/Development/Plotting/Modules/GeneratorLevelStudyModule.C (file contents):
Revision 1.2 by buchmann, Thu Feb 23 15:19:55 2012 UTC vs.
Revision 1.5 by buchmann, Mon Apr 16 17:22:33 2012 UTC

# Line 38 | Line 38 | namespace GenLevelStudy {
38          void MomentumFractionScenario(float massglu, float masslsp);
39          void WidthIllustration();
40          void ZDecayIllustration();
41 +        void ZDecayIllustration(float massglu, float masslsp);
42          void pStarIllustration(float x);
43          void DeltaLSPmomentum();
44          void DeltaLSPmomentumScenario(float massglu, float masslsp);
# Line 49 | Line 50 | namespace GenLevelStudy {
50          void DrawOnly100to150inJetBand();
51          void DrawOnly100to150inJetBand(float massglu,float masslsp);
52          void ImpactOfGluinoChi2MassDifference();
53 +        void color_histos(TH1F *a, TH1F *b, TH1F *c, string xlabel);
54  
55   //      string LM4sample="/scratch/buchmann/ntuples/GeneratorInformationInJZB___JZBplusSamples_PrimeTime__SAMPLES__Gen_V11/LM4_SUSY_sftsht_7TeV-pythia6__Summer11-PU_S4_START42_V11-v2__withIndex.root";
56 <        string LM4sample="/scratch/buchmann/ntuples/GeneratorInformationInJZB___JZBplusSamples_PrimeTime__SAMPLES__Gen_V16_sumJet_with_LSPsum_LM8only_fixed/LM8_SUSY_sftsht_7TeV-pythia6__Summer11-PU_S4_START42_V11-v2_novtx_fixed3.root";
57 <        string SMSsample="/scratch/buchmann/buchmann/GeneratorInformationInJZB___JZBplusSamples_PrimeTime__SAMPLES__Gen_V12_with_zchi2angle_bf1/SMS-T5zz_x-05_Mgluino-150to1200_mLSP-50to1150_7TeV-Pythia6Z__Summer11-PU_START42_V11_FastSim-v2__AODSIM___inclindex_v2_complet.root";
56 >        string LM4sample="/scratch/buchmann/buchmann/SignalWithLeptonsStartingAt5GeV/LM4_SUSY_sftsht_7TeV-pythia.root";
57 > //      string LM4sample="/scratch/buchmann/ntuples/GeneratorInformationInJZB___JZBplusSamples_PrimeTime__SAMPLES__Gen_V16_sumJet_with_LSPsum_LM8only_fixed/LM8_SUSY_sftsht_7TeV-pythia6__Summer11-PU_S4_START42_V11-v2_novtx_fixed3.root";
58 >        string SMSsample="/shome/buchmann/JellyfishCBAF/various_assignments/SimPa_LOCAL/Tests/FullSMS.root";
59 >        //scratch/buchmann/buchmann/GeneratorInformationInJZB___JZBplusSamples_PrimeTime__SAMPLES__Gen_V12_with_zchi2angle_bf1/SMS-T5zz_x-05_Mgluino-150to1200_mLSP-50to1150_7TeV-Pythia6Z__Summer11-PU_START42_V11_FastSim-v2__AODSIM___inclindex_v2_complet.root";
60          string histoname(int i);
61          Color_t histocolor(int i);
62          Color_t diversehistocolor(int i);
63  
64          float pstarlow=0;
65 <        float pstarhigh=400;
65 >        float pstarhigh=320;
66  
67   } // end of GenLevelStudy namespace
68  
# Line 82 | Line 86 | Color_t GenLevelStudy::histocolor(int i)
86          return TColor::GetColor("#0B61A4");
87   }
88   Color_t GenLevelStudy::diversehistocolor(int i) {
89 +        i+=1;
90          if(i==0) return TColor::GetColor("#000000"); // Black
91 <        if(i==1) return TColor::GetColor("#800000"); //Dark Red
92 <        if(i==2) return TColor::GetColor("#008000");//Dark Green
93 <        if(i==3) return TColor::GetColor("#808000");//Dark Yellow
94 <        if(i==4) return TColor::GetColor("#000080");//Dark Blue
95 <        if(i==5) return TColor::GetColor("#800080");//Dark Magenta
96 <        if(i==6) return TColor::GetColor("#008080");//Dark Cyan
91 >        if(i==1) return kBlue;
92 >        if(i==2) return kRed;
93 >        if(i==3) return kGreen+2;
94 >        if(i==4) return TColor::GetColor("#FF8000");//Orange
95 >        if(i==5) return TColor::GetColor("#DF01D7");//Dark Magenta
96 >        if(i==6) return TColor::GetColor("#01A9DB");//Dark Cyan
97          if(i==7) return TColor::GetColor("#C0C0C0");//Light Gray
98 <        if(i==8) return TColor::GetColor("#C0DCC0");//Grass Green
99 <        if(i==9) return TColor::GetColor("#A6CAF0");//Light Blue
98 >        if(i==8) return TColor::GetColor("#F7FE2E");//Juicy Lemon
99 >        if(i==9) return TColor::GetColor("#F781BE");//Light
100          if(i==10) return TColor::GetColor("#FFFBF0");//Cream
101          if(i==11) return TColor::GetColor("#A0A0A4");//Medium Gray
102          if(i==12) return TColor::GetColor("#808080");//Dark Gray
# Line 193 | Line 198 | void GenLevelStudy::MomentumFractionScen
198    stringstream cut;
199    cut << "genNjets>2&&abs(pureGeneratorJZB)>0";
200    if(massglu>0&&masslsp>0) cut << "&&abs(MassGlu-" << massglu << ")<5&&abs(MassLSP-" << masslsp << ")";
201 <  events->Draw("(LSP1pt/LSP1Mopt):pureGeneratorJZB",cut.str().c_str(),"PROF");
202 <  TH1F *h = new TH1F("h","h",100,-500,500);
203 <  h->SetLineColor(kBlack);
204 <  TProfile *p = (TProfile*)jcan->GetPrimitive("htemp");
205 <  p->GetXaxis()->SetTitle("Generator JZB");
206 <  p->GetXaxis()->CenterTitle();
201 >  
202 >  TProfile *fLSP = new TProfile("fLSP","fLSP",500,-500,1000,0,1.5);
203 >  TProfile *fZ = new TProfile("fZ","fZ",500,-500,1000,0,1.5);
204 >  events->Draw("(LSP1pt/LSP1Mopt):pureGeneratorJZB>>fLSP",cut.str().c_str(),"PROF");
205 > //  TH1F *h = new TH1F("h","h",100,-500,500);
206 > //  h->SetLineColor(kBlack);
207 >  
208 >  fLSP->GetXaxis()->SetTitle("Generator JZB");
209 >  fLSP->GetXaxis()->CenterTitle();
210 >  fLSP->SetMarkerSize(0);
211   //  p->GetYaxis()->SetTitle("( LSP p_{T} ) / ( LSP mother p_{T} )");
212 <  p->GetYaxis()->SetTitle("f");
213 <  p->GetYaxis()->CenterTitle();
214 <  p->SetLineColor(kBlue);
215 <  p->GetXaxis()->SetRangeUser(-500,1000);
216 <  p->GetYaxis()->SetRangeUser(0,2);
212 >  fLSP->GetYaxis()->SetTitle("f");
213 >  fLSP->GetYaxis()->CenterTitle();
214 >  fLSP->SetLineColor(kBlue);
215 >  fLSP->GetYaxis()->SetRangeUser(0,1.5);
216 > //  p->GetYaxis()->SetRangeUser(0,2);
217   /*  TLegend* leg = make_legend("", 0.20, 1.03, false);
218    leg->SetNColumns(2);
219    leg->AddEntry(p,"f_{LSP}","l");
# Line 212 | Line 221 | void GenLevelStudy::MomentumFractionScen
221    leg->Draw();*/
222   //  TText *title = write_title("JZB as a function of the first LSP's momentum transfer");
223   //  title->Draw();
224 <  events->Draw("(genZPt/LSP1Mopt):pureGeneratorJZB","genNjets>2","PROF,same");
224 >  events->Draw("(genZPt/LSP1Mopt):pureGeneratorJZB>>fZ","genNjets>2","PROF,same");
225 >  fZ->SetMarkerSize(0);
226 >  fLSP->Draw();
227 >  fZ->Draw("same");
228  
229    stringstream saveas;
230    saveas << "GeneratorStudies/MomentumFraction";
# Line 222 | Line 234 | void GenLevelStudy::MomentumFractionScen
234   }  
235  
236   void GenLevelStudy::MomentumFraction() {
225 write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
237    GenLevelStudy::MomentumFractionScenario(-1,-1);
238    GenLevelStudy::MomentumFractionScenario(1175,500);
239    GenLevelStudy::MomentumFractionScenario(625,425);
# Line 252 | Line 263 | void GenLevelStudy::AngleMETsumLSPScenar
263   }
264  
265   void GenLevelStudy::AngleMETsumLSP() {
266 < write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
267 <  //AngleMETsumLSPScenario(-1,-1);
268 <  //AngleMETsumLSPScenario(1175,500.0);
258 <  //AngleMETsumLSPScenario(625,425);
266 >  AngleMETsumLSPScenario(-1,-1);
267 >  AngleMETsumLSPScenario(1175,500.0);
268 >  AngleMETsumLSPScenario(625,425);
269   }
270  
271   void GenLevelStudy::RatioMETsumLSPScenario(float massglu, float masslsp) {
# Line 281 | Line 291 | void GenLevelStudy::RatioMETsumLSPScenar
291   }
292  
293   void GenLevelStudy::RatioMETsumLSP() {
294 < write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
295 <  //RatioMETsumLSPScenario(-1,-1);
296 <  //RatioMETsumLSPScenario(1175,500.0);
287 <  //RatioMETsumLSPScenario(625,425);
294 >  RatioMETsumLSPScenario(-1,-1);
295 >  RatioMETsumLSPScenario(1175,500.0);
296 >  RatioMETsumLSPScenario(625,425);
297   }
298  
299   void GenLevelStudy::AngleLSPLSPScenario(float massglu, float masslsp) {
# Line 294 | Line 303 | void GenLevelStudy::AngleLSPLSPScenario(
303    stringstream cut;
304    cut << "genNjets>2&&abs(pureGeneratorJZB)>0";
305    if(massglu>0&&masslsp>0) cut << "&&abs(MassGlu-" << massglu << ")<5&&abs(MassLSP-" << masslsp << ")";
306 <  events->Draw("angleLSPLSP/TMath::Pi():pureGeneratorJZB",cut.str().c_str(),"PROF");
307 <  TProfile *p = (TProfile*)jcan->GetPrimitive("htemp");
308 <  p->GetXaxis()->SetTitle("Generator JZB");
309 <  p->GetXaxis()->CenterTitle();
310 <  p->GetYaxis()->SetTitle("#angle (LSP,LSP) / #pi");
311 <  p->GetYaxis()->CenterTitle();
312 <  p->SetLineColor(kBlue);
313 <  p->GetXaxis()->SetRangeUser(-500,1000);
314 <  p->GetYaxis()->SetRangeUser(0,1);
306 >  TProfile *angLSP = new TProfile("angLSP","angLSP",500,-500,1000,0,3.2);
307 >  events->Draw("angleLSPLSP:pureGeneratorJZB>>angLSP",cut.str().c_str(),"PROF");
308 > //  TProfile *p = (TProfile*)jcan->GetPrimitive("htemp");
309 >  angLSP->GetXaxis()->SetTitle("Generator JZB");
310 >  angLSP->GetXaxis()->CenterTitle();
311 >  angLSP->GetYaxis()->SetTitle("#angle (LSP,LSP)");
312 >  angLSP->GetYaxis()->CenterTitle();
313 >  angLSP->SetLineColor(kBlue);
314 >  angLSP->SetMarkerSize(0);
315 > //  p->GetXaxis()->SetRangeUser(-500,1000);
316 >  angLSP->GetYaxis()->SetRangeUser(0,3.1415);
317 >  
318    stringstream saveas;
319    saveas << "GeneratorStudies/AngleLSPLSP";
320    if(massglu>0&&masslsp>0) saveas << "__MassGlu" << massglu << "_MassLSP_" << masslsp;
# Line 324 | Line 336 | void GenLevelStudy::AngleLSPLSPScenario(
336   }
337  
338   void GenLevelStudy::AngleLSPLSP() {
339 < write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
340 < //  AngleLSPLSPScenario(-1,-1);
341 < //  AngleLSPLSPScenario(1175,500);
330 < //  AngleLSPLSPScenario(625,425);
339 >  AngleLSPLSPScenario(-1,-1);
340 >  AngleLSPLSPScenario(1175,500);
341 >  AngleLSPLSPScenario(625,425);
342   }
343  
344   void GenLevelStudy::AngleLSPZScenario(float massglu, float masslsp) {
# Line 351 | Line 362 | void GenLevelStudy::AngleLSPZScenario(fl
362   }
363  
364   void GenLevelStudy::AngleLSPZ() {
365 < write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
366 < //  AngleLSPZScenario(-1,-1);
367 < //  AngleLSPZScenario(1175,500.0);
357 < //  AngleLSPZScenario(625,425);
365 >  AngleLSPZScenario(-1,-1);
366 >  AngleLSPZScenario(1175,500.0);
367 >  AngleLSPZScenario(625,425);
368   }
369  
370   void GenLevelStudy::WidthIllustration() {
# Line 392 | Line 402 | void GenLevelStudy::WidthIllustration()
402    CompleteSave(can,"GeneratorStudies/JZB_over_MET__as_a_function_of_the_angle_between_Z_and_MET");
403   }
404  
405 < void GenLevelStudy::ZDecayIllustration() {
405 > void GenLevelStudy::ZDecayIllustration(float massglu, float masslsp) {
406    TFile *f = new TFile(GenLevelStudy::SMSsample.c_str());
407    TTree *events = (TTree*)f->Get("events");
408    TCanvas *jcan = new TCanvas("jcan","jcan");
409 <  string cutdileptonic="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==2";
410 <  string cutsemihadronic="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==11";
411 <  string cutsemineutrino="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==101";
409 >  
410 >  stringstream cut;
411 >  if(massglu>0&&masslsp>0) cut << "&&abs(MassGlu-" << massglu << ")<5&&abs(MassLSP-" << masslsp << ")";
412 >
413 >  string cutdileptonic="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==2"+cut.str();
414 >  string cutsemihadronic="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==11"+cut.str();
415 >  string cutsemineutrino="genNjets>2&&abs(pureGeneratorJZB)>0&&DecayCode==101"+cut.str();
416  
417    int nbins=100;
418    float xmin=-300;
# Line 430 | Line 444 | void GenLevelStudy::ZDecayIllustration()
444  
445    stringstream saveas;
446    saveas << "GeneratorStudies/ZDecayIllustration";
447 +  if(massglu>0&&masslsp>0) saveas << "__MassGlu" << massglu << "_MassLSP_" << masslsp;
448    CompleteSave(jcan,saveas.str());  
449    
450   }
451  
452 + void GenLevelStudy::ZDecayIllustration() {
453 +  ZDecayIllustration(-1,-1);
454 +  ZDecayIllustration(1175,500);
455 +  ZDecayIllustration(625,425);
456 + }
457 +
458  
459   void GenLevelStudy::pStarIllustration(float x) {
460    TH2F *pstarlspmap = new TH2F("pstarlspmap", "",(int)((mgluend-mglustart)/mglustep+1),mglustart-0.5*mglustep,mgluend+0.5*mglustep,(int)((mLSPend-mLSPstart)/mLSPstep+1),mLSPstart-0.5*mLSPstep,mLSPend+0.5*mLSPstep);
# Line 533 | Line 554 | void GenLevelStudy::DeltaLSPmomentumScen
554    stringstream cut;
555    cut << "genNjets>2&&abs(pureGeneratorJZB)>0";
556    if(massglu>0&&masslsp>0) cut << "&&abs(MassGlu-" << massglu << ")<5&&abs(MassLSP-" << masslsp << ")";
557 <  events->Draw("(LSP1pt-LSP2pt):pureGeneratorJZB",cut.str().c_str(),"PROF");
558 <  TProfile *p = (TProfile*)jcan->GetPrimitive("htemp");
559 <  p->GetXaxis()->SetTitle("Generator JZB");
560 <  p->GetXaxis()->CenterTitle();
561 <  p->GetYaxis()->SetTitle("p_{T}(LSP1)-p_{T}(LSP2)");
562 <  p->GetYaxis()->CenterTitle();
563 <  p->GetXaxis()->SetRangeUser(-500,1000);
564 <  p->GetYaxis()->SetRangeUser(-800,800);
565 <  p->SetLineColor(kBlue);
557 >  TProfile *DeltaLSP = new TProfile("DeltaLSP","DeltaLSP",500,-500,1000,-800,800);  
558 >  events->Draw("(LSP1pt-LSP2pt):pureGeneratorJZB>>DeltaLSP",cut.str().c_str(),"PROF");
559 > //  TProfile *p = (TProfile*)jcan->GetPrimitive("htemp");
560 >  DeltaLSP->GetXaxis()->SetTitle("Generator JZB");
561 >  DeltaLSP->GetXaxis()->CenterTitle();
562 >  DeltaLSP->GetYaxis()->SetTitle("p_{T}(LSP1)-p_{T}(LSP2)");
563 >  DeltaLSP->GetYaxis()->CenterTitle();
564 >  DeltaLSP->GetXaxis()->SetRangeUser(-500,1000);
565 >  DeltaLSP->GetYaxis()->SetRangeUser(-800,800);
566 >  DeltaLSP->SetLineColor(kBlue);
567 >  DeltaLSP->SetMarkerSize(0);
568  
569    stringstream saveas;
570    saveas << "GeneratorStudies/DeltaLSPPt";
# Line 552 | Line 575 | void GenLevelStudy::DeltaLSPmomentumScen
575  
576  
577   void GenLevelStudy::DeltaLSPmomentum() {
555 write_warning(__FUNCTION__,"Skipping this function (please uncomment the lines below)");
578    GenLevelStudy::DeltaLSPmomentumScenario(-1,-1);
579    GenLevelStudy::DeltaLSPmomentumScenario(1175,500);
580    GenLevelStudy::DeltaLSPmomentumScenario(625,425);
# Line 560 | Line 582 | write_warning(__FUNCTION__,"Skipping thi
582   }
583  
584   void GenLevelStudy::fill_pstar_histos(string scandir, float x, TH1F* pstarhistos[], int npstarhistos, TLegend *leg, bool addlegentry=false) {
585 <  TChain chain("events");
585 >  cout << "Preparing SMS file" << endl;
586 >  TFile *f = new TFile(GenLevelStudy::SMSsample.c_str());
587 >  TTree *events = (TTree*)f->Get("events");
588 >  /*
589    for(int i=0;i<15;i++) {
590      for(int j=0;j<15;j++) {
591         stringstream filename;
# Line 568 | Line 593 | void GenLevelStudy::fill_pstar_histos(st
593         chain.Add(filename.str().c_str());
594      }
595     }
596 +   */
597    
598     //Draw two very different distributions ... for illustration purposes.
599     if(TMath::Abs((float)(x-0.5))<0.1) {
600          TCanvas *cannie = new TCanvas("cannie","cannie");
601 <        TH1F *h1 = new TH1F("h1","h1",100,-200,800);
602 <        TH1F *h2 = new TH1F("h2","h2",100,-200,800);
603 <        chain.Draw("jzb[1]>>h1","(MassLSP==150&&MassGlu==400&&abs(jzb[1])>0)");
604 <        chain.Draw("jzb[1]>>h2","(MassLSP==150&&MassGlu==1200&&abs(jzb[1])>0)","sames");
601 >        TH1F *h1 = new TH1F("h1","h1",100,-400,600);
602 >        TH1F *h2 = new TH1F("h2","h2",100,-400,600);
603 >        events->Draw("jzb[1]>>h1","(MassLSP==150&&MassGlu==400&&abs(jzb[1])>0)");
604 >        events->Draw("jzb[1]>>h2","(MassLSP==150&&MassGlu==1200&&abs(jzb[1])>0)","sames");
605          h1->SetLineColor(histocolor(4));
606          h2->SetLineColor(histocolor(6));
607          h1->GetXaxis()->SetTitle("JZB (GeV/c)");
# Line 597 | Line 623 | void GenLevelStudy::fill_pstar_histos(st
623     accdrawcommand << "1+((" << x << "*(MassGlu+MassLSP)-MassLSP)>91.2)";
624    
625     TCanvas *ca = new TCanvas("ca","ca");
626 <   chain.Draw(accdrawcommand.str().c_str(),"","COLZ");
626 >   events->Draw(accdrawcommand.str().c_str(),"","COLZ");
627     stringstream saveACCas;
628     saveACCas << "GeneratorStudies/AcceptedRegion__x_0p" << 100*x;
629     CompleteSave(ca,saveACCas.str());
# Line 609 | Line 635 | void GenLevelStudy::fill_pstar_histos(st
635          cut << "(abs(TMath::Sqrt((("<< x*x << ")*(MassGlu+MassLSP)*(MassGlu+MassLSP)-(MassLSP+91.2)*(MassLSP+91.2))*((" << x*x << ")*(MassGlu+MassLSP)*(MassGlu+MassLSP)-(MassLSP-91.2)*(MassLSP-91.2)))/(2*(" << x << ")*(MassGlu+MassLSP))-" << curr-stepsize/2.0 << ")<" << stepsize/2.0 << ")";
636          cut << "&&((" << x << "*(MassGlu+MassLSP)-MassLSP)>91.2)"; // cleaning all events out that dont' have the imposed x
637          stringstream drawcommand;
638 <        drawcommand << "jzb[1]>>GenLevelHisto_" << i;
639 <        chain.Draw(drawcommand.str().c_str(),cut.str().c_str());
638 >        drawcommand << "jzb[1]>>tempie";
639 >        TH1F *temp = (TH1F*)pstarhistos[i]->Clone("tempie");
640 >        events->Draw(drawcommand.str().c_str(),cut.str().c_str());
641 >        for(int ibi=1;ibi<=temp->GetNbinsX();ibi++) pstarhistos[i]->SetBinContent(ibi,temp->GetBinContent(ibi));
642 >        delete temp;
643          stringstream histotext;
644          histotext << curr-stepsize << " < p^{*} < " << curr;
645          if(addlegentry&&pstarhistos[i]->Integral()>0) leg->AddEntry(pstarhistos[i],histotext.str().c_str(),"l");
646          cout << "Finished working on " << scandir << " with a p* value in [" << curr - stepsize << "," << curr << "] (now contains: " << pstarhistos[i]->Integral() << " events)" << endl;
618
647     }
648     delete ca;
649 +
650   }
651  
652   void GenLevelStudy::pStarDistributions(string name, float modelx) {
653 <  const int nhistos=20;
653 >  const int nhistos=8;
654    TH1F  *pstarhistos[nhistos];
655    TCanvas *can = new TCanvas("can","can");
656    for(int i=0;i<nhistos;i++) pstarhistos[i] = new TH1F(histoname(i).c_str(),histoname(i).c_str(),100,-400,600);
# Line 633 | Line 662 | void GenLevelStudy::pStarDistributions(s
662    stringstream rootfilename;
663    rootfilename << "pstarhistos__x0p" << 100*modelx << ".root";
664    TFile *f = new TFile(rootfilename.str().c_str(),"RECREATE");
665 <  pstarhistos[0]->GetXaxis()->SetTitle("JZB");
665 >  pstarhistos[0]->GetXaxis()->SetTitle("Generator JZB");
666    pstarhistos[0]->GetXaxis()->CenterTitle();
667 <  pstarhistos[0]->GetYaxis()->SetTitle("");
667 >  pstarhistos[0]->GetYaxis()->SetTitle("events (normalized to unity)");
668    pstarhistos[0]->GetYaxis()->CenterTitle();
669    for(int i=0;i<nhistos;i++) {
670        pstarhistos[i]->SetLineColor(diversehistocolor(i));
# Line 651 | Line 680 | void GenLevelStudy::pStarDistributions(s
680    leg->Draw();
681    stringstream saveas;
682    saveas << "GeneratorStudies/pStarStudy__x_0p" << 100*modelx;
683 +  TText *ta = write_title("JZB distribution for different p^{*}");
684 +  ta->Draw();
685    CompleteSave(can,saveas.str());
686  
687    TGraphErrors *gr = new TGraphErrors(nhistos,x,y,ex,ey);
688    gr->Draw("AP");
689    gr->GetXaxis()->SetTitle("p^{*}");
690    gr->GetXaxis()->CenterTitle();
691 <  gr->GetYaxis()->SetTitle("JZB");
691 >  gr->GetYaxis()->SetTitle("Generator JZB");
692    gr->GetYaxis()->CenterTitle();
693    gr->Draw("AP");
694    stringstream saveas2;
695    saveas2 << "GeneratorStudies/pStarVsJZB__x_0p" << 100*modelx;
696 +  TText *tb = write_title("JZB distribution width for different p^{*}");
697 +  tb->Draw();
698    CompleteSave(can,saveas2.str());
699    f->cd();
700    gr->Write();
# Line 670 | Line 703 | void GenLevelStudy::pStarDistributions(s
703  
704   }
705   void GenLevelStudy::pStarDistributions() {
706 <  pStarDistributions("SMS_T5zzh_newslots",0.25);
706 > //  pStarDistributions("SMS_T5zzh_newslots",0.25);
707    pStarDistributions("SMS_T5zz",0.5);
708 <  pStarDistributions("SMS_T5zzl",0.75);
708 > //  pStarDistributions("SMS_T5zzl",0.75);
709   }
710  
711   void GenLevelStudy::DrawJetBand(float massglu, float masslsp) {
# Line 751 | Line 784 | void GenLevelStudy::DrawJetBand() {
784    GenLevelStudy::DrawJetBand(625,425);
785   }
786  
787 + void GenLevelStudy::color_histos(TH1F *a, TH1F *b, TH1F *c, string xlabel) {
788 +  a->GetXaxis()->SetTitle(xlabel.c_str());
789 +  a->GetYaxis()->SetTitle("events");
790 +  a->GetXaxis()->CenterTitle();
791 +  a->GetYaxis()->CenterTitle();
792 +  b->SetLineColor(diversehistocolor(1));
793 +  
794 +  if(!Contains(((string)(a->GetName())),"LSP")) {
795 +    a->SetLineColor(diversehistocolor(0));
796 +    c->SetLineColor(diversehistocolor(2));
797 +  } else {
798 +    a->SetLineColor(diversehistocolor(2));
799 +    c->SetLineColor(diversehistocolor(0));
800 +  }
801 + }
802 +
803 +
804   void GenLevelStudy::ImpactOfGluinoChi2MassDifference() {
805 +  
806 +  // STEP 1 : Loading everything
807    TCanvas *can = new TCanvas("can","can");
808    can->SetLogy(1);
809    TChain smsp025events("events");
# Line 763 | Line 815 | void GenLevelStudy::ImpactOfGluinoChi2Ma
815         stringstream filenamep25;
816         stringstream filenamep50;
817         stringstream filenamep75;
818 <       filenamep25 << "/shome/buchmann/ntuples/SMS_T5zzh_newslots/SMS_clean_splitup_" << i << "_" << j << ".root";
818 >       filenamep25 << "/shome/lbaeni/jzb/SMS_T5zzh_newslots/SMS_clean_splitup_" << i << "_" << j << ".root";
819         filenamep50 << "/shome/buchmann/ntuples/SMS_T5zz/SMS_clean_splitup_" << i << "_" << j << ".root";
820         filenamep75 << "/shome/buchmann/ntuples/SMS_T5zzl/SMS_clean_splitup_" << i << "_" << j << ".root";
821         smsp025events.Add(filenamep25.str().c_str());
# Line 772 | Line 824 | void GenLevelStudy::ImpactOfGluinoChi2Ma
824      }
825     }
826    
775  stringstream cutp25m2;
776  cutp25m2 << "abs(MassGlu-700)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";
777  stringstream cutp50m2;
778  cutp50m2 << "abs(MassGlu-400)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";
779  stringstream cutp75m2;
780  cutp75m2 << "abs(MassGlu-300)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";
781  
782  stringstream cutp25m1;
783  cutp25m1 << "abs(MassGlu-700)<5&&abs(MassLSP-500)&&pfJetGoodNum>0";
784  stringstream cutp50m1;
785  cutp50m1 << "abs(MassGlu-700)<5&&abs(MassLSP-400)&&pfJetGoodNum>0";
786  stringstream cutp75m1;
787  cutp75m1 << "abs(MassGlu-700)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";
788  
789  TH1F *nJets25m2 = new TH1F("nJets25m2","nJets25m2",20,-0.5,19.5);
790  TH1F *nJets50m2 = new TH1F("nJets50m2","nJets50m2",20,-0.5,19.5);
791  TH1F *nJets75m2 = new TH1F("nJets75m2","nJets75m2",20,-0.5,19.5);
792  
793  TH1F *sumJetpt25m2 = new TH1F("sumJetpt25m2","sumJetpt25m2",100,0,300);
794  TH1F *sumJetpt50m2 = new TH1F("sumJetpt50m2","sumJetpt50m2",100,0,300);
795  TH1F *sumJetpt75m2 = new TH1F("sumJetpt75m2","sumJetpt75m2",100,0,300);
796  
797  TH1F *Zpt25m2 = new TH1F("Zpt25m2","Zpt25m2",100,0,200);
798  TH1F *Zpt50m2 = new TH1F("Zpt50m2","Zpt50m2",100,0,200);
799  TH1F *Zpt75m2 = new TH1F("Zpt75m2","Zpt75m2",100,0,200);
800  
801  TH1F *nJets25m1 = new TH1F("nJets25m1","nJets25m1",20,-0.5,19.5);
802  TH1F *nJets50m1 = new TH1F("nJets50m1","nJets50m1",20,-0.5,19.5);
803  TH1F *nJets75m1 = new TH1F("nJets75m1","nJets75m1",20,-0.5,19.5);
804  
805  TH1F *sumJetpt25m1 = new TH1F("sumJetpt25m1","sumJetpt25m1",100,0,300);
806  TH1F *sumJetpt50m1 = new TH1F("sumJetpt50m1","sumJetpt50m1",100,0,300);
807  TH1F *sumJetpt75m1 = new TH1F("sumJetpt75m1","sumJetpt75m1",100,0,300);
808  
809  TH1F *Zpt25m1 = new TH1F("Zpt25m1","Zpt25m1",100,0,200);
810  TH1F *Zpt50m1 = new TH1F("Zpt50m1","Zpt50m1",100,0,200);
811  TH1F *Zpt75m1 = new TH1F("Zpt75m1","Zpt75m1",100,0,200);
812  
813  smsp025events.Draw("pfJetGoodNum>>nJets25m2",("abs(mll-91.2)&&id1==id2&&"+cutp25m2.str()).c_str());
814  smsp050events.Draw("pfJetGoodNum>>nJets50m2",("abs(mll-91.2)&&id1==id2&&"+cutp50m2.str()).c_str());
815  smsp075events.Draw("pfJetGoodNum>>nJets75m2",("abs(mll-91.2)&&id1==id2&&"+cutp75m2.str()).c_str());
816  
817  smsp025events.Draw("sumJetPt[1]>>sumJetpt25m2",("abs(mll-91.2)&&id1==id2&&"+cutp25m2.str()).c_str());
818  smsp050events.Draw("sumJetPt[1]>>sumJetpt50m2",("abs(mll-91.2)&&id1==id2&&"+cutp50m2.str()).c_str());
819  smsp075events.Draw("sumJetPt[1]>>sumJetpt75m2",("abs(mll-91.2)&&id1==id2&&"+cutp75m2.str()).c_str());
820  
821  smsp025events.Draw("pt>>Zpt25m2",("abs(mll-91.2)&&id1==id2&&"+cutp25m2.str()).c_str());
822  smsp050events.Draw("pt>>Zpt50m2",("abs(mll-91.2)&&id1==id2&&"+cutp50m2.str()).c_str());
823  smsp075events.Draw("pt>>Zpt75m2",("abs(mll-91.2)&&id1==id2&&"+cutp75m2.str()).c_str());
824  
825  smsp025events.Draw("pfJetGoodNum>>nJets25m1",("abs(mll-91.2)&&id1==id2&&"+cutp25m1.str()).c_str());
826  smsp050events.Draw("pfJetGoodNum>>nJets50m1",("abs(mll-91.2)&&id1==id2&&"+cutp50m1.str()).c_str());
827  smsp075events.Draw("pfJetGoodNum>>nJets75m1",("abs(mll-91.2)&&id1==id2&&"+cutp75m1.str()).c_str());
828  
829  smsp025events.Draw("sumJetPt[1]>>sumJetpt25m1",("abs(mll-91.2)&&id1==id2&&"+cutp25m1.str()).c_str());
830  smsp050events.Draw("sumJetPt[1]>>sumJetpt50m1",("abs(mll-91.2)&&id1==id2&&"+cutp50m1.str()).c_str());
831  smsp075events.Draw("sumJetPt[1]>>sumJetpt75m1",("abs(mll-91.2)&&id1==id2&&"+cutp75m1.str()).c_str());
832  
833  smsp025events.Draw("pt>>Zpt25m1",("abs(mll-91.2)&&id1==id2&&"+cutp25m1.str()).c_str());
834  smsp050events.Draw("pt>>Zpt50m1",("abs(mll-91.2)&&id1==id2&&"+cutp50m1.str()).c_str());
835  smsp075events.Draw("pt>>Zpt75m1",("abs(mll-91.2)&&id1==id2&&"+cutp75m1.str()).c_str());
836  
837  sumJetpt25m1->GetXaxis()->SetTitle("Sum of Jet Pt (GeV)");
838  sumJetpt25m1->GetYaxis()->SetTitle("events");
839  sumJetpt25m1->GetXaxis()->CenterTitle();
840  sumJetpt25m1->GetYaxis()->CenterTitle();
841  
842  sumJetpt25m1->SetLineColor(diversehistocolor(0));
843  sumJetpt50m1->SetLineColor(diversehistocolor(1));
844  sumJetpt75m1->SetLineColor(diversehistocolor(2));
845  
846  TLegend *leg = make_legend("",0.6,0.6,false);
847  leg->AddEntry(sumJetpt25m1,"#Delta m_{2} = 50 GeV","l");
848  leg->AddEntry(sumJetpt50m1,"#Delta m_{2} = 150 GeV","l");
849  leg->AddEntry(sumJetpt75m1,"#Delta m_{2} = 450 GeV","l");
850  
851  sumJetpt25m1->Draw("histo");
852  sumJetpt50m1->Draw("histo,same");
853  sumJetpt75m1->Draw("histo,same");
854  leg->Draw("same");
855  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM2/ComparingSumJetPt_Of_Three_Different_Gluino_Chi2_MassDifferences");
856  
857  nJets25m1->SetLineColor(diversehistocolor(0));
858  nJets50m1->SetLineColor(diversehistocolor(1));
859  nJets75m1->SetLineColor(diversehistocolor(2));  
860  nJets25m1->GetXaxis()->SetTitle("N(Jets)");
861  nJets25m1->GetXaxis()->CenterTitle();
862  nJets25m1->GetYaxis()->SetTitle("events");
863  nJets25m1->GetYaxis()->CenterTitle();
864  nJets25m1->Draw("histo");
865  nJets50m1->Draw("histo,same");
866  nJets75m1->Draw("histo,same");
867  leg->Draw("same");
868  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM2/ComparingNJets_Of_Three_Different_Gluino_Chi2_MassDifferences");
869  
870  Zpt25m1->GetXaxis()->SetTitle("Z p_{T} (GeV)");
871  Zpt25m1->GetXaxis()->CenterTitle();
872  Zpt25m1->GetYaxis()->SetTitle("events");
873  Zpt25m1->GetYaxis()->CenterTitle();
874  Zpt25m1->SetLineColor(diversehistocolor(0));
875  Zpt50m1->SetLineColor(diversehistocolor(1));
876  Zpt75m1->SetLineColor(diversehistocolor(2));
877  Zpt25m1->Draw("histo");
878  Zpt50m1->Draw("histo,same");
879  Zpt75m1->Draw("histo,same");
880  leg->Draw("same");
881  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM2/ComparingZPt_Of_Three_Different_Gluino_Chi2_MassDifferences");
882  
883 //------------
884  
885  sumJetpt25m2->GetXaxis()->SetTitle("Sum of Jet Pt (GeV)");
886  sumJetpt25m2->GetYaxis()->SetTitle("events");
887  sumJetpt25m2->GetXaxis()->CenterTitle();
888  sumJetpt25m2->GetYaxis()->CenterTitle();
889  
890  sumJetpt25m2->SetLineColor(diversehistocolor(0));
891  sumJetpt50m2->SetLineColor(diversehistocolor(1));
892  sumJetpt75m2->SetLineColor(diversehistocolor(2));
893  
894  TLegend *leg2 = make_legend("",0.6,0.6,false);
895  leg2->AddEntry(sumJetpt75m2,"#Delta m_{1} = 50 GeV","l");
896  leg2->AddEntry(sumJetpt50m2,"#Delta m_{1} = 150 GeV","l");
897  leg2->AddEntry(sumJetpt25m2,"#Delta m_{1} = 450 GeV","l");
898  
899  sumJetpt25m2->Draw("histo");
900  sumJetpt50m2->Draw("histo,same");
901  sumJetpt75m2->Draw("histo,same");
902  leg2->Draw("same");
903  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM1/ComparingSumJetPt_Of_Three_Different_Chi1_Chi2_MassDifferences");
904  
905  nJets25m2->SetLineColor(diversehistocolor(0));
906  nJets50m2->SetLineColor(diversehistocolor(1));
907  nJets75m2->SetLineColor(diversehistocolor(2));  
908  nJets25m2->GetXaxis()->SetTitle("N(Jets)");
909  nJets25m2->GetXaxis()->CenterTitle();
910  nJets25m2->GetYaxis()->SetTitle("events");
911  nJets25m2->GetYaxis()->CenterTitle();
912
913  nJets25m2->Draw("histo");
914  nJets50m2->Draw("histo,same");
915  nJets75m2->Draw("histo,same");
916  leg2->Draw("same");
917  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM1/ComparingNJets_Of_Three_Different_Chi1_Chi2_MassDifferences");
918  
919  Zpt25m2->GetXaxis()->SetTitle("Z p_{T} (GeV)");
920  Zpt25m2->GetXaxis()->CenterTitle();
921  Zpt25m2->GetYaxis()->SetTitle("events");
922  Zpt25m2->GetYaxis()->CenterTitle();
923  
924  Zpt25m2->SetLineColor(diversehistocolor(0));
925  Zpt50m2->SetLineColor(diversehistocolor(1));
926  Zpt75m2->SetLineColor(diversehistocolor(2));  
927  Zpt25m2->Draw("histo");
928  Zpt50m2->Draw("histo,same");
929  Zpt75m2->Draw("histo,same");
930  leg2->Draw("same");
931  CompleteSave(can,"GeneratorStudies/MassDifferences/VaryingDeltaM1/ComparingZPt_Of_Three_Different_Chi1_Chi2_MassDifferences");
827    
828 < //--------------
934 <  delete can;
828 >  // STEP 2: Define cuts
829    
830 <  delete nJets25m1;
831 <  delete nJets50m1;
832 <  delete nJets75m1;
833 <  
834 <  delete nJets25m2;
835 <  delete nJets50m2;
836 <  delete nJets75m2;
837 <  
838 <  delete sumJetpt25m1;
839 <  delete sumJetpt50m1;
840 <  delete sumJetpt75m1;
841 <  
842 <  delete sumJetpt25m2;
843 <  delete sumJetpt50m2;
844 <  delete sumJetpt75m2;
830 >  stringstream cut_VaryingGluiChi2_MDiff_x25;
831 >  cut_VaryingGluiChi2_MDiff_x25 << "abs(MassGlu-700)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";   // config: (700,250,100)
832 >  stringstream cut_VaryingGluiChi2_MDiff_x50;
833 >  cut_VaryingGluiChi2_MDiff_x50  << "abs(MassGlu-400)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";  // config: (400,250,100)
834 >  stringstream cut_VaryingGluiChi2_MDiff_x75;
835 >  cut_VaryingGluiChi2_MDiff_x75  << "abs(MassGlu-300)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";  // config: (300,250,100)
836 >  
837 >  
838 >  stringstream cut_VaryingChi2LSP_MDiff_x25;
839 >  cut_VaryingChi2LSP_MDiff_x25 << "abs(MassGlu-700)<5&&abs(MassLSP-500)&&pfJetGoodNum>0";   // config: (700,550,500)
840 >  stringstream cut_VaryingChi2LSP_MDiff_x50;
841 >  cut_VaryingChi2LSP_MDiff_x50  << "abs(MassGlu-700)<5&&abs(MassLSP-550)&&pfJetGoodNum>0";  // config: (700,550,400)
842 >  stringstream cut_VaryingChi2LSP_MDiff_x75;
843 >  cut_VaryingChi2LSP_MDiff_x75  << "abs(MassGlu-700)<5&&abs(MassLSP-100)&&pfJetGoodNum>0";  // config: (700,550,100)
844 >  
845 >  
846 >  // STEP 3: Define histos
847 >  TH1F *nJets25GluChi2 = new TH1F("nJets25GluChi2","nJets25GluChi2",20,-0.5,19.5);
848 >  TH1F *nJets50GluChi2 = new TH1F("nJets50GluChi2","nJets50GluChi2",20,-0.5,19.5);
849 >  TH1F *nJets75GluChi2 = new TH1F("nJets75GluChi2","nJets75GluChi2",20,-0.5,19.5);
850 >  
851 >  TH1F *sumJetpt25GluChi2 = new TH1F("sumJetpt25GluChi2","sumJetpt25GluChi2",100,0,300);
852 >  TH1F *sumJetpt50GluChi2 = new TH1F("sumJetpt50GluChi2","sumJetpt50GluChi2",100,0,300);
853 >  TH1F *sumJetpt75GluChi2 = new TH1F("sumJetpt75GluChi2","sumJetpt75GluChi2",100,0,300);
854 >  
855 >  TH1F *Zpt25GluChi2 = new TH1F("Zpt25GluChi2","Zpt25GluChi2",100,0,200);
856 >  TH1F *Zpt50GluChi2 = new TH1F("Zpt50GluChi2","Zpt50GluChi2",100,0,200);
857 >  TH1F *Zpt75GluChi2 = new TH1F("Zpt75GluChi2","Zpt75GluChi2",100,0,200);
858 >  
859 >  TH1F *MET25GluChi2 = new TH1F("MET25GluChi2","MET25GluChi2",100,0,500);
860 >  TH1F *MET50GluChi2 = new TH1F("MET50GluChi2","MET50GluChi2",100,0,500);
861 >  TH1F *MET75GluChi2 = new TH1F("MET75GluChi2","MET75GluChi2",100,0,500);
862 >  
863 >  TH1F *JZB25GluChi2 = new TH1F("JZB25GluChi2","JZB25GluChi2",100,-400,800);
864 >  TH1F *JZB50GluChi2 = new TH1F("JZB50GluChi2","JZB50GluChi2",100,-400,800);
865 >  TH1F *JZB75GluChi2 = new TH1F("JZB75GluChi2","JZB75GluChi2",100,-400,800);
866 >  
867 >  TH1F *nJets25Chi2LSP = new TH1F("nJets25Chi2LSP","nJets25Chi2LSP",20,-0.5,19.5);
868 >  TH1F *nJets50Chi2LSP = new TH1F("nJets50Chi2LSP","nJets50Chi2LSP",20,-0.5,19.5);
869 >  TH1F *nJets75Chi2LSP = new TH1F("nJets75Chi2LSP","nJets75Chi2LSP",20,-0.5,19.5);
870 >  
871 >  TH1F *sumJetpt25Chi2LSP = new TH1F("sumJetpt25Chi2LSP","sumJetpt25Chi2LSP",100,0,300);
872 >  TH1F *sumJetpt50Chi2LSP = new TH1F("sumJetpt50Chi2LSP","sumJetpt50Chi2LSP",100,0,300);
873 >  TH1F *sumJetpt75Chi2LSP = new TH1F("sumJetpt75Chi2LSP","sumJetpt75Chi2LSP",100,0,300);
874 >  
875 >  TH1F *Zpt25Chi2LSP = new TH1F("Zpt25Chi2LSP","Zpt25Chi2LSP",100,0,200);
876 >  TH1F *Zpt50Chi2LSP = new TH1F("Zpt50Chi2LSP","Zpt50Chi2LSP",100,0,200);
877 >  TH1F *Zpt75Chi2LSP = new TH1F("Zpt75Chi2LSP","Zpt75Chi2LSP",100,0,200);
878 >
879 >  TH1F *MET25Chi2LSP = new TH1F("MET25Chi2LSP","MET25Chi2LSP",100,0,500);
880 >  TH1F *MET50Chi2LSP = new TH1F("MET50Chi2LSP","MET50Chi2LSP",100,0,500);
881 >  TH1F *MET75Chi2LSP = new TH1F("MET75Chi2LSP","MET75Chi2LSP",100,0,500);
882 >
883 >  TH1F *JZB25Chi2LSP = new TH1F("JZB25Chi2LSP","JZB25Chi2LSP",100,-400,800);
884 >  TH1F *JZB50Chi2LSP = new TH1F("JZB50Chi2LSP","JZB50Chi2LSP",100,-400,800);
885 >  TH1F *JZB75Chi2LSP = new TH1F("JZB75Chi2LSP","JZB75Chi2LSP",100,-400,800);
886 >
887 >  // STEP 4: Filling the histos
888 >  smsp025events.Draw("pfJetGoodNum>>nJets25GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x25.str()).c_str());
889 >  smsp050events.Draw("pfJetGoodNum>>nJets50GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x50.str()).c_str());
890 >  smsp075events.Draw("pfJetGoodNum>>nJets75GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x75.str()).c_str());
891 >  
892 >  smsp025events.Draw("pfJetGoodNum>>nJets25Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
893 >  smsp050events.Draw("pfJetGoodNum>>nJets50Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
894 >  smsp075events.Draw("pfJetGoodNum>>nJets75Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
895 >  
896 >  smsp025events.Draw("sumJetPt[1]>>sumJetpt25GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x25.str()).c_str());
897 >  smsp050events.Draw("sumJetPt[1]>>sumJetpt50GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x50.str()).c_str());
898 >  smsp075events.Draw("sumJetPt[1]>>sumJetpt75GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x75.str()).c_str());
899 >  
900 >  smsp025events.Draw("sumJetPt[1]>>sumJetpt25Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
901 >  smsp050events.Draw("sumJetPt[1]>>sumJetpt50Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
902 >  smsp075events.Draw("sumJetPt[1]>>sumJetpt75Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
903 >  
904 >  smsp025events.Draw("pt>>Zpt25GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x25.str()).c_str());
905 >  smsp050events.Draw("pt>>Zpt50GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x50.str()).c_str());
906 >  smsp075events.Draw("pt>>Zpt75GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x75.str()).c_str());
907 >  
908 >  smsp025events.Draw("pt>>Zpt25Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
909 >  smsp050events.Draw("pt>>Zpt50Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
910 >  smsp075events.Draw("pt>>Zpt75Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
911 >  
912 >  smsp025events.Draw("met[4]>>MET25GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x25.str()).c_str());
913 >  smsp050events.Draw("met[4]>>MET50GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x50.str()).c_str());
914 >  smsp075events.Draw("met[4]>>MET75GluChi2",("id1==id2&&"+cut_VaryingGluiChi2_MDiff_x75.str()).c_str());
915 >  
916 >  smsp025events.Draw("met[4]>>MET25Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
917 >  smsp050events.Draw("met[4]>>MET50Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
918 >  smsp075events.Draw("met[4]>>MET75Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
919 >  
920 >  smsp025events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB25GluChi2",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
921 >  smsp050events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB50GluChi2",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
922 >  smsp075events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB75GluChi2",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
923 >  
924 >  smsp025events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB25Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x25.str()).c_str());
925 >  smsp050events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB50Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x50.str()).c_str());
926 >  smsp075events.Draw("(((jzb[1]+0.043*pt)-3.05933))>>JZB75Chi2LSP",("id1==id2&&"+cut_VaryingChi2LSP_MDiff_x75.str()).c_str());
927 >  
928 >  // STEP 4: Cosmetics
929 >  color_histos(nJets25GluChi2,nJets50GluChi2,nJets75GluChi2,"N(jets)");
930 >  color_histos(nJets25Chi2LSP,nJets50Chi2LSP,nJets75Chi2LSP,"N(jets)");
931 >  color_histos(sumJetpt25GluChi2,sumJetpt50GluChi2,sumJetpt75GluChi2,"Sum of Jet Pt (GeV)");
932 >  color_histos(sumJetpt25Chi2LSP,sumJetpt50Chi2LSP,sumJetpt75Chi2LSP,"Sum of Jet Pt (GeV)");
933 >  color_histos(Zpt25GluChi2,Zpt50GluChi2,Zpt75GluChi2,"Z p_{T} (GeV)");
934 >  color_histos(Zpt25Chi2LSP,Zpt50Chi2LSP,Zpt75Chi2LSP,"Z p_{T} (GeV)");
935 >  color_histos(MET25GluChi2,MET50GluChi2,MET75GluChi2,"Missing E_{T} (GeV)");
936 >  color_histos(MET25Chi2LSP,MET50Chi2LSP,MET75Chi2LSP,"Missing E_{T} (GeV)");
937 >  color_histos(JZB25GluChi2,JZB50GluChi2,JZB75GluChi2,"JZB (GeV)");
938 >  color_histos(JZB25Chi2LSP,JZB50Chi2LSP,JZB75Chi2LSP,"JZB (GeV)");
939 >  
940 >  TLegend *legGluChi2 = make_legend("",0.55,0.6,false);
941 >  legGluChi2->AddEntry(nJets75GluChi2,"m_{#tilde{g}}-m_{#chi_{2}} = 50 GeV","l");
942 >  legGluChi2->AddEntry(nJets50GluChi2,"m_{#tilde{g}}-m_{#chi_{2}} = 150 GeV","l");
943 >  legGluChi2->AddEntry(nJets25GluChi2,"m_{#tilde{g}}-m_{#chi_{2}} = 450 GeV","l");
944 >
945 >  TLegend *legChi2LSP = make_legend("",0.55,0.6,false);
946 >  legChi2LSP->AddEntry(nJets25Chi2LSP,"m_{#chi_{2}}-m_{LSP} = 50 GeV","l");
947 >  legChi2LSP->AddEntry(nJets50Chi2LSP,"m_{#chi_{2}}-m_{LSP} = 150 GeV","l");
948 >  legChi2LSP->AddEntry(nJets75Chi2LSP,"m_{#chi_{2}}-m_{LSP} = 450 GeV","l");
949 >
950 >  // STEP 4: Draw!
951 >  
952 >  nJets25GluChi2->DrawNormalized("histo");
953 >  nJets50GluChi2->DrawNormalized("histo,same");
954 >  nJets75GluChi2->DrawNormalized("histo,same");
955 >  legGluChi2->Draw("same");
956 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingNJets_Of_Three_Different_Gluino_Chi2_MassDifferences");
957 >  
958 >  sumJetpt25GluChi2->SetMaximum(sumJetpt25GluChi2->GetMaximum()*15);
959 >  sumJetpt25GluChi2->DrawNormalized("histo");
960 >  sumJetpt50GluChi2->DrawNormalized("histo,same");
961 >  sumJetpt75GluChi2->DrawNormalized("histo,same");
962 >  legGluChi2->Draw("same");
963 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingSumJetPt_Of_Three_Different_Gluino_Chi2_MassDifferences");
964 >  
965 >  Zpt25GluChi2->SetMaximum(Zpt25GluChi2->GetMaximum()*15);
966 >  Zpt25GluChi2->DrawNormalized("histo");
967 >  Zpt50GluChi2->DrawNormalized("histo,same");
968 >  Zpt75GluChi2->DrawNormalized("histo,same");
969 >  legGluChi2->Draw("same");
970 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingZPt_Of_Three_Different_Gluino_Chi2_MassDifferences");
971 >  
972 >  MET25GluChi2->SetMaximum(MET25GluChi2->GetMaximum()*15);
973 >  MET25GluChi2->DrawNormalized("histo");
974 >  MET50GluChi2->DrawNormalized("histo,same");
975 >  MET75GluChi2->DrawNormalized("histo,same");
976 >  legGluChi2->Draw("same");
977 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingMET_Of_Three_Different_Gluino_Chi2_MassDifferences");
978 >  
979 >  JZB25GluChi2->SetMaximum(JZB25GluChi2->GetMaximum()*10);
980 >  JZB25GluChi2->DrawNormalized("histo");
981 >  JZB50GluChi2->DrawNormalized("histo,same");
982 >  JZB75GluChi2->DrawNormalized("histo,same");
983 > //  legGluChi2->Draw("same");
984 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingJZB_Of_Three_Different_Gluino_Chi2_MassDifferences");
985 >  
986 >  //----------------------
987 >  
988 >  
989 >  sumJetpt25Chi2LSP->SetMaximum(sumJetpt25Chi2LSP->GetMaximum()*15);
990 >  sumJetpt25Chi2LSP->DrawNormalized("histo");
991 >  sumJetpt50Chi2LSP->DrawNormalized("histo,same");
992 >  sumJetpt75Chi2LSP->DrawNormalized("histo,same");
993 >  legChi2LSP->Draw("same");
994 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingSumJetPt_Of_Three_Different_Chi1_Chi2_MassDifferences");
995 >  
996 >  nJets25Chi2LSP->DrawNormalized("histo");
997 >  nJets50Chi2LSP->DrawNormalized("histo,same");
998 >  nJets75Chi2LSP->DrawNormalized("histo,same");
999 >  legChi2LSP->Draw("same");
1000 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingNJets_Of_Three_Different_Chi1_Chi2_MassDifferences");
1001 >  
1002 >  Zpt25Chi2LSP->SetMaximum(Zpt25Chi2LSP->GetMaximum()*30);
1003 >  Zpt25Chi2LSP->DrawNormalized("histo");
1004 >  Zpt50Chi2LSP->DrawNormalized("histo,same");
1005 >  Zpt75Chi2LSP->DrawNormalized("histo,same");
1006 >  legChi2LSP->Draw("same");
1007 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingZPt_Of_Three_Different_Chi1_Chi2_MassDifferences");
1008 >  
1009 >  MET25Chi2LSP->SetMaximum(MET25Chi2LSP->GetMaximum()*30);
1010 >  MET25Chi2LSP->DrawNormalized("histo");
1011 >  MET50Chi2LSP->DrawNormalized("histo,same");
1012 >  MET75Chi2LSP->DrawNormalized("histo,same");
1013 >  legChi2LSP->Draw("same");
1014 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingMET_Of_Three_Different_Chi1_Chi2_MassDifferences");
1015 >  
1016 >  JZB25Chi2LSP->SetMaximum(JZB25Chi2LSP->GetMaximum()*30);
1017 >  JZB25Chi2LSP->DrawNormalized("histo");
1018 >  JZB50Chi2LSP->DrawNormalized("histo,same");
1019 >  JZB75Chi2LSP->DrawNormalized("histo,same");
1020 > //  legChi2LSP->Draw("same");
1021 >  CompleteSave(can,"GeneratorStudies/MassDifferences/ComparingJZB_Of_Three_Different_Chi1_Chi2_MassDifferences");
1022   }
952
953

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines