Break-point track fitter. More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-15/BreakPointFitter/func/Lutz.h"
Public Member Functions | |
Lutz (unsigned int n, unsigned int N) | |
Construct a fitter for n measurements and N scattering planes. More... | |
void | SetMeasurement (unsigned int i, double z, double x, double sigx) |
Add measurements. More... | |
void | SetScatteringPlane (unsigned int j, double Z, double sigSJ) |
Set Z location of a scattering plane j. More... | |
void | Fit (double *a, double *b, double *alpha, double *chi2) |
Do the fit. More... | |
double | Chi2XIi (unsigned int i) const |
After fit, contribution to chi^2 of the ith measurement. More... | |
double | Chi2BetaJ (unsigned int j) const |
After fit, contribution to chi^2 of the jth scattering plane. More... | |
double | Chi2XI () const |
double | Chi2Beta () const |
double | X (double z) const |
After fit, best-fit x location of track at location z. More... | |
Private Member Functions | |
void | CalcZeta () |
void | CalcD () |
bool | CalcAinv () |
void | Calcq () |
void | Calcx () |
void | NullResult () |
Private Attributes | |
unsigned int | fn |
Number of measurements. More... | |
unsigned int | fN |
Number of scattering planes. More... | |
std::vector< double > | fz |
Measurement plane longitudinal locations. More... | |
TVectorT< double > | fXI |
Measurements in transverse location. More... | |
std::vector< double > | fwx |
Measurement weight (1/sigx^2) More... | |
std::vector< double > | fZ |
Location of scattering planes. More... | |
std::vector< double > | fwSJ |
Scattering angle weight (1/sigSJ^2) More... | |
std::vector< std::vector< double > > | fZeta |
measurement-scattering plane distances More... | |
TMatrixT< double > | fD |
Eqn. 31. More... | |
TMatrixTSym< double > | fAinv |
System of equations, Eqn. 29. More... | |
double | fa |
Fitted intercept. More... | |
double | fb |
Fitted slope. More... | |
std::vector< double > | fAlpha |
Fitted scatters. More... | |
std::vector< double > | fx |
Fitted track locations. More... | |
Break-point track fitter.
Implementation of ................................................................... OPTIMUM TRACK FITTING IN THE PRESENCE OF MULTIPLE SCATTERING G. LUTZ Nuclear Instruments and Methods in Physics Research A273 (1998) pp. 349-361 ...................................................................
Construct a fitter for n measurements and N scattering planes.
n | - number of measurements to be added |
N | - number of scattering surfaces to be added |
Definition at line 13 of file Lutz.cxx.
References fZeta, MECModelEnuComparisons::i, bpfit::kNn, getGoodRuns4SAM::n, and stan::math::resize().
|
private |
Inverting the matrix Sometimes this operation fails, producing error: matrix is singular Thus we need to put it into try/catch block to avoid the hard exit.
Definition at line 100 of file Lutz.cxx.
References om::cerr, fillBadChanDBTables::det, allTimeWatchdog::endl, fAinv, fn, fN, fwSJ, fwx, fz, fZeta, MECModelEnuComparisons::i, genie::utils::mec::J(), K, and sum.
Referenced by Fit().
|
private |
Definition at line 84 of file Lutz.cxx.
References fD, fn, fN, fwx, fz, fZeta, MECModelEnuComparisons::i, and calib::j.
Referenced by Fit().
|
private |
|
private |
Definition at line 194 of file Lutz.cxx.
References fa, fAlpha, fb, fn, fN, fx, fz, fZeta, MECModelEnuComparisons::i, and calib::j.
Referenced by Fit().
|
private |
Definition at line 69 of file Lutz.cxx.
References fn, fN, fz, fZ, fZeta, MECModelEnuComparisons::i, and calib::j.
Referenced by Fit().
double bpfit::Lutz::Chi2Beta | ( | ) | const |
Definition at line 287 of file Lutz.cxx.
References Chi2BetaJ(), fN, calib::j, and sum.
Referenced by bpfit::BreakPoint::FillTrackNt(), and Fit().
double bpfit::Lutz::Chi2BetaJ | ( | unsigned int | j | ) | const |
double bpfit::Lutz::Chi2XI | ( | ) | const |
Definition at line 277 of file Lutz.cxx.
References Chi2XIi(), fn, MECModelEnuComparisons::i, and sum.
Referenced by bpfit::BreakPoint::FillTrackNt(), and Fit().
double bpfit::Lutz::Chi2XIi | ( | unsigned int | i | ) | const |
void bpfit::Lutz::Fit | ( | double * | a, |
double * | b, | ||
double * | alpha, | ||
double * | chi2 | ||
) |
Do the fit.
a | - on return, fitted intercept. OK to pass 0. |
b | - on return, fitted initial slope. OK to pass 0. |
alpha | - on return, fitted scattering slopes. OK to pass 0. |
chi2 | - on return, the chi^2 result of the fit. OK to pass 0. |
Definition at line 221 of file Lutz.cxx.
References CalcAinv(), CalcD(), Calcq(), Calcx(), CalcZeta(), Chi2Beta(), Chi2XI(), fa, fAlpha, fb, fN, calib::j, and NullResult().
|
private |
Add measurements.
i | - measurement index [0...n) |
z | - z location of measurement (longitudinal location) |
x | - x location of measurement (transverse location) |
sigx | - measurement error on x position |
Definition at line 38 of file Lutz.cxx.
References fn, fwx, fXI, fz, MECModelEnuComparisons::i, bpfit::kINDEX, bpfit::kNAN, bpfit::kSIGX, submit_syst::x, and test::z.
Referenced by bpfit::BreakPoint::FitTracks(), and bpfit::DimuonFitter::FitView().
Set Z location of a scattering plane j.
j | - index of scattering plane (start from 0) |
Z | - longitudinal location of scattering plane |
sigSJ | - RMS scattering of track slope at this plane |
Definition at line 54 of file Lutz.cxx.
References fN, fwSJ, fZ, calib::j, bpfit::kINDEX, bpfit::kNAN, bpfit::kSIGSJ, and Z.
double bpfit::Lutz::X | ( | double | z | ) | const |
|
private |
|
private |
System of equations, Eqn. 29.
Definition at line 99 of file Lutz.h.
Referenced by CalcAinv(), and Calcq().
|
private |
Fitted scatters.
Definition at line 102 of file Lutz.h.
Referenced by Calcq(), Calcx(), Chi2BetaJ(), Fit(), NullResult(), and X().
|
private |
|
private |
|
private |
Number of measurements.
Definition at line 90 of file Lutz.h.
Referenced by CalcAinv(), CalcD(), Calcx(), CalcZeta(), Chi2XI(), NullResult(), and SetMeasurement().
|
private |
Number of scattering planes.
Definition at line 91 of file Lutz.h.
Referenced by CalcAinv(), CalcD(), Calcq(), Calcx(), CalcZeta(), Chi2Beta(), Fit(), NullResult(), SetScatteringPlane(), and X().
|
private |
Scattering angle weight (1/sigSJ^2)
Definition at line 96 of file Lutz.h.
Referenced by CalcAinv(), Chi2BetaJ(), and SetScatteringPlane().
|
private |
Measurement weight (1/sigx^2)
Definition at line 94 of file Lutz.h.
Referenced by CalcAinv(), CalcD(), Chi2XIi(), and SetMeasurement().
|
private |
Fitted track locations.
Definition at line 103 of file Lutz.h.
Referenced by Calcx(), Chi2XIi(), and NullResult().
|
private |
Measurements in transverse location.
Definition at line 93 of file Lutz.h.
Referenced by Calcq(), Chi2XIi(), and SetMeasurement().
|
private |
Measurement plane longitudinal locations.
Definition at line 92 of file Lutz.h.
Referenced by CalcAinv(), CalcD(), Calcx(), CalcZeta(), and SetMeasurement().
|
private |
Location of scattering planes.
Definition at line 95 of file Lutz.h.
Referenced by CalcZeta(), SetScatteringPlane(), and X().
|
private |
measurement-scattering plane distances
Definition at line 97 of file Lutz.h.
Referenced by CalcAinv(), CalcD(), Calcx(), CalcZeta(), and Lutz().