ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MuonCalib::RtCalibrationAnalytic Class Reference

#include <RtCalibrationAnalytic.h>

Inheritance diagram for MuonCalib::RtCalibrationAnalytic:
Collaboration diagram for MuonCalib::RtCalibrationAnalytic:

Public Types

using MuonSegVec = std::vector< std::shared_ptr< MuonCalibSegment > >
 
using MuonSegIt = MuonSegVec::iterator
 
using MuonSegCit = MuonSegVec::const_iterator
 
using MdtCalibOutputPtr = std::shared_ptr< IMdtCalibrationOutput >
 

Public Member Functions

 RtCalibrationAnalytic (const std::string &name)
 Default constructor: r-t accuracy is set to 0.5 mm. More...
 
 RtCalibrationAnalytic (const std::string &name, const double &rt_accuracy, const unsigned int &func_type, const unsigned int &ord, const bool &split, const bool &full_matrix, const bool &fix_min, const bool &fix_max, const int &max_it, bool do_smoothing=false, bool do_parabolic_extrapolation=false)
 Constructor: r-t accuracy is set to rt_accuracy (unit: CLHEP::mm). More...
 
 ~RtCalibrationAnalytic ()
 
double reliability () const
 get the reliability of the r-t: 0: no convergence yet 1: convergence, r-t is reliable 2: convergence, r-t is unreliable More...
 
double estimatedRtAccuracy () const
 get the estimated r-t quality (CLHEP::mm), the accuracy of the input r-t is computed at the end of the iteration; in order to get the accuracy of the final r-t, the algorithm has to be rerun with the final r-t as an input More...
 
int numberOfSegments () const
 get the number of segments which were passed to the algorithm More...
 
int numberOfSegmentsUsed () const
 get the number of segments which are used in the autocalibration More...
 
int iteration () const
 get the number of the current iteration More...
 
bool splitIntoMultilayers () const
 returns true, if segments are internally restricted to single multilayers; returns false, if segments may contain hits from both multilayers More...
 
bool fullMatrix () const
 returns true, if the full matrix relating the errors in the r-t relationship to the residuals should be used; returns false, if the unit matrix is used More...
 
bool smoothing () const
 returns true, if the r-t relationship will be smoothened using the conventional autocalibration after convergence; returns false otherwise More...
 
void setEstimateRtAccuracy (const double &acc)
 set the estimated r-t accuracy =acc More...
 
void splitIntoMultilayers (const bool &yes_or_no)
 yes_or_no=true: segments are internally restriced to single multilayers; yes_or_no=false: segments over two multilayers of a chamber are allowed More...
 
void fullMatrix (const bool &yes_or_no)
 yes_or_no=true: the full matrix relating the errors in the r-t relationship to the residuals is used yes_or_no=false: unit matrix is used (algorithm is equivalent to to the conventional/classical method More...
 
void switch_on_control_histograms (const std::string &file_name)
 this methods requests control histograms from the algorithms; the algorithm will write them to ROOT file called "file_name" More...
 
void switch_off_control_histograms ()
 the algorithm does not produce controll histograms (this is the default) More...
 
void forceMonotony ()
 force r(t) to be monotonically increasing More...
 
void doNotForceMonotony ()
 do not force r(t) to be monotonically increasing More...
 
void doSmoothing ()
 requires that the r-t relationship will be smoothened using the conventional autocalibration after convergence More...
 
void noSmoothing ()
 do not smoothen the r-t relationship after convergence More...
 
void doParabolicExtrapolation ()
 requires that parabolic extrapolation will be used for small and large radii More...
 
void noParabolicExtrapolation ()
 no parabolic extrapolation is done More...
 
MdtCalibOutputPtr analyseSegments (const MuonSegVec &seg)
 perform the full autocalibration including iterations (required since MdtCalibInterfaces-00-01-06) More...
 
bool handleSegment (MuonCalibSegment &seg)
 analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06) More...
 
void setInput (const IMdtCalibrationOutput *rt_input)
 set the r-t relationship, the internal autocalibration objects are reset More...
 
bool analyse ()
 perform the autocalibration with the segments acquired so far More...
 
bool converged () const
 returns true, if the autocalibration has converged More...
 
MdtCalibOutputPtr getResults () const
 returns the final r-t relationship More...
 
virtual std::string name () const
 returns name (region) of instance More...
 

Private Member Functions

void init (const double &rt_accuracy, const unsigned int &func_type, const unsigned int &ord, const bool &split, const bool &full_matrix, const bool &fix_min, const bool &fix_max, const int &max_it, bool do_smoothing, bool do_parabolic_extrapolation)
 
double t_from_r (const double &r)
 
void display_segment (MuonCalibSegment *segment, std::ofstream &outfile)
 
std::shared_ptr< RtRelationLookUpperformParabolicExtrapolation (const bool &min, const bool &max, const IRtRelation &in_rt)
 

Private Attributes

bool m_control_histograms = false
 
bool m_split_into_ml = false
 
bool m_full_matrix = false
 
bool m_fix_min = false
 
bool m_fix_max = false
 
int m_max_it = 0
 
bool m_force_monotony = false
 
int m_nb_segments = 0
 
int m_nb_segments_used = 0
 
int m_iteration = 0
 
std::array< bool, 2 > m_multilayer {}
 
int m_status = 0
 
double m_rt_accuracy = 0.0
 
double m_rt_accuracy_previous = 0.0
 
double m_chi2_previous = 0.0
 
double m_chi2 = 0.0
 
std::shared_ptr< const IRtRelationm_rt
 
double m_t_length = 0.0
 
double m_t_mean = 0.0
 
std::shared_ptr< IRtRelationm_rt_new
 
std::shared_ptr< RtCalibrationOutputm_output
 
double m_r_max = 0.0
 
QuasianalyticLineReconstruction m_tracker
 
bool m_do_smoothing = false
 
bool m_do_parabolic_extrapolation = false
 
unsigned int m_order = 0U
 
std::vector< CLHEP::HepVector > m_U
 
CLHEP::HepSymMatrix m_A
 
CLHEP::HepVector m_alpha
 
CLHEP::HepVector m_b
 
std::unique_ptr< BaseFunctionm_base_function
 
std::unique_ptr< TFile > m_tfile
 
std::unique_ptr< TH1Fm_cut_evolution
 
std::unique_ptr< TH1Fm_nb_segment_hits
 
std::unique_ptr< TH1Fm_CL
 
std::unique_ptr< TH2Fm_residuals
 
MeanRMS m_track_slope
 
MeanRMS m_track_position
 
std::string m_name
 

Detailed Description

This class performs the analytic autocalibration whose basic ideas were developed by Mario Deile (see ATL-MUON-2004-021).

Author
Olive.nosp@m.r.Ko.nosp@m.rtner.nosp@m.@CER.nosp@m.N.CH
Date
06.04.2006

This class performs the analytic autocalibration whose basic ideas were developed by Mario Deile (see ATL-MUON-2004-021).

Author
Olive.nosp@m.r.Ko.nosp@m.rtner.nosp@m.@CER.nosp@m.N.CH

Definition at line 59 of file RtCalibrationAnalytic.h.

Member Typedef Documentation

◆ MdtCalibOutputPtr

Definition at line 30 of file IMdtCalibration.h.

◆ MuonSegCit

using MuonCalib::IMdtCalibration::MuonSegCit = MuonSegVec::const_iterator
inherited

Definition at line 29 of file IMdtCalibration.h.

◆ MuonSegIt

using MuonCalib::IMdtCalibration::MuonSegIt = MuonSegVec::iterator
inherited

Definition at line 28 of file IMdtCalibration.h.

◆ MuonSegVec

using MuonCalib::IMdtCalibration::MuonSegVec = std::vector<std::shared_ptr<MuonCalibSegment> >
inherited

Definition at line 27 of file IMdtCalibration.h.

Constructor & Destructor Documentation

◆ RtCalibrationAnalytic() [1/2]

RtCalibrationAnalytic::RtCalibrationAnalytic ( const std::string &  name)

Default constructor: r-t accuracy is set to 0.5 mm.

The r-t accuracy is used internally to distinguish between good and bad segments. By default Legendre polynomials are used to parametrize the r-t correction. The order of the r-t correction polynomial is set to 5. Segments are restricted to single multilayers. The full matrix relating the errors in r(t) to the residuals is used. By default no smoothing is applied after convergence.

Definition at line 38 of file RtCalibrationAnalytic.cxx.

39  init(0.5 * CLHEP::mm, 1, 5, true, true, true, true, 100, false, false);
40 }

◆ RtCalibrationAnalytic() [2/2]

RtCalibrationAnalytic::RtCalibrationAnalytic ( const std::string &  name,
const double &  rt_accuracy,
const unsigned int &  func_type,
const unsigned int &  ord,
const bool &  split,
const bool &  full_matrix,
const bool &  fix_min,
const bool &  fix_max,
const int &  max_it,
bool  do_smoothing = false,
bool  do_parabolic_extrapolation = false 
)

Constructor: r-t accuracy is set to rt_accuracy (unit: CLHEP::mm).

The r-t accuracy is used internally to distinguish between good and bad segments.

Parameters
func_typetype of function to be used for the r-t correction; = 1: Legendre polynomial, = 2: Chebyshev polynomial, = 3: polygon equidistant in r.
ordThe order of the r-t correction polynomial is set to ord.
split= true forces the algorithm to restrict segments to multilayers. Otherwise, segments may contain hits from different multilayers.
full_matrix= true lets the algorithm use the full matrix relating the errors in r(t) to the residuals is used. Otherwise the unit matrix is used, making the code equivalent to the conventional/classical method.
fix_min,fix_max=true fix r(t_min), r(t_max) (this is default).
max_itmaximum number of iterations.
do_smoothingSmoothen the r-t relations after convergence.

