%jsroot on #include "Riostream.h" #include "TString.h" #include "TFile.h" #include "TTree.h" #include "TSystem.h" #include #include //This two lines can be commented out. You just need it once, and in case the CVS file was not provided already system("rm outreach.csv"); system("wget http://opendata.atlas.cern/visualisations/CrossFilter/outreach.csv"); //If the file is downloaded with the line above, you *need* to remove the first line of the outreach.csv TString dir = gSystem->UnixPathName(__FILE__); dir.ReplaceAll("outreach.C",""); dir.ReplaceAll("/./","/"); TFile *f = new TFile("outreach.root","RECREATE"); TTree *tree = new TTree("ntuple","data from csv file"); // The file inside has ----> type, Channel, NJets, MET, Mll, LepDeltaPhi, METLLDeltaPhi, SumLepPt, BTags, weight tree->ReadFile("outreach.csv","type/I:Channel/I:NJets/I:MET/F:Mll/F:LepDeltaPhi/F:METLLDeltaPhi/F:SumLepPt/F:BTags/F:weight/F",','); f->Write(); system("ls -lhrt outreach.*"); TFile *_file0 = TFile::Open("outreach.root"); TCanvas *c3D = new TCanvas("c3D","c3D",10,10,400,400); ntuple->Draw("MET:Mll:LepDeltaPhi","MET>0."); c3D->Draw(); TCanvas *cz = new TCanvas("cz","cz",10,10,400,400); ntuple->Draw("Mll:MET","weight>-999","colz"); cz->Draw(); TCanvas *c2D = new TCanvas("c2D","c2D",10,10,400,400); ntuple->Draw("Mll:LepDeltaPhi","MET>0.","colz"); c2D->Draw();