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 histogramChi2GaussianFit(int which, double &fit_mean, double &fit_sigma)
double MuonResidualsFitter_logGaussPowerTails(double residual, double center, double sigma)
double MuonResidualsFitter_integrate_pureGaussian(double low, double high, double center, double sigma)
Double_t MuonResidualsFitter_powerLawTails_TF1(Double_t *xvec, Double_t *par)
virtual void inform(TMinuit *tMinuit)=0
std::vector< double * > m_residuals
void computeHistogramRangeAndBinning(int which, int &nbins, double &a, double &b)
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
void selectPeakResiduals(double nsigma, int nvar, int *vars)
double MuonResidualsFitter_logPureGaussian2D(double x, double y, double x0, double y0, double sx, double sy, double r)
void write(FILE *file, int which=0)
double covarianceElement(int parNum1, int parNum2)
void eraseNotSelectedResiduals()
int parNum2parIdx(int parNum)
std::vector< double > m_error
int residualsModel() const
void read(FILE *file, int which=0)
std::vector< double * >::const_iterator residuals_begin() const
void MuonResidualsPositionFitter_FCN(int &npar, double *gin, double &fval, double *par, int iflag)
virtual bool fit(Alignable *ali)=0
void fill(double *residual)
MuonResidualsFitter * fitter()
long numResiduals() const
std::vector< double * >::const_iterator residuals_end() const
TMatrixDSym covarianceMatrix()
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_logROOTVoigt(double residual, double center, double sigma, double gamma)
double MuonResidualsFitter_compute_log_convolution(double toversigma, double gammaoversigma, double max=1000., double step=0.001, double power=4.)
TMatrixDSym correlationMatrix()
std::vector< double > m_value
T * make(const Args &...args) const
make new ROOT object
std::map< int, int > m_parNum2parIdx
double MuonResidualsFitter_logPowerLawTails(double residual, double center, double sigma, double gamma)
ClassImp(AliDaqEventHeader)
MuonResidualsFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true)
std::vector< bool > m_residuals_ok
Double_t MuonResidualsFitter_GaussPowerTails_TF1(Double_t *xvec, Double_t *par)
void fix(int parNum, bool dofix=true)
virtual void correctBField()=0
friend detail::Desired< E, detail::is_derived_or_same< Exception, std::remove_reference_t< E > >::value >::type & operator<<(E &&e, T const &stuff)
virtual double plot(std::string name, TFileDirectory *dir, Alignable *ali)=0
Double_t MuonResidualsFitter_pureGaussian_TF1(Double_t *xvec, Double_t *par)
Namespace of DDCMS conversion namespace.
void plotsimple(std::string name, TFileDirectory *dir, int which, double multiplier)
void setStrategy(int strategy)
virtual double sumofweights()=0
MuonResidualsFitter * m_fitter
double errorerror(int parNum)
std::map< int, double > m_parNum2InitValue
void fcn(int &, double *, double &, double *, int)
void fiducialCuts(double xMin=-80.0, double xMax=80.0, double yMin=-80.0, double yMax=80.0, bool fidcut1=false)
void setInitialValue(int parNum, double value)
int useRes(int pattern=-1)
std::vector< bool > & selectedResidualsFlags()
Exception(std::string const &aCategory)
void plotweighted(std::string name, TFileDirectory *dir, int which, int whichredchi2, double multiplier)
void MuonResidualsAngleFitter_FCN(int &npar, double *gin, double &fval, double *par, int iflag)
virtual ~MuonResidualsFitter()
~Exception() noexcept override
void selectPeakResiduals_simple(double nsigma, int nvar, int *vars)
std::vector< bool > m_fixed
void setPrintLevel(int printLevel)
char const * what() const noexcept override
Double_t MuonResidualsFitter_ROOTVoigt_TF1(Double_t *xvec, Double_t *par)
virtual int type() const =0
MuonResidualsFitterFitInfo(MuonResidualsFitter *fitter)
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)