do_parabolic_extrapolationUse parabolic extrapolations for

small and larged drift radii.

Definition at line 42 of file RtCalibrationAnalytic.cxx.

44  :
45  IMdtCalibration(name), m_rt(nullptr) {
46  init(rt_accuracy, func_type, ord, split, full_matrix, fix_min, fix_max, max_it, do_smoothing, do_parabolic_extrapolation);
47 }

◆ ~RtCalibrationAnalytic()

RtCalibrationAnalytic::~RtCalibrationAnalytic ( )

Definition at line 49 of file RtCalibrationAnalytic.cxx.

49  {
50  if (m_tfile) { m_tfile->Write(); }
51 }

Member Function Documentation

◆ analyse()

bool RtCalibrationAnalytic::analyse ( )

perform the autocalibration with the segments acquired so far

Definition at line 740 of file RtCalibrationAnalytic.cxx.

740  {
741  if (m_tfile) m_tfile->cd();
742 
744  // VARIABLES //
746  int ifail; // flag indicating a failure of the matrix inversion
747  unsigned int nb_points(30); // number of points used to set the new r-t relationship
748  double step; // r step size
749  std::shared_ptr<const RtChebyshev> rt_Chebyshev = std::dynamic_pointer_cast<const RtChebyshev>(m_rt);
750  std::shared_ptr<const RtRelationLookUp> rt_LookUp = std::dynamic_pointer_cast<const RtRelationLookUp>(m_rt);
751  double r_corr; // radial correction
752  std::vector<double> rt_param(m_rt->nPar()); // parameters for the new r-t
753  double x; // reduced time
754  RtParabolicExtrapolation rt_extrapolator; // r-t extrapolator
755  RtFromPoints rt_from_points; // r-t from points
756 
758  // SOLVE THE AUTOCALIBRATION EQUATION //
760  m_alpha = m_A.inverse(ifail) * m_b;
761  if (ifail != 0) {
762  MsgStream log(Athena::getMessageSvc(), "RtCalibrationAnalytic");
763  log << MSG::WARNING << "analyse() - Could not solve the autocalibration equation!" << endmsg;
764  return false;
765  }
766 
768  // CALCULATE THE NEW r-t RELATIONSHIP //
770 
771  // input r-t is of type RtChebyshev //
772  if (rt_Chebyshev) {
773  // set the number of points //
774  if (rt_Chebyshev->numberOfRtParameters() > 30) { nb_points = rt_Chebyshev->numberOfRtParameters(); }
775 
776  // r step size //
777  step = m_r_max / static_cast<double>(nb_points);
778 
779  // sample points and Chebyshev fitter //
780  std::vector<SamplePoint> x_r(nb_points + 1);
782  ChebyshevPolynomial chebyshev;
783 
784  // calculate the sample points //
785  for (unsigned int k = 0; k < nb_points + 1; k++) {
786  x_r[k].set_x1(t_from_r(k * step));
787  x_r[k].set_x2(rt_Chebyshev->radius(x_r[k].x1()));
788  x_r[k].set_x1(rt_Chebyshev->get_reduced_time(x_r[k].x1()));
789  x_r[k].set_error(1.0);
790 
791  r_corr = 0.0;
792  for (unsigned int l = 0; l < m_order; l++) {
793  // r_corr = r_corr+m_alpha[l]*
794  // m_base_function->value(l, x_r[k].x1());
795  r_corr = r_corr + m_alpha[l] * m_base_function->value(l, (x_r[k].x2() - 0.5 * m_r_max) / (0.5 * m_r_max));
796  }
797 
798  // do not change the r-t and the endpoints //
799  if (((k == 0 || x_r[k].x2() < 0.5) && m_fix_min) || ((k == nb_points || x_r[k].x2() > 14.1) && m_fix_max)) {
800  r_corr = 0.0;
801  x_r[k].set_error(0.01);
802  }
803  x_r[k].set_x2(x_r[k].x2() + r_corr);
804  }
805 
806  // force monotony //
807  if (m_force_monotony) {
808  for (unsigned int k = 0; k < nb_points; k++) {
809  if (x_r[k].x2() > x_r[k + 1].x2()) { x_r[k + 1].set_x2(x_r[k].x2()); }
810  }
811  }
812 
813  if (m_control_histograms) {
814  std::unique_ptr<TGraphErrors> gre = std::make_unique<TGraphErrors>(x_r.size());
815  for (unsigned int i = 0; i < 1; i++) {
816  gre->SetPoint(i, x_r[i].x1(), x_r[i].x2());
817  gre->SetPointError(i, 0, x_r[i].error());
818  }
819  std::ostringstream str_str;
820  str_str << "CorrectionPoints_" << m_iteration;
821  gre->Write(str_str.str().c_str());
822  }
823 
824  // create the new r-t relationship //
825  fitter.fit_parameters(x_r, 1, nb_points + 1, &chebyshev);
826  rt_param[0] = rt_Chebyshev->tLower();
827  rt_param[1] = rt_Chebyshev->tUpper();
828  for (unsigned int k = 0; k < rt_Chebyshev->numberOfRtParameters(); k++) { rt_param[k + 2] = fitter.coefficients()[k]; }
829 
830  m_rt_new = std::make_unique<RtChebyshev>(rt_param);
831  }
832 
833  // input-rt is of type RtRelationLookUp //
834  if (rt_LookUp) {
835  rt_param = rt_LookUp->parameters();
836  unsigned int min_k(2), max_k(rt_param.size());
837  if (m_fix_min) { min_k = 3; }
838  if (m_fix_max) { max_k = rt_param.size() - 1; }
839 
840  std::unique_ptr<TGraph> gr;
841  if (m_control_histograms) gr = std::make_unique<TGraph>(max_k - min_k);
842 
843  for (unsigned int k = min_k; k < max_k; k++) {
844  x = (rt_param[k] - 0.5 * m_r_max) / (0.5 * m_r_max);
845  r_corr = m_alpha[0];
846  for (unsigned int l = 1; l < m_order; l++) { r_corr = r_corr + m_alpha[l] * m_base_function->value(l, x); }
847  rt_param[k] = rt_param[k] + r_corr;
848  if (m_control_histograms) gr->SetPoint(k - min_k, x, r_corr);
849  if (m_force_monotony && k > 2) {
850  if (rt_param[k] < rt_param[k - 1]) { rt_param[k] = rt_param[k - 1]; }
851  }
852  }
853 
854  m_rt_new = std::make_unique<RtRelationLookUp>(rt_param);
855  if (m_control_histograms) {
856  std::ostringstream str_str;
857  str_str << "CorrectionPoints_" << m_iteration;
858  gr->Write(str_str.str().c_str());
859  }
860  m_r_max = m_rt_new->radius(m_rt_new->tUpper());
861  }
862 
864  // DETERMINE THE r-t QUALITY AND CHECK FOR CONVERGENCE //
866 
867  // estimate r-t accuracy //
868  m_rt_accuracy = 0.0;
869  double r_corr_max = 0.0;
870 
871  for (unsigned int k = 0; k < 100; k++) {
872  r_corr = m_alpha[0];
873  for (unsigned int l = 1; l < m_order; l++) { r_corr = r_corr + m_alpha[l] * m_base_function->value(l, -1.0 + 0.01 * k); }
874  if (std::abs(r_corr) > r_corr_max) { r_corr_max = std::abs(r_corr); }
875  m_rt_accuracy = m_rt_accuracy + r_corr * r_corr;
876  }
877  m_rt_accuracy = std::sqrt(0.01 * m_rt_accuracy);
879 
880  // convergence? //
881 
882  m_chi2 = m_chi2 / static_cast<double>(m_nb_segments_used);
883  if (((m_chi2 < m_chi2_previous && std::abs(m_chi2 - m_chi2_previous) > 0.01) || std::abs(m_rt_accuracy) > 0.001) &&
884  m_iteration < m_max_it) {
885  m_status = 0; // no convergence yet
886  } else {
887  m_status = 1;
888  }
890 
891  // reliabilty of convergence //
892  if (m_status != 0) {
894  if (!m_split_into_ml && m_nb_segments_used < 0.5 * m_nb_segments) { m_status = 2; }
895  }
896 
898  // STORE THE RESULTS IN THE RtCalibrationOutput //
900  m_iteration = m_iteration + 1;
901 
902  m_output = std::make_shared<RtCalibrationOutput>(
903  m_rt_new, std::make_shared<RtFullInfo>("RtCalibrationAnalytic", m_iteration, m_nb_segments_used, 0.0, 0.0, 0.0, 0.0));
904 
905  return true;
906 }

◆ analyseSegments()

RtCalibrationAnalytic::MdtCalibOutputPtr RtCalibrationAnalytic::analyseSegments ( const MuonSegVec seg)
virtual

perform the full autocalibration including iterations (required since MdtCalibInterfaces-00-01-06)

Implements MuonCalib::IMdtCalibration.

Definition at line 339 of file RtCalibrationAnalytic.cxx.

