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.root");
0003 
0004   //TID L1 x
0005   TH1F * TID_X_L1=(TH1F*)_file0->Get("mTIDpull_x_l1");
0006   TH1F * TID_X_L1_COMBINED=(TH1F*)_file0->Get("mTIDpull_x_l1_combined");
0007   TH1F * TID_X_L1_SIM=(TH1F*)_file0->Get("mTIDpull_x_l1_sim");
0008 
0009   //TID L2 x
0010   TH1F * TID_X_L2=(TH1F*)_file0->Get("mTIDpull_x_l2");
0011   TH1F * TID_X_L2_COMBINED=(TH1F*)_file0->Get("mTIDpull_x_l2_combined");
0012   TH1F * TID_X_L2_SIM=(TH1F*)_file0->Get("mTIDpull_x_l2_sim");
0013 
0014   //TID L1 y
0015   TH1F * TID_Y_L1=(TH1F*)_file0->Get("mTIDpull_y_l1");
0016   TH1F * TID_Y_L1_COMBINED=(TH1F*)_file0->Get("mTIDpull_y_l1_combined");
0017   TH1F * TID_Y_L1_SIM=(TH1F*)_file0->Get("mTIDpull_y_l1_sim");
0018 
0019   //TID L2 y
0020   TH1F * TID_Y_L2=(TH1F*)_file0->Get("mTIDpull_y_l2");
0021   TH1F * TID_Y_L2_COMBINED=(TH1F*)_file0->Get("mTIDpull_y_l2_combined");
0022   TH1F * TID_Y_L2_SIM=(TH1F*)_file0->Get("mTIDpull_y_l2_sim");
0023 
0024   //TEC L1 x
0025   TH1F * TEC_X_L1=(TH1F*)_file0->Get("mTECpull_x_l1");
0026   TH1F * TEC_X_L1_COMBINED=(TH1F*)_file0->Get("mTECpull_x_l1_combined");
0027   TH1F * TEC_X_L1_SIM=(TH1F*)_file0->Get("mTECpull_x_l1_sim");
0028 
0029   //TEC L2 x
0030   TH1F * TEC_X_L2=(TH1F*)_file0->Get("mTECpull_x_l2");
0031   TH1F * TEC_X_L2_COMBINED=(TH1F*)_file0->Get("mTECpull_x_l2_combined");
0032   TH1F * TEC_X_L2_SIM=(TH1F*)_file0->Get("mTECpull_x_l2_sim");
0033 
0034   //TEC L1 y
0035   TH1F * TEC_Y_L1=(TH1F*)_file0->Get("mTECpull_y_l1");
0036   TH1F * TEC_Y_L1_COMBINED=(TH1F*)_file0->Get("mTECpull_y_l1_combined");
0037   TH1F * TEC_Y_L1_SIM=(TH1F*)_file0->Get("mTECpull_y_l1_sim");
0038 
0039   //TEC L2 y
0040   TH1F * TEC_Y_L2=(TH1F*)_file0->Get("mTECpull_y_l2");
0041   TH1F * TEC_Y_L2_COMBINED=(TH1F*)_file0->Get("mTECpull_y_l2_combined");
0042   TH1F * TEC_Y_L2_SIM=(TH1F*)_file0->Get("mTECpull_y_l2_sim");
0043 
0044 
0045   //TEC L5 x
0046   TH1F * TEC_X_L5=(TH1F*)_file0->Get("mTECpull_x_l5");
0047   TH1F * TEC_X_L5_COMBINED=(TH1F*)_file0->Get("mTECpull_x_l5_combined");
0048   TH1F * TEC_X_L5_SIM=(TH1F*)_file0->Get("mTECpull_x_l5_sim");
0049 
0050   //TEC L5 y
0051   TH1F * TEC_Y_L5=(TH1F*)_file0->Get("mTECpull_y_l5");
0052   TH1F * TEC_Y_L5_COMBINED=(TH1F*)_file0->Get("mTECpull_y_l5_combined");
0053   TH1F * TEC_Y_L5_SIM=(TH1F*)_file0->Get("mTECpull_y_l5_sim");
0054 
0055   TCanvas *cTID=new TCanvas("TIDpull","TIDpull",1250,930);
0056   cTID->Divide(2,2);
0057   cTID->cd(1);
0058   TID_X_L1_SIM->Fit("gaus");
0059   TID_X_L1_COMBINED->Fit("gaus");
0060   TID_X_L1->Fit("gaus");
0061   TID_X_L1_SIM->SetLineColor(kRed);
0062   TID_X_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0063   TID_X_L1_COMBINED->SetLineColor(kBlue);
0064   TID_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0065   gStyle->SetOptFit(1111);
0066   //  TID_X_L1_SIM->Draw();
0067   //  TID_X_L1_COMBINED->Draw("sames");
0068   TID_X_L1->Draw("sames");
0069   cTID->cd(2);
0070   TID_X_L2_SIM->Fit("gaus");
0071   TID_X_L2_COMBINED->Fit("gaus");
0072   TID_X_L2->Fit("gaus");
0073   TID_X_L2_SIM->SetLineColor(kRed);
0074   TID_X_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0075   TID_X_L2_COMBINED->SetLineColor(kBlue);
0076   TID_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0077   gStyle->SetOptFit(1111);
0078   //  TID_X_L2_SIM->Draw();
0079   //  TID_X_L2_COMBINED->Draw("sames");
0080   TID_X_L2->Draw("sames");
0081   cTID->cd(3);
0082   TID_Y_L1_SIM->Fit("gaus");
0083   TID_Y_L1_COMBINED->Fit("gaus");
0084   TID_Y_L1->Fit("gaus");
0085   TID_Y_L1_SIM->SetLineColor(kRed);
0086   TID_Y_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0087   TID_Y_L1_COMBINED->SetLineColor(kBlue);
0088   TID_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0089   gStyle->SetOptFit(1111);
0090   //  TID_Y_L1_SIM->Draw();
0091   //  TID_Y_L1_COMBINED->Draw("sames");
0092   TID_Y_L1->Draw("sames");
0093   cTID->cd(4);
0094   TID_Y_L2_SIM->Fit("gaus");
0095   TID_Y_L2_COMBINED->Fit("gaus");
0096   TID_Y_L2->Fit("gaus");
0097   TID_Y_L2_SIM->SetLineColor(kRed);
0098   TID_Y_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0099   TID_Y_L2_COMBINED->SetLineColor(kBlue);
0100   TID_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0101   gStyle->SetOptFit(1111);
0102   //  TID_Y_L2_SIM->Draw();
0103   //  TID_Y_L2_COMBINED->Draw("sames");
0104   TID_Y_L2->Draw("sames"); 
0105 
0106   TCanvas *cTEC=new TCanvas("TECpull","TECpull",1250,930);
0107   cTEC->Divide(3,2);
0108   cTEC->cd(1);
0109   TEC_X_L1_SIM->Fit("gaus");
0110   TEC_X_L1_COMBINED->Fit("gaus");
0111   TEC_X_L1->Fit("gaus");
0112   TEC_X_L1_SIM->SetLineColor(kRed);
0113   TEC_X_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0114   TEC_X_L1_COMBINED->SetLineColor(kBlue);
0115   TEC_X_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0116   gStyle->SetOptFit(1111);
0117   //  TEC_X_L1_SIM->Draw();
0118   //  TEC_X_L1_COMBINED->Draw("sames");
0119   TEC_X_L1->Draw("sames");
0120 
0121   cTEC->cd(2);
0122   TEC_X_L2_SIM->Fit("gaus");
0123   TEC_X_L2_COMBINED->Fit("gaus");
0124   TEC_X_L2->Fit("gaus");
0125   TEC_X_L2_SIM->SetLineColor(kRed);
0126   TEC_X_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0127   TEC_X_L2_COMBINED->SetLineColor(kBlue);
0128   TEC_X_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0129   gStyle->SetOptFit(1111);
0130   // TEC_X_L2_SIM->Draw();
0131   // TEC_X_L2_COMBINED->Draw("sames");
0132   TEC_X_L2->Draw("sames");
0133 
0134   cTEC->cd(3);
0135   TEC_X_L5_SIM->Fit("gaus");
0136   TEC_X_L5_COMBINED->Fit("gaus");
0137   TEC_X_L5->Fit("gaus");
0138   TEC_X_L5_SIM->SetLineColor(kRed);
0139   TEC_X_L5_SIM->GetFunction("gaus")->SetLineColor(kRed);
0140   TEC_X_L5_COMBINED->SetLineColor(kBlue);
0141   TEC_X_L5_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0142   gStyle->SetOptFit(1111);
0143   // TEC_X_L5_SIM->Draw();
0144   //  TEC_X_L5_COMBINED->Draw("sames");
0145   TEC_X_L5->Draw("sames");
0146 
0147   cTEC->cd(4);
0148   TEC_Y_L1_SIM->Fit("gaus");
0149   TEC_Y_L1_COMBINED->Fit("gaus");
0150   TEC_Y_L1->Fit("gaus");
0151   TEC_Y_L1_SIM->SetLineColor(kRed);
0152   TEC_Y_L1_SIM->GetFunction("gaus")->SetLineColor(kRed);
0153   TEC_Y_L1_COMBINED->SetLineColor(kBlue);
0154   TEC_Y_L1_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0155   gStyle->SetOptFit(1111);
0156   //  TEC_Y_L1_SIM->Draw();
0157   //  TEC_Y_L1_COMBINED->Draw("sames");
0158   TEC_Y_L1->Draw("sames");
0159   cTEC->cd(5);
0160   TEC_Y_L2_SIM->Fit("gaus");
0161   TEC_Y_L2_COMBINED->Fit("gaus");
0162   TEC_Y_L2->Fit("gaus");
0163   TEC_Y_L2_SIM->SetLineColor(kRed);
0164   TEC_Y_L2_SIM->GetFunction("gaus")->SetLineColor(kRed);
0165   TEC_Y_L2_COMBINED->SetLineColor(kBlue);
0166   TEC_Y_L2_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0167   gStyle->SetOptFit(1111);
0168   //  TEC_Y_L2_SIM->Draw();
0169   //  TEC_Y_L2_COMBINED->Draw("sames");
0170   TEC_Y_L2->Draw("sames"); 
0171 
0172   cTEC->cd(6);
0173   TEC_Y_L5_SIM->Fit("gaus");
0174   TEC_Y_L5_COMBINED->Fit("gaus");
0175   TEC_Y_L5->Fit("gaus");
0176   TEC_Y_L5_SIM->SetLineColor(kRed);
0177   TEC_Y_L5_SIM->GetFunction("gaus")->SetLineColor(kRed);
0178   TEC_Y_L5_COMBINED->SetLineColor(kBlue);
0179   TEC_Y_L5_COMBINED->GetFunction("gaus")->SetLineColor(kBlue);
0180   gStyle->SetOptFit(1111);
0181   //  TEC_Y_L5_SIM->Draw();
0182   //  TEC_Y_L5_COMBINED->Draw("sames");
0183   TEC_Y_L5->Draw("sames"); 
0184 }