#include "/home/xs32/work/cms/metsgf/src/9.02/root/tdrstyle.C" void sgfvsmht_lm1_ttj(){ TString lm1 = "/home/xs32/work/cms/metsgf/dat/9.02/susy/lm1/regular/"; TString ttj = "/home/xs32/work/cms/metsgf/dat/9.02/ttjets/regular/"; TString output_file = "sgfvsmht_lm1_ttj.png"; TString output_file2 = "sgfvsmht_lm1_ttj.pdf"; TString tree_ntp = "Events"; TChain *ch_lm1_ntp = new TChain(tree_ntp); ch_lm1_ntp->Add(lm1+"*.root"); // TChain *ch_ttj_ntp = new TChain(tree_ntp); // TChain *ch_ttj_dcs = new TChain(tree_dcs); // ch_ttj_ntp->Add(ttj+"*.root"); // ch_ttj_dcs->Add(ttj+"*.root"); TLegend *leg = new TLegend(0.69, 0.85, 0.93, 0.94); gROOT->Reset(); setTDRStyle(); const int nBins = 100; const int Xmin = 0; const int Ymin = 0; const int Xmax = 1500; const int Ymax = 500; Float_t sgf, mht, num_of_jets, jet_0_et, jet_1_et, jet_2_et; Float_t r1, r2, ht, fem; Double_t wgt; // ---------------------------------------------------------------- // Lm1 // ---------------------------------------------------------------- TH2D *h_sgf_mht_allhadcut_lm1 = new TH2D("SignificancevsMHT_ALLHADCUT_lm1", "Significance vs MHT", nBins, Xmin, Xmax, nBins, Ymin, Ymax); Int_t nevent = ch_lm1_ntp->GetEntries(); for (Int_t i=0; i< nevent; i++) { // ch_lm1_ntp->GetBranch("double_allHadronic_MHT.significance_ANA")->GetLeaf("double_allHadronic_MHT.significance_ANA.obj")->SetAddress(&sgf); // ch_lm1_ntp->GetBranch("double_allHadronic_MHT.mht_ANA")->GetLeaf("double_allHadronic_MHT.mht_ANA.obj")->SetAddress(&mht); ch_lm1_ntp->GetBranch("variables")->GetLeaf("MHT.significance")->SetAddress(&sgf); ch_lm1_ntp->GetBranch("variables")->GetLeaf("MHT.mht")->SetAddress(&mht); ch_lm1_ntp->GetEntry(i); h_sgf_mht_allhadcut_lm1 -> Fill(mht, sgf); } TCanvas *c1 = new TCanvas("SgfvsMHT", "Significance vs MHT", 200, 50, 600, 600); h_sgf_mht_allhadcut_lm1 -> Draw(); // c1->Print(output_file); // c1->Print(output_file2); }