339  {
340  std::shared_ptr<const IRtRelation> tmp_rt;
341  std::shared_ptr<const IRtRelation> conv_rt;
342 
344  // AUTOCALIBRATION LOOP //
346  while (!converged()) {
347  for (const auto & k : seg) { handleSegment(*k); }
348  if (!analyse()) {
349  MsgStream log(Athena::getMessageSvc(), "RtCalibrationAnalytic");
350  log << MSG::WARNING << "analyseSegments() - analyse failed, segments:" << endmsg;
351  for (unsigned int i = 0; i < seg.size(); i++) {
352  log << MSG::WARNING << i << " " << seg[i]->direction() << " " << seg[i]->position() << endmsg;
353  }
354  return nullptr;
355  }
356 
357  const RtCalibrationOutput *rtOut = m_output.get();
358 
359  if (!converged()) { setInput(rtOut); }
360  tmp_rt = rtOut->rt();
361 
362  std::vector<double> params;
363  params.push_back(tmp_rt->tLower());
364  params.push_back(0.01 * (tmp_rt->tUpper() - tmp_rt->tLower()));
365  for (double t = tmp_rt->tLower(); t <= tmp_rt->tUpper(); t = t + params[1]) { params.push_back(tmp_rt->radius(t)); }
366  conv_rt = std::make_shared<RtRelationLookUp>(params);
367  }
368 
369  // parabolic extrapolations for small radii //
371  std::shared_ptr<const RtRelationLookUp> tmprt = performParabolicExtrapolation(true, true, *tmp_rt);
372  m_output = std::make_shared<RtCalibrationOutput>(
373  tmprt, std::make_shared<RtFullInfo>("RtCalibrationAnalyticExt", m_iteration, m_nb_segments_used, 0.0, 0.0, 0.0, 0.0));
374  tmp_rt = tmprt;
375  }
376 
378  // SMOOTHING AFTER CONVERGENCE IF REQUESTED //
380  if (!m_do_smoothing) { return getResults(); }
381 
382  // maximum number of iterations //
383  int max_smoothing_iterations(static_cast<int>(m_max_it));
384  if (max_smoothing_iterations == 0) { max_smoothing_iterations = 1; }
385 
386  // convergence RMS //
387  double convergence_RMS(0.002);
388 
389  // variables //
390  int it(0); // iteration
391  double RMS(1.0); // RMS change of r(t)
392 
393  // smoothing //
394  //---------------------------------------------------------------------------//
395  //---------------------------------------------------------------------------//
396  while (it < max_smoothing_iterations && RMS > convergence_RMS) {
397  //---------------------------------------------------------------------------//
399 
400  // counter //
401  unsigned int counter(0);
402 
403  // overwrite drift radii and calculate the average resolution //
404  for (const auto & k : seg) {
405  if (k->mdtHitsOnTrack() < 3) { continue; }
406  double avres(0.0);
407  for (unsigned int h = 0; h < k->mdtHitsOnTrack(); h++) {
408  k->mdtHOT()[h]->setDriftRadius(tmp_rt->radius(k->mdtHOT()[h]->driftTime()),
409  k->mdtHOT()[h]->sigmaDriftRadius());
410  if (k->mdtHOT()[h]->sigmaDriftRadius() < 0.5 * m_r_max) {
411  avres = avres + k->mdtHOT()[h]->sigma2DriftRadius();
412  } else {
413  avres = avres + 0.1;
414  }
415  }
416  avres = avres / static_cast<double>(k->mdtHitsOnTrack());
417  avres = std::sqrt(avres);
418  if (k->mdtHitsOnTrack() > 3) {
419  if (smoothing.addResidualsFromSegment(*k, true, 7.0 * avres)) { counter++; }
420  } else {
421  if (smoothing.addResidualsFromSegment(*k, false, 7.0 * avres)) { counter++; }
422  }
423  }
424 
425  // break, do no smoothing if there are not enough segments //
426  if (counter < 1000) {
427  MsgStream log(Athena::getMessageSvc(), "RtCalibrationAnalytic");
428  log << MSG::WARNING << "analyseSegments() - no smoothing applied due to too small number of reconstructed segments" << endmsg;
429  return getResults();
430  }
431 
432  // smoothing //
433  RtRelationLookUp smooth_rt(smoothing.performSmoothing(*tmp_rt, m_fix_min, m_fix_max));
434 
435  // calculate RMS change //
436  RMS = 0.0;
437  double bin_width(0.01 * (smooth_rt.tUpper() - smooth_rt.tLower()));
438  for (double t = smooth_rt.tLower(); t <= smooth_rt.tUpper(); t = t + bin_width) {
439  RMS = RMS + std::pow(smooth_rt.radius(t) - tmp_rt->radius(t), 2);
440  }
441  RMS = std::sqrt(0.01 * RMS);
442 
443  // increase the iterations counter //
444  it++;
445 
446  // delete tmp_rt and update it //
447  tmp_rt = std::make_shared<RtRelationLookUp>(smooth_rt);
448 
449  //---------------------------------------------------------------------------//
450  }
451  //---------------------------------------------------------------------------//
452  //---------------------------------------------------------------------------//
453 
454  m_output = std::make_shared<RtCalibrationOutput>(
455  tmp_rt, std::make_shared<RtFullInfo>("RtCalibrationAnalytic", m_iteration, m_nb_segments_used, 0.0, 0.0, 0.0, 0.0));
456 
458  // RETURN THE RESULT AFTER CONVERGENCE //
460  return getResults();
461 }

◆ converged()

bool RtCalibrationAnalytic::converged ( ) const

returns true, if the autocalibration has converged

Definition at line 907 of file RtCalibrationAnalytic.cxx.

907 { return (m_status > 0); }

◆ display_segment()

void RtCalibrationAnalytic::display_segment ( MuonCalibSegment segment,
std::ofstream &  outfile 
)
private

Definition at line 170 of file RtCalibrationAnalytic.cxx.

170  {
172  // VARIABLES //
174  double y_min, y_max, z_min, z_max; // minimum and maximum y and z coordinates
175  Amg::Vector3D null(0.0, 0.0, 0.0); // auxiliary null vector
176 
178  // DISPLAY THE SEGMENT //
180 
181  // minimum and maximum coordinates //
182  y_min = (segment->mdtHOT()[0])->localPosition().y();
183  y_max = y_min;
184  z_min = (segment->mdtHOT()[0])->localPosition().z();
185  z_max = z_min;
186  for (unsigned int k = 1; k < segment->mdtHitsOnTrack(); k++) {
187  if ((segment->mdtHOT()[k])->localPosition().y() < y_min) { y_min = (segment->mdtHOT()[k])->localPosition().y(); }
188  if ((segment->mdtHOT()[k])->localPosition().y() > y_max) { y_max = (segment->mdtHOT()[k])->localPosition().y(); }
189  if ((segment->mdtHOT()[k])->localPosition().z() < z_min) { z_min = (segment->mdtHOT()[k])->localPosition().z(); }
190  if ((segment->mdtHOT()[k])->localPosition().z() > z_max) { z_max = (segment->mdtHOT()[k])->localPosition().z(); }
191  }
192  for (unsigned int k = 0; k < segment->mdtCloseHits(); k++) {
193  if ((segment->mdtClose()[k])->localPosition().y() < y_min) { y_min = (segment->mdtClose()[k])->localPosition().y(); }
194  if ((segment->mdtClose()[k])->localPosition().y() > y_max) { y_max = (segment->mdtClose()[k])->localPosition().y(); }
195  if ((segment->mdtClose()[k])->localPosition().z() < z_min) { z_min = (segment->mdtClose()[k])->localPosition().z(); }
196  if ((segment->mdtClose()[k])->localPosition().z() > z_max) { z_max = (segment->mdtClose()[k])->localPosition().z(); }
197  }
198 
199  // write out the coordinate system //
200  if (y_max - y_min > z_max - z_min) {
201  outfile << "nullptr " << y_min - 30.0 << " " << y_max + 30.0 << " " << 0.5 * (z_min + z_max) - 0.5 * (y_max - y_min) - 30.0 << " "
202  << 0.5 * (z_min + z_max) + 0.5 * (y_max - y_min) + 30.0 << "\n";
203  } else {
204  outfile << "nullptr " << 0.5 * (y_min + y_max) - 0.5 * (z_max - z_min) - 30.0 << " "
205  << 0.5 * (y_min + y_max) + 0.5 * (z_max - z_min) + 30.0 << " " << z_min - 30.0 << " " << z_max + 30.0 << "\n";
206  }
207 
208  // write out the hits on track //
209  for (unsigned int k = 0; k < segment->mdtHitsOnTrack(); k++) {
210  // draw a circle for the tube //
211  outfile << "SET PLCI 1\n"
212  << "ARC " << (segment->mdtHOT()[k])->localPosition().y() << " " << (segment->mdtHOT()[k])->localPosition().z() << " 15.0\n";
213 
214  // draw a drift circle //
215  outfile << "SET PLCI 3\n"
216  << "ARC " << (segment->mdtHOT()[k])->localPosition().y() << " " << (segment->mdtHOT()[k])->localPosition().z() << " "
217  << (segment->mdtHOT()[k])->driftRadius() << "\n";
218  }
219 
220  // write out the close hits //
221  for (unsigned int k = 0; k < segment->mdtCloseHits(); k++) {
222  // draw a circle for the tube //
223  outfile << "SET PLCI 1\n"
224  << "ARC " << (segment->mdtClose()[k])->localPosition().y() << " " << (segment->mdtClose()[k])->localPosition().z()
225  << " 15.0\n";
226 
227  // draw a drift circle //
228  outfile << "SET PLCI 2\n"
229  << "ARC " << (segment->mdtClose()[k])->localPosition().y() << " " << (segment->mdtClose()[k])->localPosition().z() << " "
230  << (segment->mdtClose()[k])->driftRadius() << "\n";
231  }
232 
233  // write out the reconstructed track //
234  MTStraightLine aux_track(segment->position(), segment->direction(), null, null);
235  outfile << "SET PLCI 4\n"
236  << "LINE " << aux_track.a_x2() * (z_min - 30.0) + aux_track.b_x2() << " " << z_min - 30.0 << " "
237  << aux_track.a_x2() * (z_max + 30.0) + aux_track.b_x2() << " " << z_max + 30.0 << "\n";
238 
239  // add a wait statement //
240  outfile << "WAIT\n";
241 
242  return;
243 }

◆ doNotForceMonotony()

void RtCalibrationAnalytic::doNotForceMonotony ( )

