42 if (tracks.size() == 0) {
47 TCanvas canvA(
"axialCanvas",
"CDC axial hits in an event", 0, 0, 1440, 1080);
48 TCanvas canvS(
"stereoCanvas",
"CDC stereo hits in an event", 0, 0, 1440, 1080);
49 TMultiGraph* mgA =
new TMultiGraph(
"axialTracks",
"CDC axial tracks in the event;X, cm;Y, cm");
50 TMultiGraph* mgS =
new TMultiGraph(
"stereoTracks",
"CDC stereo tracks in the event;Z, cm;R, cm");
52 TGraph* grA =
new TGraph();
53 TGraph* grS =
new TGraph();
59 ROOT::Math::XYZVector pos = hit.getRecoPos3D();
60 const double R = std::sqrt(pos.x() * pos.x() + pos.y() * pos.y());
61 const double X = pos.x();
62 const double Y = pos.y();
63 const double Z = pos.z();
64 if (Z == 0 and hit.isAxial()) {
65 grA->SetPoint(grA->GetN(), X, Y);
67 grS->SetPoint(grS->GetN(), Z,
R);
79 if (mgA->GetXaxis()) {
80 mgA->GetXaxis()->SetLimits(-120, 120);
81 mgA->GetYaxis()->SetRangeUser(-120, 120);
82 canvA.SaveAs(Form(
"CDCaxialTracks_%i.png", nevent));
84 if (mgS->GetXaxis()) {
85 mgS->GetXaxis()->SetLimits(-180, 180);
86 mgS->GetYaxis()->SetRangeUser(0, 120);
87 canvS.SaveAs(Form(
"CDCstereoTracks_%i.png", nevent));