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.
Double_t AboveRidge (const Gauss2D &beam, Double_t x, Double_t y)
 How far a point sits above the beam ridge, in conditional sigma.
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.

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 395 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 416 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 400 of file RegionCuts.cpp.

Referenced by main(), and SaveFigures().

◆ 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 258 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 428 of file RegionCuts.cpp.

Referenced by main().