|
ATLAS Offline Software
|
#include <RtCalibrationAnalytic.h>
|
| 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...
|
|
|
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< RtRelationLookUp > | performParabolicExtrapolation (const bool &min, const bool &max, const IRtRelation &in_rt) |
|
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.
◆ MdtCalibOutputPtr
◆ MuonSegCit
◆ MuonSegIt
◆ MuonSegVec
◆ 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);
◆ 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_type | type of function to be used for the r-t correction; = 1: Legendre polynomial, = 2: Chebyshev polynomial, = 3: polygon equidistant in r. |
ord | The 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_it | maximum number of iterations. |
do_smoothing | Smoothen the r-t relations after convergence.
|
do_parabolic_extrapolation | Use parabolic extrapolations for |
small and larged drift radii.
Definition at line 42 of file RtCalibrationAnalytic.cxx.
46 init(rt_accuracy, func_type, ord,
split, full_matrix, fix_min, fix_max, max_it, do_smoothing, do_parabolic_extrapolation);
◆ ~RtCalibrationAnalytic()
RtCalibrationAnalytic::~RtCalibrationAnalytic |
( |
| ) |
|
◆ analyse()
bool RtCalibrationAnalytic::analyse |
( |
| ) |
|
perform the autocalibration with the segments acquired so far
Definition at line 740 of file RtCalibrationAnalytic.cxx.
747 unsigned int nb_points(30);
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);
752 std::vector<double> rt_param(
m_rt->nPar());
763 log << MSG::WARNING <<
"analyse() - Could not solve the autocalibration equation!" <<
endmsg;
780 std::vector<SamplePoint> x_r(nb_points + 1);
785 for (
unsigned int k = 0;
k < nb_points + 1;
k++) {
787 x_r[
k].set_x2(rt_Chebyshev->
radius(x_r[
k].x1()));
789 x_r[
k].set_error(1.0);
801 x_r[
k].set_error(0.01);
803 x_r[
k].set_x2(x_r[
k].
x2() + r_corr);
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()); }
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());
819 std::ostringstream str_str;
821 gre->Write(str_str.str().c_str());
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();
830 m_rt_new = std::make_unique<RtChebyshev>(rt_param);
836 unsigned int min_k(2), max_k(rt_param.size());
838 if (
m_fix_max) { max_k = rt_param.size() - 1; }
840 std::unique_ptr<TGraph>
gr;
843 for (
unsigned int k = min_k;
k < max_k;
k++) {
847 rt_param[
k] = rt_param[
k] + r_corr;
850 if (rt_param[
k] < rt_param[
k - 1]) { rt_param[
k] = rt_param[
k - 1]; }
854 m_rt_new = std::make_unique<RtRelationLookUp>(rt_param);
856 std::ostringstream str_str;
858 gr->Write(str_str.str().c_str());
869 double r_corr_max = 0.0;
871 for (
unsigned int k = 0;
k < 100;
k++) {
874 if (std::abs(r_corr) > r_corr_max) { r_corr_max = std::abs(r_corr); }
902 m_output = std::make_shared<RtCalibrationOutput>(
◆ analyseSegments()
perform the full autocalibration including iterations (required since MdtCalibInterfaces-00-01-06)
Implements MuonCalib::IMdtCalibration.
Definition at line 339 of file RtCalibrationAnalytic.cxx.
340 std::shared_ptr<const IRtRelation> tmp_rt;
341 std::shared_ptr<const IRtRelation> conv_rt;
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;
360 tmp_rt = rtOut->
rt();
362 std::vector<double>
params;
366 conv_rt = std::make_shared<RtRelationLookUp>(
params);
372 m_output = std::make_shared<RtCalibrationOutput>(
383 int max_smoothing_iterations(
static_cast<int>(
m_max_it));
384 if (max_smoothing_iterations == 0) { max_smoothing_iterations = 1; }
387 double convergence_RMS(0.002);
396 while (it < max_smoothing_iterations && RMS > convergence_RMS) {
404 for (
const auto &
k : seg) {
405 if (
k->mdtHitsOnTrack() < 3) {
continue; }
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();
416 avres = avres /
static_cast<double>(
k->mdtHitsOnTrack());
417 avres = std::sqrt(avres);
418 if (
k->mdtHitsOnTrack() > 3) {
428 log << MSG::WARNING <<
"analyseSegments() - no smoothing applied due to too small number of reconstructed segments" <<
endmsg;
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) {
441 RMS = std::sqrt(0.01 *
RMS);
447 tmp_rt = std::make_shared<RtRelationLookUp>(smooth_rt);
454 m_output = std::make_shared<RtCalibrationOutput>(
◆ converged()
bool RtCalibrationAnalytic::converged |
( |
| ) |
const |
◆ display_segment()
void RtCalibrationAnalytic::display_segment |
( |
MuonCalibSegment * |
segment, |
|
|
std::ofstream & |
outfile |
|
) |
| |
|
private |
Definition at line 170 of file RtCalibrationAnalytic.cxx.
174 double y_min, y_max, z_min, z_max;
182 y_min = (
segment->mdtHOT()[0])->localPosition().y();
184 z_min = (
segment->mdtHOT()[0])->localPosition().z();
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(); }
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(); }
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";
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";
209 for (
unsigned int k = 0;
k <
segment->mdtHitsOnTrack();
k++) {
212 <<
"ARC " << (
segment->mdtHOT()[
k])->localPosition().y() <<
" " << (
segment->mdtHOT()[
k])->localPosition().z() <<
" 15.0\n";
216 <<
"ARC " << (
segment->mdtHOT()[
k])->localPosition().y() <<
" " << (
segment->mdtHOT()[
k])->localPosition().z() <<
" "
221 for (
unsigned int k = 0;
k <
segment->mdtCloseHits();
k++) {
224 <<
"ARC " << (
segment->mdtClose()[
k])->localPosition().y() <<
" " << (
segment->mdtClose()[
k])->localPosition().z()
229 <<
"ARC " << (
segment->mdtClose()[
k])->localPosition().y() <<
" " << (
segment->mdtClose()[
k])->localPosition().z() <<
" "
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";
◆ doNotForceMonotony()
void RtCalibrationAnalytic::doNotForceMonotony |
( |
| ) |
|
◆ doParabolicExtrapolation()
void RtCalibrationAnalytic::doParabolicExtrapolation |
( |
| ) |
|
◆ 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.
◆ 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.
◆ forceMonotony()
void RtCalibrationAnalytic::forceMonotony |
( |
| ) |
|
◆ 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.
◆ 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.
◆ getResults()
◆ handleSegment()
analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06)
Definition at line 468 of file RtCalibrationAnalytic.cxx.
482 if (std::abs(seg.
direction().y()) > 100)
return true;
491 double chi2_scale_factor;
497 unsigned int nb_hits_in_ml[2];
499 std::vector<double> d_track;
500 std::vector<double> residual_value;
501 std::vector<MTStraightLine>
w;
507 std::vector<double> zeta;
519 nb_hits_in_ml[0] = 0;
520 nb_hits_in_ml[1] = 0;
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()); }
538 av_res = av_res + 0.01;
542 (hit_selection[0])[
k] = 0;
553 (hit_selection[0])[
k] = 1;
554 (hit_selection[1])[
k] = 1;
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]);
567 av_res = std::sqrt(av_res /
static_cast<double>(seg.
mdtHitsOnTrack()));
583 if (nb_hits_in_ml[
k] < 3) {
continue; }
590 if (std::isnan(
track.a_x1()) || std::isnan(
track.a_x2()) || std::isnan(
track.b_x1()) || std::isnan(
track.b_x2())) {
continue; }
593 if (
track.chi2PerDegreesOfFreedom() > 5 * chi2_scale_factor) {
continue; }
597 if (
track.numberOfTrackHits() < 3) {
continue; }
600 if (std::abs(
track.a_x2()) > 8e8)
continue;
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());
622 m_U[
l] = CLHEP::HepVector(
track.numberOfTrackHits());
623 for (
unsigned int m = 0;
m <
track.numberOfTrackHits();
m++) {
630 for (
unsigned int l = 0;
l <
track.numberOfTrackHits();
l++) {
634 d_track[
l] =
track.signDistFrom(
w[
l]);
635 residual_value[
l] =
track.trackHits()[
l]->driftRadius() - std::abs(d_track[
l]);
640 for (
unsigned int l = 0;
l <
track.numberOfTrackHits();
l++) {
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];
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();
654 if (d_track[
m] * d_track[
l] >= 0.0) {
660 CLHEP::HepSymMatrix A_tmp(
m_A);
663 for (
unsigned int pp =
p; pp <
m_order; pp++) {
665 if (std::isnan(A_tmp[
p][pp]))
return true;
669 CLHEP::HepVector b_tmp(
m_b);
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;
◆ 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.
87 throw std::runtime_error(
88 Form(
"File: %s, Line: %d\nRtCalibrationAnalytic::init - Order of the correction polynomial must be >0!", __FILE__, __LINE__));
102 if (func_type < 1 || func_type > 3) {
104 throw std::runtime_error(
105 Form(
"File: %s, Line: %d\nRtCalibrationAnalytic::init - Illegal correction function type!", __FILE__, __LINE__));
108 case 1:
m_base_function = std::make_unique<LegendrePolynomial>();
break;
109 case 2:
m_base_function = std::make_unique<ChebyshevPolynomial>();
break;
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.",
◆ iteration()
int RtCalibrationAnalytic::iteration |
( |
| ) |
const |
◆ name()
virtual std::string MuonCalib::IMdtCalibration::name |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ noParabolicExtrapolation()
void RtCalibrationAnalytic::noParabolicExtrapolation |
( |
| ) |
|
◆ noSmoothing()
void RtCalibrationAnalytic::noSmoothing |
( |
| ) |
|
◆ numberOfSegments()
int RtCalibrationAnalytic::numberOfSegments |
( |
| ) |
const |
◆ numberOfSegmentsUsed()
int RtCalibrationAnalytic::numberOfSegmentsUsed |
( |
| ) |
const |
◆ performParabolicExtrapolation()
Definition at line 909 of file RtCalibrationAnalytic.cxx.
915 std::shared_ptr<RtRelationLookUp> rt_low, rt_high;
918 std::vector<SamplePoint> add_fit_point;
925 add_fit_point.clear();
932 rt_high = std::make_shared<RtRelationLookUp>(
941 add_fit_point.clear();
955 if (
min &&
max) {
return rt_low; }
956 if (
min) {
return rt_low; }
◆ 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.
◆ setEstimateRtAccuracy()
void RtCalibrationAnalytic::setEstimateRtAccuracy |
( |
const double & |
acc | ) |
|
◆ setInput()
set the r-t relationship, the internal autocalibration objects are reset
Implements MuonCalib::IMdtCalibration.
Definition at line 688 of file RtCalibrationAnalytic.cxx.
697 if (
input ==
nullptr) {
698 throw std::runtime_error(
699 Form(
"File: %s, Line: %d\nRtCalibrationAnalytic::setInput - Calibration input class not supported.", __FILE__, __LINE__));
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);
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__));
◆ 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.
◆ 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.
◆ 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.
◆ switch_off_control_histograms()
void RtCalibrationAnalytic::switch_off_control_histograms |
( |
| ) |
|
◆ 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.
314 m_cut_evolution = std::make_unique<TH1F>(
"m_cut_evolution",
"CUT EVOLUTION", 11, -0.5, 10.5);
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);
318 m_CL = std::make_unique<TH1F>(
"m_CL",
"CONFIDENCE LEVELS OF THE REFITTED SEGMENTS", 100, 0.0, 1.0);
320 m_residuals = std::make_unique<TH2F>(
"m_residuals",
"RESIDUALS OF THE REFITTED SEGMENTS", 100, -0.5, 15.0, 300, -1.5, 1.5);
◆ t_from_r()
double RtCalibrationAnalytic::t_from_r |
( |
const double & |
r | ) |
|
|
private |
Definition at line 143 of file RtCalibrationAnalytic.cxx.
147 double precision(0.001);
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);
158 t_min = 0.5 * (t_min + t_max);
162 return 0.5 * (t_min + t_max);
◆ m_A
CLHEP::HepSymMatrix MuonCalib::RtCalibrationAnalytic::m_A |
|
private |
◆ m_alpha
CLHEP::HepVector MuonCalib::RtCalibrationAnalytic::m_alpha |
|
private |
◆ m_b
CLHEP::HepVector MuonCalib::RtCalibrationAnalytic::m_b |
|
private |
◆ m_base_function
std::unique_ptr<BaseFunction> MuonCalib::RtCalibrationAnalytic::m_base_function |
|
private |
◆ m_chi2
double MuonCalib::RtCalibrationAnalytic::m_chi2 = 0.0 |
|
private |
◆ m_chi2_previous
double MuonCalib::RtCalibrationAnalytic::m_chi2_previous = 0.0 |
|
private |
◆ m_CL
std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_CL |
|
private |
◆ m_control_histograms
bool MuonCalib::RtCalibrationAnalytic::m_control_histograms = false |
|
private |
◆ m_cut_evolution
std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_cut_evolution |
|
private |
◆ m_do_parabolic_extrapolation
bool MuonCalib::RtCalibrationAnalytic::m_do_parabolic_extrapolation = false |
|
private |
◆ m_do_smoothing
bool MuonCalib::RtCalibrationAnalytic::m_do_smoothing = false |
|
private |
◆ m_fix_max
bool MuonCalib::RtCalibrationAnalytic::m_fix_max = false |
|
private |
◆ m_fix_min
bool MuonCalib::RtCalibrationAnalytic::m_fix_min = false |
|
private |
◆ m_force_monotony
bool MuonCalib::RtCalibrationAnalytic::m_force_monotony = false |
|
private |
◆ m_full_matrix
bool MuonCalib::RtCalibrationAnalytic::m_full_matrix = false |
|
private |
◆ m_iteration
int MuonCalib::RtCalibrationAnalytic::m_iteration = 0 |
|
private |
◆ m_max_it
int MuonCalib::RtCalibrationAnalytic::m_max_it = 0 |
|
private |
◆ m_multilayer
std::array<bool, 2> MuonCalib::RtCalibrationAnalytic::m_multilayer {} |
|
private |
◆ m_name
std::string MuonCalib::IMdtCalibration::m_name |
|
privateinherited |
◆ m_nb_segment_hits
std::unique_ptr<TH1F> MuonCalib::RtCalibrationAnalytic::m_nb_segment_hits |
|
private |
◆ m_nb_segments
int MuonCalib::RtCalibrationAnalytic::m_nb_segments = 0 |
|
private |
◆ m_nb_segments_used
int MuonCalib::RtCalibrationAnalytic::m_nb_segments_used = 0 |
|
private |
◆ m_order
unsigned int MuonCalib::RtCalibrationAnalytic::m_order = 0U |
|
private |
◆ m_output
◆ m_r_max
double MuonCalib::RtCalibrationAnalytic::m_r_max = 0.0 |
|
private |
◆ m_residuals
std::unique_ptr<TH2F> MuonCalib::RtCalibrationAnalytic::m_residuals |
|
private |
◆ m_rt
◆ m_rt_accuracy
double MuonCalib::RtCalibrationAnalytic::m_rt_accuracy = 0.0 |
|
private |
◆ m_rt_accuracy_previous
double MuonCalib::RtCalibrationAnalytic::m_rt_accuracy_previous = 0.0 |
|
private |
◆ m_rt_new
std::shared_ptr<IRtRelation> MuonCalib::RtCalibrationAnalytic::m_rt_new |
|
private |
◆ m_split_into_ml
bool MuonCalib::RtCalibrationAnalytic::m_split_into_ml = false |
|
private |
◆ m_status
int MuonCalib::RtCalibrationAnalytic::m_status = 0 |
|
private |
◆ m_t_length
double MuonCalib::RtCalibrationAnalytic::m_t_length = 0.0 |
|
private |
◆ m_t_mean
double MuonCalib::RtCalibrationAnalytic::m_t_mean = 0.0 |
|
private |
◆ m_tfile
std::unique_ptr<TFile> MuonCalib::RtCalibrationAnalytic::m_tfile |
|
private |
◆ m_track_position
MeanRMS MuonCalib::RtCalibrationAnalytic::m_track_position |
|
private |
◆ m_track_slope
MeanRMS MuonCalib::RtCalibrationAnalytic::m_track_slope |
|
private |
◆ m_tracker
◆ m_U
std::vector<CLHEP::HepVector> MuonCalib::RtCalibrationAnalytic::m_U |
|
private |
The documentation for this class was generated from the following files:
const ShapeFitter * fitter
IMdtCalibration(const std::string &name)
constructor, string used to identify the instance
virtual double tUpper(void) const =0
MdtCalibOutputPtr getResults() const
returns the final r-t relationship
std::unique_ptr< TH2F > m_residuals
std::unique_ptr< BaseFunction > m_base_function
const Amg::Vector3D & position() const
retrieve local position of segment (on station level)
unsigned int numberOfRtParameters(void) const
get the coefficients of the r(t) polynomial
std::unique_ptr< TFile > m_tfile
std::unique_ptr< TH1F > m_cut_evolution
void setRoadWidth(const double &r_road_width)
set the road width for the pattern recognition = r_road_width
Equidistant look up table for rt-relations with the time as key.
std::vector< CLHEP::HepVector > m_U
IMessageSvc * getMessageSvc(bool quiet=false)
double par(unsigned int index) const
const Amg::Vector3D & direction() const
retrieve local direction of segment (on station level) retrieve the transformation from local chamber...
std::shared_ptr< const IRtRelation > m_rt
QuasianalyticLineReconstruction m_tracker
double get_reduced_time(const double &t) const
bool analyse()
perform the autocalibration with the segments acquired so far
std::unique_ptr< TH1F > m_nb_segment_hits
virtual double tLower(void) const =0
bool handleSegment(MuonCalibSegment &seg)
analyse the segment "seg" (this method was required before MdtCalibInterfaces-00-01-06)
double m_rt_accuracy_previous
std::shared_ptr< IRtRelation > m_rt_new
double tLower(void) const
< get the lower drift-time bound
def dot(G, fn, nodesToHighlight=[])
virtual std::string name() const
returns name (region) of instance
unsigned int mdtHitsOnTrack() const
retrieve the number of MdtCalibHitBase s assigned to this segment
virtual double radius(double t) const =0
returns drift radius for a given time
std::unique_ptr< TH1F > m_CL
std::shared_ptr< const IRtRelation > rt() const
access to private attributes
bool m_control_histograms
Eigen::Matrix< double, 3, 1 > Vector3D
double tUpper(void) const
get the number of parameters used to describe the r(t) relationship
void setInput(const IMdtCalibrationOutput *rt_input)
set the r-t relationship, the internal autocalibration objects are reset
void switchOnRefit()
switch on/off chi^2 refit after hit selection
const ParVec & parameters() const
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...
bool fit(MuonCalibSegment &r_segment) const
reconstruction of the track using all hits in the segment "r_segment", returns true in case of succes...
bool converged() const
returns true, if the autocalibration has converged
double t_from_r(const double &r)
unsigned int nPar() const
bool m_do_parabolic_extrapolation
const MdtHitVec & mdtHOT() const
retrieve the full set of MdtCalibHitBase s assigned to this segment
std::shared_ptr< RtRelationLookUp > performParabolicExtrapolation(const bool &min, const bool &max, const IRtRelation &in_rt)
std::array< bool, 2 > m_multilayer
std::shared_ptr< RtCalibrationOutput > m_output
bool smoothing() const
returns true, if the r-t relationship will be smoothened using the conventional autocalibration after...
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)
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
std::vector< unsigned int > HitSelection