ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PtDependence Class Reference
Inheritance diagram for PtDependence:
Collaboration diagram for PtDependence:

Public Member Functions

 PtDependence (TFile *)
 

Private Attributes

TDirectory * m_errors
 

Detailed Description

Definition at line 4075 of file TRTCalib_makeplots.cxx.

Constructor & Destructor Documentation

◆ PtDependence()

PtDependence::PtDependence ( TFile *  file)

Definition at line 4084 of file TRTCalib_makeplots.cxx.

4085 {
4086  m_errors = (TDirectory *)file->FindKey("Errors")->ReadObj();
4087  if (m_errors == nullptr)
4088  throw(string("No errors folder!!!!!!!!!!!!!!!"));
4089  if (m_errors->GetNkeys() > 29)
4090  {
4091  this->Divide(2, 3, 0.01, 0.01);
4092  // Read the histos:
4093  TH2F *residual_trt = (TH2F *)m_errors->FindKey("residual_allhits")->ReadObj();
4094  TH2F *residual_ba = (TH2F *)m_errors->FindKey("residual_ba")->ReadObj();
4095  TH2F *residual_bc = (TH2F *)m_errors->FindKey("residual_bc")->ReadObj();
4096  TH2F *residual_ea = (TH2F *)m_errors->FindKey("residual_ea")->ReadObj();
4097  TH2F *residual_ec = (TH2F *)m_errors->FindKey("residual_ec")->ReadObj();
4098  // TH2F *tresidual_trt = (TH2F *)m_errors->FindKey("tresidual_trt")->ReadObj();
4099  // TH2F *tresidual_ba = (TH2F *)m_errors->FindKey("tresidual_ba")->ReadObj();
4100  // TH2F *tresidual_bc = (TH2F *)m_errors->FindKey("tresidual_bc")->ReadObj();
4101  // TH2F *tresidual_ea = (TH2F *)m_errors->FindKey("tresidual_ea")->ReadObj();
4102  // TH2F *tresidual_ec = (TH2F *)m_errors->FindKey("tresidual_ec")->ReadObj();
4103  TH2F *pull_trtP = (TH2F *)m_errors->FindKey("pull_trtP")->ReadObj();
4104  TH2F *pull_baP = (TH2F *)m_errors->FindKey("pull_baP")->ReadObj();
4105  TH2F *pull_bcP = (TH2F *)m_errors->FindKey("pull_bcP")->ReadObj();
4106  TH2F *pull_eaP = (TH2F *)m_errors->FindKey("pull_eaP")->ReadObj();
4107  TH2F *pull_ecP = (TH2F *)m_errors->FindKey("pull_ecP")->ReadObj();
4108  TH2F *residual_trtP = (TH2F *)m_errors->FindKey("residual_trtP")->ReadObj();
4109  TH2F *residual_baP = (TH2F *)m_errors->FindKey("residual_baP")->ReadObj();
4110  TH2F *residual_bcP = (TH2F *)m_errors->FindKey("residual_bcP")->ReadObj();
4111  TH2F *residual_eaP = (TH2F *)m_errors->FindKey("residual_eaP")->ReadObj();
4112  TH2F *residual_ecP = (TH2F *)m_errors->FindKey("residual_ecP")->ReadObj();
4113  TH2F *tresidual_trtP = (TH2F *)m_errors->FindKey("tresidual_trtP")->ReadObj();
4114  TH2F *tresidual_baP = (TH2F *)m_errors->FindKey("tresidual_baP")->ReadObj();
4115  TH2F *tresidual_bcP = (TH2F *)m_errors->FindKey("tresidual_bcP")->ReadObj();
4116  TH2F *tresidual_eaP = (TH2F *)m_errors->FindKey("tresidual_eaP")->ReadObj();
4117  TH2F *tresidual_ecP = (TH2F *)m_errors->FindKey("tresidual_ecP")->ReadObj();
4118  TH2F *trackerrors_trt = (TH2F *)m_errors->FindKey("trackerrors_trt")->ReadObj();
4119  TH2F *trackerrors_ba = (TH2F *)m_errors->FindKey("trackerrors_ba")->ReadObj();
4120  TH2F *trackerrors_bc = (TH2F *)m_errors->FindKey("trackerrors_bc")->ReadObj();
4121  TH2F *trackerrors_ea = (TH2F *)m_errors->FindKey("trackerrors_ea")->ReadObj();
4122  TH2F *trackerrors_ec = (TH2F *)m_errors->FindKey("trackerrors_ec")->ReadObj();
4123 
4124  this->cd(1);
4125  // Time Residual Mean Vs Pt:
4126  TGraphErrors *tresTRT = GetMean(tresidual_trtP);
4127  TGraphErrors *tresBA = GetMean(tresidual_baP);
4128  tresBA->SetLineColor(kRed);
4129  tresBA->SetMarkerColor(kRed);
4130  TGraphErrors *tresBC = GetMean(tresidual_bcP);
4131  tresBC->SetLineColor(kBlue);
4132  tresBC->SetMarkerColor(kBlue);
4133  TGraphErrors *tresEA = GetMean(tresidual_eaP);
4134  tresEA->SetLineColor(kGreen);
4135  tresEA->SetMarkerColor(kGreen);
4136  TGraphErrors *tresEC = GetMean(tresidual_ecP);
4137  tresEC->SetLineColor(kYellow);
4138  tresEC->SetMarkerColor(kYellow);
4139 
4140  tresTRT->SetTitle("Time Residual Mean VS PT");
4141  tresTRT->GetXaxis()->SetTitle("Pt (GeV)");
4142  tresTRT->GetYaxis()->SetTitle("ns");
4143  tresTRT->GetYaxis()->SetRangeUser(-0.8, 0.4);
4144  tresTRT->Draw("ALP");
4145  tresBA->Draw("LP");
4146  tresBC->Draw("LP");
4147  tresEA->Draw("LP");
4148  tresEC->Draw("LP");
4149 
4150  this->cd(3);
4151  // Time Residual Width Vs Pt
4152 
4153  TGraphErrors *tresTRTw = GetWidth(tresidual_trtP);
4154  TGraphErrors *tresBAw = GetWidth(tresidual_baP);
4155  tresBAw->SetLineColor(kRed);
4156  tresBAw->SetMarkerColor(kRed);
4157  TGraphErrors *tresBCw = GetWidth(tresidual_bcP);
4158  tresBCw->SetLineColor(kBlue);
4159  tresBCw->SetMarkerColor(kBlue);
4160  TGraphErrors *tresEAw = GetWidth(tresidual_eaP);
4161  tresEAw->SetLineColor(kGreen);
4162  tresEAw->SetMarkerColor(kGreen);
4163  TGraphErrors *tresECw = GetWidth(tresidual_ecP);
4164  tresECw->SetLineColor(kYellow);
4165  tresECw->SetMarkerColor(kYellow);
4166 
4167  tresTRTw->SetTitle("Time Residual Width VS PT");
4168  tresTRTw->GetXaxis()->SetTitle("Pt (GeV)");
4169  tresTRTw->GetYaxis()->SetTitle("ns");
4170  tresTRTw->GetYaxis()->SetRangeUser(2.9, 4.0);
4171  tresTRTw->Draw("ALP");
4172  tresBAw->Draw("LP");
4173  tresBCw->Draw("LP");
4174  tresEAw->Draw("LP");
4175  tresECw->Draw("LP");
4176  this->cd(5);
4177 
4178  // Residual Vs Pt:
4179  TGraphErrors *resTRTw = GetWidth(residual_trtP);
4180  TGraphErrors *resBAw = GetWidth(residual_baP);
4181  resBAw->SetLineColor(kRed);
4182  resBAw->SetMarkerColor(kRed);
4183  TGraphErrors *resBCw = GetWidth(residual_bcP);
4184  resBCw->SetLineColor(kBlue);
4185  resBCw->SetMarkerColor(kBlue);
4186  TGraphErrors *resEAw = GetWidth(residual_eaP);
4187  resEAw->SetLineColor(kGreen);
4188  resEAw->SetMarkerColor(kGreen);
4189  TGraphErrors *resECw = GetWidth(residual_ecP);
4190  resECw->SetLineColor(kYellow);
4191  resECw->SetMarkerColor(kYellow);
4192 
4193  resTRTw->SetTitle("Residual Width VS PT");
4194  resTRTw->GetXaxis()->SetTitle("Pt (GeV)");
4195  resTRTw->GetYaxis()->SetTitle("mm");
4196  resTRTw->GetYaxis()->SetRangeUser(0.11, 0.18);
4197  resTRTw->Draw("ALP");
4198  resBAw->Draw("LP");
4199  resBCw->Draw("LP");
4200  resEAw->Draw("LP");
4201  resECw->Draw("LP");
4202 
4203  this->cd(2);
4204  // Pull Width vs Pt:
4205  TGraphErrors *pullTRTw = GetPWidth(pull_trtP);
4206  TGraphErrors *pullBAw = GetPWidth(pull_baP);
4207  pullBAw->SetLineColor(kRed);
4208  pullBAw->SetMarkerColor(kRed);
4209  TGraphErrors *pullBCw = GetPWidth(pull_bcP);
4210  pullBCw->SetLineColor(kBlue);
4211  pullBCw->SetMarkerColor(kBlue);
4212  TGraphErrors *pullEAw = GetPWidth(pull_eaP);
4213  pullEAw->SetLineColor(kGreen);
4214  pullEAw->SetMarkerColor(kGreen);
4215  TGraphErrors *pullECw = GetPWidth(pull_ecP);
4216  pullECw->SetLineColor(kYellow);
4217  pullECw->SetMarkerColor(kYellow);
4218 
4219  pullTRTw->SetTitle("Pull Width VS PT");
4220  pullTRTw->GetXaxis()->SetTitle("Pt (GeV)");
4221  pullTRTw->GetYaxis()->SetTitle(" ");
4222  pullTRTw->GetYaxis()->SetRangeUser(0.7, 1.3);
4223  pullTRTw->Draw("ALP");
4224  pullBAw->Draw("LP");
4225  pullBCw->Draw("LP");
4226  pullEAw->Draw("LP");
4227  pullECw->Draw("LP");
4228 
4229  this->cd(4);
4230  // Pull Width vs Pt:
4231  TGraphErrors *trkTRTw = GetMean(trackerrors_trt);
4232  TGraphErrors *trkBAw = GetMean(trackerrors_ba);
4233  trkBAw->SetLineColor(kRed);
4234  trkBAw->SetMarkerColor(kRed);
4235  TGraphErrors *trkBCw = GetMean(trackerrors_bc);
4236  trkBCw->SetLineColor(kBlue);
4237  trkBCw->SetMarkerColor(kBlue);
4238  TGraphErrors *trkEAw = GetMean(trackerrors_ea);
4239  trkEAw->SetLineColor(kGreen);
4240  trkEAw->SetMarkerColor(kGreen);
4241  TGraphErrors *trkECw = GetMean(trackerrors_ec);
4242  trkECw->SetLineColor(kYellow);
4243  trkECw->SetMarkerColor(kYellow);
4244 
4245  trkTRTw->SetTitle("Trk error Mean Width VS PT");
4246  trkTRTw->GetXaxis()->SetTitle("Pt (GeV)");
4247  trkTRTw->GetYaxis()->SetTitle("mm");
4248  trkTRTw->GetYaxis()->SetRangeUser(0.0, 0.07);
4249  trkTRTw->Draw("ALP");
4250  trkBAw->Draw("LP");
4251  trkBCw->Draw("LP");
4252  trkEAw->Draw("LP");
4253  trkECw->Draw("LP");
4254 
4255  this->cd(6);
4256 
4257  // Residual Vs Pt:
4258  TGraphErrors *presTRTw = GetWidth(residual_trt);
4259  TGraphErrors *presBAw = GetWidth(residual_ba);
4260  presBAw->SetLineColor(kRed);
4261  presBAw->SetMarkerColor(kRed);
4262  TGraphErrors *presBCw = GetWidth(residual_bc);
4263  presBCw->SetLineColor(kBlue);
4264  presBCw->SetMarkerColor(kBlue);
4265  TGraphErrors *presEAw = GetWidth(residual_ea);
4266  presEAw->SetLineColor(kGreen);
4267  presEAw->SetMarkerColor(kGreen);
4268  TGraphErrors *presECw = GetWidth(residual_ec);
4269  presECw->SetLineColor(kYellow);
4270  presECw->SetMarkerColor(kYellow);
4271 
4272  presTRTw->SetTitle("Residual Width all hits VS PT");
4273  presTRTw->GetXaxis()->SetTitle("Pt (GeV)");
4274  presTRTw->GetYaxis()->SetTitle("mm");
4275  presTRTw->GetYaxis()->SetRangeUser(0.11, 0.18);
4276  presTRTw->Draw("ALP");
4277  presBAw->Draw("LP");
4278  presBCw->Draw("LP");
4279  presEAw->Draw("LP");
4280  presECw->Draw("LP");
4281  }
4282  else
4283  {
4284  cout << " Not enough keys in Errors directory for Pt dependence plots " << endl;
4285  }
4286 }

Member Data Documentation

◆ m_errors

TDirectory* PtDependence::m_errors
private

Definition at line 4081 of file TRTCalib_makeplots.cxx.


The documentation for this class was generated from the following file:
PtDependence::m_errors
TDirectory * m_errors
Definition: TRTCalib_makeplots.cxx:4081
GetMean
TGraphErrors * GetMean(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:3907
GetWidth
TGraphErrors * GetWidth(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:3983
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
file
TFile * file
Definition: tile_monitor.h:29
GetPWidth
TGraphErrors * GetPWidth(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:4042
calibdata.cd
cd
Definition: calibdata.py:51