|
|
Go to the documentation of this file. 1 #ifndef Alignment_MuonAlignmentAlgorithms_MuonResidualsFitter_H
2 #define Alignment_MuonAlignmentAlgorithms_MuonResidualsFitter_H
12 #ifndef STANDALONE_FITTER
24 #include "TMatrixDSym.h"
33 #ifdef STANDALONE_FITTER
40 double width() {
return 300.; }
41 double length() {
return 300.; }
49 template <
typename T,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
50 T *
make(
const A1 &a1,
const A2 &
a2,
const A3 &a3,
const A4 &a4,
const A5 &a5)
const {
51 T *
t =
new T(a1,
a2, a3, a4, a5);
54 template <
typename T,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7>
55 T *
make(
const A1 &a1,
const A2 &
a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7)
const {
56 T *
t =
new T(a1,
a2, a3, a4, a5, a6, a7);
59 template <
typename T,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename A6,
typename A7,
typename A8>
60 T *
make(
const A1 &a1,
const A2 &
a2,
const A3 &a3,
const A4 &a4,
const A5 &a5,
const A6 &a6,
const A7 &a7,
const A8 &a8)
62 T *
t =
new T(a1,
a2, a3, a4, a5, a6, a7, a8);
82 #endif // STANDALONE_FITTER
115 virtual int type()
const = 0;
116 virtual int npar() = 0;
117 virtual int ndata() = 0;
127 void fix(
int parNum,
bool dofix =
true);
128 bool fixed(
int parNum);
139 void fill(
double *residual);
174 #ifdef STANDALONE_FITTER
177 bool fit() {
return fit(&m_ali); }
204 bool fidcut1 =
false);
215 bool dofit(
void (*
fcn)(
int &,
double *,
double &,
double *,
int),
216 std::vector<int> &parNum,
217 std::vector<std::string> &parName,
218 std::vector<double> &
start,
219 std::vector<double> &
step,
220 std::vector<double> &
low,
221 std::vector<double> &
high);
222 virtual void inform(TMinuit *tMinuit) = 0;
257 #ifdef STANDALONE_FITTER
261 #ifdef STANDALONE_FITTER
271 double toversigma,
double gammaoversigma,
double max = 1000.,
double step = 0.001,
double power = 4.);
281 #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsFitter_H
void fiducialCuts(double xMin=-80.0, double xMax=80.0, double yMin=-80.0, double yMax=80.0, bool fidcut1=false)
virtual void correctBField()=0
void MuonResidualsPositionFitter_FCN(int &npar, double *gin, double &fval, double *par, int iflag)
Double_t MuonResidualsFitter_pureGaussian_TF1(Double_t *xvec, Double_t *par)
MuonResidualsFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true)
void setStrategy(int strategy)
std::vector< bool > m_residuals_ok
double errorerror(int parNum)
double MuonResidualsFitter_logROOTVoigt(double residual, double center, double sigma, double gamma)
bool dofit(void(*fcn)(int &, double *, double &, double *, int), std::vector< int > &parNum, std::vector< std::string > &parName, std::vector< double > &start, std::vector< double > &step, std::vector< double > &low, std::vector< double > &high)
double MuonResidualsFitter_integrate_pureGaussian(double low, double high, double center, double sigma)
std::vector< bool > m_fixed
virtual ~MuonResidualsFitter()
TMatrixDSym covarianceMatrix()
MuonResidualsFitter * m_fitter
long numResiduals() const
virtual double sumofweights()=0
void eraseNotSelectedResiduals()
int parNum2parIdx(int parNum)
void fcn(int &, double *, double &, double *, int)
char const * what() const noexcept override
virtual int type() const =0
void plotweighted(std::string name, TFileDirectory *dir, int which, int whichredchi2, double multiplier)
void setPrintLevel(int printLevel)
ClassImp(AliDaqEventHeader)
Double_t MuonResidualsFitter_powerLawTails_TF1(Double_t *xvec, Double_t *par)
Exception(std::string const &aCategory)
void selectPeakResiduals_simple(double nsigma, int nvar, int *vars)
MuonResidualsFitterFitInfo(MuonResidualsFitter *fitter)
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
int useRes(int pattern=-1)
void write(FILE *file, int which=0)
virtual double plot(std::string name, TFileDirectory *dir, Alignable *ali)=0
double covarianceElement(int parNum1, int parNum2)
std::vector< bool > & selectedResidualsFlags()
std::map< int, double > m_parNum2InitValue
void MuonResidualsAngleFitter_FCN(int &npar, double *gin, double &fval, double *par, int iflag)
Double_t MuonResidualsFitter_ROOTVoigt_TF1(Double_t *xvec, Double_t *par)
void plotsimple(std::string name, TFileDirectory *dir, int which, double multiplier)
std::vector< double * > m_residuals
std::vector< double * >::const_iterator residuals_end() const
std::vector< double > m_error
void computeHistogramRangeAndBinning(int which, int &nbins, double &a, double &b)
double MuonResidualsFitter_logPowerLawTails(double residual, double center, double sigma, double gamma)
std::map< int, int > m_parNum2parIdx
void fill(double *residual)
void setInitialValue(int parNum, double value)
void histogramChi2GaussianFit(int which, double &fit_mean, double &fit_sigma)
double MuonResidualsFitter_logPureGaussian2D(double x, double y, double x0, double y0, double sx, double sy, double r)
friend detail::Desired< E, detail::is_derived_or_same< Exception, std::remove_reference_t< E > >::value >::type & operator<<(E &&e, T const &stuff)
TMatrixDSym correlationMatrix()
std::vector< double > m_value
MuonResidualsFitter * fitter()
T * make(const Args &...args) const
make new ROOT object
void fix(int parNum, bool dofix=true)
void selectPeakResiduals(double nsigma, int nvar, int *vars)
void read(FILE *file, int which=0)
virtual bool fit(Alignable *ali)=0
double MuonResidualsFitter_logGaussPowerTails(double residual, double center, double sigma)
Double_t MuonResidualsFitter_GaussPowerTails_TF1(Double_t *xvec, Double_t *par)
~Exception() noexcept override
int residualsModel() const
std::vector< double * >::const_iterator residuals_begin() const
double MuonResidualsFitter_compute_log_convolution(double toversigma, double gammaoversigma, double max=1000., double step=0.001, double power=4.)
Namespace of DDCMS conversion namespace.
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)
virtual void inform(TMinuit *tMinuit)=0