do not force r(t) to be monotonically increasing

Definition at line 331 of file RtCalibrationAnalytic.cxx.

331 { m_force_monotony = false; }

◆ doParabolicExtrapolation()

void RtCalibrationAnalytic::doParabolicExtrapolation ( )

requires that parabolic extrapolation will be used for small and large radii

Definition at line 334 of file RtCalibrationAnalytic.cxx.

◆ doSmoothing()

void RtCalibrationAnalytic::doSmoothing ( )

requires that the r-t relationship will be smoothened using the conventional autocalibration after convergence

Definition at line 332 of file RtCalibrationAnalytic.cxx.

332 { m_do_smoothing = true; }

◆ estimatedRtAccuracy()

double RtCalibrationAnalytic::estimatedRtAccuracy ( ) const

get the estimated r-t quality (CLHEP::mm), the accuracy of the input r-t is computed at the end of the iteration; in order to get the accuracy of the final r-t, the algorithm has to be rerun with the final r-t as an input

Definition at line 257 of file RtCalibrationAnalytic.cxx.

257 { return m_rt_accuracy; }

◆ forceMonotony()

void RtCalibrationAnalytic::forceMonotony ( )

force r(t) to be monotonically increasing

Definition at line 330 of file RtCalibrationAnalytic.cxx.

330 { m_force_monotony = true; }

◆ fullMatrix() [1/2]

bool RtCalibrationAnalytic::fullMatrix ( ) const

returns true, if the full matrix relating the errors in the r-t relationship to the residuals should be used; returns false, if the unit matrix is used

Definition at line 292 of file RtCalibrationAnalytic.cxx.

292 { return m_full_matrix; }

◆ fullMatrix() [2/2]

void RtCalibrationAnalytic::fullMatrix ( const bool &  yes_or_no)

yes_or_no=true: the full matrix relating the errors in the r-t relationship to the residuals is used yes_or_no=false: unit matrix is used (algorithm is equivalent to to the conventional/classical method

Definition at line 338 of file RtCalibrationAnalytic.cxx.

338 { m_full_matrix = yes_or_no; }

◆ getResults()

RtCalibrationAnalytic::MdtCalibOutputPtr RtCalibrationAnalytic::getResults ( ) const
virtual

returns the final r-t relationship

Implements MuonCalib::IMdtCalibration.

Definition at line 908 of file RtCalibrationAnalytic.cxx.

908 { return m_output; }

◆ handleSegment()

bool RtCalibrationAnalytic::handleSegment ( MuonCalibSegment seg)

analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06)

Definition at line 468 of file RtCalibrationAnalytic.cxx.

468  {
470  // RETURN, IF THE SEGMENT HAD LESS THAN 3 HITS //
472  if (m_control_histograms) { m_cut_evolution->Fill(0.0, 1.0); }
473 
475  if (seg.mdtHitsOnTrack() < 3) { return true; }
476 
477  if (m_control_histograms) { m_cut_evolution->Fill(1.0, 1.0); }
478 
479  if (std::isnan(seg.direction().x()) || std::isnan(seg.direction().y()) || std::isnan(seg.direction().z()) ||
480  std::isnan(seg.position().x()) || std::isnan(seg.position().y()) || std::isnan(seg.position().z()))
481  return true;
482  if (std::abs(seg.direction().y()) > 100) return true;
483 
485  // VARIABLES //
487 
488  // segment reconstruction and segment selection //
489  double aux_res; // auxiliary resolution
490  double av_res(0.0); // average spatial resolution of the tube hits
491  double chi2_scale_factor; // chi^2 scale factor used to take into
492  // account bad r-t accuracy in the segment selection
493  IMdtSegmentFitter::HitSelection hit_selection[2];
494  hit_selection[0] = IMdtSegmentFitter::HitSelection(seg.mdtHitsOnTrack());
495  hit_selection[1] = IMdtSegmentFitter::HitSelection(seg.mdtHitsOnTrack());
496  // hit selection vectors for refits in the first and second multilayer
497  unsigned int nb_hits_in_ml[2]; // number of hits in the multilayers
498  double x; // reduced time = (r(t)-0.5*m_r_max)/(0.5*m_r_max)
499  std::vector<double> d_track; // signed distances of the track from the anode wires of the tubes
500  std::vector<double> residual_value; // residuals
501  std::vector<MTStraightLine> w; // anode wires
502  Amg::Vector3D null(0.0, 0.0, 0.0); // auxiliary 0 vector
503  Amg::Vector3D xhat(1.0, 0.0, 0.0); // auxiliary unit vector
504 
505  // objects needed to calculate the autocalibration matrix and vector //
506  CLHEP::HepVector G; // vector used in the calculation of the autocalibration matrix
507  std::vector<double> zeta; // vector used in the calculation of G
508 
510  // PREPARATION FOR THE SEGMENT REFIT //
512 
513  // debug display //
514  // display_segment(&seg, display);
515 
516  // overwrite the drift radii according to the input r-t relationship, //
517  // calculate the average spatial resolution to define a road width, //
518  // select the hits in the multilayer, if requested //
519  nb_hits_in_ml[0] = 0;
520  nb_hits_in_ml[1] = 0;
521  for (unsigned int k = 0; k < seg.mdtHitsOnTrack(); k++) {
522  // make the resolution at small radii large enough //
523  aux_res = seg.mdtHOT()[k]->sigmaDriftRadius();
524  if (m_rt->radius(seg.mdtHOT()[k]->driftTime()) < 0.5) {
525  if (aux_res < 0.5 - m_rt->radius(seg.mdtHOT()[k]->driftTime())) { aux_res = 0.5 - m_rt->radius(seg.mdtHOT()[k]->driftTime()); }
526  }
527 
528  // overwrite radius //
529  seg.mdtHOT()[k]->setDriftRadius(m_rt->radius(seg.mdtHOT()[k]->driftTime()), aux_res);
530  // seg.mdtHOT()[k]->setDriftRadius(m_rt->radius(
531  // seg.mdtHOT()[k]->driftTime()),
532  // seg.mdtHOT()[k]->sigmaDriftRadius());
533 
534  // average resolution in the segment //
535  if (seg.mdtHOT()[k]->sigmaDriftRadius() < 0.5 * m_r_max) {
536  av_res = av_res + std::pow(seg.mdtHOT()[k]->sigmaDriftRadius(), 2);
537  } else {
538  av_res = av_res + 0.01;
539  }
540 
541  // hit selection //
542  (hit_selection[0])[k] = 0;
543 
544  // 1st multilayer, if splitting is requested //
545  if (m_split_into_ml) { (hit_selection[0])[k] = seg.mdtHOT()[k]->identify().mdtMultilayer() == 2; }
546 
547  // 2nd multilayer, if splitting is requested //
548  if (m_split_into_ml) { (hit_selection[1])[k] = seg.mdtHOT()[k]->identify().mdtMultilayer() == 1; }
549 
550  // reject hits with bad radii or bad resolution //
551  if (seg.mdtHOT()[k]->driftRadius() < 0.0 || seg.mdtHOT()[k]->driftRadius() > m_r_max ||
552  seg.mdtHOT()[k]->sigmaDriftRadius() > 10.0 * m_r_max) {
553  (hit_selection[0])[k] = 1;
554  (hit_selection[1])[k] = 1;
555  }
556 
557  // counting of selected segments //
558  nb_hits_in_ml[0] = nb_hits_in_ml[0] + (1 - (hit_selection[0])[k]);
559  nb_hits_in_ml[1] = nb_hits_in_ml[1] + (1 - (hit_selection[1])[k]);
560 
561  // check for hits in both multilayers (needed if splitting is requested) //
562  if (m_multilayer[0] == false && seg.mdtHOT()[k]->identify().mdtMultilayer() == 1) { m_multilayer[0] = true; }
563  if (m_multilayer[1] == false && seg.mdtHOT()[k]->identify().mdtMultilayer() == 2) { m_multilayer[1] = true; }
564  }
565 
566  // average resolution and chi^2 scale factor //
567  av_res = std::sqrt(av_res / static_cast<double>(seg.mdtHitsOnTrack()));
568  chi2_scale_factor = std::sqrt(av_res * av_res + m_rt_accuracy * m_rt_accuracy) / av_res;
569 
571  // FILL THE AUTOCALIBRATION MATRICES //
573 
574  // set the road width for the track reconstruction //
575  m_tracker.setRoadWidth(7.0 * std::sqrt(av_res * av_res + m_rt_accuracy * m_rt_accuracy));
576 
577  // loop over the multilayers //
578 
579  //-----------------------------------------------------------------------------
580  for (int k = 0; k < 1 + m_split_into_ml; k++) {
581  //-----------------------------------------------------------------------------
582 
583  if (nb_hits_in_ml[k] < 3) { continue; }
584 
585  // refit the segments within the multilayers //
587 
588  if (!m_tracker.fit(seg, hit_selection[k], track)) { continue; }
589 
590  if (std::isnan(track.a_x1()) || std::isnan(track.a_x2()) || std::isnan(track.b_x1()) || std::isnan(track.b_x2())) { continue; }
591 
592  // check the quality of the fit //
593  if (track.chi2PerDegreesOfFreedom() > 5 * chi2_scale_factor) { continue; }
594 
595  // check whether there are at least three track hits //
596  if (m_control_histograms) { m_nb_segment_hits->Fill(track.numberOfTrackHits(), 1.0); }
597  if (track.numberOfTrackHits() < 3) { continue; }
598 
599  // reject tracks with silly parameters
600  if (std::abs(track.a_x2()) > 8e8) continue;
601 
602  // for filling into data class
603  if (m_iteration == 0) {
604  m_track_slope.Insert(track.a_x2());
605  m_track_position.Insert(track.b_x2());
606  }
607 
608  // bookkeeping for convergence decision and reliability estimation //
609  m_chi2 = m_chi2 + track.chi2PerDegreesOfFreedom();
611 
612  // fill the autocalibration objects //
613  // auxiliary variables //
614  d_track = std::vector<double>(track.numberOfTrackHits());
615  residual_value = std::vector<double>(track.numberOfTrackHits());
616  w = std::vector<MTStraightLine>(track.numberOfTrackHits());
617  G = CLHEP::HepVector(track.numberOfTrackHits());
618  zeta = std::vector<double>(track.numberOfTrackHits());
619 
620  // base function values //
621  for (unsigned int l = 0; l < m_order; l++) {
622  m_U[l] = CLHEP::HepVector(track.numberOfTrackHits());
623  for (unsigned int m = 0; m < track.numberOfTrackHits(); m++) {
624  x = (track.trackHits()[m]->driftRadius() - 0.5 * m_r_max) / (0.5 * m_r_max);
625  (m_U[l])[m] = m_base_function->value(l, x);
626  }
627  }
628 
629  // get the wire coordinates, track distances, and residuals //
630  for (unsigned int l = 0; l < track.numberOfTrackHits(); l++) {
631  w[l] =
632  MTStraightLine(Amg::Vector3D(0.0, (track.trackHits()[l]->localPosition()).y(), (track.trackHits()[l]->localPosition()).z()),
633  xhat, null, null);
634  d_track[l] = track.signDistFrom(w[l]);
635  residual_value[l] = track.trackHits()[l]->driftRadius() - std::abs(d_track[l]);
636  if (m_control_histograms) { m_residuals->Fill(std::abs(d_track[l]), residual_value[l], 1.0); }
637  }
638 
639  // loop over all track hits //
640  for (unsigned int l = 0; l < track.numberOfTrackHits(); l++) {
641  // analytic calculation of G //
642  for (unsigned int m = 0; m < track.numberOfTrackHits(); m++) {
643  zeta[m] = std::sqrt(1.0 + std::pow(track.a_x2(), 2)) * (w[m].positionVector()).z() - track.a_x2() * d_track[m];
644  }
645  for (unsigned int m = 0; m < track.numberOfTrackHits(); m++) {
646  double sum1(0.0), sum2(0.0), sum3(0.0), sum4(0.0);
647  for (unsigned int ll = 0; ll < track.numberOfTrackHits(); ll++) {
648  sum1 = sum1 + (zeta[l] - zeta[ll]) * (zeta[ll] - zeta[m]) /
649  (track.trackHits()[m]->sigma2DriftRadius() * track.trackHits()[ll]->sigma2DriftRadius());
650  sum2 = sum2 + zeta[ll] / track.trackHits()[ll]->sigma2DriftRadius();
651  sum3 = sum3 + 1.0 / track.trackHits()[ll]->sigma2DriftRadius();
652  sum4 = sum4 + std::pow(zeta[ll] / track.trackHits()[ll]->sigmaDriftRadius(), 2);
653  }
654  if (d_track[m] * d_track[l] >= 0.0) {
655  G[m] = (l == m) - m_full_matrix * sum1 / (sum2 * sum2 - sum3 * sum4);
656  } else {
657  G[m] = (l == m) + m_full_matrix * sum1 / (sum2 * sum2 - sum3 * sum4);
658  }
659  }
660  CLHEP::HepSymMatrix A_tmp(m_A);
661  // autocalibration objects //
662  for (unsigned int p = 0; p < m_order; p++) {
663  for (unsigned int pp = p; pp < m_order; pp++) {
664  A_tmp[p][pp] = m_A[p][pp] + (dot(G, m_U[p]) * dot(G, m_U[pp])) / track.trackHits()[l]->sigma2DriftRadius();
665  if (std::isnan(A_tmp[p][pp])) return true;
666  }
667  }
668  m_A = A_tmp;
669  CLHEP::HepVector b_tmp(m_b);
670  for (unsigned int p = 0; p < m_order; p++) {
671  b_tmp[p] = m_b[p] - residual_value[l] * dot(G, m_U[p]) / track.trackHits()[l]->sigma2DriftRadius();
672  if (std::isnan(b_tmp[p])) return true;
673  }
674  m_b = b_tmp;
675  }
676 
677  //-----------------------------------------------------------------------------
678  }
679  //-----------------------------------------------------------------------------
680  return true;
681 }

