Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:01

0001 {
0002 gROOT->SetBatch();
0003 gROOT->SetStyle("Plain");
0004 
0005 TFile *_file0 = TFile::Open("histo10GeV.root");
0006 TDirectory * RS = _file0->Get("RSWMaterial");
0007 TDirectory * CTF = _file0->Get("CTFWMaterial");
0008 
0009 TCanvas c;
0010 
0011 TH1F * ptRS = RS->Get("pt");
0012 TH1F * ptCTF = CTF->Get("pt");
0013 ptRS.SetLineColor( kRed );
0014 ptRS.GetYaxis().SetRangeUser(0,(ptRS.GetMaximum()>ptCTF.GetMaximum() ? ptRS.GetMaximum()*=1.1 : ptCTF.GetMaximum()*=1.1));
0015 ptRS->Draw();
0016 ptCTF->Draw("same");
0017 TLegend * ll = new TLegend(0.8,0.2,0.95,0.35);
0018 ll->AddEntry(ptRS, "RS","L");
0019 ll->AddEntry(ptCTF,"CTF","L");
0020 ll->Draw();
0021 c.SaveAs( "pt.gif" );
0022 c.Clear();
0023 
0024 // TH1F * pt2RS = RS->Get("pt2");
0025 // TH1F * pt2CTF = CTF->Get("pt2");
0026 // ptRS.SetLineColor( kRed );
0027 // ptRS.GetYaxis().SetRangeUser(0,(ptRS.GetMaximum()>ptCTF.GetMaximum() ? ptRS.GetMaximum()*=1.1 : ptCTF.GetMaximum()*=1.1));
0028 // ptRS->Draw();
0029 // ptCTF->Draw("same");
0030 // ll->Draw();
0031 // c.SaveAs( "pt2.gif" );
0032 // c.Clear();
0033 
0034 TH1F * etaRS = RS->Get("eta");
0035 TH1F * etaCTF = CTF->Get("eta");
0036 etaRS.SetLineColor( kRed );
0037 etaRS.GetYaxis().SetRangeUser(0,(etaRS.GetMaximum()>etaCTF.GetMaximum() ? etaRS.GetMaximum()*=1.1 : etaCTF.GetMaximum()*=1.1));
0038 etaRS->Draw();
0039 etaCTF->Draw("same");
0040 ll->Draw();
0041 c.SaveAs( "eta.gif" );
0042 c.Clear();
0043 
0044 TH1F * hitsRS = RS->Get("hits");
0045 TH1F * hitsCTF = CTF->Get("hits");
0046 hitsRS.SetLineColor( kRed );
0047 hitsRS.GetYaxis().SetRangeUser(0,(hitsRS.GetMaximum()>hitsCTF.GetMaximum() ? hitsRS.GetMaximum()*=1.1 : hitsCTF.GetMaximum()*=1.1));
0048 hitsRS->Draw();
0049 hitsCTF->Draw("same");
0050 ll->Draw();
0051 c.SaveAs( "hits.gif" );
0052 c.Clear();
0053 
0054 TH1F * efficRS = RS->Get("effic");
0055 TH1F * efficCTF = CTF->Get("effic");
0056 efficRS.SetLineColor( kRed );
0057 efficRS.GetYaxis().SetRangeUser(0,(efficRS.GetMaximum()>efficCTF.GetMaximum() ? efficRS.GetMaximum()*=1.1 : efficCTF.GetMaximum()*=1.1));
0058 efficRS->Draw();
0059 efficCTF->Draw("same");
0060 ll->Draw();
0061 c.SaveAs( "effic.gif" );
0062 c.Clear();
0063 
0064 TH1F * nchi2RS = RS->Get("nchi2");
0065 TH1F * nchi2CTF = CTF->Get("nchi2");
0066 nchi2RS.SetLineColor( kRed );
0067 nchi2RS.GetYaxis().SetRangeUser(0,(nchi2RS.GetMaximum()>nchi2CTF.GetMaximum() ? nchi2RS.GetMaximum()*=10 : nchi2CTF.GetMaximum()*=10));
0068 nchi2RS->Draw();
0069 nchi2CTF->Draw("same");
0070 ll->Draw();
0071 c.SaveAs( "nchi2.gif" );
0072 c.Clear();
0073 
0074 TH1F * tracksRS = RS->Get("tracks");
0075 TH1F * tracksCTF = CTF->Get("tracks");
0076 tracksRS.SetLineColor( kRed );
0077 tracksRS.GetYaxis().SetRangeUser(0,(tracksRS.GetMaximum()>tracksCTF.GetMaximum() ? tracksRS.GetMaximum()*=1.1 : tracksCTF.GetMaximum()*=1.1));
0078 tracksRS->Draw();
0079 tracksCTF->Draw("same");
0080 ll->Draw();
0081 tracksRS->SetMinimum(0.000001);
0082 tracksCTF->SetMinimum(0.000001);
0083 c.SetLogy();
0084 c.SaveAs( "tracks.gif" );
0085 c.SetLogy(0);
0086 c.Clear();
0087 
0088 TH1F * chargeRS = RS->Get("charge");
0089 TH1F * chargeCTF = CTF->Get("charge");
0090 chargeRS.SetLineColor( kRed );
0091 chargeRS.GetYaxis().SetRangeUser(0,(chargeRS.GetMaximum()>chargeCTF.GetMaximum() ? chargeRS.GetMaximum()*=1.1 : chargeCTF.GetMaximum()*=1.1));
0092 chargeRS->Draw();
0093 chargeCTF->Draw("same");
0094 ll->Draw();
0095 chargeRS->SetMinimum(0.000001);
0096 chargeCTF->SetMinimum(0.000001);
0097 c.SetLogy();
0098 c.SaveAs( "charge.gif" );
0099 c.SetLogy(0);
0100 c.Clear();
0101 
0102 TH1F * pullPhi0RS = RS->Get("pullPhi0");
0103 TH1F * pullPhi0CTF = CTF->Get("pullPhi0");
0104 pullPhi0RS.SetLineColor( kRed );
0105 pullPhi0RS.GetYaxis().SetRangeUser(0,(pullPhi0RS.GetMaximum()>pullPhi0CTF.GetMaximum() ? pullPhi0RS.GetMaximum()*=1.1 : pullPhi0CTF.GetMaximum()*=1.1));
0106 pullPhi0RS->Draw();
0107 pullPhi0CTF->Draw("same");
0108 ll->Draw();
0109 c.SaveAs( "pullPhi0.gif" );
0110 c.Clear();
0111 
0112 TH1F * pullThetaRS = RS->Get("pullTheta");
0113 TH1F * pullThetaCTF = CTF->Get("pullTheta");
0114 pullThetaRS.SetLineColor( kRed );
0115 pullThetaRS.GetYaxis().SetRangeUser(0,(pullThetaRS.GetMaximum()>pullThetaCTF.GetMaximum() ? pullThetaRS.GetMaximum()*=1.1 : pullThetaCTF.GetMaximum()*=1.1));
0116 pullThetaRS->Draw();
0117 pullThetaCTF->Draw("same");
0118 ll->Draw();
0119 c.SaveAs( "pullTheta.gif" );
0120 c.Clear();
0121 
0122 
0123 
0124 }