{ // #include cout << " Executing Electroweak Analysis Macro ... " << endl; // Clean up : gROOT->Reset(); // Open input file : TFile ewFile("ew_anal.root"); // List the contents : // ewFile->ls(); // Go to the directory with the same name as the analysis module : ewFile->cd("HighPtElectrons"); // List the contents : // ewFile->ls(); // Find the various histograms and assign pointers : TH1F *emClusterPt = (TH1F*) gROOT.FindObject("EM cluster pT (GeV)"); TH1F *matchingTrackPt = (TH1F*) gROOT.FindObject("Matching Track pT (GeV)"); TH1F *eOverP = (TH1F*) gROOT.FindObject("E over p for cluster, matching track"); TH1F *tMass = (TH1F*) gROOT.FindObject("Transverse Mass (GeV)"); // Make a canvas to plot the histograms on : c1 = new TCanvas("c1","Electroweak Analysis Variables",0,0,700,900); c1->SetFillColor(18); // Make the pads for the individual histograms. // The coordinates are (x,y) of the bottom-left-hand and upper-right-hand // corners, respectively : pad1 = new TPad("pad1"," ",0.01,0.51,0.49,0.99,21); pad2 = new TPad("pad2"," ",0.51,0.51,0.99,0.99,21); pad3 = new TPad("pad3"," ",0.01,0.01,0.49,0.49,21); pad4 = new TPad("pad4"," ",0.51,0.01,0.99,0.49,21); pad1->Draw(); pad2->Draw(); pad3->Draw(); pad4->Draw(); // Activate pads and plot histogram : pad1->cd(); pad1->SetFillColor(19); emClusterPt->Draw(""); pad2->cd(); pad2->SetFillColor(19); matchingTrackPt->Draw(""); pad3->cd(); pad3->SetFillColor(19); pad3->SetLogy(); eOverP->Draw(""); pad4->cd(); pad4->SetFillColor(19); tMass->Draw("e"); }