◆ init()

void RtCalibrationAnalytic::init ( const double &  rt_accuracy,
const unsigned int &  func_type,
const unsigned int &  ord,
const bool &  split,
const bool &  full_matrix,
const bool &  fix_min,
const bool &  fix_max,
const int &  max_it,
bool  do_smoothing,
bool  do_parabolic_extrapolation 
)
private

Definition at line 56 of file RtCalibrationAnalytic.cxx.

58  {
60  // RESET PRIVATE VARIABLES //
62  m_r_max = 15.0 * CLHEP::mm;
63  m_control_histograms = false;
64  m_tfile = nullptr;
65  m_cut_evolution = nullptr;
66  m_nb_segment_hits = nullptr;
67  m_CL = nullptr;
68  m_residuals = nullptr;
70  m_full_matrix = full_matrix;
71  m_nb_segments = 0;
73  m_iteration = 0;
74  m_multilayer[0] = false;
75  m_multilayer[1] = false;
76  m_status = 0;
77  m_rt_accuracy = std::abs(rt_accuracy);
79  m_chi2_previous = 1.0e99; // large value to force at least two rounds
80  m_chi2 = 0.0;
81  m_order = ord;
82  m_fix_min = fix_min;
83  m_fix_max = fix_max;
84  m_max_it = std::abs(max_it);
85 
86  if (m_order == 0) {
87  throw std::runtime_error(
88  Form("File: %s, Line: %d\nRtCalibrationAnalytic::init - Order of the correction polynomial must be >0!", __FILE__, __LINE__));
89  }
90 
91  m_t_length = 1000.0;
92  m_t_mean = 500.0;
93  // default values, correct values will be set when the input r-t
94  // has been given
95 
96  m_U = std::vector<CLHEP::HepVector>(m_order);
97  m_A = CLHEP::HepSymMatrix(m_order, 0);
98  m_b = CLHEP::HepVector(m_order, 0);
99  m_alpha = CLHEP::HepVector(m_order, 0);
100 
101  // correction function
102  if (func_type < 1 || func_type > 3) {
103  m_base_function = nullptr;
104  throw std::runtime_error(
105  Form("File: %s, Line: %d\nRtCalibrationAnalytic::init - Illegal correction function type!", __FILE__, __LINE__));
106  }
107  switch (func_type) {
108  case 1: m_base_function = std::make_unique<LegendrePolynomial>(); break;
109  case 2: m_base_function = std::make_unique<ChebyshevPolynomial>(); break;
110  case 3:
111  if (m_order < 2) {
112  throw std::runtime_error(
113  Form("File: %s, Line: %d\nRtCalibrationAnalytic::init - Order must be >2 for polygons! It is set to %i by the user.",
114  __FILE__, __LINE__, m_order));
115  }
116  std::vector<double> x(m_order);
117  double bin_width = 2.0 / static_cast<double>(m_order - 1);
118  for (unsigned int k = 0; k < m_order; k++) { x[k] = -1 + k * bin_width; }
119  m_base_function = std::make_unique<PolygonBase>(x);
120  break;
121  }
122 
123  // request a chi^2 refit after the quasianalytic pattern recognition //
125 
126  // monotony of r(t) //
127  m_force_monotony = false;
128 
129  // smoothing //
130  m_do_smoothing = do_smoothing;
131 
132  // parabolic extrapolation //
133  m_do_parabolic_extrapolation = do_parabolic_extrapolation;
134 
135  return;
136 }

◆ iteration()

int RtCalibrationAnalytic::iteration ( ) const

get the number of the current iteration

Definition at line 278 of file RtCalibrationAnalytic.cxx.

278 { return m_iteration; }

◆ name()

virtual std::string MuonCalib::IMdtCalibration::name ( ) const
inlinevirtualinherited

returns name (region) of instance

Definition at line 49 of file IMdtCalibration.h.

49 { return m_name; }

◆ noParabolicExtrapolation()

void RtCalibrationAnalytic::noParabolicExtrapolation ( )

no parabolic extrapolation is done

Definition at line 335 of file RtCalibrationAnalytic.cxx.

335 { m_do_parabolic_extrapolation = false; }

◆ noSmoothing()

void RtCalibrationAnalytic::noSmoothing ( )

do not smoothen the r-t relationship after convergence

Definition at line 333 of file RtCalibrationAnalytic.cxx.

333 { m_do_smoothing = false; }

◆ numberOfSegments()

int RtCalibrationAnalytic::numberOfSegments ( ) const

get the number of segments which were passed to the algorithm

Definition at line 264 of file RtCalibrationAnalytic.cxx.

264 { return m_nb_segments; }

◆ numberOfSegmentsUsed()

int RtCalibrationAnalytic::numberOfSegmentsUsed ( ) const

get the number of segments which are used in the autocalibration

Definition at line 271 of file RtCalibrationAnalytic.cxx.

271 { return m_nb_segments_used; }

◆ performParabolicExtrapolation()

std::shared_ptr< RtRelationLookUp > RtCalibrationAnalytic::performParabolicExtrapolation ( const bool &  min,
const bool &  max,
const IRtRelation in_rt 
)
private

Definition at line 909 of file RtCalibrationAnalytic.cxx.

