void Plot2Dproj() { TCanvas *c1 = new TCanvas ( "c1", "2D Projections", 800, 0, 700, 700); c1->Divide(1,2); // File A file_a = new TFile( "data/a.root"); h3a = (TH3D*) file_a->Get( "hist1"); TH2D *h2a = h3a->Project3D( "yx"); c1->cd(1); h2a->Draw(); // File B file_b = new TFile( "data/b.root"); h3b = (TH3D*) file_b->Get( "hist1"); TH2D *h2b = h3b->Project3D( "yx2"); c1->cd(2); h2b->Draw(); }