Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:26:30

0001 {
0002   TFile *_file0 = TFile::Open("pull_matched_1simhit.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_COMBINED->Fit("gaus");
0048   // TIB_X_L1_COMBINED->Fit("gaus");
0049   //TIB_X_L1->Fit("gaus");
0050   TIB_X_L1_COMBINED->SetLineColor(kBlack);
0051   TIB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0052   TIB_X_L1_COMBINED->SetLineColor(kBlack);
0053   // TIB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0054   gStyle->SetOptFit(1111);
0055   TIB_X_L1_COMBINED->Draw();
0056   //  TIB_X_L1_COMBINED->Draw("sames");
0057   //  TIB_X_L1->Draw("sames");
0058   cTIB->cd(2);
0059   TIB_X_L2_COMBINED->Fit("gaus");
0060   // TIB_X_L2_COMBINED->Fit("gaus");
0061   // TIB_X_L2->Fit("gaus");
0062   TIB_X_L2_COMBINED->SetLineColor(kBlack);
0063   TIB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0064   TIB_X_L2_COMBINED->SetLineColor(kBlack);
0065   // TIB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0066   gStyle->SetOptFit(1111);
0067   TIB_X_L2_COMBINED->Draw();
0068   //  TIB_X_L2_COMBINED->Draw("sames");
0069   // TIB_X_L2->Draw("sames");
0070   cTIB->cd(3);
0071   TIB_Y_L1_COMBINED->Fit("gaus");
0072   //  TIB_Y_L1_COMBINED->Fit("gaus");
0073   // TIB_Y_L1->Fit("gaus");
0074   TIB_Y_L1_COMBINED->SetLineColor(kBlack);
0075   TIB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0076   TIB_Y_L1_COMBINED->SetLineColor(kBlack);
0077   // TIB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0078   gStyle->SetOptFit(1111);
0079   TIB_Y_L1_COMBINED->Draw();
0080   // TIB_Y_L1_COMBINED->Draw("sames");
0081   //TIB_Y_L1->Draw("sames");
0082   cTIB->cd(4);
0083   TIB_Y_L2_COMBINED->Fit("gaus");
0084   // TIB_Y_L2_COMBINED->Fit("gaus");
0085   // TIB_Y_L2->Fit("gaus");
0086   TIB_Y_L2_COMBINED->SetLineColor(kBlack);
0087   TIB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0088   TIB_Y_L2_COMBINED->SetLineColor(kBlack);
0089   // TIB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0090   gStyle->SetOptFit(1111);
0091   TIB_Y_L2_COMBINED->Draw();
0092   // TIB_Y_L2_COMBINED->Draw("sames");
0093   // TIB_Y_L2->Draw("sames"); 
0094 
0095   TCanvas *cTOB=new TCanvas("TOBpull","TOBpull",1250,930);
0096   cTOB->Divide(2,2);
0097   cTOB->cd(1);
0098   TOB_X_L1_COMBINED->Fit("gaus");
0099   // TOB_X_L1_COMBINED->Fit("gaus");
0100   // TOB_X_L1->Fit("gaus");
0101   TOB_X_L1_COMBINED->SetLineColor(kBlack);
0102   TOB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0103   TOB_X_L1_COMBINED->SetLineColor(kBlack);
0104   //  TOB_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0105   gStyle->SetOptFit(1111);
0106   TOB_X_L1_COMBINED->Draw();
0107   // TOB_X_L1_COMBINED->Draw("sames");
0108   // TOB_X_L1->Draw("sames");
0109   cTOB->cd(2);
0110   TOB_X_L2_COMBINED->Fit("gaus");
0111   // TOB_X_L2_COMBINED->Fit("gaus");
0112   //  TOB_X_L2->Fit("gaus");
0113   TOB_X_L2_COMBINED->SetLineColor(kBlack);
0114   TOB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0115   TOB_X_L2_COMBINED->SetLineColor(kBlack);
0116   //  TOB_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0117   gStyle->SetOptFit(1111);
0118   TOB_X_L2_COMBINED->Draw();
0119   //  TOB_X_L2_COMBINED->Draw("sames");
0120   // TOB_X_L2->Draw("sames");
0121   cTOB->cd(3);
0122   TOB_Y_L1_COMBINED->Fit("gaus");
0123   //  TOB_Y_L1_COMBINED->Fit("gaus");
0124   //  TOB_Y_L1->Fit("gaus");
0125   TOB_Y_L1_COMBINED->SetLineColor(kBlack);
0126   TOB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0127   TOB_Y_L1_COMBINED->SetLineColor(kBlack);
0128   //  TOB_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0129   gStyle->SetOptFit(1111);
0130   TOB_Y_L1_COMBINED->Draw();
0131   //  TOB_Y_L1_COMBINED->Draw("sames");
0132   //  TOB_Y_L1->Draw("sames");
0133   cTOB->cd(4);
0134   TOB_Y_L2_COMBINED->Fit("gaus");
0135   //  TOB_Y_L2_COMBINED->Fit("gaus");
0136   //  TOB_Y_L2->Fit("gaus");
0137   TOB_Y_L2_COMBINED->SetLineColor(kBlack);
0138   TOB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0139   TOB_Y_L2_COMBINED->SetLineColor(kBlack);
0140   //  TOB_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlack);
0141   gStyle->SetOptFit(1111);
0142   TOB_Y_L2_COMBINED->Draw();
0143   //  TOB_Y_L2_COMBINED->Draw("sames");
0144   //  TOB_Y_L2->Draw("sames"); 
0145 }