Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:04

0001 {
0002    gStyle->SetPalette(1,0);
0003    TFile f("muons.root");
0004    
0005    c3 = new TCanvas("c3","HCAL energy deposition");
0006    // Events->Draw("muons.energy().had>>h3(100,0,10)","fabs(muons.eta())<1");
0007    Events->Draw("muonsWithMatchInfo.calEnergy().had>>h3(100,0,10)");
0008    
0009    c4 = new TCanvas("c4","ECAL energy deposition");
0010    Events->Draw("muonsWithMatchInfo.calEnergy().em>>h4(100,0,2)");
0011 
0012    gROOT->LoadMacro("resolution_fit.cxx");
0013    c5 = new TCanvas("c5","Muon DT segments",400,800);
0014    c5->Divide(2,4);
0015    c5->cd(1);
0016    Events->Draw("muonsWithMatchInfo.dX(0)>>hh1(100,-50,50)","muonsWithMatchInfo.dXErr(0)<100");
0017    resolution_fit(hh1,"dX[0]");
0018    c5->cd(2);
0019    Events->Draw("muonsWithMatchInfo.dY(0)>>hh2(100,-50,50)","muonsWithMatchInfo.dYErr(0)<100");
0020    resolution_fit(hh2,"dY[0]");
0021    c5->cd(3);
0022    Events->Draw("muonsWithMatchInfo.dX(1)>>hh3(100,-50,50)","muonsWithMatchInfo.dXErr(1)<100");
0023    resolution_fit(hh3,"dX[1]");
0024    c5->cd(4);
0025    Events->Draw("muonsWithMatchInfo.dY(1)>>hh4(100,-50,50)","muonsWithMatchInfo.dYErr(1)<100");
0026    resolution_fit(hh4,"dY[1]");
0027    c5->cd(5);
0028    Events->Draw("muonsWithMatchInfo.dX(2)>>hh5(100,-50,50)","muonsWithMatchInfo.dXErr(2)<100");
0029    resolution_fit(hh5,"dX[2]");
0030    c5->cd(6);
0031    Events->Draw("muonsWithMatchInfo.dY(2)>>hh6(100,-50,50)","muonsWithMatchInfo.dYErr(2)<100");
0032    resolution_fit(hh6,"dY[2]");
0033    c5->cd(7);
0034    Events->Draw("muonsWithMatchInfo.dX(3)>>hh7(100,-50,50)","muonsWithMatchInfo.dXErr(3)<100");
0035    resolution_fit(hh7,"dX[3]");
0036    
0037    c6 = new TCanvas("c6","Muon pulls",400,800);
0038    c6->Divide(2,4);
0039    c6->cd(1);
0040    Events->Draw("muonsWithMatchInfo.dX(0)/muonsWithMatchInfo.dXErr(0)>>hp1(100,-10,10)","muonsWithMatchInfo.dXErr(0)<100");
0041    resolution_fit(hp1,"pull X[0]");
0042    c6->cd(2);
0043    Events->Draw("muonsWithMatchInfo.dY(0)/muonsWithMatchInfo.dYErr(0)>>hp2(100,-10,10)","muonsWithMatchInfo.dYErr(0)<100");
0044    resolution_fit(hp2,"pull Y[0]");
0045    c6->cd(3);
0046    Events->Draw("muonsWithMatchInfo.dX(1)/muonsWithMatchInfo.dXErr(1)>>hp3(100,-10,10)","muonsWithMatchInfo.dXErr(1)<100");
0047    resolution_fit(hp3,"pull X[1]");
0048    c6->cd(4);
0049    Events->Draw("muonsWithMatchInfo.dY(1)/muonsWithMatchInfo.dYErr(1)>>hp4(100,-10,10)","muonsWithMatchInfo.dYErr(1)<100");
0050    resolution_fit(hp4,"pull Y[1]");
0051    c6->cd(5);
0052    Events->Draw("muonsWithMatchInfo.dX(2)/muonsWithMatchInfo.dXErr(2)>>hp5(100,-10,10)","muonsWithMatchInfo.dXErr(2)<100");
0053    resolution_fit(hp5,"pull X[2]");
0054    c6->cd(6);
0055    Events->Draw("muonsWithMatchInfo.dY(2)/muonsWithMatchInfo.dYErr(2)>>hp6(100,-10,10)","muonsWithMatchInfo.dYErr(2)<100");
0056    resolution_fit(hp6,"pull Y[2]");
0057    c6->cd(7);
0058    Events->Draw("muonsWithMatchInfo.dX(3)/muonsWithMatchInfo.dXErr(3)>>hp7(100,-10,10)","muonsWithMatchInfo.dXErr(3)<100");
0059    resolution_fit(hp7,"pull X[3]");
0060 
0061 }