|
MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
|
Builds the strip-sum scatters, tags reactions, and draws the results. More...
#include <StripSumScatter.hpp>
Public Member Functions | |
| StripSumScatter () | |
| Construct with empty scatters and no cache loaded. | |
| ~StripSumScatter () | |
| Frees the scatters and the reservoir. | |
| void | Run () |
| Build or load the scatters, tag reactions, and draw everything. | |
| Bool_t | Prepare () |
| Measure the beam, then load the scatter cache or build it. | |
| void | SimTagReport () |
| Run the data selection over every simulated population: the event-level cuts (all but the beam gate, which is fitted on data) and the tag at every reaction strip with the one-tag rule, against the measured beam spread. | |
| void | DrawAllTaggedTraces (const TString &subdir) |
| Region-trace overlays of every tagged event, one figure per reaction strip, against the beam band. | |
Static Public Member Functions | |
| static TString | CacheName () |
| Filename of the scatter cache for this configuration. | |
| static void | PlaneXY (const Double_t *total, Int_t reac, Double_t &x, Double_t &y) |
| Where an event sits in the scatter plane for a given reaction strip. | |
| static Int_t | YLoOf (Int_t reac) |
| First strip of the post-trigger window summed onto y. | |
| static Int_t | YHiOf (Int_t reac) |
| Last strip of the post-trigger window, inclusive. | |
| static Int_t | ResolveTag (const EnergyView &ev, const std::vector< Bool_t > &pass) |
| The one strip an event is tagged at, among those whose tag passed (pass[ReacIndex]), per TAG_RESOLVE; -1 when none. | |
| static Bool_t | Condition (TagCut c, const EnergyView &ev, Int_t reac, const TagThresholds &T) |
| One tag condition on its own: whether c passes for reac under T, true where it does not apply at that strip. | |
| static Bool_t | ConditionActive (TagCut c, const TagThresholds &T) |
| Whether the configuration has condition c in force. | |
| static TagCut | RejectReason (const EnergyView &ev, Int_t reac) |
| Which condition of the tag an event fails first at a strip. | |
| static TagCut | RejectReason (const EnergyView &ev, Int_t reac, const TagThresholds &T) |
| RejectReason under an explicit threshold set. | |
| static TagCut | TailReason (const EnergyView &ev, Int_t reac, const TagThresholds &T) |
| The tail-shape part of RejectReason: kTAG_PASS or the first failing tail condition, under an explicit threshold set. | |
| static Bool_t | IsPileup (const EnergyView &ev) |
| The event-level pileup and noise cuts (PILEUP_* / NOISE_*), in sigma of the measured beam spread. | |
| static Bool_t | IsNoise (const EnergyView &ev) |
| static Bool_t | IsPileup (const EnergyView &ev, Double_t nsigma) |
| static Bool_t | IsNoise (const EnergyView &ev, Double_t nsigma) |
| static Double_t | MaxStepNSigma (const EnergyView &ev) |
| The largest strip-to-strip step of the trace, |E(s) - E(s-1)| over strips 2 to the last in sigma of strip s's measured spread, with the single largest rise left out (the reaction jump); strips without a measured spread are skipped. | |
| static Bool_t | IsSmooth (const EnergyView &ev, Double_t nsigma) |
| The event-level smoothness cut: MaxStepNSigma() at or under nsigma, or the cut is off (nsigma <= 0). | |
| static TagThresholds | NominalThresholds () |
| The thresholds the configuration sets. | |
| static std::vector< std::pair< TString, TagThresholds > > | ThresholdVariants () |
| The cut-variation set: each active threshold shifted up and down by its configured step (CUT_VARIATION_*), one at a time, named <threshold>+ and <threshold>-. | |
| static std::vector< SelectionStep > | DescribeSelection () |
| The whole selection as the configuration sets it, in order. | |
Measured beam noise | |
Measured once from the data and stamped into the cache. Set before any tagging begins and read-only afterwards, which is what makes them safe to share across the worker threads without synchronisation. | |
| static Double_t | StripSigma (Int_t strip) |
| Width of the beam's deposit on a strip, from the gated beam sample of the first run (MeasureBeamNoise). | |
| static Double_t | StripMean (Int_t strip) |
| Mean of the beam's deposit on a strip over the same sample; the level every cut measures from. | |
| static void | SetStripNoise (const Double_t *mean, const Double_t *sigma) |
| Install the per-strip beam means and sigmas. | |
| static Double_t | JumpMin (Int_t reac) |
| Minimum jump for a tag: REAC_JUMP_NSIGMA * StripSigma(reac). | |
Builds the strip-sum scatters, tags reactions, and draws the results.
The entry point behind the strip-sum-scatter binary. Fills per-strip scatters from the events files, caches them alongside a reservoir of tagged events, and draws the regions and trace overlays.
Definition at line 332 of file StripSumScatter.hpp.
| StripSumScatter::StripSumScatter | ( | ) |
Construct with empty scatters and no cache loaded.
Definition at line 50 of file StripSumScatter.cpp.
| StripSumScatter::~StripSumScatter | ( | ) |
Frees the scatters and the reservoir.
Definition at line 69 of file StripSumScatter.cpp.
|
static |
Filename of the scatter cache for this configuration.
Definition at line 807 of file StripSumScatter.cpp.
|
static |
One tag condition on its own: whether c passes for reac under T, true where it does not apply at that strip.
Each condition on its own.
The tail-shape ones follow the published 87Rb per-strip macros (TracesVisu2.C at A9-A11), each in sigma of the measured noise; all are numerator-only: they describe the residue, not the beam. A strip whose noise was not measured is skipped. A condition that does not apply at this strip (a window past the last strip, the cliff with no strip between the reaction and the end) passes.
Definition at line 247 of file StripSumScatter.cpp.
Referenced by RejectReason(), and TailReason().
|
static |
Whether the configuration has condition c in force.
Definition at line 218 of file StripSumScatter.cpp.
Referenced by RejectReason(), and TailReason().
|
static |
The whole selection as the configuration sets it, in order.
Input and beam reference, the event-level cuts, the tag conditions per reaction strip and what becomes of a tag, each with its configured numbers and whether it is on. Read by WriteCutReport() for the on/off columns and by SelectionDiagram for the block diagram, so it is kept beside RejectReason and must follow its order.
Definition at line 406 of file StripSumScatter.cpp.
Referenced by Prepare().
| void StripSumScatter::DrawAllTaggedTraces | ( | const TString & | subdir | ) |
Region-trace overlays of every tagged event, one figure per reaction strip, against the beam band.
The all-tagged mode's counterpart of the interactive overlay: no region cut, and every event tagged at the strip is drawn with no cap (the TRACES_PER_CLASS cap applies to the beam sample only), in calibrated units, in raw ADC when PLOT_ADC_TRACES, and as mean traces when PLOT_REGION_MEAN_TRACES. Needs the reservoir, so call after Prepare().
| subdir | Plot subdirectory the figures go to. |
Definition at line 3397 of file StripSumScatter.cpp.
Referenced by main().
|
static |
Definition at line 741 of file StripSumScatter.cpp.
Referenced by IsNoise(), and SimTagReport().
|
static |
Definition at line 745 of file StripSumScatter.cpp.
|
static |
The event-level pileup and noise cuts (PILEUP_* / NOISE_*), in sigma of the measured beam spread.
Definition at line 721 of file StripSumScatter.cpp.
Referenced by IsPileup(), and SimTagReport().
|
static |
Definition at line 725 of file StripSumScatter.cpp.
|
static |
The event-level smoothness cut: MaxStepNSigma() at or under nsigma, or the cut is off (nsigma <= 0).
Definition at line 782 of file StripSumScatter.cpp.
Referenced by SimTagReport().
|
static |
Minimum jump for a tag: REAC_JUMP_NSIGMA * StripSigma(reac).
| reac | Reaction strip index. |
Definition at line 198 of file StripSumScatter.cpp.
Referenced by Prepare().
|
static |
The largest strip-to-strip step of the trace, |E(s) - E(s-1)| over strips 2 to the last in sigma of strip s's measured spread, with the single largest rise left out (the reaction jump); strips without a measured spread are skipped.
Definition at line 760 of file StripSumScatter.cpp.
Referenced by IsSmooth().
|
static |
The thresholds the configuration sets.
Definition at line 112 of file StripSumScatter.cpp.
Referenced by RejectReason(), and ThresholdVariants().
|
static |
Where an event sits in the scatter plane for a given reaction strip.
x is the sum over X_LO..X_HI; y is the sum over the post-trigger window.
| total | Calibrated per-strip totals for the event. | |
| reac | Reaction strip index. | |
| [out] | x | Plane x coordinate. |
| [out] | y | Plane y coordinate. |
Definition at line 793 of file StripSumScatter.cpp.
| Bool_t StripSumScatter::Prepare | ( | ) |
Measure the beam, then load the scatter cache or build it.
Everything Run() does before any overlay: the first run's beam mean and width per strip, the cache fingerprint, a load of a matching cache or a fill and write of a fresh one, and the batch scatter figures. Leaves the scatters and the trace reservoir in memory. compute-regions calls this in the all-tagged mode so strip-sum-scatter itself never has to be run. Writes the selection diagram (SelectionDiagram::Write) first, before any data are read.
Definition at line 3295 of file StripSumScatter.cpp.
|
static |
Which condition of the tag an event fails first at a strip.
The per-strip conditions only: the event-level cuts (PreCut, every strip fired among them) are applied once per event by the fill, before any strip is asked about, and are assumed here.
| ev | Decoded event. |
| reac | Reaction strip index. |
Definition at line 350 of file StripSumScatter.cpp.
Referenced by RejectReason(), and SimTagReport().
|
static |
RejectReason under an explicit threshold set.
Definition at line 342 of file StripSumScatter.cpp.
|
static |
The one strip an event is tagged at, among those whose tag passed (pass[ReacIndex]), per TAG_RESOLVE; -1 when none.
| ev | Decoded event. |
| pass | Per-strip pass flags, indexed from REACTION_STRIP_MIN. |
Definition at line 354 of file StripSumScatter.cpp.
Referenced by SimTagReport().
| void StripSumScatter::Run | ( | ) |
Build or load the scatters, tag reactions, and draw everything.
The entry point called from main_strip_sum_scatter.cpp: Prepare(), then the optional simulation overlays and the interactive region-trace overlay for the candidate strip.
Definition at line 3381 of file StripSumScatter.cpp.
Referenced by main().
|
static |
Install the per-strip beam means and sigmas.
Call before tagging starts.
| mean | 18 values, one per strip; null means 1.0 everywhere. |
| sigma | 18 values, one per strip. |
Definition at line 104 of file StripSumScatter.cpp.
| void StripSumScatter::SimTagReport | ( | ) |
Run the data selection over every simulated population: the event-level cuts (all but the beam gate, which is fitted on data) and the tag at every reaction strip with the one-tag rule, against the measured beam spread.
Per file: the event-level funnel, the first failing condition at the file's own strip, and where the event's one tag went. Printed and written to plots/strip_sum_scatter/sim_tag_report.txt. No correction is derived from it. Needs the strip noise set (Prepare, or SetStripNoise from the cache).
Definition at line 1656 of file StripSumScatter.cpp.
|
static |
Mean of the beam's deposit on a strip over the same sample; the level every cut measures from.
1.0 when none was installed.
| strip | Strip index. |
Definition at line 100 of file StripSumScatter.cpp.
Referenced by Condition(), IsNoise(), and IsPileup().
|
static |
Width of the beam's deposit on a strip, from the gated beam sample of the first run (MeasureBeamNoise).
| strip | Strip index. |
Definition at line 96 of file StripSumScatter.cpp.
Referenced by Condition(), IsNoise(), IsPileup(), JumpMin(), MaxStepNSigma(), and ResolveTag().
|
static |
The tail-shape part of RejectReason: kTAG_PASS or the first failing tail condition, under an explicit threshold set.
Definition at line 332 of file StripSumScatter.cpp.
|
static |
The cut-variation set: each active threshold shifted up and down by its configured step (CUT_VARIATION_*), one at a time, named <threshold>+ and <threshold>-.
Empty when CUT_VARIATION is off.
Definition at line 135 of file StripSumScatter.cpp.
|
static |
Last strip of the post-trigger window, inclusive.
| reac | Reaction strip index. |
Definition at line 82 of file StripSumScatter.cpp.
Referenced by Condition(), and PlaneXY().
|
static |
First strip of the post-trigger window summed onto y.
| reac | Reaction strip index. |
Definition at line 80 of file StripSumScatter.cpp.
Referenced by PlaneXY().