MUSIC unknown
Analysis for the MUSIC active-target ionization chamber
Loading...
Searching...
No Matches
Constants.hpp
Go to the documentation of this file.
1#ifndef CONSTANTS_HPP
2#define CONSTANTS_HPP
3
4#include "DedupStrategy.hpp"
5#include "RunEpoch.hpp"
6#include "SlotLayout.hpp"
7#include <Rtypes.h>
8#include <RtypesCore.h>
9#include <TString.h>
10#include <iostream>
11#include <map>
12#include <utility>
13#include <vector>
14
29
40#ifndef MUSIC_HOT_PATH_LOGGING
41#define MUSIC_HOT_PATH_LOGGING 1
42#endif
43
56
67 std::map<Int_t, Int_t> POST_WINDOW_STRIPS;
70
73
76
81 Double_t REAC_JUMP_MAX;
82 Double_t END_STRIP_MAX;
83
86
90
94
99
118
123
134
136 Double_t OFFBEAM_DIST;
147
158
164
166
168
169 Int_t X_LO;
170 Int_t X_HI;
171
176 Double_t GATE_MIN;
177 Double_t GATE_MAX;
179
185 Int_t XBINS;
188 Int_t YBINS;
189
192 std::map<Int_t, std::pair<Double_t, Double_t>> Y_DISPLAY_RANGE;
193
195
196 Bool_t RERUN_SIM;
198
204
209
210 void SetDefaults();
211};
212
213// One TALYS calculation: what the plot calls it, and the input lines that
214// select it (see CrossSectionConfig::TALYS_MODELS).
215// One measured reaction channel; see CrossSectionConfig::CHANNELS.
225 TString name;
230 TString label;
238 std::vector<TString> talys_exits;
244 std::vector<std::vector<Double_t>> reference_xs;
246};
247
250 TString label;
251 std::vector<TString> keywords;
252};
253
262
265Int_t TargetGasA(TargetGas gas);
266
270
283
286 Int_t BEAM_A;
287 Int_t BEAM_Z;
289
302 std::vector<TalysModel> TALYS_MODELS;
303
307
311
319
326 std::vector<TString> EPOCHS;
327
333 std::vector<CrossSectionChannel> CHANNELS;
334
335 void SetDefaults();
336};
337
339public:
346
352 std::vector<Int_t> RUN_NUMBERS;
353 std::vector<RunEpoch> EPOCHS;
354 Int_t N_CHUNKS;
355
357
359 Int_t N_BOARDS;
362 std::vector<UShort_t> TIMING_REF_BOARD_CHANNELS;
363
377
379
402
406
408 Bool_t HAS_GRID;
411
414
416
421
423
427
430
438
444
447
452
453 Double_t GRID_MIN_ADC;
454 Double_t GRID_MAX_ADC;
455
458
462
467
468 std::map<std::pair<Int_t, Int_t>, TString> channelMap;
469 std::map<std::pair<Int_t, Int_t>, TString> channelMap64;
470 std::map<std::pair<Int_t, Int_t>, Long64_t> ttfOffsetPs;
471
473};
474
475namespace Constants {
478extern const DatasetConfig &cfg;
479
489void SetActiveEpoch(const RunEpoch *epoch);
490
492const RunEpoch *GetActiveEpoch();
500const RunEpoch *EpochForRun(Int_t run);
516RunEpoch MakeEpoch(const TString &name, const std::vector<Int_t> &runs);
520std::vector<Int_t> RunRange(Int_t first, Int_t last);
524const TString &ActiveFileTag();
525
527Int_t ActiveNBoards();
529Int_t ActiveNChannels();
531UShort_t ActiveTimingRefBoard();
533const std::vector<UShort_t> &ActiveTimingRefBoardChannels();
535Bool_t ActiveDoBoardSync();
537Bool_t ActiveDoSort();
539Bool_t ActiveHasCathode();
541Bool_t ActiveUseSolarisData();
543Double_t ActiveEventTimeWindowUs();
545const TString &ActiveReferenceChannel();
553Double_t ActiveStripEMinAdc();
555Double_t ActiveStripEMaxAdc();
557Double_t ActiveCathodeMaxAdc();
559Double_t ActiveGridMaxAdc();
561Double_t ActiveStrip0MaxAdc();
563Double_t ActiveStrip17MaxAdc();
565Double_t ActiveLeftEvenMaxAdc();
567Double_t ActiveLeftOddMaxAdc();
569Double_t ActiveRightEvenMaxAdc();
571Double_t ActiveRightOddMaxAdc();
572
574const std::vector<Int_t> &ActiveRunNumbers();
575
579Int_t ActiveMaxFiles();
580
589const std::map<std::pair<Int_t, Int_t>, TString> &ActiveChannelMap();
590} // namespace Constants
591
592#endif
Double_t TargetGasAtomsPerMolecule(TargetGas gas)
Atoms of the reacting species per molecule of fill gas.
Definition Constants.cpp:11
TargetGas
The fill gas the beam reacts in.
@ kHELIUM
Helium fill.
Int_t TargetGasA(TargetGas gas)
Mass number of the target nucleus in a fill gas.
Definition Constants.cpp:3
DedupStrategy
How to resolve more than one hit on the same channel within an event.
Fixed array indices for the per-event channel arrays.
Double_t PULSE_HISTORY_OWN_LO
Looser window for the long ends of the chain whose kernel is being fitted; the tight one above applie...
std::vector< Int_t > RUN_NUMBERS
Flat run list, used when EPOCHS is empty.
std::map< std::pair< Int_t, Int_t >, TString > channelMap
TString SOL_SPLIT_DIR
Double_t REFERENCE_CHANNEL_MIN_ADC
Double_t TIMING_MIN_ENERGY
Timing.
Double_t STRIP_DE_MIN_NORMED
Double_t PULSE_HISTORY_APPLY_MAX_US
Bool_t HAS_STRIP0
Double_t GRID_MIN_ADC
Double_t TIMING_SHIFT_COARSE_STEP_US
Double_t LEFT_ODD_MAX_ADC
UShort_t TIMING_REF_BOARD
Double_t TIMING_THRESH_DT_US
Double_t PULSE_HISTORY_OWN_HI
Double_t STRIP17_MAX_ADC
Double_t CATHODE_MAX_ADC
Double_t TIMING_MAX_ENERGY
Double_t PULSE_HISTORY_BEAM_LO
Bool_t HAS_CATHODE
TString SOL_BASE_DIR
Double_t STRIP_DE_OVERVIEW_MAX_NORMED
Double_t BEAM_GATE_NSIGMA_X
n-sigma of the per-strip beam gate in the beam calibration: strip s is gated by the ellipse on the (s...
Int_t N_BOARDS
Hardware layout.
StripSumScatterConfig STRIP_SUM_SCATTER_CONFIG
Bool_t HAS_STRIP17
Bool_t SKIP_CALIBRATION
Bool_t REJECT_FLAGGED_EVENTS
Double_t PULSE_HISTORY_BEAM_HI
Double_t STRIP_DE_MAX_NORMED
Double_t RIGHT_EVEN_MAX_ADC
Double_t TIMING_MAX_ABS_SHIFT_S
Bool_t TIMING_DO_SORT
Double_t EVENT_TIME_WINDOW_US
Bool_t IGNORE_STRIP_0
TString SIM_BEAM_FILE
Int_t SOL_N_SPLIT_WORKERS
Bool_t USE_SOLARIS_DATA
Data source.
Bool_t TIMING_DO_BOARD_SYNC
Double_t STRIP_E_MIN_ADC
DedupStrategy DEDUP_STRATEGY
TString REFERENCE_CHANNEL
Double_t CATHODE_E_MAX_NORMED
Double_t SOL_SPLIT_CHUNK_SECONDS
Int_t TIMING_SHIFT_MIN_NPTS
Double_t TOTAL_E_MAX_NORMED
Int_t SAVE_SAMPLE_TRACES
Number of sample traces to save during event build and normed summary passes (0 = disabled).
Int_t MAX_FUSED_WORKERS
Double_t STRIP_DE_OVERVIEW_MIN_NORMED
TString COMPASS_BASE_DIR
Double_t TIMING_OVERLAP_MARGIN_S
Double_t STRIP_E_MAX_ADC
Double_t TOTAL_E_MIN_ADC
Int_t PULSE_HISTORY_AMP_BINS
Kernel bands in the previous pulse's amplitude, in units of the channel's beam peak: 1 is one kernel ...
Double_t REFERENCE_CHANNEL_MAX_ADC
Double_t RIGHT_ODD_MAX_ADC
Bool_t SAVE_PLOTS
Double_t LEFT_EVEN_MAX_ADC
Bool_t IGNORE_STRIP_17
Double_t BEAM_GATE_NSIGMA_Y
std::map< std::pair< Int_t, Int_t >, Long64_t > ttfOffsetPs
Bool_t SKIP_EXISTING
Long64_t PULSE_HISTORY_MIN_EVENTS
Double_t TOTAL_E_MIN_NORMED
Int_t TIMING_SHIFT_MAX_SCAN_CANDIDATES
Double_t GRID_MAX_ADC
CrossSectionConfig CROSS_SECTION_CONFIG
Int_t MAX_GPU_CONCURRENT_SORTS
Double_t STRIP0_MAX_ADC
Bool_t IGNORE_SHORT_STRIPS
Double_t TOTAL_E_MAX_ADC
std::map< std::pair< Int_t, Int_t >, TString > channelMap64
Double_t TIMING_SHIFT_FINE_STEP_US
Double_t TIMING_SHIFT_FINE_HALF_WIDTH_US
std::vector< RunEpoch > EPOCHS
Bool_t USE_GPU_ACCELERATION
Bool_t PULSE_HISTORY_CORRECTION
Pole-zero pulse-history correction on the raw hits, before event building (see PulseHistory....
std::vector< UShort_t > TIMING_REF_BOARD_CHANNELS
DedupStrategy ActiveDedupStrategy()
How repeated hits on one slot are resolved.
const RunEpoch * GetActiveEpoch()
The currently active epoch, or null when none is set.
UShort_t ActiveTimingRefBoard()
Board the others are timing-aligned against.
RunEpoch MakeEpoch(const TString &name, const std::vector< Int_t > &runs)
Build an epoch prefilled from the flat configuration block.
Int_t ActiveMaxFiles()
Cap on subfiles processed per run for the active epoch.
Double_t ActiveReferenceChannelMaxAdc()
Upper energy gate on the seed channel, in ADC.
Double_t ActiveStrip17MaxAdc()
Strip 17 full scale, in ADC.
const TString & ActiveReferenceChannel()
Channel whose hits seed events.
Double_t ActiveLeftEvenMaxAdc()
Left-side ceiling for even strips, in ADC.
Double_t ActiveStripEMaxAdc()
Upper bound of the per-strip energy range, in ADC.
Bool_t ActiveDoBoardSync()
Whether to run the multi-board timing alignment.
Double_t ActiveEventTimeWindowUs()
Coincidence window for event building, in microseconds.
Bool_t ActiveDoSort()
Whether to time-sort hits before event building.
Double_t ActiveStripEMinAdc()
Lower bound of the per-strip energy range, in ADC.
Double_t ActiveRightEvenMaxAdc()
Right-side ceiling for even strips, in ADC.
const std::vector< Int_t > & ActiveRunNumbers()
Runs of the active epoch, or the flat RUN_NUMBERS when none is set.
const std::map< std::pair< Int_t, Int_t >, TString > & ActiveChannelMap()
The channel map in force.
Double_t ActiveLeftOddMaxAdc()
Left-side ceiling for odd strips, in ADC.
Double_t ActiveStrip0MaxAdc()
Strip 0 full scale, in ADC.
Double_t ActiveRightOddMaxAdc()
Right-side ceiling for odd strips, in ADC.
Double_t ActiveCathodeMaxAdc()
Cathode full scale, in ADC.
const std::vector< UShort_t > & ActiveTimingRefBoardChannels()
Reference channel per board, for the alignment.
Double_t ActiveReferenceChannelMinAdc()
Lower energy gate on the seed channel, in ADC.
const RunEpoch * EpochForRun(Int_t run)
The epoch owning a run number.
Int_t ActiveNBoards()
Boards in the active epoch's setup.
const TString & ActiveFileTag()
Output-name prefix of the active epoch.
Bool_t ActiveHasCathode()
Whether this era instrumented the cathode.
Double_t ActiveGridMaxAdc()
Grid full scale, in ADC.
const DatasetConfig & cfg
The active dataset's configuration, flat block.
Int_t ActiveNChannels()
Channels per board.
std::vector< Int_t > RunRange(Int_t first, Int_t last)
Consecutive run numbers, for MakeEpoch().
void SetActiveEpoch(const RunEpoch *epoch)
Set the epoch the Active*() accessors read from.
Bool_t ActiveUseSolarisData()
Whether this era's data is SOLARIS rather than CoMPASS.
One reaction channel the cross section is extracted for.
std::vector< std::vector< Double_t > > reference_xs
Published values to compare against, if any, one row per point: the effective centre-of-mass energy [...
std::vector< TString > talys_exits
Which of the residual channels TALYS wrote make up this channel's curve, as exit channels by name: wh...
TString label
The reaction as it appears in the plot title after the dataset name, e.g.
TString name
Names the region cut (region_<name>), the tag-efficiency records and the output figure.
What the cross section needs about the experiment rather than the analysis.
Int_t XS_STRIP_MIN
Reaction strips to report a cross section for.
std::vector< TString > EPOCHS
Epochs whose runs feed the cross-section chain (strip-sum-scatter, compute-regions,...
Double_t GAS_PRESSURE_TORR
At the pressure the gas was actually at rather than the nominal one.
TString BEAM_SIM_FILE
Simulated unreacted beam, read for the energy at each strip.
Int_t BEAM_A
Beam mass number, for the lab-to-centre-of-mass conversion; its Z and element symbol name it to a rea...
Bool_t EFFECTIVE_ENERGY
Report each strip at its effective centre-of-mass energy (Szegedi et al.
std::vector< TalysModel > TALYS_MODELS
Hauser-Feshbach predictions from TALYS.
std::vector< CrossSectionChannel > CHANNELS
The reaction channels measured on this dataset.
One acquisition period of a dataset.
Definition RunEpoch.hpp:37
Everything governing the reaction search in the strip-sum scatters.
Definition Constants.hpp:53
AnRegionMode
How compute-regions defines the (a,n) region.
Double_t PARITY_ASYM_MAX
Reject events whose even strips and odd strips disagree by more than this fraction,...
Double_t X_DISPLAY_MIN
Display-only windows for the strip-sum scatters (a.u.): the histograms are built over the fixed Scatt...
AnRegionMode AN_REGION_MODE
std::map< Int_t, Int_t > POST_WINDOW_STRIPS
Definition Constants.hpp:67
Int_t POST_TRIGGER_SUM_STRIPS
Strips summed onto the scatter y-axis after the trigger strip: y spans reac+1 .
Definition Constants.hpp:65
Bool_t REQUIRE_STRIP_16_BELOW_BEAM
Double_t REAC_JUMP_NSIGMA
Minimum jump at the reaction strip for a tag, in sigma of the measured strip-to-strip beam noise (Str...
Definition Constants.hpp:80
Int_t MAX_STRIP_SUM_WORKERS
Cap on worker threads for the scatter fill.
Definition Constants.hpp:69
Bool_t PLOT_PARITY_REJECTED_GRID
Diagnostic only: when set, run an extra pass over the events (gated by PARITY_ASYM_MAX > 0) that fill...
Bool_t ALT_DECODE_REGION_TRACES
Also render the selected region traces under the OTHER decode (long-side-only <-> L+R sum) from the s...
PureBeamGate PURE_BEAM_GATE
Definition Constants.hpp:55
Double_t REQUIRE_SMOOTHNESS_MAX_STEP
Definition Constants.hpp:75
Bool_t REQUIRE_BEAM_UPSTREAM_OF_REAC
Tolerance in sigma of each strip's measured beam spread (StripSumScatter::StripSigma).
Double_t AN_REGION_NSIGMA
compute-regions: the (a,n) region is the reaction component's AN_REGION_NSIGMA Mahalanobis ellipse fr...
Double_t BEAM_UPSTREAM_NSIGMA
Int_t REQUIRE_SMOOTHNESS_END_STRIP
Definition Constants.hpp:74
std::map< Int_t, std::pair< Double_t, Double_t > > Y_DISPLAY_RANGE
Per-reaction-strip y-axis display windows, overriding Y_DISPLAY_MIN/MAX for individual strips (displa...
Int_t BOTH_MULT_MAX
Both-ends multiplicity cut: reject an event when more than MAX strips in 1..COUNT_TO had BOTH ends fi...
Bool_t REGION_CUT_REDRAW
Redraw the regions for this reaction strip even if saved ones exist, and overwrite only that strip's ...
Definition Constants.hpp:98
One TALYS model variant to compare against.
TString label
Legend label for this model's curve.
std::vector< TString > keywords
TALYS keywords selecting the variant.