ATLAS Offline Software
Loading...
Searching...
No Matches
StraightPatRec.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <TString.h> // for Form
8
9
11#include "CLHEP/GenericFunctions/CumulativeChiSquare.hh"
12#include "CLHEP/Units/PhysicalConstants.h"
13#include "CLHEP/Units/SystemOfUnits.h"
15#include "GaudiKernel/MsgStream.h"
18#include "time.h"
19#include <fstream>
20#include <iostream>
21using namespace MuonCalib;
22
24 init(0.5 * CLHEP::mm); // default road width = 0.5 CLHEP::mm
25 return;
26}
27
28void StraightPatRec::init(const double r_road_width) {
29 //:::::::::::::::
30 //:: VARIABLES ::
31 //:::::::::::::::
32
33 Amg::Vector3D null_vec(0.0, 0.0, 0.0); // auxiliary 0 vector
34
35 //::::::::::::::::::
36 //:: SET TIME-OUT ::
37 //::::::::::::::::::
38
39 m_time_out = 10.0;
40
41 //::::::::::::::::::::::::::::
42 //:: SET THE MAXIMUM RADIUS ::
43 //::::::::::::::::::::::::::::
44
45 m_r_max = 15.0;
46
47 //::::::::::::::::::::::::
48 //:: SET THE ROAD WIDTH ::
49 //::::::::::::::::::::::::
50
51 m_road_width = r_road_width;
52
53 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
54 //:: INITIALIZE PRIVATE VARIABLES WHICH ARE ACCESSIBLE BY METHODS ::
55 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
56
57 // m_nb_track_hits = 0;
58 // m_chi2 = 0.0;
59 // m_track = MTStraightLine(null_vec, null_vec, null_vec, null_vec);
60
61 m_fix_selection = false;
62
63 return;
64}
65
66MTStraightLine StraightPatRec::tangent(const Amg::Vector3D &r_w1, const double r_r1, const double r_sigma12, const Amg::Vector3D &r_w2,
67 const double r_r2, const double r_sigma22, const int &r_case) const {
68 //:::::::::::::::
69 //:: VARIABLES ::
70 //:::::::::::::::
71
72 double sinalpha; // auxiliary sinus of an angle
73 double cosalpha; // auxiliary sinus of an angle
74 Amg::Vector3D e2prime, e3prime; // auxiliary direction vectors
75 MTStraightLine tang; // tangent to drift circles of a hit pair
76 Amg::Vector3D p1(0.0, 0.0, 0.0), p2(0.0, 0.0, 0.0); // hit points defining a tangent
77 Amg::Vector3D null_vec(0.0, 0.0, 0.0); // auxiliary 0 vector
78 double mx1 = 0, bx1 = 0, mx2 = 0, bx2 = 0; // auxiliary track parameters
79
80 //::::::::::::::::::::::::::::::::::::::::::::
81 //:: CHECK WHETHER THE SELECTED CASE EXISTS ::
82 //::::::::::::::::::::::::::::::::::::::::::::
83
84 if (r_case < 1 || r_case > 4) {
85 throw std::runtime_error(
86 Form("File: %s, Line: %d\nStraightPatRec::tangent - Illegal case %i, must be 1,2,3, or 4.!", __FILE__, __LINE__, r_case));
87 }
88
89 //:::::::::::::::::::::::::::::::::::::
90 //:: CALCULATE THE REQUESTED TANGENT ::
91 //:::::::::::::::::::::::::::::::::::::
92
93 // local coordinate axis vectors //
94 e3prime = (r_w2 - r_w1).unit();
95 e2prime = Amg::Vector3D(0.0, e3prime.z(), -e3prime.y());
96
97 // case 1 and 2 //
98 if (r_case == 1 || r_case == 2) {
99 sinalpha = std::abs(r_r2 - r_r1) / (r_w2 - r_w1).mag();
100 cosalpha = std::sqrt(1.0 - sinalpha * sinalpha);
101
102 // case 1 //
103 if (r_case == 1) {
104 p1 = r_w1 + ((1 && r_r2 >= r_r1) - (1 && r_r2 < r_r1)) * r_r1 * (cosalpha * e2prime - sinalpha * e3prime);
105 p2 = r_w2 + ((1 && r_r2 >= r_r1) - (1 && r_r2 < r_r1)) * r_r2 * (cosalpha * e2prime - sinalpha * e3prime);
106 }
107
108 // case 2 //
109 if (r_case == 2) {
110 p1 = r_w1 - ((1 && r_r2 >= r_r1) - (1 && r_r2 < r_r1)) * r_r1 * (cosalpha * e2prime + sinalpha * e3prime);
111 p2 = r_w2 - ((1 && r_r2 >= r_r1) - (1 && r_r2 < r_r1)) * r_r2 * (cosalpha * e2prime + sinalpha * e3prime);
112 }
113 }
114
115 // case 3 and 4 //
116 if (r_case == 3 || r_case == 4) {
117 sinalpha = (r_r1 + r_r2) / (r_w2 - r_w1).mag();
118 cosalpha = std::sqrt(1.0 - sinalpha * sinalpha);
119
120 // case 3 //
121 if (r_case == 3) {
122 p1 = r_w1 + r_r1 * (cosalpha * e2prime + sinalpha * e3prime);
123 p2 = r_w2 - r_r2 * (cosalpha * e2prime + sinalpha * e3prime);
124 }
125
126 // case 4 //
127 if (r_case == 4) {
128 p1 = r_w1 - r_r1 * (cosalpha * e2prime - sinalpha * e3prime);
129 p2 = r_w2 + r_r2 * (cosalpha * e2prime - sinalpha * e3prime);
130 }
131 }
132
133 // calculation of the tangent and estimation of its errors //
134 if ((p2 - p1).z() != 0.0) {
135 tang = MTStraightLine(p1, p2 - p1, null_vec, null_vec);
136 } else {
137 Amg::Vector3D direction(p2 - p1);
138 direction[2] = (1.0e-99);
139 tang = MTStraightLine(p1, direction, null_vec, null_vec);
140 }
141 mx1 = tang.a_x1();
142 bx2 = tang.b_x1();
143 mx2 = tang.a_x2();
144 bx2 = tang.b_x2();
145 tang = MTStraightLine(mx1, bx1, mx2, bx2, 1.0, 1.0, std::sqrt(r_sigma12 + r_sigma22) / std::abs(p2.z() - p1.z()),
146 std::sqrt(r_sigma12 + p1.z() * p1.z() * (r_sigma12 + r_sigma22) / std::pow(p2.z() - p1.z(), 2)));
147 // errors in mx1 and bx1 are arbitrary since they are
148 // not used at a later stage.
149
150 return tang;
151}
152
153MTStraightLine StraightPatRec::fitCandidate(MuonCalibSegment &r_segment, const std::vector<unsigned int> &r_selection,
154 const MTStraightLine &cand_line) const {
156 // VARIABLES //
158 Amg::Vector3D null(0.0, 0.0, 0.0);
159 Amg::Vector3D xhat(1.0, 0.0, 0.0);
160
161 unsigned int num_selected_hits(0);
162 for (unsigned int k : r_selection) {
163 if (!k) { num_selected_hits++; }
164 }
165 if (num_selected_hits < 3) return cand_line;
166
167 Amg::Vector3D init_dir(r_segment.direction());
168 Amg::Vector3D init_pos(r_segment.position());
170 // SET THE CORRECT SIGNED TRACK DISTANCES //
172
173 r_segment.set(r_segment.chi2(), cand_line.positionVector(), cand_line.directionVector());
174
175 for (unsigned int k = 0; k < r_segment.mdtHitsOnTrack(); k++) {
176 MTStraightLine aux_line(r_segment.mdtHOT()[k]->localPosition(), xhat, null, null);
177 r_segment.mdtHOT()[k]->setDistanceToTrack(cand_line.signDistFrom(aux_line), r_segment.mdtHOT()[k]->sigmaDriftRadius());
178 }
179
181 // Analitical fit of linearized measurements (transformation to reference frame is used) //
183 unsigned int NLC = 2; // number of fit parameters
184
185 // Normalization on z-direction
186 Amg::Vector3D dir_norm(r_segment.direction().x() / r_segment.direction().z(), r_segment.direction().y() / r_segment.direction().z(),
187 1.0);
188
189 Amg::Vector3D refTransl(r_segment.position());
190 refTransl[0] = 0;
191 Amg::Vector3D refDir(dir_norm);
192 refDir[0] = 0;
193 refDir = refDir.unit();
194
195 // Rotation Matrix for Toewr_to_track transformation
196
197 double rotAngle = Amg::angle(Amg::Vector3D::UnitZ(), refDir) * (refDir.y()) / std::abs(refDir.y());
198 Amg::AngleAxis3D RotMatr(rotAngle, Amg::Vector3D::UnitX()); // Matrix for Track reference transformation
199 Amg::AngleAxis3D RotMatr_inv(-rotAngle, Amg::Vector3D::UnitX()); // inverse
200
201 Amg::VectorX alpha = Amg::VectorX(NLC);
202 alpha.setZero();
203 Amg::VectorX betha = Amg::VectorX(NLC);
204 betha.setZero();
205 Amg::MatrixX Gamma = Amg::MatrixX(NLC, NLC);
206 Gamma.setZero();
207 // vector to store hit positions
208 std::vector<Amg::Vector3D> hit_position_track;
209
210 for (unsigned int l = 0; l < r_segment.mdtHitsOnTrack(); l++) {
211 // Transformation to track reference frame
212 Amg::Vector3D WirPosLocal = r_segment.mdtHOT()[l]->localPosition();
213 Amg::Vector3D WirPosTrack = WirPosLocal - refTransl;
214 WirPosTrack = RotMatr * WirPosTrack;
215 double signedDrifRadius =
216 std::abs(r_segment.mdtHOT()[l]->driftRadius()) *
217 (r_segment.mdtHOT()[l]->signedDistanceToTrack() / std::abs(r_segment.mdtHOT()[l]->signedDistanceToTrack()));
218 Amg::Vector3D HitPosTrack = WirPosTrack;
219 HitPosTrack[0] = HitPosTrack.y() + signedDrifRadius;
220 HitPosTrack[1] = r_segment.mdtHOT()[l]->sigma2DriftRadius(); // trick to store hit resolution
221
222 hit_position_track.push_back(HitPosTrack);
223
224 Amg::VectorX delta = Amg::VectorX(NLC);
225 delta.setZero();
226 delta[0] = 1.0;
227 delta[1] = HitPosTrack.z();
228
229 if (!r_selection[l]) {
230 double weight = 1.0 / (r_segment.mdtHOT()[l]->sigma2DriftRadius());
231 Gamma += weight * delta * delta.transpose();
232 betha += weight * HitPosTrack.y() * delta;
233 }
234 }
235
236 // solution of linear system of equations
237 Gamma = Gamma.inverse();
238 alpha = Gamma * betha;
239
240 double refit_chi2(0.0);
241 for (unsigned int j = 0; j < hit_position_track.size(); j++) {
242 double res = (alpha[0] + alpha[1] * hit_position_track[j].z() - hit_position_track[j].y());
243 if (!r_selection[j]) refit_chi2 += res * res / hit_position_track[j].x();
244 }
245
246 // Backward transformation
247 Amg::Vector3D seg_dir(0.0, alpha[1], 1.0);
248 seg_dir = RotMatr_inv * seg_dir;
249 seg_dir[1] = seg_dir.y() / seg_dir.z();
250 seg_dir[0] = init_dir.x() / init_dir.z();
251 seg_dir[2] = 1.0;
252
253 Amg::Vector3D seg_pos(0.0, alpha[0], 0.0);
254 seg_pos = RotMatr_inv * seg_pos;
255 seg_pos = seg_pos + refTransl;
256
257 seg_pos[1] = seg_pos.y() + seg_dir.y() * (init_pos.z() - seg_pos.z());
258 seg_pos[0] = init_pos.x();
259 seg_pos[2] = init_pos.z();
260
261 // Rewriting segment
262 r_segment.set(refit_chi2 / (num_selected_hits - 2), seg_pos, seg_dir);
263
264 MTStraightLine aux_line(seg_pos, seg_dir, Amg::Vector3D(0.0, 0.0, 0.0), Amg::Vector3D(0.0, 0.0, 0.0));
265
266 for (unsigned int k = 0; k < r_segment.mdtHitsOnTrack(); k++) {
267 MTStraightLine aux_t(r_segment.mdtHOT()[k]->localPosition(), xhat, null, null);
268 r_segment.mdtHOT()[k]->setDistanceToTrack(aux_line.signDistFrom(aux_t), r_segment.mdtHOT()[k]->sigmaDriftRadius());
269 }
270
271 aux_line.setNumberOfTrackHits(num_selected_hits);
272 aux_line.setChi2(refit_chi2);
273 return aux_line;
274}
275
276double StraightPatRec::roadWidth() const { return m_road_width; }
277
278void StraightPatRec::setRoadWidth(const double r_road_width) {
279 m_road_width = std::abs(r_road_width);
280 return;
281}
282void StraightPatRec::setTimeOut(const double time_out) {
283 m_time_out = time_out;
284 return;
285}
286
287void StraightPatRec::setFixSelection(bool fix_sel) { m_fix_selection = fix_sel; }
288bool StraightPatRec::fit(MuonCalibSegment &r_segment) const {
289 // select all hits //
290 HitSelection selection(r_segment.mdtHitsOnTrack(), 0);
291
292 // call the other fit function //
293 return fit(r_segment, std::move(selection));
294}
295bool StraightPatRec::fit(MuonCalibSegment &r_segment, HitSelection r_selection) const { return fitCallByReference(r_segment, r_selection); }
296bool StraightPatRec::fit(MuonCalibSegment &r_segment, HitSelection r_selection, MTStraightLine &line_track) const {
297 return fitCallByReference(r_segment, r_selection, line_track);
298}
300 MTStraightLine fitted_track{};
301 return fitCallByReference(r_segment, r_selection, fitted_track);
302}
303bool StraightPatRec::fitCallByReference(MuonCalibSegment &r_segment, HitSelection &r_selection, MTStraightLine &fitted_track) const {
305 // VARIABLES //
307
308 time_t start, end; // start and end time (needed for time-out)
309 time(&start);
310 double diff; // difference of start and end time (needed for time-out)
311 Combination combination;
312
313 std::vector<unsigned int> hit_index; // hit indices for given selection
314 unsigned int try_nb_hits; // try this given number of hits for the
315 // segment reconstruction
316
317 MuonCalibSegment::MdtHitVec selected_hits;
318 std::vector<unsigned int> selected_hits_index;
319
320 Amg::Vector3D w_min, w_max; // wire with the minimum local z coordinate,
321 // wire with the maximum local z coordinate
322 double r_min, r_max{}; // corresponding drift CLHEP::radii
323 double sigma2_min, sigma2_max; // corresponding spatial resolution
324
325 unsigned int counter1; // auxiliary counter
326
327 unsigned int nb_candidates(0); // number of straight-track candidates
328
329 MTStraightLine tangents[4]; // the four tangents to the drift circles of a
330 // hit pair
331 MTStraightLine aux_track; // auxiliary track
332 Amg::Vector3D null(0.0, 0.0, 0.0);
333 Amg::Vector3D xhat(1.0, 0.0, 0.0);
334
335 MTStraightLine initial_track(r_segment.position(), r_segment.direction(), null, null);
336 // initial track stored in the segment
337 Amg::Vector3D aux_pos, aux_dir; // auxiliary position and direction vectors
338
340 // RESET //
342
343 if (r_segment.mdtHitsOnTrack() != r_selection.size()) {
344 MsgStream log(Athena::getMessageSvc(), "StraightPatRec");
345 log << MSG::WARNING
346 << "fitCallByReference() - Vector with selected hits unequal to the number of hits on the segment! The user selection will "
347 "be "
348 "ignored!"
349 << endmsg;
350 r_selection.clear();
351 r_selection.assign(r_segment.hitsOnTrack(), 0);
352 }
353
354 // Filling selected_hits vector
355 for (unsigned int k = 0; k < r_segment.mdtHitsOnTrack(); k++) {
356 if (!r_selection[k]) {
357 selected_hits.push_back(r_segment.mdtHOT()[k]);
358 selected_hits_index.push_back(k);
359 }
360 }
361
363 // RETURN, IF THERE ARE LESS THAN 3 HITS, I.E. THE TRACK IS NOT UNIQUELY //
364 // DEFINED BY THE HITS. //
366
367 if (selected_hits.size() < 3) { return false; }
368
370 // FIX POTENTIAL SECOND-COORDINATE PROBLEM OF THE INITIAL TRACK SEGMENT //
372
373 if (r_segment.direction().z() == 0.0) {
374 Amg::Vector3D dir(r_segment.direction().x(), r_segment.direction().y(), 1.0);
375 initial_track = MTStraightLine(r_segment.position(), dir, null, null);
376 }
377
379 // TRACK RECONSTRUCTION //
381 // try to find a segment with as many hits as selected initially //
382
383 HitSelection final_selection(r_selection);
384
385 try_nb_hits = selected_hits.size();
386 //=============================================================================
387 while (nb_candidates == 0) {
388 //-----------------------------------------------------------------------------
389 // Return in case of large amount of fake hits
390 if (try_nb_hits < 5 && (selected_hits.size() - try_nb_hits) > 2) return false;
391 // reset //
392 double best_chi2ndf = -1.0;
393 MTStraightLine best_aux_line(initial_track);
394
395 // loop over all combinations //
396 combination.setNewParameters(selected_hits.size(), try_nb_hits);
397
398 //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
399 for (unsigned int cb = 0; cb < combination.numberOfCombinations(); cb++) {
400 //.............................................................................
401
402 // time-out //
403 time(&end);
404 diff = difftime(end, start);
405 if (diff > m_time_out) { return false; }
406
407 // get the present hit combination //
408 if (cb == 0) {
409 combination.currentCombination(hit_index);
410 } else {
411 combination.nextCombination(hit_index);
412 }
413
414 // Current selection of hits
415 HitSelection tmp_selection(r_selection);
416 tmp_selection.assign(tmp_selection.size(), 1);
417 for (unsigned int k = 0; k < try_nb_hits; k++) { tmp_selection[selected_hits_index[hit_index[k] - 1]] = 0; }
418
419 // investigate the current combination //
420 // find the wires with minimum and maximum local z //
421 w_min = selected_hits[hit_index[0] - 1]->localPosition();
422 w_max = selected_hits[hit_index[0] - 1]->localPosition();
423 r_min = selected_hits[hit_index[0] - 1]->driftRadius();
424 r_max = selected_hits[hit_index[0] - 1]->driftRadius();
425 sigma2_min = selected_hits[hit_index[0] - 1]->sigma2DriftRadius();
426 sigma2_max = selected_hits[hit_index[0] - 1]->sigma2DriftRadius();
427 for (unsigned int k = 1; k < try_nb_hits; k++) {
428 if (selected_hits[hit_index[k] - 1]->localPosition().z() < w_min.z()) {
429 w_min = selected_hits[hit_index[k] - 1]->localPosition();
430 r_min = selected_hits[hit_index[k] - 1]->driftRadius();
431 sigma2_min = selected_hits[hit_index[k] - 1]->sigma2DriftRadius();
432 }
433 if (selected_hits[hit_index[k] - 1]->localPosition().z() > w_max.z()) {
434 w_max = selected_hits[hit_index[k] - 1]->localPosition();
435 r_max = selected_hits[hit_index[k] - 1]->driftRadius();
436 sigma2_max = selected_hits[hit_index[k] - 1]->sigma2DriftRadius();
437 }
438 }
439
440 // set the spatial resolution to 0.1 CLHEP::mm if it is 0 //
441 if (sigma2_min == 0) { sigma2_min = 0.1; }
442 if (sigma2_max == 0) { sigma2_max = 0.1; }
443
444 // get the four segment candidates tangential to the outermost hits //
445 for (unsigned int r_case = 1; r_case < 5; r_case++) {
446 tangents[r_case - 1] = tangent(w_min, r_min, sigma2_min, w_max, r_max, sigma2_max, r_case);
447 }
448
449 // determine additional track points within the road width around //
450 // the four tangents and determine a segment //
451 for (unsigned int r_case = 1; r_case < 5; r_case++) {
452 counter1 = 0;
453 for (unsigned int n = 0; n < try_nb_hits; n++) {
454 MTStraightLine aux_line(selected_hits[hit_index[n] - 1]->localPosition(), xhat, null, null);
455 if (std::abs(std::abs(tangents[r_case - 1].signDistFrom(aux_line)) - selected_hits[hit_index[n] - 1]->driftRadius()) <=
456 m_road_width) {
457 counter1 = counter1 + 1;
458 }
459 }
460
461 // Used to fix initial configuration of hits
462 if (m_fix_selection) counter1 = try_nb_hits;
463 // perform a straight line fit for the candidate //
464 if (counter1 == try_nb_hits) {
465 nb_candidates++;
466 aux_track = fitCandidate(r_segment, tmp_selection, tangents[r_case - 1]);
467
468 if ((best_chi2ndf == -1) || (best_chi2ndf > r_segment.chi2())) {
469 best_chi2ndf = r_segment.chi2();
470 best_aux_line = aux_track;
471 final_selection.assign(final_selection.size(), 1);
472 for (unsigned int j = 0; j < try_nb_hits; j++) { final_selection[selected_hits_index[hit_index[j] - 1]] = 0; }
473 }
474 }
475 }
476 //.............................................................................
477 }
478 //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
479
481 // MAKE THE FINAL STRAIGHT SEGMENT, IF POSSIBLE //
483
485 if (nb_candidates > 0) {
486 // store track hits, rewrite hit selection //
487 for (unsigned int k = 0; k < r_selection.size(); k++) {
488 r_selection[k] = final_selection[k];
489 if (!final_selection[k]) { used_hits.push_back(r_segment.mdtHOT()[k]); }
490 }
491
492 // Final refit //
493 fitted_track = fitCandidate(r_segment, final_selection, best_aux_line);
494 fitted_track.setUsedHits(used_hits);
495
496 if (m_refine_segment) { r_segment.refineMdtSelection(r_selection); }
497
498 } else {
499 try_nb_hits = try_nb_hits - 1;
500 if (try_nb_hits < 3) { return false; }
501 }
502
503 //-----------------------------------------------------------------------------
504 }
505 //=============================================================================
506
507 return fitted_track.chi2() > 0;
508}
Scalar mag() const
mag method
#define endmsg
detray::unit< scalar_t > unit
std::pair< std::vector< unsigned int >, bool > res
void diff(const TrigCaloCluster &a, const TrigCaloCluster &b, std::map< std::string, double > &varChange)
#define y
#define z
void currentCombination(std::vector< unsigned int > &index_array) const
get the current combination; the result is stored in the vector index_array
unsigned int numberOfCombinations() const
get the number of combinations
void setNewParameters(const unsigned int &nb_elements, const unsigned int &wh_class)
set the number of elements = nb_elements; set the class of which the combination is = wh_class
void nextCombination(std::vector< unsigned int > &index_array)
get the next combination; the results is stored in the array index_array
std::vector< unsigned int > HitSelection
Amg::Vector3D directionVector() const
get the direction vector of the straight line
double b_x2() const
get the intercept of the straight line in the x2-x3 plane
double a_x2() const
get the slope of the straight line in the x2-x3 plane
double b_x1() const
get the intercept of the straight line in the x1-x3 plane
Amg::Vector3D positionVector() const
get the position vector of the straight line
double a_x1() const
get the slope of the straight line in the x1-x3 plane
void setUsedHits(const MdtHitVec &hits)
double signDistFrom(const MTStraightLine &h) const
get the signed distance of two lines (if both are parallel, dist>0)
void setChi2(double chi2)
Cache the chi2.
void setNumberOfTrackHits(unsigned int n_hits)
cache the number of track hits
A MuonCalibSegment is a reconstructed three dimensional track segment in the MuonSpectrometer.
unsigned int mdtHitsOnTrack() const
retrieve the number of MdtCalibHitBase s assigned to this segment
void refineMdtSelection(const std::vector< unsigned int > &new_selection)
move trck hits to close hits
const Amg::Vector3D & direction() const
retrieve local direction of segment (on station level) retrieve the transformation from local chamber...
std::vector< MdtHitPtr > MdtHitVec
unsigned int hitsOnTrack() const
retrieve the sum of all XxxCalibHits assigned to the MuonCalibSegment
double chi2() const
retrieve chi2
const MdtHitVec & mdtHOT() const
retrieve the full set of MdtCalibHitBase s assigned to this segment
void set(double chi2, const Amg::Vector3D &pos, const Amg::Vector3D &dir)
const Amg::Vector3D & position() const
retrieve local position of segment (on station level)
void setTimeOut(const double time_out)
set the time-out for the track finding to time_out (in seconds)
double roadWidth() const
get the final track in the local co-ordinate frame, i.e.
bool fitCallByReference(MuonCalibSegment &r_segment, HitSelection &r_selection, MTStraightLine &line_track) const
MTStraightLine fitCandidate(MuonCalibSegment &r_segment, const std::vector< unsigned int > &r_selection, const MTStraightLine &cand_line) const
void setRoadWidth(const double r_road_width)
set the road width for the pattern recognition = r_road_width
bool fit(MuonCalibSegment &r_segment) const
reconstruction of the track using all hits in the segment "r_segment", returns true in case of succes...
MTStraightLine tangent(const Amg::Vector3D &r_w1, const double r_r1, const double r_sigma12, const Amg::Vector3D &r_w2, const double r_r2, const double r_sigma22, const int &r_case) const
void setFixSelection(bool fix_sel)
const std::string selection
singleton-like access to IMessageSvc via open function and helper
Eigen::AngleAxisd AngleAxis3D
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
double angle(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
calculates the opening angle between two vectors
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
IMessageSvc * getMessageSvc(bool quiet=false)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.