910  {
912  // VARIABLES //
914  RtParabolicExtrapolation rt_extrapolator; // r-t extrapolator
915  std::shared_ptr<RtRelationLookUp> rt_low, rt_high; // pointers to the r-t
916  // relationships after
917  // extrapolation
918  std::vector<SamplePoint> add_fit_point; // additional r-t points used if r(0) or
919  // r(t_max) is fixed.
920 
922  // EXTRAPOLATE TO LARGE RADII //
924  if (max) {
925  add_fit_point.clear();
926  if (m_fix_max) { add_fit_point.push_back(SamplePoint(in_rt.tUpper(), in_rt.radius(in_rt.tUpper()), 1.0)); }
927  if (in_rt.radius(in_rt.tUpper()) < 16.0) {
928  rt_high = std::make_shared<RtRelationLookUp>(rt_extrapolator.getRtWithParabolicExtrapolation(
929  in_rt, in_rt.radius(in_rt.tUpper()) - 3.0, in_rt.radius(in_rt.tUpper()) - 1.0, in_rt.radius(in_rt.tUpper()),
930  add_fit_point));
931  } else {
932  rt_high = std::make_shared<RtRelationLookUp>(
933  rt_extrapolator.getRtWithParabolicExtrapolation(in_rt, m_r_max - 3.0, m_r_max - 1.0, m_r_max, add_fit_point));
934  }
935  }
936 
938  // EXTRAPOLATE TO SMALL RADII //
940  if (min) {
941  add_fit_point.clear();
942  if (m_fix_min) { add_fit_point.push_back(SamplePoint(m_rt_new->tLower(), 0.0, 1.0)); }
943  if (m_fix_max && rt_high) {
944  rt_low =
945  std::make_shared<RtRelationLookUp>(rt_extrapolator.getRtWithParabolicExtrapolation(*rt_high, 1.0, 3.0, 0.0, add_fit_point));
946  } else {
947  rt_low =
948  std::make_shared<RtRelationLookUp>(rt_extrapolator.getRtWithParabolicExtrapolation(in_rt, 1.0, 3.0, 0.0, add_fit_point));
949  }
950  }
951 
953  // RETURN RESULTS //
955  if (min && max) { return rt_low; }
956  if (min) { return rt_low; }
957  return rt_high;
958 }

◆ reliability()

double RtCalibrationAnalytic::reliability ( ) const

get the reliability of the r-t: 0: no convergence yet 1: convergence, r-t is reliable 2: convergence, r-t is unreliable

Definition at line 250 of file RtCalibrationAnalytic.cxx.

250 { return m_status; }

◆ setEstimateRtAccuracy()

void RtCalibrationAnalytic::setEstimateRtAccuracy ( const double &  acc)

set the estimated r-t accuracy =acc

Definition at line 336 of file RtCalibrationAnalytic.cxx.

336 { m_rt_accuracy = std::abs(acc); }

◆ setInput()

void RtCalibrationAnalytic::setInput ( const IMdtCalibrationOutput rt_input)
virtual

set the r-t relationship, the internal autocalibration objects are reset

Implements MuonCalib::IMdtCalibration.

Definition at line 688 of file RtCalibrationAnalytic.cxx.

688  {
690  // VARIABLES //
692  const RtCalibrationOutput *input(dynamic_cast<const RtCalibrationOutput *>(rt_input));
693 
695  // CHECK IF THE OUTPUT CLASS IS SUPPORTED //
697  if (input == nullptr) {
698  throw std::runtime_error(
699  Form("File: %s, Line: %d\nRtCalibrationAnalytic::setInput - Calibration input class not supported.", __FILE__, __LINE__));
700  }
701 
703  // GET THE INITIAL r-t RELATIONSHIP AND RESET STATUS VARIABLES //
705 
706  // get the r-t relationship //
707  m_rt = input->rt();
708  m_r_max = m_rt->radius(m_rt->tUpper());
709 
710  // status variables //
711  m_nb_segments = 0;
712  m_nb_segments_used = 0;
713  m_chi2 = 0.0;
714  m_A = CLHEP::HepSymMatrix(m_order, 0);
715  m_b = CLHEP::HepVector(m_order, 0);
716  m_alpha = CLHEP::HepVector(m_order, 0);
717 
718  // drift-time interval //
719  std::shared_ptr<const RtChebyshev> rt_Chebyshev = std::dynamic_pointer_cast<const RtChebyshev>(m_rt);
720  std::shared_ptr<const RtRelationLookUp> rt_LookUp = std::dynamic_pointer_cast<const RtRelationLookUp>(m_rt);
721 
722  if (!rt_Chebyshev && !rt_LookUp) {
723  throw std::runtime_error(
724  Form("File: %s, Line: %d\nRtCalibrationAnalytic::setInput - r-t class not supported.", __FILE__, __LINE__));
725  }
726 
727  // RtChebyshev //
728  if (rt_Chebyshev) {
729  m_t_length = rt_Chebyshev->tUpper() - rt_Chebyshev->tLower();
730  m_t_mean = 0.5 * (rt_Chebyshev->tLower() + rt_Chebyshev->tUpper());
731  }
732 
733  // RtRelationLookUp, dangerous implementation, but the only way right now //
734  if (rt_LookUp) {
735  m_t_length = rt_LookUp->par(1) * (rt_LookUp->nPar() - 2) - rt_LookUp->par(0);
736  m_t_mean = 0.5 * (rt_LookUp->par(1) * (rt_LookUp->nPar() - 2) + rt_LookUp->par(0));
737  }
738 }

◆ smoothing()

bool RtCalibrationAnalytic::smoothing ( ) const

returns true, if the r-t relationship will be smoothened using the conventional autocalibration after convergence; returns false otherwise

Definition at line 299 of file RtCalibrationAnalytic.cxx.

299 { return m_do_smoothing; }

◆ splitIntoMultilayers() [1/2]

bool RtCalibrationAnalytic::splitIntoMultilayers ( ) const

returns true, if segments are internally restricted to single multilayers; returns false, if segments may contain hits from both multilayers

Definition at line 285 of file RtCalibrationAnalytic.cxx.

285 { return m_split_into_ml; }

◆ splitIntoMultilayers() [2/2]

void RtCalibrationAnalytic::splitIntoMultilayers ( const bool &  yes_or_no)

yes_or_no=true: segments are internally restriced to single multilayers; yes_or_no=false: segments over two multilayers of a chamber are allowed

Definition at line 337 of file RtCalibrationAnalytic.cxx.

337 { m_split_into_ml = yes_or_no; }

◆ switch_off_control_histograms()

void RtCalibrationAnalytic::switch_off_control_histograms ( )

the algorithm does not produce controll histograms (this is the default)

Definition at line 322 of file RtCalibrationAnalytic.cxx.

322  {
323  m_control_histograms = false;
324  if (m_tfile) {
325  m_tfile->Write();
326  m_tfile.reset();
327  }
328 }

◆ switch_on_control_histograms()

void RtCalibrationAnalytic::switch_on_control_histograms ( const std::string &  file_name)

this methods requests control histograms from the algorithms; the algorithm will write them to ROOT file called "file_name"

Definition at line 306 of file RtCalibrationAnalytic.cxx.

306  {
308  // CREATE THE ROOT FILE AND THE HISTOGRAMS //
310  m_control_histograms = true;
311 
312  m_tfile = std::make_unique<TFile>(file_name.c_str(), "RECREATE");
313 
314  m_cut_evolution = std::make_unique<TH1F>("m_cut_evolution", "CUT EVOLUTION", 11, -0.5, 10.5);
315 
316  m_nb_segment_hits = std::make_unique<TH1F>("m_nb_segment_hits", "NUMBER OF HITS ON THE REFITTED SEGMENTS", 11, -0.5, 10.5);
317 
318  m_CL = std::make_unique<TH1F>("m_CL", "CONFIDENCE LEVELS OF THE REFITTED SEGMENTS", 100, 0.0, 1.0);
319 
320  m_residuals = std::make_unique<TH2F>("m_residuals", "RESIDUALS OF THE REFITTED SEGMENTS", 100, -0.5, 15.0, 300, -1.5, 1.5);
321 }

◆ t_from_r()

double RtCalibrationAnalytic::t_from_r ( const double &  r)
private

Definition at line 143 of file RtCalibrationAnalytic.cxx.

143  {
145  // VARIABLES //
147  double precision(0.001); // spatial precision of the inversion
148  double t_max(0.5 * (m_t_length + 2.0 * m_t_mean)); // upper time search limit
149  double t_min(t_max - m_t_length); // lower time search limit
150 
152  // SEARCH FOR THE CORRESPONDING DRIFT TIME //
154  while (t_max - t_min > 0.1 && std::abs(m_rt->radius(0.5 * (t_min + t_max)) - r) > precision) {
155  if (m_rt->radius(0.5 * (t_min + t_max)) > r) {
156  t_max = 0.5 * (t_min + t_max);
157  } else {
158  t_min = 0.5 * (t_min + t_max);
159  }
160  }
161 
162  return 0.5 * (t_min + t_max);
163 }

Member Data Documentation

◆ m_A

CLHEP::HepSymMatrix MuonCalib::RtCalibrationAnalytic::m_A
private

Definition at line 288 of file RtCalibrationAnalytic.h.

◆ m_alpha

CLHEP::HepVector MuonCalib::RtCalibrationAnalytic::m_alpha
private

Definition at line 290 of file RtCalibrationAnalytic.h.

◆ m_b

CLHEP::HepVector MuonCalib::RtCalibrationAnalytic::m_b
private

Definition at line 292 of file RtCalibrationAnalytic.h.

◆ m_base_function

std::unique_ptr<BaseFunction> MuonCalib::RtCalibrationAnalytic::m_base_function
private

Definition at line 295 of file RtCalibrationAnalytic.h.

◆ m_chi2

double MuonCalib::RtCalibrationAnalytic::m_chi2 = 0.0
private

Definition at line 255 of file RtCalibrationAnalytic.h.

◆ m_chi2_previous

double MuonCalib::RtCalibrationAnalytic::m_chi2_previous = 0.0
private

