/* * $Id: plotScan.C,v 1.1 2008/11/12 13:09:32 szuba Exp $ */ #if !defined(__CINT__) || defined(__MAKECINT__) #include #include #include #include #include #include #include #endif void plotScan(void) { const Char_t *histNames[] = { "a0.1-2.0_t3.0-4.0", "a0.5-2.0_t3.0-4.0", "a1.0-2.5_t3.0-4.0", "a1.5-3.0_t3.0-4.0", "a0.1-2.0_t2.5-4.0", "a0.5-2.0_t2.5-4.0", "a1.0-2.5_t2.5-4.0", "a1.5-3.0_t2.5-4.0", "a0.1-2.0_t2.0-3.5", "a0.5-2.0_t2.0-3.5", "a1.0-2.5_t2.0-3.5", "a1.5-3.0_t2.0-3.5", "a0.1-2.0_t1.5-3.0", "a0.5-2.0_t1.5-3.0", "a1.0-2.5_t1.5-3.0", "a1.5-3.0_t1.5-3.0", "a0.1-2.0_t1.0-2.5", "a0.5-2.0_t1.0-2.5", "a1.0-2.5_t1.0-2.5", "a1.5-3.0_t1.0-2.5", "a0.1-2.0_t0.5-2.0", "a0.5-2.0_t0.5-2.0", "a1.0-2.5_t0.5-2.0", "a1.5-3.0_t0.5-2.0", "a0.1-2.0_t0.1-2.0", "a0.5-2.0_t0.1-2.0", "a1.0-2.5_t0.1-2.0", "a1.5-3.0_t0.1-2.0" }; const Char_t *inFile = "pTscan_collection-cEtaPhi.root"; TFile *fin; TH2D *hist; cout << "Opening " << inFile << "... "; try { fin = TFile::Open(inFile, "read"); if (fin == NULL) throw 0; if (fin->IsZombie()) throw 0; } catch (...) { cout << "FAILED" << endl; return; } cout << "OK\n" << endl; fin->cd(); gROOT->ProcessLine(".L makePadsHists.C+O"); TObjArray *pads = makePadsHists(4, 7, 0.2, 0.25, NULL, "pTscan"); for (Int_t i = 0; i < pads->GetEntries(); ++i) { fin->GetObject(histNames[i], hist); if (hist != NULL) { TPad *pad = dynamic_cast(pads->At(i)); pad->cd(); hist->SetTitle(""); hist->GetXaxis()->SetLabelSize(0.1); hist->GetYaxis()->SetLabelSize(0.1); hist->GetZaxis()->SetLabelSize(0.1); hist->GetXaxis()->SetTitleSize(0.1); hist->GetYaxis()->SetTitleSize(0.1); hist->GetZaxis()->SetTitleSize(0.1); hist->GetXaxis()->SetTitleOffset(1.2); hist->GetYaxis()->SetTitleOffset(1.2); hist->GetZaxis()->SetTitleOffset(1.2); gStyle->SetOptStat(0); hist->DrawCopy("col"); } } // FIXME: add one colour palette! delete fin; return; }