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 4081 of file TRTCalib_makeplots.cxx.

Constructor & Destructor Documentation

◆ PtDependence()

PtDependence::PtDependence ( TFile *  file)

Definition at line 4090 of file TRTCalib_makeplots.cxx.

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

Member Data Documentation

◆ m_errors

TDirectory* PtDependence::m_errors
private

Definition at line 4087 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:4087
GetMean
TGraphErrors * GetMean(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:3913
GetWidth
TGraphErrors * GetWidth(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:3989
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:4048
calibdata.cd
cd
Definition: calibdata.py:50