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.1 by buchmann, Mon Feb 20 17:06:18 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 48 | Line 49 | namespace GenLevelStudy {
49          void fill_pstar_histos(string scandir, float x, TH1F* pstarhistos[], int npstarhistos, TLegend *leg, bool addlegentry);
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 SMSsample="/scratch/buchmann/ntuples/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.root";
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/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 80 | 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 191 | 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 210 | 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 220 | Line 234 | void GenLevelStudy::MomentumFractionScen
234   }  
235  
236   void GenLevelStudy::MomentumFraction() {
223 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 250 | 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);
256 <  //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 279 | 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);
285 <  //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 292 | 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 322 | 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);
328 < //  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 349 | 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);
355 < //  AngleLSPZScenario(625,425);
365 >  AngleLSPZScenario(-1,-1);
366 >  AngleLSPZScenario(1175,500.0);
367 >  AngleLSPZScenario(625,425);
368   }
369  
370   void GenLevelStudy::WidthIllustration() {
# Line 390 | 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 428 | 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 *pstartmap = new TH2F("limitmap", "",(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);
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);
461 >  TH2F *pstarchimap = new TH2F("pstarchimap", "",(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);
462 >  TH2F *pstardiffmap = new TH2F("pstardiffmap", "",(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);
463  
464    for(int mglu=(int)mglustart;mglu<=mgluend;mglu+=(int)mglustep) {
465      for (int mlsp=(int)mLSPstart;mlsp<=mLSPend&&mlsp<=mglu;mlsp+=(int)mLSPstep)
466      {
467 <        float pstar = pSTAR(mglu,mlsp,mlsp+x*(mglu-mlsp));
468 <        pstartmap->Fill(mglu,mlsp,pstar);
467 >        float pstarlsp = pSTAR(mglu,mlsp,mlsp+x*(mglu-mlsp));
468 >        pstarlspmap->Fill(mglu,mlsp,pstarlsp);
469 >        float pstarchi = generalizedpSTAR(mglu,mlsp+x*(mglu-mlsp),1.0);//the second daughter is a jet; we're using 1 GeV here.
470 >        pstarchimap->Fill(mglu,mlsp,pstarchi);
471 >        pstardiffmap->Fill(mglu,mlsp,pstarchi-pstarlsp);
472      }
473    }
474  
475    stringstream pstartitle;
476    pstartitle << "pstar_histo_x_equal_0p" << 100*x << "____NOT_efficiencymap";
477 <  pstartmap->SetTitle(pstartitle.str().c_str());
478 <  pstartmap->SetName(pstartitle.str().c_str());
479 <  pstartmap->GetXaxis()->SetTitle("m_{#tilde{g}} (GeV/c^{2})");
480 <  pstartmap->GetXaxis()->CenterTitle();
481 <  pstartmap->GetYaxis()->SetTitle("m_{LSP} (GeV/c^{2})");
482 <  pstartmap->GetYaxis()->CenterTitle();
483 <  pstartmap->GetZaxis()->SetTitle("p^{*} (GeV/c)");
484 <  pstartmap->GetZaxis()->CenterTitle();
477 >  pstarlspmap->SetTitle(pstartitle.str().c_str());
478 >  pstarlspmap->SetName(pstartitle.str().c_str());
479 >  pstarlspmap->GetXaxis()->SetTitle("m_{#tilde{g}} (GeV/c^{2})");
480 >  pstarlspmap->GetXaxis()->CenterTitle();
481 >  pstarlspmap->GetYaxis()->SetTitle("m_{LSP} (GeV/c^{2})");
482 >  pstarlspmap->GetYaxis()->CenterTitle();
483 >  pstarlspmap->GetZaxis()->SetTitle("p^{*}(LSP) (GeV/c)");
484 >  pstarlspmap->GetZaxis()->CenterTitle();
485  
486    float corr=91.2/x;
487    TLine *l = new TLine(corr,0,1200,1200-corr);
# Line 465 | Line 493 | void GenLevelStudy::pStarIllustration(fl
493  
494    TCanvas *can = new TCanvas("can","can");
495    can->SetRightMargin(0.16);
496 <  pstartmap->Draw("COLZ");
496 >  pstarlspmap->Draw("COLZ");
497    l->Draw("same");
498    l2->Draw("same");
499    stringstream saveas;
500 <  saveas << "GeneratorStudies/PStar_x_0p" << x*100;
500 >  saveas << "GeneratorStudies/PStarLSP_x_0p" << x*100;
501    CompleteSave(can,saveas.str());  
502 +  
503 +  stringstream pstartitle2;
504 +  pstartitle2 << "pstar_histo_x_equal_0p" << 100*x << "____NOT_efficiencymap";
505 +  pstarchimap->SetTitle(pstartitle2.str().c_str());
506 +  pstarchimap->SetName(pstartitle2.str().c_str());
507 +  pstarchimap->GetXaxis()->SetTitle("m_{#tilde{g}} (GeV/c^{2})");
508 +  pstarchimap->GetXaxis()->CenterTitle();
509 +  pstarchimap->GetYaxis()->SetTitle("m_{LSP} (GeV/c^{2})");
510 +  pstarchimap->GetYaxis()->CenterTitle();
511 +  pstarchimap->GetZaxis()->SetTitle("p^{*}(#chi_{2}^{0}) (GeV/c)");
512 +  pstarchimap->GetZaxis()->CenterTitle();
513 +  pstarchimap->Draw("COLZ");
514 +  l->Draw("same");
515 +  l2->Draw("same");
516 +  stringstream saveas2;
517 +  saveas2 << "GeneratorStudies/PStarCHI_x_0p" << x*100;
518 +  CompleteSave(can,saveas2.str());  
519 +  
520 +  stringstream pstartitle3;
521 +  pstartitle3 << "pstar_histo_x_equal_0p" << 100*x << "____NOT_efficiencymap";
522 +  pstardiffmap->SetTitle(pstartitle3.str().c_str());
523 +  pstardiffmap->SetName(pstartitle3.str().c_str());
524 +  pstardiffmap->GetXaxis()->SetTitle("m_{#tilde{g}} (GeV/c^{2})");
525 +  pstardiffmap->GetXaxis()->CenterTitle();
526 +  pstardiffmap->GetYaxis()->SetTitle("m_{LSP} (GeV/c^{2})");
527 +  pstardiffmap->GetYaxis()->CenterTitle();
528 +  pstardiffmap->GetZaxis()->SetTitle("p^{*}(#chi_{2}^{0}) -p^{*}(LSP) (GeV/c)");
529 +  pstardiffmap->GetZaxis()->CenterTitle();
530 + //  pstardiffmap->GetZaxis()->SetRangeUser(0,250);
531 +  pstardiffmap->Draw("COLZ");
532 +  l->Draw("same");
533 +  l2->Draw("same");
534 +  stringstream saveas3;
535 +  saveas3 << "GeneratorStudies/PStar_CHI_minus_LSP__x_0p" << x*100;
536 +  CompleteSave(can,saveas3.str());  
537 +  
538 +  
539    TFile *g = new TFile("pstarshapes.root","UPDATE");
540 <  pstartmap->Write();
540 >  pstarlspmap->Write();
541 >  pstarchimap->Write();
542 >  pstardiffmap->Write();
543    g->Close();
544    delete can;
545 <  delete pstartmap;
545 >  delete pstarlspmap;
546 >  delete pstarchimap;
547 >  delete pstardiffmap;
548   }
549  
550   void GenLevelStudy::DeltaLSPmomentumScenario(float massglu, float masslsp) {
# Line 485 | 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 504 | Line 575 | void GenLevelStudy::DeltaLSPmomentumScen
575  
576  
577   void GenLevelStudy::DeltaLSPmomentum() {
507 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 512 | 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 520 | 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 549 | 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 561 | 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;
570
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 585 | 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 603 | 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 622 | 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 703 | 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");
810 +  TChain smsp050events("events");
811 +  TChain smsp075events("events");
812 +  
813 +  for(int i=0;i<15;i++) {
814 +    for(int j=0;j<15;j++) {
815 +       stringstream filenamep25;
816 +       stringstream filenamep50;
817 +       stringstream filenamep75;
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());
822 +       smsp050events.Add(filenamep50.str().c_str());
823 +       smsp075events.Add(filenamep75.str().c_str());
824 +    }
825 +   }
826 +  
827 +  
828 +  // STEP 2: Define cuts
829 +  
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 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines