// This function cloned from one of the balloon analysis files // It will do some very basic histogramming of the pdr ntuple values // // Tracy Usher (July 9, 2001) #ifndef PSF_plots_c #define PSF_plots_c #include "PSFplot.c" #endif void makePsfPlot(char* histfile) { gROOT->Reset(); gStyle->SetOptStat(1100); gStyle->SetTitleColor(0); // Title box background Color gStyle->SetTitleH(0.11); // Franction of title box hight gStyle->SetTitleW(0.35); // Franction of title box width gStyle->SetTitleX(0.1); // X position of the title box from left gStyle->SetTitleY(1.00); // Y position of the title box from bottom TCanvas *pCan = new TCanvas("PSF_cuts","PSF Cut Plots",0,0,700,850); pCan->SetTitle("PSF Cut Plots: Jose Cuts"); pCan->GetFrame()->SetFillColor(46); pCan->SetFillColor(19); pCan->SetBorderMode(28); TText *c1title = new TText(0.2,0.96,"PSF Cut Plots: Jose Cuts"); c1title->SetTextSize(0.04); c1title->Draw(); TFile* histFile = new TFile(histfile); TDirectory* pTKR = (TDirectory *)histFile->Get("PDR"); TTree* pTree = (TTree *)pTKR->Get("t1"); TPad *hpad; //Define the drawing areas //TPad dimensions are xlow,ylow,xhigh,yhigh and are fractions of //the drawing area defined above. hpad = new TPad("pad0" ,"This is pad0" ,0.10,0.20,0.90,0.80,19); //***********************USER************************************ //******************************************************************** PSFplot* pPlot; //Define and fill the histogram of the # of events reconstructing a track TH1F* pCount = new TH1F("cntEm", "Tracks", 50, 0., 50.); pTree->Project("cntEm", "TKR_No_Tracks", "TKR_No_Tracks>0"); int numPassCuts = pCount->GetEntries(); printf("******* Number reconstructed converstions:%i *********\n",numPassCuts); pPlot = new PSFplot(0, "Gamma err, Jose cuts", 100, 0., 0., numPassCuts); // TCut convert = "abs(MC_X0) < 10000."; TCut convert = "abs(MC_X0) < 75. && abs(MC_Y0) < 75. && -2. < MC_Z0 && MC_Z0 < 50."; TCut trkcut = "TKR_No_Tracks>0"; // TCut tangle = "TKR_t_angle<4*0.0041"; TCut tangle = "TKR_t_angle<0.005"; // TCut kink = "-0.04fillHists(pTree, JoseCut); pCan->cd(); pPlot->plotHists(pCan, hpad); }