Definition at line 249 of file RtCalibrationAnalytic.h.

◆ m_CL

std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_CL
private

Definition at line 301 of file RtCalibrationAnalytic.h.

◆ m_control_histograms

bool MuonCalib::RtCalibrationAnalytic::m_control_histograms = false
private

Definition at line 217 of file RtCalibrationAnalytic.h.

◆ m_cut_evolution

std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_cut_evolution
private

Definition at line 299 of file RtCalibrationAnalytic.h.

◆ m_do_parabolic_extrapolation

bool MuonCalib::RtCalibrationAnalytic::m_do_parabolic_extrapolation = false
private

Definition at line 281 of file RtCalibrationAnalytic.h.

◆ m_do_smoothing

bool MuonCalib::RtCalibrationAnalytic::m_do_smoothing = false
private

Definition at line 278 of file RtCalibrationAnalytic.h.

◆ m_fix_max

bool MuonCalib::RtCalibrationAnalytic::m_fix_max = false
private

Definition at line 230 of file RtCalibrationAnalytic.h.

◆ m_fix_min

bool MuonCalib::RtCalibrationAnalytic::m_fix_min = false
private

Definition at line 229 of file RtCalibrationAnalytic.h.

◆ m_force_monotony

bool MuonCalib::RtCalibrationAnalytic::m_force_monotony = false
private

Definition at line 232 of file RtCalibrationAnalytic.h.

◆ m_full_matrix

bool MuonCalib::RtCalibrationAnalytic::m_full_matrix = false
private

Definition at line 223 of file RtCalibrationAnalytic.h.

◆ m_iteration

int MuonCalib::RtCalibrationAnalytic::m_iteration = 0
private

Definition at line 238 of file RtCalibrationAnalytic.h.

◆ m_max_it

int MuonCalib::RtCalibrationAnalytic::m_max_it = 0
private

Definition at line 231 of file RtCalibrationAnalytic.h.

◆ m_multilayer

std::array<bool, 2> MuonCalib::RtCalibrationAnalytic::m_multilayer {}
private

Definition at line 239 of file RtCalibrationAnalytic.h.

◆ m_name

std::string MuonCalib::IMdtCalibration::m_name
privateinherited

Definition at line 52 of file IMdtCalibration.h.

◆ m_nb_segment_hits

std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_nb_segment_hits
private

Definition at line 300 of file RtCalibrationAnalytic.h.

◆ m_nb_segments

int MuonCalib::RtCalibrationAnalytic::m_nb_segments = 0
private

Definition at line 236 of file RtCalibrationAnalytic.h.

◆ m_nb_segments_used

int MuonCalib::RtCalibrationAnalytic::m_nb_segments_used = 0
private

Definition at line 237 of file RtCalibrationAnalytic.h.

◆ m_order

unsigned int MuonCalib::RtCalibrationAnalytic::m_order = 0U
private

Definition at line 285 of file RtCalibrationAnalytic.h.

◆ m_output

std::shared_ptr<RtCalibrationOutput> MuonCalib::RtCalibrationAnalytic::m_output
private

Definition at line 266 of file RtCalibrationAnalytic.h.

◆ m_r_max

double MuonCalib::RtCalibrationAnalytic::m_r_max = 0.0
private

Definition at line 270 of file RtCalibrationAnalytic.h.

◆ m_residuals

std::unique_ptr<TH2F> MuonCalib::RtCalibrationAnalytic::m_residuals
private

Definition at line 302 of file RtCalibrationAnalytic.h.

◆ m_rt

std::shared_ptr<const IRtRelation> MuonCalib::RtCalibrationAnalytic::m_rt
private

Definition at line 260 of file RtCalibrationAnalytic.h.

◆ m_rt_accuracy

double MuonCalib::RtCalibrationAnalytic::m_rt_accuracy = 0.0
private

Definition at line 246 of file RtCalibrationAnalytic.h.

◆ m_rt_accuracy_previous

double MuonCalib::RtCalibrationAnalytic::m_rt_accuracy_previous = 0.0
private

Definition at line 247 of file RtCalibrationAnalytic.h.

◆ m_rt_new

std::shared_ptr<IRtRelation> MuonCalib::RtCalibrationAnalytic::m_rt_new
private

Definition at line 265 of file RtCalibrationAnalytic.h.

◆ m_split_into_ml

bool MuonCalib::RtCalibrationAnalytic::m_split_into_ml = false
private

Definition at line 219 of file RtCalibrationAnalytic.h.

◆ m_status

int MuonCalib::RtCalibrationAnalytic::m_status = 0
private

Definition at line 243 of file RtCalibrationAnalytic.h.

◆ m_t_length

double MuonCalib::RtCalibrationAnalytic::m_t_length = 0.0
private

Definition at line 261 of file RtCalibrationAnalytic.h.

◆ m_t_mean

double MuonCalib::RtCalibrationAnalytic::m_t_mean = 0.0
private

Definition at line 262 of file RtCalibrationAnalytic.h.

◆ m_tfile

std::unique_ptr<TFile> MuonCalib::RtCalibrationAnalytic::m_tfile
private

Definition at line 298 of file RtCalibrationAnalytic.h.

◆ m_track_position

MeanRMS MuonCalib::RtCalibrationAnalytic::m_track_position
private

Definition at line 346 of file RtCalibrationAnalytic.h.

◆ m_track_slope

MeanRMS MuonCalib::RtCalibrationAnalytic::m_track_slope
private

Definition at line 345 of file RtCalibrationAnalytic.h.

◆ m_tracker

QuasianalyticLineReconstruction MuonCalib::RtCalibrationAnalytic::m_tracker
private

Definition at line 271 of file RtCalibrationAnalytic.h.

◆ m_U

std::vector<CLHEP::HepVector> MuonCalib::RtCalibrationAnalytic::m_U
private

