Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:04

0001 void mbplot(int flag=0){
0002   gROOT->LoadMacro("mbtkStyle.C");
0003   setTDRStyle();
0004 
0005   if (((flag)%2) == 1) {
0006     TFile *CMSSWFile1 = new TFile("matbdgtkC.root");
0007     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0008     TH1D *c1 = histCMSSW1->ProjectionX();
0009 
0010     TFile *OSCARFile1 = new TFile("matbdgtkO.root");
0011     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0012     TH1D *o1 = histOSCAR1->ProjectionX();
0013 
0014     TCanvas *mbtkplot = new TCanvas("Tracker MB","Tracker MB",1);
0015 
0016     c1->SetLineStyle(1);
0017     c1->SetLineWidth(3);
0018     c1->SetLineColor(2);
0019     c1->SetFillColor(5);
0020     c1->SetFillStyle(3013);
0021     c1->SetMinimum(0.);
0022     c1->SetMaximum(1.7);
0023     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0024     c1->GetXaxis()->SetTitle("#eta");
0025     c1->GetYaxis()->SetTitle("X/X_{0}");
0026     c1->Draw("HIST");
0027 
0028     o1->SetLineStyle(2);
0029     o1->SetLineWidth(3);
0030     o1->SetLineColor(4);
0031     o1->SetFillColor(7);
0032     o1->SetFillStyle(3013);
0033     o1->Draw("HIST same");
0034 
0035     leg1 = new TLegend(0.55,0.35,0.85,0.45);
0036     leg1->AddEntry(c1,"CMSSW Geometry","F");
0037     leg1->AddEntry(o1,"OSCAR Geometry","F");
0038     leg1->SetHeader("Complete Tracker");
0039     leg1->Draw();
0040 
0041     mbtkplot->SaveAs("mbtkfig.eps");
0042   }
0043 
0044   if (((flag/2)%2) == 1) {
0045     TFile *CMSSWFile1 = new TFile("matbdgpxC.root");
0046     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0047     TH1D *c1 = histCMSSW1->ProjectionX();
0048 
0049     TFile *OSCARFile1 = new TFile("matbdgpxO.root");
0050     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0051     TH1D *o1 = histOSCAR1->ProjectionX();
0052 
0053     TCanvas *mbpxplot = new TCanvas("Pixel MB","Pixel MB",1);
0054 
0055     c1->SetLineStyle(1);
0056     c1->SetLineWidth(3);
0057     c1->SetLineColor(2);
0058     c1->SetFillColor(5);
0059     c1->SetFillStyle(3013);
0060     c1->SetMinimum(0.);
0061     c1->SetMaximum(1.7);
0062     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0063     c1->GetXaxis()->SetTitle("#eta");
0064     c1->GetYaxis()->SetTitle("X/X_{0}");
0065     c1->Draw("HIST");
0066 
0067     o1->SetLineStyle(2);
0068     o1->SetLineWidth(3);
0069     o1->SetLineColor(4);
0070     o1->SetFillColor(7);
0071     o1->SetFillStyle(3013);
0072     o1->Draw("HIST same");
0073 
0074     leg1 = new TLegend(0.55,0.4,0.85,0.5);
0075     leg1->AddEntry(c1,"CMSSW Geometry","F");
0076     leg1->AddEntry(o1,"OSCAR Geometry","F");
0077     leg1->SetHeader("Pixel Detectors");
0078     leg1->Draw();
0079 
0080     mbpxplot->SaveAs("mbpxfig.eps");
0081   }
0082 
0083   if (((flag/4)%2) == 1) {
0084     TFile *CMSSWFile1 = new TFile("matbdgtibC.root");
0085     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0086     TH1D *c1 = histCMSSW1->ProjectionX();
0087 
0088     TFile *OSCARFile1 = new TFile("matbdgtibO.root");
0089     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0090     TH1D *o1 = histOSCAR1->ProjectionX();
0091 
0092     TCanvas *mbtibplot = new TCanvas("TIB MB","TIB MB",1);
0093 
0094     c1->SetLineStyle(1);
0095     c1->SetLineWidth(3);
0096     c1->SetLineColor(2);
0097     c1->SetFillColor(5);
0098     c1->SetFillStyle(3013);
0099     c1->SetMinimum(0.);
0100     c1->SetMaximum(1.7);
0101     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0102     c1->GetXaxis()->SetTitle("#eta");
0103     c1->GetYaxis()->SetTitle("X/X_{0}");
0104     c1->Draw("HIST");
0105 
0106     o1->SetLineStyle(2);
0107     o1->SetLineWidth(3);
0108     o1->SetLineColor(4);
0109     o1->SetFillColor(7);
0110     o1->SetFillStyle(3013);
0111     o1->Draw("HIST same");
0112 
0113     leg1 = new TLegend(0.55,0.4,0.85,0.5);
0114     leg1->AddEntry(c1,"CMSSW Geometry","F");
0115     leg1->AddEntry(o1,"OSCAR Geometry","F");
0116     leg1->SetHeader("TIB");
0117     leg1->Draw();
0118 
0119     mbtibplot->SaveAs("mbtibfig.eps");
0120   }
0121 
0122   if (((flag/8)%2) == 1) {
0123     TFile *CMSSWFile1 = new TFile("matbdgtidC.root");
0124     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0125     TH1D *c1 = histCMSSW1->ProjectionX();
0126 
0127     TFile *OSCARFile1 = new TFile("matbdgtidO.root");
0128     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0129     TH1D *o1 = histOSCAR1->ProjectionX();
0130 
0131     TCanvas *mbtidplot = new TCanvas("TID MB","TID MB",1);
0132 
0133     c1->SetLineStyle(1);
0134     c1->SetLineWidth(3);
0135     c1->SetLineColor(2);
0136     c1->SetFillColor(5);
0137     c1->SetFillStyle(3013);
0138     c1->SetMinimum(0.);
0139     c1->SetMaximum(1.7);
0140     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0141     c1->GetXaxis()->SetTitle("#eta");
0142     c1->GetYaxis()->SetTitle("X/X_{0}");
0143     c1->Draw("HIST");
0144 
0145     o1->SetLineStyle(2);
0146     o1->SetLineWidth(3);
0147     o1->SetLineColor(4);
0148     o1->SetFillColor(7);
0149     o1->SetFillStyle(3013);
0150     o1->Draw("HIST same");
0151 
0152     leg1 = new TLegend(0.55,0.4,0.85,0.5);
0153     leg1->AddEntry(c1,"CMSSW Geometry","F");
0154     leg1->AddEntry(o1,"OSCAR Geometry","F");
0155     leg1->SetHeader("TID");
0156     leg1->Draw();
0157 
0158     mbtidplot->SaveAs("mbtidfig.eps");
0159   }
0160 
0161   if (((flag/16)%2) == 1) {
0162     TFile *CMSSWFile1 = new TFile("matbdgtobC.root");
0163     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0164     TH1D *c1 = histCMSSW1->ProjectionX();
0165 
0166     TFile *OSCARFile1 = new TFile("matbdgtobO.root");
0167     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0168     TH1D *o1 = histOSCAR1->ProjectionX();
0169 
0170     TCanvas *mbtobplot = new TCanvas("TOB MB","TOB MB",1);
0171 
0172     c1->SetLineStyle(1);
0173     c1->SetLineWidth(3);
0174     c1->SetLineColor(2);
0175     c1->SetFillColor(5);
0176     c1->SetFillStyle(3013);
0177     c1->SetMinimum(0.);
0178     c1->SetMaximum(0.5);
0179     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0180     c1->GetXaxis()->SetTitle("#eta");
0181     c1->GetYaxis()->SetTitle("X/X_{0}");
0182     c1->Draw("HIST");
0183 
0184     o1->SetLineStyle(2);
0185     o1->SetLineWidth(3);
0186     o1->SetLineColor(4);
0187     o1->SetFillColor(7);
0188     o1->SetFillStyle(3013);
0189     o1->Draw("HIST same");
0190 
0191     leg1 = new TLegend(0.55,0.4,0.85,0.5);
0192     leg1->AddEntry(c1,"CMSSW Geometry","F");
0193     leg1->AddEntry(o1,"OSCAR Geometry","F");
0194     leg1->SetHeader("TOB");
0195     leg1->Draw();
0196 
0197     mbtobplot->SaveAs("mbtobfig.eps");
0198   }
0199 
0200   if (((flag/32)%2) == 1) {
0201     TFile *CMSSWFile1 = new TFile("matbdgtecC.root");
0202     TProfile *histCMSSW1 = (TProfile*) CMSSWFile1->Get("10");
0203     TH1D *c1 = histCMSSW1->ProjectionX();
0204 
0205     TFile *OSCARFile1 = new TFile("matbdgtecO.root");
0206     TProfile *histOSCAR1 = (TProfile*) OSCARFile1->Get("10");
0207     TH1D *o1 = histOSCAR1->ProjectionX();
0208 
0209     TCanvas *mbtecplot = new TCanvas("TEC MB","TEC MB",1);
0210 
0211     c1->SetLineStyle(1);
0212     c1->SetLineWidth(3);
0213     c1->SetLineColor(2);
0214     c1->SetFillColor(5);
0215     c1->SetFillStyle(3013);
0216     c1->SetMinimum(0.);
0217     c1->SetMaximum(1.7);
0218     c1->GetXaxis()->SetRangeUser(0.0, 2.5);
0219     c1->GetXaxis()->SetTitle("#eta");
0220     c1->GetYaxis()->SetTitle("X/X_{0}");
0221     c1->Draw("HIST");
0222 
0223     o1->SetLineStyle(2);
0224     o1->SetLineWidth(3);
0225     o1->SetLineColor(4);
0226     o1->SetFillColor(7);
0227     o1->SetFillStyle(3013);
0228     o1->Draw("HIST same");
0229 
0230     leg1 = new TLegend(0.55,0.4,0.85,0.5);
0231     leg1->AddEntry(c1,"CMSSW Geometry","F");
0232     leg1->AddEntry(o1,"OSCAR Geometry","F");
0233     leg1->SetHeader("TEC");
0234     leg1->Draw();
0235 
0236     mbtecplot->SaveAs("mbtecfig.eps");
0237   }
0238 }