//================================================================== // // hepg_ana.C Macro // // This MACRO calls "TTopHepg.cc" that searches and fills histos from // TGenpBlock and plots various t - W - b particle properties from // ttbar decay. // // Version 0.0: P. Koehn 03/04/02 // // root[] .x hepg_ana.C // //================================================================== { //timer start gROOT->Time(); // Instantiate a StnAna object //---------------------------- TStnAna x("/nosu3a/pkoehn/mc/top/new_pyt_ttbar_dilep_ee_stntuple_440.root"); gSystem->CompileMacro("TTopHepg.cc","k"); // // Make the output histogram file TFile* HistFile = new TFile("TTopHepg.root","RECREATE","test file"); // // Making TTopHepg object TTopHepg* m = new TTopHepg(HistFile,"tophepg","tophepg"); // // The module must be added to TStnAna object x.AddModule(m); TTopHepg::Hist_t* mc_hist = m->GetHist(); m->SetDebugLevel(0); // Setting level = 1 gives a ridiculously large, // but informative, print spew. x.Run(200); m->PlotHistograms(-1,1); // canvas 1, all particles m->PlotHistograms(-1,2); // canvas 2, top and bottom m->PlotHistograms(-1,3); // canvas 2, W boson and lepton(ele or Muon) HistFile->Write(); //HistFile->Close(); }