Definition at line 287 of file RtCalibrationAnalytic.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
MuonCalib::IMdtCalibration::IMdtCalibration
IMdtCalibration(const std::string &name)
constructor, string used to identify the instance
Definition: IMdtCalibration.h:34
MuonCalib::RtCalibrationOutput
Definition: RtCalibrationOutput.h:21
MuonCalib::IRtRelation::tUpper
virtual double tUpper(void) const =0
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
MuonCalib::RtCalibrationAnalytic::m_full_matrix
bool m_full_matrix
Definition: RtCalibrationAnalytic.h:223
max
#define max(a, b)
Definition: cfImp.cxx:41
MuonCalib::RtCalibrationAnalytic::getResults
MdtCalibOutputPtr getResults() const
returns the final r-t relationship
Definition: RtCalibrationAnalytic.cxx:908
MuonCalib::RtCalibrationAnalytic::m_track_slope
MeanRMS m_track_slope
Definition: RtCalibrationAnalytic.h:345
MuonCalib::MeanRMS::Insert
void Insert(double x)
Definition: MeanRMS.h:12
MuonCalib::ChebyshevPolynomial
Definition: ChebyshevPolynomial.h:29
MuonCalib::RtCalibrationAnalytic::m_residuals
std::unique_ptr< TH2F > m_residuals
Definition: RtCalibrationAnalytic.h:302
MuonCalib::RtCalibrationAnalytic::m_fix_min
bool m_fix_min
Definition: RtCalibrationAnalytic.h:229
MuonCalib::RtParabolicExtrapolation
Definition: RtParabolicExtrapolation.h:27
CheckAppliedSFs.bin_width
bin_width
Definition: CheckAppliedSFs.py:242
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
MuonCalib::RtCalibrationAnalytic::m_status
int m_status
Definition: RtCalibrationAnalytic.h:243
skel.it
it
Definition: skel.GENtoEVGEN.py:423
MuonCalib::RtCalibrationAnalytic::m_base_function
std::unique_ptr< BaseFunction > m_base_function
Definition: RtCalibrationAnalytic.h:295
MuonCalib::MuonCalibSegment::position
const Amg::Vector3D & position() const
retrieve local position of segment (on station level)
Definition: MuonCalibSegment.cxx:186
MuonCalib::RtChebyshev::numberOfRtParameters
unsigned int numberOfRtParameters(void) const
get the coefficients of the r(t) polynomial
Definition: RtChebyshev.cxx:106
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
gr
#define gr
MuonCalib::RtCalibrationAnalytic::m_chi2_previous
double m_chi2_previous
Definition: RtCalibrationAnalytic.h:249
MuonCalib::RtCalibrationAnalytic::m_tfile
std::unique_ptr< TFile > m_tfile
Definition: RtCalibrationAnalytic.h:298
MuonCalib::RtCalibrationAnalytic::m_cut_evolution
std::unique_ptr< TH1F > m_cut_evolution
Definition: RtCalibrationAnalytic.h:299
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::QuasianalyticLineReconstruction::setRoadWidth
void setRoadWidth(const double &r_road_width)
set the road width for the pattern recognition = r_road_width
Definition: QuasianalyticLineReconstruction.cxx:319
MuonCalib::RtRelationLookUp
Equidistant look up table for rt-relations with the time as key.
Definition: RtRelationLookUp.h:24
MuonCalib::RtCalibrationAnalytic::m_U
std::vector< CLHEP::HepVector > m_U
Definition: RtCalibrationAnalytic.h:287
x
#define x
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonCalib::RtParabolicExtrapolation::getRtWithParabolicExtrapolation
RtRelationLookUp getRtWithParabolicExtrapolation(const IRtRelation &in_rt, const double &r_min=13.0, const double &r_max=14.0) const
get an r-t relationship which is equivalent to the input relationship in_rt for r<r_min and has r(t) ...
Definition: RtParabolicExtrapolation.cxx:24
MuonCalib::CalibFunc::par
double par(unsigned int index) const
Definition: CalibFunc.h:41
MuonCalib::MuonCalibSegment::direction
const Amg::Vector3D & direction() const
retrieve local direction of segment (on station level) retrieve the transformation from local chamber...
Definition: MuonCalibSegment.cxx:187
MuonCalib::RtCalibrationAnalytic::m_rt
std::shared_ptr< const IRtRelation > m_rt
Definition: RtCalibrationAnalytic.h:260
physics_parameters.file_name
string file_name
Definition: physics_parameters.py:32
MuonCalib::BaseFunctionFitter
Definition: BaseFunctionFitter.h:47
MuonCalib::RtCalibrationAnalytic::m_tracker
QuasianalyticLineReconstruction m_tracker
Definition: RtCalibrationAnalytic.h:271
MuonCalib::RtChebyshev::get_reduced_time
double get_reduced_time(const double &t) const
Definition: RtChebyshev.cxx:125
MuonCalib::RtCalibrationAnalytic::m_r_max
double m_r_max
Definition: RtCalibrationAnalytic.h:270
MuonCalib::RtCalibrationAnalytic::analyse
bool analyse()
perform the autocalibration with the segments acquired so far
Definition: RtCalibrationAnalytic.cxx:740
lumiFormat.i
int i
Definition: lumiFormat.py:92
MuonCalib::RtCalibrationAnalytic::m_iteration
int m_iteration
Definition: RtCalibrationAnalytic.h:238
z
#define z
h
G
#define G(x, y, z)
Definition: MD5.cxx:113
MuonCalib::RtCalibrationAnalytic::m_track_position
MeanRMS m_track_position
Definition: RtCalibrationAnalytic.h:346
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
extractSporadic.h
list h
Definition: extractSporadic.py:97
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:59
MuonCalib::RtCalibrationAnalytic::m_nb_segment_hits
std::unique_ptr< TH1F > m_nb_segment_hits
Definition: RtCalibrationAnalytic.h:300
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
MuonCalib::IRtRelation::tLower
virtual double tLower(void) const =0
MuonCalib::IMdtCalibration::m_name
std::string m_name
Definition: IMdtCalibration.h:52
MuonCalib::RtCalibrationAnalytic::handleSegment
bool handleSegment(MuonCalibSegment &seg)
analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06)
Definition: RtCalibrationAnalytic.cxx:468
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
MuonCalib::RtCalibrationAnalytic::m_rt_accuracy_previous
double m_rt_accuracy_previous
Definition: RtCalibrationAnalytic.h:247
MuonCalib::RtCalibrationAnalytic::m_rt_new
std::shared_ptr< IRtRelation > m_rt_new
Definition: RtCalibrationAnalytic.h:265
MuonCalib::RtChebyshev::tLower
double tLower(void) const
< get the lower drift-time bound
Definition: RtChebyshev.cxx:92
MuonCalib::AdaptiveResidualSmoothing
Definition: AdaptiveResidualSmoothing.h:48
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
MuonCalib::RtCalibrationAnalytic::m_t_mean
double m_t_mean
Definition: RtCalibrationAnalytic.h:262
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonCalib::RtCalibrationAnalytic::m_do_smoothing
bool m_do_smoothing
Definition: RtCalibrationAnalytic.h:278
MuonCalib::IMdtCalibration::name
virtual std::string name() const
returns name (region) of instance
Definition: IMdtCalibration.h:49
MuonCalib::MuonCalibSegment::mdtHitsOnTrack
unsigned int mdtHitsOnTrack() const
retrieve the number of MdtCalibHitBase s assigned to this segment
Definition: MuonCalibSegment.cxx:147
MuonCalib::RtCalibrationAnalytic::m_A
CLHEP::HepSymMatrix m_A
Definition: RtCalibrationAnalytic.h:288
MuonCalib::RtFromPoints
Definition: RtFromPoints.h:30
MuonCalib::IRtRelation::radius
virtual double radius(double t) const =0
returns drift radius for a given time
MuonCalib::RtCalibrationAnalytic::m_CL
std::unique_ptr< TH1F > m_CL
Definition: RtCalibrationAnalytic.h:301
MuonCalib::SamplePoint
Definition: SamplePoint.h:17
MuonCalib::RtCalibrationOutput::rt
std::shared_ptr< const IRtRelation > rt() const
access to private attributes
Definition: RtCalibrationOutput.h:27
MuonCalib::RtCalibrationAnalytic::m_control_histograms
bool m_control_histograms
Definition: RtCalibrationAnalytic.h:217
MuonCalib::RtCalibrationAnalytic::m_max_it
int m_max_it
Definition: RtCalibrationAnalytic.h:231
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
MuonCalib::RtCalibrationAnalytic::m_nb_segments_used
int m_nb_segments_used
Definition: RtCalibrationAnalytic.h:237
MuonCalib::RtChebyshev::tUpper
double tUpper(void) const
get the number of parameters used to describe the r(t) relationship
Definition: RtChebyshev.cxx:99
MuonCalib::RtCalibrationAnalytic::setInput
void setInput(const IMdtCalibrationOutput *rt_input)
set the r-t relationship, the internal autocalibration objects are reset
Definition: RtCalibrationAnalytic.cxx:688
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonCalib::IMdtPatRecFitter::switchOnRefit
void switchOnRefit()
switch on/off chi^2 refit after hit selection
Definition: IMdtPatRecFitter.h:41
MuonCalib::CalibFunc::parameters
const ParVec & parameters() const
Definition: CalibFunc.h:40
MuonCalib::RtCalibrationAnalytic::m_order
unsigned int m_order
Definition: RtCalibrationAnalytic.h:285
MuonCalib::RtCalibrationAnalytic::m_alpha
CLHEP::HepVector m_alpha
Definition: RtCalibrationAnalytic.h:290
MuonCalib::RtChebyshev::radius
double radius(double t) const
get the radius corresponding to the drift time t; if t is not within [t_low, t_up] an unphysical radi...
Definition: RtChebyshev.cxx:54
MuonCalib::QuasianalyticLineReconstruction::fit
bool fit(MuonCalibSegment &r_segment) const
reconstruction of the track using all hits in the segment "r_segment", returns true in case of succes...
Definition: QuasianalyticLineReconstruction.cxx:328
MuonCalib::RtCalibrationAnalytic::converged
bool converged() const
returns true, if the autocalibration has converged
Definition: RtCalibrationAnalytic.cxx:907
MuonCalib::RtCalibrationAnalytic::m_force_monotony
bool m_force_monotony
Definition: RtCalibrationAnalytic.h:232
MuonCalib::RtCalibrationAnalytic::m_rt_accuracy
double m_rt_accuracy
Definition: RtCalibrationAnalytic.h:246
DiTauMassTools::HistInfoV2::RMS
@ RMS
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:31
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonCalib::RtCalibrationAnalytic::t_from_r
double t_from_r(const double &r)
Definition: RtCalibrationAnalytic.cxx:143
MuonCalib::MTStraightLine
Definition: MTStraightLine.h:16
LArCellBinning.step
step
Definition: LArCellBinning.py:158
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39
MuonCalib::RtCalibrationAnalytic::m_do_parabolic_extrapolation
bool m_do_parabolic_extrapolation
Definition: RtCalibrationAnalytic.h:281
MuonCalib::RtCalibrationAnalytic::m_chi2
double m_chi2
Definition: RtCalibrationAnalytic.h:255
MuonCalib::RtCalibrationAnalytic::m_nb_segments
int m_nb_segments
Definition: RtCalibrationAnalytic.h:236
MuonCalib::MuonCalibSegment::mdtHOT
const MdtHitVec & mdtHOT() const
retrieve the full set of MdtCalibHitBase s assigned to this segment
Definition: MuonCalibSegment.cxx:148
MuonCalib::RtCalibrationAnalytic::m_t_length
double m_t_length
Definition: RtCalibrationAnalytic.h:261
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
get_generator_info.error
error
Definition: get_generator_info.py:40
test_pyathena.counter
counter
Definition: test_pyathena.py:15
MuonCalib::RtCalibrationAnalytic::performParabolicExtrapolation
std::shared_ptr< RtRelationLookUp > performParabolicExtrapolation(const bool &min, const bool &max, const IRtRelation &in_rt)
Definition: RtCalibrationAnalytic.cxx:909
MuonCalib::RtCalibrationAnalytic::m_b
CLHEP::HepVector m_b
Definition: RtCalibrationAnalytic.h:292
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
MuonCalib::RtCalibrationAnalytic::m_multilayer
std::array< bool, 2 > m_multilayer
Definition: RtCalibrationAnalytic.h:239
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
MuonCalib::RtCalibrationAnalytic::m_output
std::shared_ptr< RtCalibrationOutput > m_output
Definition: RtCalibrationAnalytic.h:266
MuonCalib::RtCalibrationAnalytic::smoothing
bool smoothing() const
returns true, if the r-t relationship will be smoothened using the conventional autocalibration after...
Definition: RtCalibrationAnalytic.cxx:299
MuonCalib::RtCalibrationAnalytic::init
void init(const double &rt_accuracy, const unsigned int &func_type, const unsigned int &ord, const bool &split, const bool &full_matrix, const bool &fix_min, const bool &fix_max, const int &max_it, bool do_smoothing, bool do_parabolic_extrapolation)
Definition: RtCalibrationAnalytic.cxx:56
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
MuonCalib::IMdtSegmentFitter::HitSelection
std::vector< unsigned int > HitSelection
Definition: IMdtSegmentFitter.h:32
DiTauMassTools::TauTypes::ll
@ ll
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49
MuonCalib::RtCalibrationAnalytic::m_split_into_ml
bool m_split_into_ml
Definition: RtCalibrationAnalytic.h:219
MuonCalib::RtCalibrationAnalytic::m_fix_max
bool m_fix_max
Definition: RtCalibrationAnalytic.h:230