-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfitdipole.h
More file actions
71 lines (49 loc) · 1.67 KB
/
fitdipole.h
File metadata and controls
71 lines (49 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef _FITDIP_H_
#define _FITDIP_H_
#include <vector>
#include "healpixmap.h"
#include "TMinuit.h"
#include "TMatrixD.h"
/*!
One directly fits the product of the coverage map with a general dipole (three degrees of freedom) superimposed
on a uniform background.
*/
//! Look for a dipolar modulation in the data set.
class TFitDipole
{
public:
//! Constructor.
TFitDipole(const THealpixMap & evtMap, const THealpixMap & covMap, const double ampDipole = 0.1, const double RAdipole = 180., const vector<double> & lobe = vector<double>(), const vector<double> & thetaLobe = vector<double>());
//! Destructor.
~TFitDipole();
//! Fit procedure.
void FitProcedure();
//! Returns #fNParameters.
int GetNParameters() const {return fNParameters;}
//! Returns #fParameters.
vector<double> GetParameters() const {return fParameters;}
//! Returns #fParametersErrors.
vector<double> GetErrorParameters() const {return fParametersErrors;}
private:
//! Initializes the form factor and the coordinates of the pixels of my maps.
void Init();
//! Value of the beam.
vector<double> fLobe;
//! Position of the beam on the sphere.
vector<double> fThetaLobe;
//! Amplitude of the dipole. Input value.
double fAmpDipole;
//! Longitude of the dipole. Input value.
double fRAdipole;
//! Initializes the Minuit procedure.
TMinuit* fMinuit;
//! Number of parameters.
int fNParameters;
//! Parmeters of the fit.
vector<double> fParameters;
//! Errors on the parameters.
vector<double> fParametersErrors;
};
//! \f$ \chi^2 \f$ function (minimization function)
void FCN(int& npar, double *gin, double& f, double *par, int iflag);
#endif