Project
Loading...
Searching...
No Matches
mathiesonFit.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef O2_MCH_MATHIESONFIT_H
13#define O2_MCH_MATHIESONFIT_H
14
15#include <gsl/gsl_blas.h>
16#include <gsl/gsl_multifit_nlin.h>
17#include <gsl/gsl_vector.h>
18
20#include "mathieson.h"
21#include "mathUtil.h"
22
23namespace o2
24{
25namespace mch
26{
27typedef struct dataFit {
28 int N;
29 int K;
30 const double* xInf_ptr;
31 const double* xSup_ptr;
32 const double* yInf_ptr;
33 const double* ySup_ptr;
35 const double* zObs_ptr;
38 double* cathMax_ptr;
42 double* thetaInit; // Only used by InspectModel
43 double* cathCoefNorm_ptr; // Used to keep the normalization of the 2 cathodes
44 int dimOfParameters; // default is 3 dimensions (x, y, w), 2 is for (x/y, w) fits
45 int axe; // -1 for both axes, 0 for x axis, 1 for y axis
48
49void fitMathieson(const Pads& iPads, double* thetaInit, int kInit,
50 int dimOfParameters, int axe, int mode,
51 double* thetaFinal, double* khi2, double* pError);
52
53void printState(int iter, gsl_multifit_fdfsolver* s, int K);
54// Notes :
55// - the intitialization of Mathieson module must be done before
56// (initMathieson)
57} // namespace mch
58} // namespace o2
59
60extern "C" {
61void fitMathieson0(double* muAndWi, double* xyAndDxy, double* z, o2::mch::Mask_t* cath,
62 o2::mch::Mask_t* notSaturated, double* zCathTotalCharge, int K, int N,
63 int chamberId, int jacobian, double* muAndWf, double* khi2,
64 double* pError);
65
66void fitMathieson(const double* x, const double* y, const double* dx, const double* dy, const double* q,
67 const o2::mch::Mask_t* cath, const o2::mch::Mask_t* sat, int chId, int nPads,
68 double* thetaInit, int kInit,
69 double* thetaFinal, double* khi2, double* pError);
70
71int f_ChargeIntegral(const gsl_vector* gslParams, void* data,
72 gsl_vector* residual);
73}
74
75#endif // O2_MCH_MATHIESONFIT_H
GLint GLenum GLint x
Definition glcorearb.h:403
GLenum mode
Definition glcorearb.h:266
GLboolean * data
Definition glcorearb.h:298
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
int f_ChargeIntegral(const gsl_vector *gslParams, void *data, gsl_vector *residual)
void fitMathieson(const double *x, const double *y, const double *dx, const double *dy, const double *q, const o2::mch::Mask_t *cath, const o2::mch::Mask_t *sat, int chId, int nPads, double *thetaInit, int kInit, double *thetaFinal, double *khi2, double *pError)
void fitMathieson0(double *muAndWi, double *xyAndDxy, double *z, o2::mch::Mask_t *cath, o2::mch::Mask_t *notSaturated, double *zCathTotalCharge, int K, int N, int chamberId, int jacobian, double *muAndWf, double *khi2, double *pError)
struct o2::mch::dataFit funcDescription_t
void printState(int iter, gsl_multifit_fdfsolver *s, int axe, int K, int N)
void fitMathieson(const Pads &iPads, double *thetaInit, int kInit, int dimOfParameters, int axe, int mode, double *thetaFinal, double *khi2, double *pError)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
double * cathWeights_ptr
double * cathCoefNorm_ptr
const double * xSup_ptr
double * zCathTotalCharge_ptr
const double * zObs_ptr
const double * yInf_ptr
Mask_t * notSaturated_ptr
CompressedPads_t * compressedPads
const Mask_t * cath_ptr
const double * ySup_ptr
double * cathMax_ptr
const double * xInf_ptr