// $Id$ // // File: DTrackingResolutionGEANT.cc // Created: Mon Feb 25 15:06:17 EST 2008 // Creator: davidl (on Darwin fwing-dhcp13.jlab.org 8.11.1 i386) // #include #include #include #include using namespace std; #include "DTrackingResolutionGEANT.h" #define _DBG_ cout<<__FILE__<<":"<<__LINE__<<" " //--------------------------------- // DTrackingResolutionGEANT (Constructor) //--------------------------------- DTrackingResolutionGEANT::DTrackingResolutionGEANT() { // Make sure a TApplication exists, otherwise, the following will fail if(!gApplication){ int argc=0; new TApplication("myapp", &argc, NULL); } // Open ROOT file file = new TFile("hd_res_charged.root"); if(!file->IsOpen()){ cout<GetName()<<"\""<GetObject("dpt_over_pt_vs_p_vs_theta_2", pt_res_hist); if(!pt_res_hist){ cout<GetObject("dtheta_vs_p_vs_theta_2", theta_res_hist); if(!theta_res_hist){ cout<FindObject("dphi_vs_p_vs_theta_2"); if(!phi_res_hist){ cout<FindObject("eff_vs_p_vs_theta"); if(!efficiency_hist){ cout<GetYaxis()->FindBin(p); int thetabin = pt_res_hist->GetXaxis()->FindBin(theta); //_DBG_<<"pbin="<