74 AInBoxAlgorithm inBoxAlgorithm;
75 auto skipLowWeightNode = [minWeight](
const typename Super::Node * node) {
76 return not(node->getWeight() >= minWeight);
80 std::vector<std::pair<HoughBox, std::vector<AHitPtr>>> result;
83 result.push_back(std::move(*found));
99 void drawDebugPlot(
const std::vector<TrackingUtilities::CDCRecoHit3D>& allHits,
100 const std::vector<TrackingUtilities::CDCRecoHit3D>& foundHits,
101 const typename AInBoxAlgorithm::HoughBox& node)
103 TGraph* allHitsGraph =
new TGraph();
104 allHitsGraph->SetLineWidth(2);
105 allHitsGraph->SetLineColor(9);
108 const ROOT::Math::XYZVector& recoPos3D = recoHit3D.getRecoPos3D();
109 const double R = std::sqrt(recoPos3D.x() * recoPos3D.x() + recoPos3D.y() * recoPos3D.y());
110 const double Z = recoPos3D.z();
111 allHitsGraph->SetPoint(allHitsGraph->GetN(),
R, Z);
114 static int nevent(0);
115 TCanvas canv(
"trackCanvas",
"CDC stereo hits in an event", 0, 0, 1600, 1200);
117 allHitsGraph->Draw(
"APL*");
118 allHitsGraph->GetXaxis()->SetLimits(0, 120);
119 allHitsGraph->GetYaxis()->SetRangeUser(-180, 180);
121 TGraph* foundHitsGraph =
new TGraph();
122 foundHitsGraph->SetMarkerStyle(8);
123 foundHitsGraph->SetMarkerColor(2);
126 const ROOT::Math::XYZVector& recoPos3D = recoHit3D.getRecoPos3D();
127 const double R = std::sqrt(recoPos3D.x() * recoPos3D.x() + recoPos3D.y() * recoPos3D.y());
128 const double Z = recoPos3D.z();
129 foundHitsGraph->SetPoint(foundHitsGraph->GetN(),
R, Z);
131 foundHitsGraph->Draw(
"P");
133 const double centerX = (AInBoxAlgorithm::BoxAlgorithm::centerX(node));
134 const double deltaX = (AInBoxAlgorithm::BoxAlgorithm::deltaX(node));
135 const double centerY = (AInBoxAlgorithm::BoxAlgorithm::centerY(node));
136 const double centerZ = (AInBoxAlgorithm::BoxAlgorithm::centerZ(node));
138 TF1* candidateL =
new TF1(
"candL", AInBoxAlgorithm::BoxAlgorithm::debugLine(), 0, 120);
139 TF1* candidateH =
new TF1(
"candH", AInBoxAlgorithm::BoxAlgorithm::debugLine(), 0, 120);
140 TF1* candidateMean =
new TF1(
"candMean", AInBoxAlgorithm::BoxAlgorithm::debugLine(), 0, 120);
142 candidateL->SetParameters(centerX - deltaX, centerY, centerZ - 100.0 * deltaX);
143 candidateH->SetParameters(centerX + deltaX, centerY, centerZ + 100.0 * deltaX);
144 candidateMean->SetParameters(centerX, centerY, centerZ);
146 candidateL->SetLineColor(9);
147 candidateH->SetLineColor(41);
148 candidateMean->SetLineColor(2);
150 candidateL->Draw(
"same");
151 candidateH->Draw(
"same");
152 candidateMean->Draw(
"same");
153 canv.SaveAs(Form(
"CDCRLHits_%i.png", nevent));