Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:00

0001 {
0002 
0003 
0004 gSystem->Load("libFWCoreFWLite.so");
0005 FWLiteEnabler::enable();
0006 TFile f("testPFPAT.root");
0007 
0008 TTree* Events = 0;
0009 gDirectory->GetObject("Events", Events);
0010 
0011 Events->Draw("recoIsolatedPFCandidates_pfPionsIsolation__PFPAT.obj.isolation_>>h2");
0012 Events->Draw("recoIsolatedPFCandidates_pfLeptonsPtGt5Isolation__PFPAT.obj.isolation_>>h1","","same");
0013 
0014 TH1* h1 = 0;
0015 gDirectory->GetObject("h1", h1);
0016 h1->SetLineColor(4);
0017 h1->SetLineWidth(3);
0018 h1->SetFillStyle(3005);
0019 h1->SetFillColor(4);
0020 
0021 TH1* h2 = 0;
0022 gDirectory->GetObject("h2", h2);
0023 h2->SetTitle("H to ZZ to 4 mu. Isolation cone 0.2; p_{T} fraction");
0024 h2->SetStats(0);
0025 h2->SetLineWidth(3);
0026 
0027 TLegend leg(0.35, 0.6, 0.89,0.89);
0028 leg.AddEntry(h1, "Muon PFCandidates","lf");
0029 leg.AddEntry(h2, "Pion PFCandidates","lf");
0030 leg.Draw();
0031 
0032 gPad->SetLogy();
0033 gPad->SaveAs("isolation.eps");
0034 }