ROOT logo
// Display some histograms from scanning.
//
// BIT(1) stores the original selection.
// BIT(0) stores the user selection (set to same value as b1 at init).
//
// This allows to check all possible combinations.


void show_scan_results()
{
  TFile *f = TFile::Open("scan_results.root");

  TTree* t = (TTree*) gDirectory->Get("SR");

  if (t == 0)
    Error("show_scan_results", "Tree 'SR' with scan results not found.");

  TCanvas *c = 0;


  //----------------------------------------------------------------------------
  // Tracks
  //----------------------------------------------------------------------------

  c = new TCanvas("Tracks", "Track Scanning Results", 800, 600);
  c->Divide(2, 3);

  c->cd(1);
  t->Draw("Sum$(T.fLabel & 1)");

  c->cd(2);
  t->Draw("T.GetSign()", "T.fLabel & 1");

  c->cd(3);
  t->Draw("T.Pt()", "T.fLabel & 1");

  c->cd(4);
  t->Draw("T.Eta()", "T.fLabel & 1");

  c->cd(5);
  t->Draw("T.Phi()", "T.fLabel & 1");

  c->Modified();
  c->Update();


  //----------------------------------------------------------------------------
  // Trackelts
  //----------------------------------------------------------------------------

  c = new TCanvas("Tracklets", "Tracklet Scanning Results", 800, 600);
  c->Divide(2, 3);

  c->cd(1);
  t->Draw("Sum$(M.fLabels & 1)");

  c->cd(2);
  t->Draw("M.fNsingle");

  c->cd(3);
  t->Draw("M.fFiredChips[1]:Sum$(M.fLabels & 1)");

  c->cd(4);
  t->Draw("M.fDeltTh", "M.fLabels & 1");

  c->cd(5);
  t->Draw("M.fDeltPhi", "M.fLabels & 1");

  c->cd(6);
  t->Draw("M.fPhi", "M.fLabels & 1");

  c->Modified();
  c->Update();


  //----------------------------------------------------------------------------
  // Vertices
  //----------------------------------------------------------------------------

  c = new TCanvas("Vertices", "Vertex Scanning Results", 800, 600);
  c->Divide(3, 3);

  c->cd(1);
  t->Draw("VT.GetX()", "VT.GetNContributors()>0");

  c->cd(2);
  t->Draw("VT.GetY()", "VT.GetNContributors()>0");

  c->cd(3);
  t->Draw("VT.GetZ()", "VT.GetNContributors()>0");

  c->cd(4);
  t->Draw("VSPD.GetX()", "VSPD.GetNContributors()>0 && VSPD.fTitle.Contains(\"3D\")");

  c->cd(5);
  t->Draw("VSPD.GetY()", "VSPD.GetNContributors()>0 && VSPD.fTitle.Contains(\"3D\")");

  c->cd(6);
  t->Draw("VSPD.GetZ()", "VSPD.GetNContributors()>0 && VSPD.fTitle.Contains(\"3D\")");

  c->cd(7);
  t->Draw("VTPC.GetX()", "VTPC.GetNContributors()>0");

  c->cd(8);
  t->Draw("VTPC.GetY()", "VTPC.GetNContributors()>0");

  c->cd(9);
  t->Draw("VTPC.GetZ()", "VTPC.GetNContributors()>0");

  //----------------------------------------------------------------------------
  // End
  //----------------------------------------------------------------------------

  f->Close();
  delete f;
}
 show_scan_results.C:1
 show_scan_results.C:2
 show_scan_results.C:3
 show_scan_results.C:4
 show_scan_results.C:5
 show_scan_results.C:6
 show_scan_results.C:7
 show_scan_results.C:8
 show_scan_results.C:9
 show_scan_results.C:10
 show_scan_results.C:11
 show_scan_results.C:12
 show_scan_results.C:13
 show_scan_results.C:14
 show_scan_results.C:15
 show_scan_results.C:16
 show_scan_results.C:17
 show_scan_results.C:18
 show_scan_results.C:19
 show_scan_results.C:20
 show_scan_results.C:21
 show_scan_results.C:22
 show_scan_results.C:23
 show_scan_results.C:24
 show_scan_results.C:25
 show_scan_results.C:26
 show_scan_results.C:27
 show_scan_results.C:28
 show_scan_results.C:29
 show_scan_results.C:30
 show_scan_results.C:31
 show_scan_results.C:32
 show_scan_results.C:33
 show_scan_results.C:34
 show_scan_results.C:35
 show_scan_results.C:36
 show_scan_results.C:37
 show_scan_results.C:38
 show_scan_results.C:39
 show_scan_results.C:40
 show_scan_results.C:41
 show_scan_results.C:42
 show_scan_results.C:43
 show_scan_results.C:44
 show_scan_results.C:45
 show_scan_results.C:46
 show_scan_results.C:47
 show_scan_results.C:48
 show_scan_results.C:49
 show_scan_results.C:50
 show_scan_results.C:51
 show_scan_results.C:52
 show_scan_results.C:53
 show_scan_results.C:54
 show_scan_results.C:55
 show_scan_results.C:56
 show_scan_results.C:57
 show_scan_results.C:58
 show_scan_results.C:59
 show_scan_results.C:60
 show_scan_results.C:61
 show_scan_results.C:62
 show_scan_results.C:63
 show_scan_results.C:64
 show_scan_results.C:65
 show_scan_results.C:66
 show_scan_results.C:67
 show_scan_results.C:68
 show_scan_results.C:69
 show_scan_results.C:70
 show_scan_results.C:71
 show_scan_results.C:72
 show_scan_results.C:73
 show_scan_results.C:74
 show_scan_results.C:75
 show_scan_results.C:76
 show_scan_results.C:77
 show_scan_results.C:78
 show_scan_results.C:79
 show_scan_results.C:80
 show_scan_results.C:81
 show_scan_results.C:82
 show_scan_results.C:83
 show_scan_results.C:84
 show_scan_results.C:85
 show_scan_results.C:86
 show_scan_results.C:87
 show_scan_results.C:88
 show_scan_results.C:89
 show_scan_results.C:90
 show_scan_results.C:91
 show_scan_results.C:92
 show_scan_results.C:93
 show_scan_results.C:94
 show_scan_results.C:95
 show_scan_results.C:96
 show_scan_results.C:97
 show_scan_results.C:98
 show_scan_results.C:99
 show_scan_results.C:100
 show_scan_results.C:101
 show_scan_results.C:102
 show_scan_results.C:103
 show_scan_results.C:104
 show_scan_results.C:105
 show_scan_results.C:106
 show_scan_results.C:107
 show_scan_results.C:108
 show_scan_results.C:109
 show_scan_results.C:110
 show_scan_results.C:111
 show_scan_results.C:112
 show_scan_results.C:113
 show_scan_results.C:114
 show_scan_results.C:115
 show_scan_results.C:116
 show_scan_results.C:117