Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:13

0001 {
0002   TFile *_file0 = TFile::Open("pull_matched.root");
0003 
0004   //TIB L1 x
0005   TH1F * TIB_X_L1=(TH1F*)_file0->Get("mTIBpull_x_l1");
0006   TH1F * TIB_X_L1_COMBINED=(TH1F*)_file0->Get("mTIBpull_x_l1_combined");
0007   TH1F * TIB_X_L1_SIM=(TH1F*)_file0->Get("mTIBpull_x_l1_sim");
0008 
0009   //TIB L2 x
0010   TH1F * TIB_X_L2=(TH1F*)_file0->Get("mTIBpull_x_l2");
0011   TH1F * TIB_X_L2_COMBINED=(TH1F*)_file0->Get("mTIBpull_x_l2_combined");
0012   TH1F * TIB_X_L2_SIM=(TH1F*)_file0->Get("mTIBpull_x_l2_sim");
0013 
0014   //TIB L1 y
0015   TH1F * TIB_Y_L1=(TH1F*)_file0->Get("mTIBpull_y_l1");
0016   TH1F * TIB_Y_L1_COMBINED=(TH1F*)_file0->Get("mTIBpull_y_l1_combined");
0017   TH1F * TIB_Y_L1_SIM=(TH1F*)_file0->Get("mTIBpull_y_l1_sim");
0018 
0019   //TIB L2 y
0020   TH1F * TIB_Y_L2=(TH1F*)_file0->Get("mTIBpull_y_l2");
0021   TH1F * TIB_Y_L2_COMBINED=(TH1F*)_file0->Get("mTIBpull_y_l2_combined");
0022   TH1F * TIB_Y_L2_SIM=(TH1F*)_file0->Get("mTIBpull_y_l2_sim");
0023 
0024   //TOB L1 x
0025   TH1F * TOB_X_L1=(TH1F*)_file0->Get("mTOBpull_x_l1");
0026   TH1F * TOB_X_L1_COMBINED=(TH1F*)_file0->Get("mTOBpull_x_l1_combined");
0027   TH1F * TOB_X_L1_SIM=(TH1F*)_file0->Get("mTOBpull_x_l1_sim");
0028 
0029   //TOB L2 x
0030   TH1F * TOB_X_L2=(TH1F*)_file0->Get("mTOBpull_x_l2");
0031   TH1F * TOB_X_L2_COMBINED=(TH1F*)_file0->Get("mTOBpull_x_l2_combined");
0032   TH1F * TOB_X_L2_SIM=(TH1F*)_file0->Get("mTOBpull_x_l2_sim");
0033 
0034   //TOB L1 y
0035   TH1F * TOB_Y_L1=(TH1F*)_file0->Get("mTOBpull_y_l1");
0036   TH1F * TOB_Y_L1_COMBINED=(TH1F*)_file0->Get("mTOBpull_y_l1_combined");
0037   TH1F * TOB_Y_L1_SIM=(TH1F*)_file0->Get("mTOBpull_y_l1_sim");
0038 
0039   //TOB L2 y
0040   TH1F * TOB_Y_L2=(TH1F*)_file0->Get("mTOBpull_y_l2");
0041   TH1F * TOB_Y_L2_COMBINED=(TH1F*)_file0->Get("mTOBpull_y_l2_combined");
0042   TH1F * TOB_Y_L2_SIM=(TH1F*)_file0->Get("mTOBpull_y_l2_sim");
0043 
0044   TCanvas *cTIB=new TCanvas("TIBpull","TIBpull",1250,930);
0045   cTIB->Divide(2,2);
0046   cTIB->cd(1);
0047   TIB_X_L1_SIM->Fit("gaus");
0048   TIB_X_L1_COMBINED->Fit("gaus");
0049   TIB_X_L1->Fit("gaus");
0050   TIB_X_L1_SIM->SetLineColor(kRed);
0051   TIB_X_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0052   TIB_X_L1_COMBINED->SetLineColor(kBlue);
0053   TIB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0054   gStyle->SetOptFit(1111);
0055   //  TIB_X_L1_SIM->Draw();
0056   //  TIB_X_L1_COMBINED->Draw("sames");
0057   //  TIB_X_L1->Draw("sames");
0058   TIB_X_L1->Draw("sames");
0059   cTIB->cd(2);
0060   TIB_X_L2_SIM->Fit("gaus");
0061   TIB_X_L2_COMBINED->Fit("gaus");
0062   TIB_X_L2->Fit("gaus");
0063   TIB_X_L2_SIM->SetLineColor(kRed);
0064   TIB_X_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0065   TIB_X_L2_COMBINED->SetLineColor(kBlue);
0066   TIB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0067   gStyle->SetOptFit(1111);
0068   //  TIB_X_L2_SIM->Draw();
0069   //  TIB_X_L2_COMBINED->Draw("sames");
0070   TIB_X_L2->Draw("sames");
0071   cTIB->cd(3);
0072   TIB_Y_L1_SIM->Fit("gaus");
0073   TIB_Y_L1_COMBINED->Fit("gaus");
0074   TIB_Y_L1->Fit("gaus");
0075   TIB_Y_L1_SIM->SetLineColor(kRed);
0076   TIB_Y_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0077   TIB_Y_L1_COMBINED->SetLineColor(kBlue);
0078   TIB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0079   gStyle->SetOptFit(1111);
0080   //  TIB_Y_L1_SIM->Draw();
0081   //  TIB_Y_L1_COMBINED->Draw("sames");
0082   TIB_Y_L1->Draw("sames");
0083   cTIB->cd(4);
0084   TIB_Y_L2_SIM->Fit("gaus");
0085   TIB_Y_L2_COMBINED->Fit("gaus");
0086   TIB_Y_L2->Fit("gaus");
0087   TIB_Y_L2_SIM->SetLineColor(kRed);
0088   TIB_Y_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0089   TIB_Y_L2_COMBINED->SetLineColor(kBlue);
0090   TIB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0091   gStyle->SetOptFit(1111);
0092   //  TIB_Y_L2_SIM->Draw();
0093   //  TIB_Y_L2_COMBINED->Draw("sames");
0094   TIB_Y_L2->Draw("sames"); 
0095 
0096   TCanvas *cTOB=new TCanvas("TOBpull","TOBpull",1250,930);
0097   cTOB->Divide(2,2);
0098   cTOB->cd(1);
0099   TOB_X_L1_SIM->Fit("gaus");
0100   TOB_X_L1_COMBINED->Fit("gaus");
0101   TOB_X_L1->Fit("gaus");
0102   TOB_X_L1_SIM->SetLineColor(kRed);
0103   TOB_X_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0104   TOB_X_L1_COMBINED->SetLineColor(kBlue);
0105   TOB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0106   gStyle->SetOptFit(1111);
0107   //  TOB_X_L1_SIM->Draw();
0108   //  TOB_X_L1_COMBINED->Draw("sames");
0109   TOB_X_L1->Draw("sames");
0110   cTOB->cd(2);
0111   TOB_X_L2_SIM->Fit("gaus");
0112   TOB_X_L2_COMBINED->Fit("gaus");
0113   TOB_X_L2->Fit("gaus");
0114   TOB_X_L2_SIM->SetLineColor(kRed);
0115   TOB_X_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0116   TOB_X_L2_COMBINED->SetLineColor(kBlue);
0117   TOB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0118   gStyle->SetOptFit(1111);
0119   // TOB_X_L2_SIM->Draw();
0120   //  TOB_X_L2_COMBINED->Draw("sames");
0121     TOB_X_L2->Draw("sames");
0122   cTOB->cd(3);
0123   TOB_Y_L1_SIM->Fit("gaus");
0124   TOB_Y_L1_COMBINED->Fit("gaus");
0125   TOB_Y_L1->Fit("gaus");
0126   TOB_Y_L1_SIM->SetLineColor(kRed);
0127   TOB_Y_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0128   TOB_Y_L1_COMBINED->SetLineColor(kBlue);
0129   TOB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0130   gStyle->SetOptFit(1111);
0131   //  TOB_Y_L1_SIM->Draw();
0132   //  TOB_Y_L1_COMBINED->Draw("sames");
0133   TOB_Y_L1->Draw("sames");
0134   cTOB->cd(4);
0135   TOB_Y_L2_SIM->Fit("gaus");
0136   TOB_Y_L2_COMBINED->Fit("gaus");
0137   TOB_Y_L2->Fit("gaus");
0138   TOB_Y_L2_SIM->SetLineColor(kRed);
0139   TOB_Y_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0140   TOB_Y_L2_COMBINED->SetLineColor(kBlue);
0141   TOB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0142   gStyle->SetOptFit(1111);
0143   //  TOB_Y_L2_SIM->Draw();
0144   //  TOB_Y_L2_COMBINED->Draw("sames");
0145   TOB_Y_L2->Draw("sames"); 
0146 }