MUSIC
unknown
Analysis for the MUSIC active-target ionization chamber
Toggle main menu visibility
Loading...
Searching...
No Matches
BeamFit2D.hpp
Go to the documentation of this file.
1
#ifndef BEAM_FIT_2D_HPP
2
#define BEAM_FIT_2D_HPP
3
4
#include <Rtypes.h>
5
#include <TH2F.h>
6
#include <TString.h>
7
#include <algorithm>
8
#include <cmath>
9
16
struct
BeamFit2D
{
17
Double_t
amp
= 0;
18
Double_t
mu_x
= 0,
mu_y
= 0;
19
Double_t
sigma_x
= 0,
sigma_y
= 0;
20
Double_t
rho
= 0;
21
Bool_t
ok
= kFALSE;
22
};
23
30
struct
Moments2D
{
31
Double_t
mu_x
= 0,
mu_y
= 0;
32
Double_t
sigma_x
= 0,
sigma_y
= 0;
33
Double_t
rho
= 0;
34
Double_t
weight
= 0;
36
};
37
39
class
BeamFitUtils
{
40
public
:
50
static
Bool_t
InEllipseXY
(
const
BeamFit2D
&b, Double_t x, Double_t y,
51
Double_t nx, Double_t ny);
52
66
static
Moments2D
ComputeMoments
(TH2F *h, Int_t lo_bx, Int_t hi_bx,
67
Int_t lo_by, Int_t hi_by, Double_t thresh,
68
Double_t bw_x, Double_t bw_y);
69
};
70
71
#endif
BeamFitUtils
Helpers for the 2-D beam-spot description.
Definition
BeamFit2D.hpp:39
BeamFitUtils::ComputeMoments
static Moments2D ComputeMoments(TH2F *h, Int_t lo_bx, Int_t hi_bx, Int_t lo_by, Int_t hi_by, Double_t thresh, Double_t bw_x, Double_t bw_y)
Second moments of a histogram region above a threshold.
Definition
BeamFit2D.cpp:20
BeamFitUtils::InEllipseXY
static Bool_t InEllipseXY(const BeamFit2D &b, Double_t x, Double_t y, Double_t nx, Double_t ny)
Whether a point lies inside the fitted beam ellipse.
Definition
BeamFit2D.cpp:3
BeamFit2D
A fitted 2-D Gaussian beam spot.
Definition
BeamFit2D.hpp:16
BeamFit2D::rho
Double_t rho
Correlation coefficient, in [-1, 1].
Definition
BeamFit2D.hpp:20
BeamFit2D::sigma_y
Double_t sigma_y
Widths along each axis.
Definition
BeamFit2D.hpp:19
BeamFit2D::mu_x
Double_t mu_x
Definition
BeamFit2D.hpp:18
BeamFit2D::amp
Double_t amp
Peak amplitude.
Definition
BeamFit2D.hpp:17
BeamFit2D::mu_y
Double_t mu_y
Centroid.
Definition
BeamFit2D.hpp:18
BeamFit2D::ok
Bool_t ok
Whether the fit converged.
Definition
BeamFit2D.hpp:21
BeamFit2D::sigma_x
Double_t sigma_x
Definition
BeamFit2D.hpp:19
Moments2D
Second moments of a 2-D distribution over a bin range.
Definition
BeamFit2D.hpp:30
Moments2D::rho
Double_t rho
Correlation coefficient, in [-1, 1].
Definition
BeamFit2D.hpp:33
Moments2D::sigma_y
Double_t sigma_y
Weighted RMS widths.
Definition
BeamFit2D.hpp:32
Moments2D::sigma_x
Double_t sigma_x
Definition
BeamFit2D.hpp:32
Moments2D::mu_x
Double_t mu_x
Definition
BeamFit2D.hpp:31
Moments2D::mu_y
Double_t mu_y
Weighted centroid.
Definition
BeamFit2D.hpp:31
Moments2D::weight
Double_t weight
Total weight included; zero means the range held nothing above threshold.
Definition
BeamFit2D.hpp:34
tooling
include
BeamFit2D.hpp
Generated by
1.17.0