4602 cout <<
"READING CORRECTIONS: " << endl;
4605 m_errors = (TDirectory *)
file->FindKey(
"Correction")->ReadObj();
4607 m_errors = (TDirectory *)
file->FindKey(
"CorrectionAr")->ReadObj();
4609 this->Divide(2, 3, 0.01, 0.01);
4613 TH2F *tres_vs_ToT_ba =
nullptr;
4614 TH2F *tres_vs_ToT_bc =
nullptr;
4616 TH2F *res_vs_ToT_ba =
nullptr;
4617 TH2F *res_vs_ToT_bc =
nullptr;
4625 if (
m_errors->FindKey(
"tres_vs_ToT_ba"))
4626 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tres_vs_ToT_ba")->ReadObj();
4627 if (
m_errors->FindKey(
"res_vs_ToT_ba"))
4628 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"res_vs_ToT_ba")->ReadObj();
4629 if (
m_errors->FindKey(
"tres_vs_ToT_bc"))
4630 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tres_vs_ToT_bc")->ReadObj();
4631 if (
m_errors->FindKey(
"res_vs_ToT_bc"))
4632 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"res_vs_ToT_bc")->ReadObj();
4636 if (
m_errors->FindKey(
"tres_vs_ToT_ea"))
4637 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tres_vs_ToT_ea")->ReadObj();
4638 if (
m_errors->FindKey(
"res_vs_ToT_ea"))
4639 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"res_vs_ToT_ea")->ReadObj();
4640 if (
m_errors->FindKey(
"tres_vs_ToT_ec"))
4641 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tres_vs_ToT_ec")->ReadObj();
4642 if (
m_errors->FindKey(
"res_vs_ToT_ec"))
4643 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"res_vs_ToT_ec")->ReadObj();
4650 if (
m_errors->FindKey(
"tres_vs_HT_ba"))
4651 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tres_vs_HT_ba")->ReadObj();
4652 if (
m_errors->FindKey(
"res_vs_HT_ba"))
4653 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"res_vs_HT_ba")->ReadObj();
4654 if (
m_errors->FindKey(
"tres_vs_HT_bc"))
4655 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tres_vs_HT_bc")->ReadObj();
4656 if (
m_errors->FindKey(
"res_vs_HT_bc"))
4657 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"res_vs_HT_bc")->ReadObj();
4661 if (
m_errors->FindKey(
"tres_vs_HT_ea"))
4662 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tres_vs_HT_ea")->ReadObj();
4663 if (
m_errors->FindKey(
"res_vs_HT_ea"))
4664 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"res_vs_HT_ea")->ReadObj();
4665 if (
m_errors->FindKey(
"tres_vs_HT_ec"))
4666 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tres_vs_HT_ec")->ReadObj();
4667 if (
m_errors->FindKey(
"res_vs_HT_ec"))
4668 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"res_vs_HT_ec")->ReadObj();
4678 if (
m_errors->FindKey(
"tresAr_vs_ToT_ba"))
4679 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_ToT_ba")->ReadObj();
4680 if (
m_errors->FindKey(
"resAr_vs_ToT_ba"))
4681 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"resAr_vs_ToT_ba")->ReadObj();
4682 if (
m_errors->FindKey(
"tresAr_vs_ToT_bc"))
4683 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_ToT_bc")->ReadObj();
4684 if (
m_errors->FindKey(
"resAr_vs_ToT_bc"))
4685 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"resAr_vs_ToT_bc")->ReadObj();
4689 if (
m_errors->FindKey(
"tresAr_vs_ToT_ea"))
4690 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_ToT_ea")->ReadObj();
4691 if (
m_errors->FindKey(
"resAr_vs_ToT_ea"))
4692 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"resAr_vs_ToT_ea")->ReadObj();
4693 if (
m_errors->FindKey(
"tresAr_vs_ToT_ec"))
4694 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_ToT_ec")->ReadObj();
4695 if (
m_errors->FindKey(
"resAr_vs_ToT_ec"))
4696 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"resAr_vs_ToT_ec")->ReadObj();
4703 if (
m_errors->FindKey(
"tresAr_vs_HT_ba"))
4704 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_HT_ba")->ReadObj();
4705 if (
m_errors->FindKey(
"resAr_vs_HT_ba"))
4706 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"resAr_vs_HT_ba")->ReadObj();
4707 if (
m_errors->FindKey(
"tresAr_vs_HT_bc"))
4708 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_HT_bc")->ReadObj();
4709 if (
m_errors->FindKey(
"resAr_vs_HT_bc"))
4710 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"resAr_vs_HT_bc")->ReadObj();
4714 if (
m_errors->FindKey(
"tresAr_vs_HT_ea"))
4715 tres_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_HT_ea")->ReadObj();
4716 if (
m_errors->FindKey(
"resAr_vs_HT_ea"))
4717 res_vs_ToT_ba = (
TH2F *)
m_errors->FindKey(
"resAr_vs_HT_ea")->ReadObj();
4718 if (
m_errors->FindKey(
"tresAr_vs_HT_ec"))
4719 tres_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"tresAr_vs_HT_ec")->ReadObj();
4720 if (
m_errors->FindKey(
"resAr_vs_HT_ec"))
4721 res_vs_ToT_bc = (
TH2F *)
m_errors->FindKey(
"resAr_vs_HT_ec")->ReadObj();
4728 TGraphErrors *tresBA =
GetMean(tres_vs_ToT_ba);
4729 tresBA->SetLineColor(kRed);
4730 tresBA->SetMarkerColor(kRed);
4731 if (not tres_vs_ToT_ba){
4732 throw std::runtime_error(
"tres_vs_ToT_ba pointer is null");
4735 tres_vs_ToT_ba->SetTitle(
"Barrel A Time Residual Mean VS ToT");
4737 tres_vs_ToT_ba->SetTitle(
"Endcap A Time Residual Mean VS ToT");
4738 tres_vs_ToT_ba->GetXaxis()->SetTitle(
"ToT (bin)");
4739 tres_vs_ToT_ba->GetYaxis()->SetTitle(
"Time Residual (ns)");
4743 tres_vs_ToT_ba->SetTitle(
"Barrel A Time Residual Mean VS HT");
4745 tres_vs_ToT_ba->SetTitle(
"Endcap A Time Residual Mean VS HT");}
4746 tres_vs_ToT_ba->GetXaxis()->SetTitle(
"HT (bin)");
4749 tres_vs_ToT_ba->Draw(
"colz");
4750 tresBA->Draw(
"same");
4753 TGraphErrors *tresBC =
GetMean(tres_vs_ToT_bc);
4754 tresBC->SetLineColor(kBlue);
4755 tresBC->SetMarkerColor(kBlue);
4757 if (not tres_vs_ToT_bc){
4758 throw std::runtime_error(
" tres_vs_ToT_bc is null");
4760 tres_vs_ToT_bc->SetTitle(
"Barrel C Time Residual Mean VS ToT");
4762 tres_vs_ToT_bc->SetTitle(
"Endcap C Time Residual Mean VS ToT");}
4763 tres_vs_ToT_bc->GetXaxis()->SetTitle(
"ToT (bin)");
4764 tres_vs_ToT_bc->GetYaxis()->SetTitle(
"Time Residual (ns)");
4767 tres_vs_ToT_bc->SetTitle(
"Barrel C Time Residual Mean VS HT");
4769 tres_vs_ToT_bc->SetTitle(
"Endcap C Time Residual Mean VS HT");
4771 tres_vs_ToT_bc->GetXaxis()->SetTitle(
"HT (bin)");
4774 tres_vs_ToT_bc->Draw(
"colz");
4775 tresBC->Draw(
"same");
4778 tresBA->SetTitle(
"Barrel Time Residual Mean vs ToT");
4780 tresBA->SetTitle(
"Endcap Time Residual Mean vs ToT");
4781 tresBA->GetXaxis()->SetTitle(
"ToT (bin)");
4785 tresBA->SetTitle(
"Barrel Time Residual Mean vs HT");
4787 tresBA->SetTitle(
"Endcap Time Residual Mean vs HT");
4788 tresBA->GetXaxis()->SetTitle(
"HT");
4790 tresBA->GetXaxis()->SetRangeUser(-0.5, 23.5);
4791 tresBA->GetYaxis()->SetRangeUser(-10, 10);
4794 tresBA->GetXaxis()->SetRangeUser(-0.5, 1.5);
4795 tresBA->GetYaxis()->SetRangeUser(-3, 3);
4797 tresBA->Draw(
"alp");
4798 tresBC->Draw(
"same");
4801 TGraphErrors *resBA1 =
GetMean(res_vs_ToT_ba);
4802 resBA1->SetLineColor(kRed);
4803 resBA1->SetMarkerColor(kRed);
4804 if (not res_vs_ToT_ba){
4805 throw std::runtime_error(
"res_vs_ToT_ba is null ptr");
4808 res_vs_ToT_ba->SetTitle(
"Barrel A Residual Mean VS ToT");
4810 res_vs_ToT_ba->SetTitle(
"Endcap A Residual Mean VS ToT");
4811 res_vs_ToT_ba->GetXaxis()->SetTitle(
"ToT (bin)");
4812 res_vs_ToT_ba->GetYaxis()->SetTitle(
"Residual (mm)");
4816 res_vs_ToT_ba->SetTitle(
"Barrel A Residual Mean VS HT");
4818 res_vs_ToT_ba->SetTitle(
"Endcap A Residual Mean VS HT");
4819 res_vs_ToT_ba->GetXaxis()->SetTitle(
"HT (bin)");
4821 res_vs_ToT_ba->Draw(
"colz");
4822 resBA1->Draw(
"same");
4825 TGraphErrors *resBC1 =
GetMean(res_vs_ToT_bc);
4826 resBC1->SetLineColor(kBlue);
4827 resBC1->SetMarkerColor(kBlue);
4829 res_vs_ToT_bc->SetTitle(
"Barrel C Residual Mean VS ToT");
4831 res_vs_ToT_bc->SetTitle(
"Endcap C Residual Mean VS ToT");
4832 res_vs_ToT_bc->GetXaxis()->SetTitle(
"ToT (bin)");
4833 res_vs_ToT_bc->GetYaxis()->SetTitle(
"Residual (mm)");
4837 res_vs_ToT_bc->SetTitle(
"Barrel C Residual Mean VS HT");
4839 res_vs_ToT_bc->SetTitle(
"Endcap C Residual Mean VS HT");
4840 res_vs_ToT_bc->GetXaxis()->SetTitle(
"HT (bin)");
4842 res_vs_ToT_bc->Draw(
"colz");
4843 resBC1->Draw(
"same");
4847 TGraphErrors *resBA =
GetWidth(res_vs_ToT_ba);
4848 resBA->SetLineColor(kRed);
4849 resBA->SetMarkerColor(kRed);
4850 TGraphErrors *resBC =
GetWidth(res_vs_ToT_bc);
4851 resBC->SetLineColor(kBlue);
4852 resBC->SetMarkerColor(kBlue);
4853 resBA->SetTitle(
"Barrel Time Residual Width vs ToT");
4855 resBA->SetTitle(
"Endcap Time Residual Width vs ToT");
4856 resBA->GetXaxis()->SetTitle(
"ToT (bin)");
4860 resBA->SetTitle(
"Barrel Residual Width vs HT");
4862 resBA->SetTitle(
"Endcap Residual Width vs HT");
4863 resBA->GetXaxis()->SetTitle(
"HT");
4865 resBA->GetXaxis()->SetRangeUser(-0.5, 23.5);
4866 resBA->GetYaxis()->SetRangeUser(0.08, 0.2);
4869 resBA->GetXaxis()->SetRangeUser(-0.5, 1.5);
4870 resBA->GetYaxis()->SetRangeUser(0.08, 0.2);
4873 resBC->Draw(
"same");