4299 errors = (TDirectory *)
file->FindKey(
"Errors")->ReadObj();
4301 throw(
string(
"No errors folder!!!!!!!!!!!!!!!"));
4302 if (
errors->GetNkeys() > 19)
4304 this->Divide(2, 3, 0.01, 0.01);
4308 TH2F *pull_vs_tb_trt = (
TH2F *)
errors->FindKey(
"pull_vs_tb_trt")->ReadObj();
4309 TH2F *pull_vs_tb_ba = (
TH2F *)
errors->FindKey(
"pull_vs_tb_ba")->ReadObj();
4310 TH2F *pull_vs_tb_bc = (
TH2F *)
errors->FindKey(
"pull_vs_tb_bc")->ReadObj();
4311 TH2F *pull_vs_tb_ea = (
TH2F *)
errors->FindKey(
"pull_vs_tb_ea")->ReadObj();
4312 TH2F *pull_vs_tb_ec = (
TH2F *)
errors->FindKey(
"pull_vs_tb_ec")->ReadObj();
4314 TH2F *errors_vs_tb_trt = (
TH2F *)
errors->FindKey(
"errors_vs_tb_trt")->ReadObj();
4315 TH2F *errors_vs_tb_ba = (
TH2F *)
errors->FindKey(
"errors_vs_tb_ba")->ReadObj();
4316 TH2F *errors_vs_tb_bc = (
TH2F *)
errors->FindKey(
"errors_vs_tb_bc")->ReadObj();
4317 TH2F *errors_vs_tb_ea = (
TH2F *)
errors->FindKey(
"errors_vs_tb_ea")->ReadObj();
4318 TH2F *errors_vs_tb_ec = (
TH2F *)
errors->FindKey(
"errors_vs_tb_ec")->ReadObj();
4320 TH2F *residual_vs_tb_trt = (
TH2F *)
errors->FindKey(
"residual_vs_tb_trt")->ReadObj();
4321 TH2F *residual_vs_tb_ba = (
TH2F *)
errors->FindKey(
"residual_vs_tb_ba")->ReadObj();
4322 TH2F *residual_vs_tb_bc = (
TH2F *)
errors->FindKey(
"residual_vs_tb_bc")->ReadObj();
4323 TH2F *residual_vs_tb_ea = (
TH2F *)
errors->FindKey(
"residual_vs_tb_ea")->ReadObj();
4324 TH2F *residual_vs_tb_ec = (
TH2F *)
errors->FindKey(
"residual_vs_tb_ec")->ReadObj();
4326 TH2F *trackerrors_vs_tb_trt = (
TH2F *)
errors->FindKey(
"trackerrors_vs_tb_trt")->ReadObj();
4327 TH2F *trackerrors_vs_tb_ba = (
TH2F *)
errors->FindKey(
"trackerrors_vs_tb_ba")->ReadObj();
4328 TH2F *trackerrors_vs_tb_bc = (
TH2F *)
errors->FindKey(
"trackerrors_vs_tb_bc")->ReadObj();
4329 TH2F *trackerrors_vs_tb_ea = (
TH2F *)
errors->FindKey(
"trackerrors_vs_tb_ea")->ReadObj();
4330 TH2F *trackerrors_vs_tb_ec = (
TH2F *)
errors->FindKey(
"trackerrors_vs_tb_ec")->ReadObj();
4334 TGraphErrors *tresTRT =
GetPWidth(pull_vs_tb_trt);
4335 TGraphErrors *tresBA =
GetPWidth(pull_vs_tb_ba);
4336 tresBA->SetLineColor(kRed);
4337 tresBA->SetMarkerColor(kRed);
4338 TGraphErrors *tresBC =
GetPWidth(pull_vs_tb_bc);
4339 tresBC->SetLineColor(kBlue);
4340 tresBC->SetMarkerColor(kBlue);
4341 TGraphErrors *tresEA =
GetPWidth(pull_vs_tb_ea);
4342 tresEA->SetLineColor(kGreen);
4343 tresEA->SetMarkerColor(kGreen);
4344 TGraphErrors *tresEC =
GetPWidth(pull_vs_tb_ec);
4345 tresEC->SetLineColor(kYellow);
4346 tresEC->SetMarkerColor(kYellow);
4348 tresTRT->SetTitle(
"Pull Width VS Drift Time. Pt>2GeV");
4349 tresTRT->GetXaxis()->SetTitle(
"Drift Time ");
4350 tresTRT->GetYaxis()->SetTitle(
" ");
4351 tresTRT->GetYaxis()->SetRangeUser(0.7, 1.3);
4352 tresTRT->Draw(
"ALP");
4359 TGraphErrors *errorsTRT =
GetMeanE(errors_vs_tb_trt);
4360 TGraphErrors *errorsBA =
GetMeanE(errors_vs_tb_ba);
4361 errorsBA->SetLineColor(kRed);
4362 errorsBA->SetMarkerColor(kRed);
4363 TGraphErrors *errorsBC =
GetMeanE(errors_vs_tb_bc);
4364 errorsBC->SetLineColor(kBlue);
4365 errorsBC->SetMarkerColor(kBlue);
4366 TGraphErrors *errorsEA =
GetMeanE(errors_vs_tb_ea);
4367 errorsEA->SetLineColor(kGreen);
4368 errorsEA->SetMarkerColor(kGreen);
4369 TGraphErrors *errorsEC =
GetMeanE(errors_vs_tb_ec);
4370 errorsEC->SetLineColor(kYellow);
4371 errorsEC->SetMarkerColor(kYellow);
4372 errorsTRT->SetTitle(
"Error VS Drift Time");
4373 errorsTRT->GetXaxis()->SetTitle(
"Drift Time");
4374 errorsTRT->GetYaxis()->SetTitle(
"mm");
4375 errorsTRT->GetYaxis()->SetRangeUser(0.05, 0.24);
4376 errorsTRT->Draw(
"ALP");
4377 errorsBA->Draw(
"LP");
4378 errorsBC->Draw(
"LP");
4379 errorsEA->Draw(
"LP");
4380 errorsEC->Draw(
"LP");
4383 TGraphErrors *ntresBA =
GetPn(pull_vs_tb_ba);
4384 ntresBA->SetLineColor(kRed);
4385 ntresBA->SetMarkerColor(kRed);
4386 TGraphErrors *ntresBC =
GetPn(pull_vs_tb_bc);
4387 ntresBC->SetLineColor(kBlue);
4388 ntresBC->SetMarkerColor(kBlue);
4389 TGraphErrors *ntresEA =
GetPn(pull_vs_tb_ea);
4390 ntresEA->SetLineColor(kGreen);
4391 ntresEA->SetMarkerColor(kGreen);
4392 TGraphErrors *ntresEC =
GetPn(pull_vs_tb_ec);
4393 ntresEC->SetLineColor(kYellow);
4394 ntresEC->SetMarkerColor(kYellow);
4395 ntresEA->SetTitle(
"Number of hits VS Drift Time. Pt>2GeV");
4396 ntresEA->GetXaxis()->SetTitle(
"Drift Time");
4397 ntresEA->GetYaxis()->SetTitle(
" hits ");
4398 ntresEA->Draw(
"ALP");
4399 ntresEC->Draw(
"LP");
4400 ntresBA->Draw(
"LP");
4401 ntresBC->Draw(
"LP");
4404 TGraphErrors *terrorsTRT =
GetMean(trackerrors_vs_tb_trt);
4405 TGraphErrors *terrorsBA =
GetMean(trackerrors_vs_tb_ba);
4406 terrorsBA->SetLineColor(kRed);
4407 terrorsBA->SetMarkerColor(kRed);
4408 TGraphErrors *terrorsBC =
GetMean(trackerrors_vs_tb_bc);
4409 terrorsBC->SetLineColor(kBlue);
4410 terrorsBC->SetMarkerColor(kBlue);
4411 TGraphErrors *terrorsEA =
GetMean(trackerrors_vs_tb_ea);
4412 terrorsEA->SetLineColor(kGreen);
4413 terrorsEA->SetMarkerColor(kGreen);
4414 TGraphErrors *terrorsEC =
GetMean(trackerrors_vs_tb_ec);
4415 terrorsEC->SetLineColor(kYellow);
4416 terrorsEC->SetMarkerColor(kYellow);
4417 terrorsTRT->SetTitle(
"Track Error VS Drift Time");
4418 terrorsTRT->GetXaxis()->SetTitle(
"Drift Time");
4419 terrorsTRT->GetYaxis()->SetTitle(
"mm");
4420 terrorsTRT->GetYaxis()->SetRangeUser(0.0, 0.07);
4421 terrorsTRT->Draw(
"ALP");
4422 terrorsBA->Draw(
"LP");
4423 terrorsBC->Draw(
"LP");
4424 terrorsEA->Draw(
"LP");
4425 terrorsEC->Draw(
"LP");
4428 TGraphErrors *residualTRT =
GetWidth(residual_vs_tb_trt);
4429 TGraphErrors *residualBA =
GetWidth(residual_vs_tb_ba);
4430 residualBA->SetLineColor(kRed);
4431 residualBA->SetMarkerColor(kRed);
4432 TGraphErrors *residualBC =
GetWidth(residual_vs_tb_bc);
4433 residualBC->SetLineColor(kBlue);
4434 residualBC->SetMarkerColor(kBlue);
4435 TGraphErrors *residualEA =
GetWidth(residual_vs_tb_ea);
4436 residualEA->SetLineColor(kGreen);
4437 residualEA->SetMarkerColor(kGreen);
4438 TGraphErrors *residualEC =
GetWidth(residual_vs_tb_ec);
4439 residualEC->SetLineColor(kYellow);
4440 residualEC->SetMarkerColor(kYellow);
4441 residualTRT->SetTitle(
"Residual VS Drift Time. Pt > 2GeV");
4442 residualTRT->GetXaxis()->SetTitle(
"Drift Time ");
4443 residualTRT->GetYaxis()->SetTitle(
"mm");
4444 residualTRT->GetYaxis()->SetRangeUser(0.05, 0.24);
4445 residualTRT->Draw(
"ALP");
4446 residualBA->Draw(
"LP");
4447 residualBC->Draw(
"LP");
4448 residualEA->Draw(
"LP");
4449 residualEC->Draw(
"LP");
4453 TH2F *residual_trt = (
TH2F *)
errors->FindKey(
"tresidual_trt")->ReadObj();
4454 TH2F *residual_ba = (
TH2F *)
errors->FindKey(
"tresidual_ba")->ReadObj();
4455 TH2F *residual_bc = (
TH2F *)
errors->FindKey(
"tresidual_bc")->ReadObj();
4456 TH2F *residual_ea = (
TH2F *)
errors->FindKey(
"tresidual_ea")->ReadObj();
4457 TH2F *residual_ec = (
TH2F *)
errors->FindKey(
"tresidual_ec")->ReadObj();
4459 TH2F *residual_trtP = (
TH2F *)
errors->FindKey(
"tresidual_trtP")->ReadObj();
4460 TH2F *residual_baP = (
TH2F *)
errors->FindKey(
"tresidual_baP")->ReadObj();
4461 TH2F *residual_bcP = (
TH2F *)
errors->FindKey(
"tresidual_bcP")->ReadObj();
4462 TH2F *residual_eaP = (
TH2F *)
errors->FindKey(
"tresidual_eaP")->ReadObj();
4463 TH2F *residual_ecP = (
TH2F *)
errors->FindKey(
"tresidual_ecP")->ReadObj();
4465 TGraphErrors *residualTRT1 =
GetEntries(residual_trt);
4466 TGraphErrors *residualBA1 =
GetEntries(residual_ba);
4467 residualBA1->SetLineColor(kRed);
4468 residualBA1->SetMarkerColor(kRed);
4469 TGraphErrors *residualBC1 =
GetEntries(residual_bc);
4470 residualBC1->SetLineColor(kBlue);
4471 residualBC1->SetMarkerColor(kBlue);
4472 TGraphErrors *residualEA1 =
GetEntries(residual_ea);
4473 residualEA1->SetLineColor(kGreen);
4474 residualEA1->SetMarkerColor(kGreen);
4475 TGraphErrors *residualEC1 =
GetEntries(residual_ec);
4476 residualEC1->SetLineColor(kYellow);
4477 residualEC1->SetMarkerColor(kYellow);
4479 TGraphErrors *residualTRT2 =
GetEntries(residual_trtP);
4480 TGraphErrors *residualBA2 =
GetEntries(residual_baP);
4481 residualBA2->SetLineColor(kRed);
4482 residualBA2->SetMarkerColor(kRed);
4483 TGraphErrors *residualBC2 =
GetEntries(residual_bcP);
4484 residualBC2->SetLineColor(kBlue);
4485 residualBC2->SetMarkerColor(kBlue);
4486 TGraphErrors *residualEA2 =
GetEntries(residual_eaP);
4487 residualEA2->SetLineColor(kGreen);
4488 residualEA2->SetMarkerColor(kGreen);
4489 TGraphErrors *residualEC2 =
GetEntries(residual_ecP);
4490 residualEC2->SetLineColor(kYellow);
4491 residualEC2->SetMarkerColor(kYellow);
4493 int nbins = residualTRT1->GetN();
4495 TGraphErrors *ratioTRT =
new TGraphErrors(
nbins);
4496 TGraphErrors *ratioBA =
new TGraphErrors(
nbins);
4497 TGraphErrors *ratioBC =
new TGraphErrors(
nbins);
4498 TGraphErrors *ratioEA =
new TGraphErrors(
nbins);
4499 TGraphErrors *ratioEC =
new TGraphErrors(
nbins);
4506 residualTRT1->GetPoint(
i,
x,
all);
4507 residualTRT2->GetPoint(
i,
x,
prec);
4508 cout <<
i <<
" " <<
x <<
" " <<
prec <<
" " <<
all << endl;
4515 ratioTRT->SetPoint(
i,
x, 0);
4517 residualBA1->GetPoint(
i,
x,
all);
4518 residualBA2->GetPoint(
i,
x,
prec);
4519 cout <<
i <<
" " <<
x <<
" " <<
prec <<
" " <<
all << endl;
4526 ratioBA->SetPoint(
i,
x, 0);
4529 residualBC1->GetPoint(
i,
x,
all);
4530 residualBC2->GetPoint(
i,
x,
prec);
4531 cout <<
i <<
" " <<
x <<
" " <<
prec <<
" " <<
all << endl;
4538 ratioBC->SetPoint(
i,
x, 0);
4541 residualEA1->GetPoint(
i,
x,
all);
4542 residualEA2->GetPoint(
i,
x,
prec);
4543 cout <<
i <<
" " <<
x <<
" " <<
prec <<
" " <<
all << endl;
4550 ratioEA->SetPoint(
i,
x, 0);
4553 residualEC1->GetPoint(
i,
x,
all);
4554 residualEC2->GetPoint(
i,
x,
prec);
4555 cout <<
i <<
" " <<
x <<
" " <<
prec <<
" " <<
all << endl;
4562 ratioEC->SetPoint(
i,
x, 0);
4567 ratioTRT->SetTitle(
"Ratio Precision Hits Vs Pt. Pt > 2GeV");
4568 ratioTRT->GetXaxis()->SetTitle(
"Precission Hits/Total Hits ");
4569 ratioTRT->GetYaxis()->SetTitle(
"pt");
4570 ratioTRT->GetYaxis()->SetRangeUser(0.05, 0.24);
4571 ratioTRT->GetYaxis()->SetRangeUser(0.3, 1);
4573 ratioBA->SetLineColor(kRed);
4574 ratioBC->SetLineColor(kBlue);
4575 ratioEA->SetLineColor(kGreen);
4576 ratioEC->SetLineColor(kYellow);
4578 ratioTRT->Draw(
"alp");
4579 ratioBA->Draw(
"lp");
4580 ratioBC->Draw(
"lp");
4581 ratioEA->Draw(
"lp");
4582 ratioEC->Draw(
"lp");
4586 cout <<
" Not enough keys in Errors directory for tb dependence plots " << endl;