#include #include "TTree.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include #include #include #include "TLorentzVector.h" #ifdef __MAKECINT__ #pragma link C++ class std::vector < std::vector >+; #endif using namespace std; void corr() { // gStyle->SetOptStat(0); TFile *f= new TFile ("tau3.root","READ"); // TTree *t3 = (TTree*)f->Get("physics"); TFile*f2 = new TFile("correlation2.root","RECREATE"); TH2F *h1 = new TH2F("tau_seedCalo_isolFracVstau_etOverPtLeadTrk","tau_seedCalo_isolFracVstau_etOverPtLeadTrk",50,0,1,50,0,6); //TH1F* tau_etOverPtLeadTrk; // TH1F* tau_seedCalo_EMRadius; ///TH1F* tau_seedCalo_isolFrac; TH1F* etOverPtLeadTrk = 0; TH1F* seedCalo_EMRadius = 0; TH1F* seedCalo_isolFrac = 0; etOverPtLeadTrk = (TH1F *) f->Get("tau_etOverPtLeadTrk"); seedCalo_EMRadius = (TH1F *) f->Get("tau_seedCalo_EMRadius"); seedCalo_isolFrac = (TH1F *) f->Get("tau_seedCalo_isolFrac"); for ( int i = 0 ; i < etOverPtLeadTrk ; i++) { for ( int j = 0 ; j < seedCalo_isolFrac ; j++) { h1->Fill(seedCalo_isolFrac , etOverPtLeadTrk,1); } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //} // } // TCanvas* c1 = new TCanvas("buf","buf"); // h14->Draw("COLZ"); // f2->Update(); f2->cd(); f2->Write(); f2->Close(); }