4#ifndef RtCalibrationAnalytic__H
5#define RtCalibrationAnalytic__H
35#include "CLHEP/Matrix/SymMatrix.h"
36#include "CLHEP/Matrix/Vector.h"
37#include "CLHEP/Units/PhysicalConstants.h"
38#include "CLHEP/Units/SystemOfUnits.h"
73 RtCalibrationAnalytic(
const std::string &
name,
const double rt_accuracy,
const unsigned int &func_type,
const unsigned int &ord,
74 const bool &
split,
const bool &full_matrix,
const bool &fix_min,
const bool &fix_max,
const int &max_it,
75 bool do_smoothing =
false,
bool do_parabolic_extrapolation =
false);
260 std::shared_ptr<const IRtRelation>
m_rt;
287 std::vector<CLHEP::HepVector>
m_U;
305 void init(
const double rt_accuracy,
const unsigned int &func_type,
const unsigned int &ord,
const bool &
split,
306 const bool &full_matrix,
const bool &fix_min,
const bool &fix_max,
const int &max_it,
bool do_smoothing,
307 bool do_parabolic_extrapolation);
This is an abstract base class for a set of base functions for fits to sample points.
Interface to pass calibration output during calibration.
IMdtCalibration(const std::string &name)
constructor, string used to identify the instance
virtual std::string name() const
returns name (region) of instance
std::shared_ptr< IMdtCalibrationOutput > MdtCalibOutputPtr
std::vector< std::shared_ptr< MuonCalibSegment > > MuonSegVec
generic interface for a rt-relation
A MuonCalibSegment is a reconstructed three dimensional track segment in the MuonSpectrometer.
std::unique_ptr< TH1F > m_cut_evolution
std::vector< CLHEP::HepVector > m_U
MdtCalibOutputPtr getResults() const
returns the final r-t relationship
std::unique_ptr< TFile > m_tfile
void doNotForceMonotony()
do not force r(t) to be monotonically increasing
void setEstimateRtAccuracy(const double acc)
set the estimated r-t accuracy =acc
double t_from_r(const double r)
bool m_control_histograms
int numberOfSegmentsUsed() const
get the number of segments which are used in the autocalibration
bool splitIntoMultilayers() const
returns true, if segments are internally restricted to single multilayers; returns false,...
MdtCalibOutputPtr analyseSegments(const MuonSegVec &seg)
perform the full autocalibration including iterations (required since MdtCalibInterfaces-00-01-06)
std::shared_ptr< IRtRelation > m_rt_new
std::unique_ptr< TH1F > m_CL
bool m_do_parabolic_extrapolation
double reliability() const
get the reliability of the r-t: 0: no convergence yet 1: convergence, r-t is reliable 2: convergence,...
void display_segment(MuonCalibSegment *segment, std::ofstream &outfile)
int numberOfSegments() const
get the number of segments which were passed to the algorithm
void doSmoothing()
requires that the r-t relationship will be smoothened using the conventional autocalibration after co...
void noParabolicExtrapolation()
no parabolic extrapolation is done
double m_rt_accuracy_previous
void switch_off_control_histograms()
the algorithm does not produce controll histograms (this is the default)
double estimatedRtAccuracy() const
get the estimated r-t quality (CLHEP::mm), the accuracy of the input r-t is computed at the end of th...
std::shared_ptr< const IRtRelation > m_rt
std::unique_ptr< BaseFunction > m_base_function
void doParabolicExtrapolation()
requires that parabolic extrapolation will be used for small and large radii
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)
bool converged() const
returns true, if the autocalibration has converged
QuasianalyticLineReconstruction m_tracker
bool fullMatrix() const
returns true, if the full matrix relating the errors in the r-t relationship to the residuals should ...
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 f...
RtCalibrationAnalytic(const std::string &name)
Default constructor: r-t accuracy is set to 0.5 mm.
std::shared_ptr< RtCalibrationOutput > m_output
std::array< bool, 2 > m_multilayer
int iteration() const
get the number of the current iteration
void setInput(const IMdtCalibrationOutput *rt_input)
set the r-t relationship, the internal autocalibration objects are reset
std::unique_ptr< TH2F > m_residuals
void noSmoothing()
do not smoothen the r-t relationship after convergence
bool analyse()
perform the autocalibration with the segments acquired so far
std::shared_ptr< RtRelationLookUp > performParabolicExtrapolation(const bool &min, const bool &max, const IRtRelation &in_rt)
bool handleSegment(MuonCalibSegment &seg)
analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06)
bool smoothing() const
returns true, if the r-t relationship will be smoothened using the conventional autocalibration after...
void forceMonotony()
force r(t) to be monotonically increasing
std::unique_ptr< TH1F > m_nb_segment_hits
Class for communication between event loop and rt calibration algorithm contains only a rt relation f...
Equidistant look up table for rt-relations with the time as key.
std::vector< std::string > split(const std::string &s, const std::string &t=":")
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.