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

On-disk home of the per-strip (a,n) and (a,a') region cuts. More...

Functions

TString Dir ()
 Directory holding the region cut files.
TString Path (const char *name, Int_t reac)
 Path to one cut's file.
void Save (Int_t reac, TCutG *cut_an, TCutG *cut_aa, Double_t n_an_assigned=-1.0)
 Write a strip's two region cuts.
TCutG * Load (const char *name, Int_t reac)
 Load a cut from its per-cut file.
Double_t LoadAssigned (const char *name, Int_t reac)
 The attributed count stored with a cut.
void SaveFit (Int_t reac, const RegionFit &fit)
 Store the fitted components beside the (a,n) cut.

Detailed Description

On-disk home of the per-strip (a,n) and (a,a') region cuts.

Shared by strip-sum-scatter, which draws or loads them, and compute-regions, which fits them — so the two tools can never disagree about where a cut lives.

One cut per file, written RECREATE. Saving one strip's region therefore cannot touch another's, and never touches the scatter cache: cuts are applied at read time, so a new cut is picked up on the next read with no cache rebuild.

Function Documentation

◆ Dir()

TString RegionCutStore::Dir ( )

Directory holding the region cut files.

Definition at line 26 of file RegionCuts.cpp.

Referenced by Path(), and Save().

◆ Load()

TCutG * RegionCutStore::Load ( const char * name,
Int_t reac )

Load a cut from its per-cut file.

Parameters
nameCut name.
reacReaction strip index.
Returns
The cut, or null if the file holds none. The caller owns it.

Definition at line 129 of file RegionCuts.cpp.

◆ LoadAssigned()

Double_t RegionCutStore::LoadAssigned ( const char * name,
Int_t reac )

The attributed count stored with a cut.

Parameters
nameCut name.
reacReaction strip index.
Returns
The count, or -1 when the cut carries none.

Definition at line 98 of file RegionCuts.cpp.

◆ Path()

TString RegionCutStore::Path ( const char * name,
Int_t reac )

Path to one cut's file.

Parameters
nameCut name, e.g. the (a,n) or (a,a') label.
reacReaction strip index.

Definition at line 32 of file RegionCuts.cpp.

Referenced by Load(), LoadAssigned(), main(), and SaveFit().

◆ Save()

void RegionCutStore::Save ( Int_t reac,
TCutG * cut_an,
TCutG * cut_aa,
Double_t n_an_assigned = -1.0 )

Write a strip's two region cuts.

Parameters
reacReaction strip index.
cut_anThe (a,n) region.
cut_aaThe (a,a') region.
n_an_assignedEvents the fit attributed to the reaction component. When >= 0 this is stored beside the (a,n) cut, for the cross section to prefer over a geometric count of the region. Hand-drawn cuts have none, hence the -1 default.

Definition at line 56 of file RegionCuts.cpp.

Referenced by main().

◆ SaveFit()

void RegionCutStore::SaveFit ( Int_t reac,
const RegionFit & fit )

Store the fitted components beside the (a,n) cut.

Kept so a later step can weight events by the mixture's own posterior rather than by a geometric cut.

Parameters
reacReaction strip index.
fitFit to store.

Definition at line 81 of file RegionCuts.cpp.

Referenced by main().