MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches
RegionCutFinder Namespace Reference

Finding regions by fitting a two-component mixture to the scatter. More...

Functions

RegionFit FitMixture (TH2F *scatter, Int_t reac, Double_t x_lo, Double_t x_hi, Double_t y_lo, Double_t y_hi)
 Fit the two-component mixture to one strip's scatter.
TCutG * EllipseCut (const char *name, const Gauss2D &g, Double_t nsigma, Int_t npts=64)
 Closed polygon of a component's Mahalanobis contour.
RegionFit FitBeam (TH2F *scatter, Int_t reac, Double_t x_lo, Double_t x_hi, Double_t y_lo, Double_t y_hi)
 Fit the beam component alone, with no reaction component.
Double_t AboveRidge (const Gauss2D &beam, Double_t x, Double_t y)
 How far a point sits above the beam ridge, in conditional sigma.
TCutG * RidgeBandCut (const char *name, const Gauss2D &beam, Double_t nsig_lo, Double_t nsig_hi, Double_t x_lo, Double_t x_hi, Double_t y_lo, Double_t y_hi)
 Closed polygon of a band above the beam ridge.
Double_t CountInside (TH2F *scatter, TCutG *cut, const RegionFit &fit)
 Count scatter events inside a cut.
void SaveFigures (TH2F *scatter, Int_t reac, const RegionFit &fit, TCutG *an, TCutG *aa, const TString &subdir)
 Save the diagnostic figures for a strip's regions.

Detailed Description

Finding regions by fitting a two-component mixture to the scatter.

This is ApJ 983:142's "two Gaussian peaks" carried into two dimensions. The two populations separate along the beam ridge's diagonal, which 1-D projections wash out, and the reaction island is a few times 1e-4 of the scatter.

The fit is staged accordingly: the beam-like component is pinned from its own core, the reaction component is seeded at the first local maximum above the ridge, and the mixture is fitted only above the core, so that the island rather than the 1e5-count peak decides the second component.

Function Documentation

◆ AboveRidge()

Double_t RegionCutFinder::AboveRidge ( const Gauss2D & beam,
Double_t x,
Double_t y )

How far a point sits above the beam ridge, in conditional sigma.

The residual of y about the ridge line, in units of the beam's conditional width sigma_y * sqrt(1 - rho^2).

Parameters
beamFitted beam component.
xPoint x.
yPoint y.
Returns
The height in sigma; negative below the ridge.

Definition at line 468 of file RegionCuts.cpp.

Referenced by FitMixture().

◆ CountInside()

Double_t RegionCutFinder::CountInside ( TH2F * scatter,
TCutG * cut,
const RegionFit & fit )

Count scatter events inside a cut.

Parameters
scatterScatter histogram.
cutRegion to count within.
fitFit supplying the window; only bins inside it are considered.
Returns
Summed contents of the bins whose centre lies inside cut.

Definition at line 528 of file RegionCuts.cpp.

Referenced by main().

◆ EllipseCut()

TCutG * RegionCutFinder::EllipseCut ( const char * name,
const Gauss2D & g,
Double_t nsigma,
Int_t npts = 64 )

Closed polygon of a component's Mahalanobis contour.

Parameters
nameName for the returned cut.
gComponent to contour.
nsigmaContour level, in Mahalanobis sigma.
nptsPolygon vertices; more gives a smoother ellipse.
Returns
The cut. The caller owns it.

Definition at line 512 of file RegionCuts.cpp.

Referenced by main(), and SaveFigures().

◆ FitBeam()

RegionFit RegionCutFinder::FitBeam ( TH2F * scatter,
Int_t reac,
Double_t x_lo,
Double_t x_hi,
Double_t y_lo,
Double_t y_hi )

Fit the beam component alone, with no reaction component.

Pinned from its core exactly as FitMixture() does, but returns a fit with has_reac == kFALSE. For the ridge-band region mode, where the (a,n) population is not a compact island and so cannot be modelled as a second Gaussian.

Parameters
scatterScatter histogram. Must not be null.
reacReaction strip index.
x_loFit window, lower x.
x_hiFit window, upper x.
y_loFit window, lower y.
y_hiFit window, upper y.
Returns
The beam-only fit.

Definition at line 473 of file RegionCuts.cpp.

Referenced by main().

◆ FitMixture()

RegionFit RegionCutFinder::FitMixture ( TH2F * scatter,
Int_t reac,
Double_t x_lo,
Double_t x_hi,
Double_t y_lo,
Double_t y_hi )

Fit the two-component mixture to one strip's scatter.

Parameters
scatterScatter histogram for the strip. Must not be null.
reacReaction strip index.
x_loFit window, lower x.
x_hiFit window, upper x.
y_loFit window, lower y.
y_hiFit window, upper y.
Returns
The fit; check RegionFit::ok, and RegionFit::why when it is false.

Definition at line 311 of file RegionCuts.cpp.

Referenced by main().

◆ RidgeBandCut()

TCutG * RegionCutFinder::RidgeBandCut ( const char * name,
const Gauss2D & beam,
Double_t nsig_lo,
Double_t nsig_hi,
Double_t x_lo,
Double_t x_hi,
Double_t y_lo,
Double_t y_hi )

Closed polygon of a band above the beam ridge.

The (a,n) region in AN_REGION_RIDGE_BAND mode. Spans the window in x and is clipped to the window in y.

Parameters
nameName for the returned cut.
beamFitted beam component defining the ridge.
nsig_loLower band edge, in conditional sigma above the ridge.
nsig_hiUpper band edge.
x_loWindow, lower x.
x_hiWindow, upper x.
y_loWindow, lower y.
y_hiWindow, upper y.
Returns
The cut. The caller owns it.

Definition at line 491 of file RegionCuts.cpp.

Referenced by main().

◆ SaveFigures()

void RegionCutFinder::SaveFigures ( TH2F * scatter,
Int_t reac,
const RegionFit & fit,
TCutG * an,
TCutG * aa,
const TString & subdir )

Save the diagnostic figures for a strip's regions.

The scatter with both regions drawn, then each projection with the fitted mixture's projection overlaid — so a region that landed somewhere silly is visible rather than merely wrong.

Parameters
scatterScatter histogram.
reacReaction strip index.
fitFit to overlay.
anThe (a,n) region.
aaThe (a,a') region.
subdirPlot subdirectory under the plots base.

Definition at line 540 of file RegionCuts.cpp.

Referenced by main().