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

Functions

Long64_t LookupTTFOffsetPs (Int_t board, Int_t channel)
 Timing offset to apply to one channel's TTF timestamp.
void SetActiveEpoch (const RunEpoch *epoch)
 Set the epoch the Active*() accessors read from.
const RunEpochGetActiveEpoch ()
 The currently active epoch, or null when none is set.
const RunEpochEpochForRun (Int_t run)
 The epoch owning a run number.
RunEpoch MakeEpoch (const TString &name, const std::vector< Int_t > &runs)
 Build an epoch prefilled from the flat configuration block.
std::vector< Int_t > RunRange (Int_t first, Int_t last)
 Consecutive run numbers, for MakeEpoch().
const TString & ActiveFileTag ()
 Output-name prefix of the active epoch.
Int_t ActiveNBoards ()
 Boards in the active epoch's setup.
Int_t ActiveNChannels ()
 Channels per board.
UShort_t ActiveTimingRefBoard ()
 Board the others are timing-aligned against.
const std::vector< UShort_t > & ActiveTimingRefBoardChannels ()
 Reference channel per board, for the alignment.
Bool_t ActiveDoBoardSync ()
 Whether to run the multi-board timing alignment.
Bool_t ActiveDoSort ()
 Whether to time-sort hits before event building.
Bool_t ActiveHasCathode ()
 Whether this era instrumented the cathode.
Bool_t ActiveUseSolarisData ()
 Whether this era's data is SOLARIS rather than CoMPASS.
Double_t ActiveEventTimeWindowUs ()
 Coincidence window for event building, in microseconds.
const TString & ActiveReferenceChannel ()
 Channel whose hits seed events.
Double_t ActiveReferenceChannelMinAdc ()
 Lower energy gate on the seed channel, in ADC.
Double_t ActiveReferenceChannelMaxAdc ()
 Upper energy gate on the seed channel, in ADC.
DedupStrategy ActiveDedupStrategy ()
 How repeated hits on one slot are resolved.
Double_t ActiveStripEMinAdc ()
 Lower bound of the per-strip energy range, in ADC.
Double_t ActiveStripEMaxAdc ()
 Upper bound of the per-strip energy range, in ADC.
Double_t ActiveCathodeMaxAdc ()
 Cathode full scale, in ADC.
Double_t ActiveGridMaxAdc ()
 Grid full scale, in ADC.
Double_t ActiveStrip0MaxAdc ()
 Strip 0 full scale, in ADC.
Double_t ActiveStrip17MaxAdc ()
 Strip 17 full scale, in ADC.
Double_t ActiveLeftEvenMaxAdc ()
 Left-side ceiling for even strips, in ADC.
Double_t ActiveLeftOddMaxAdc ()
 Left-side ceiling for odd strips, in ADC.
Double_t ActiveRightEvenMaxAdc ()
 Right-side ceiling for even strips, in ADC.
Double_t ActiveRightOddMaxAdc ()
 Right-side ceiling for odd strips, in ADC.
const std::vector< Int_t > & ActiveRunNumbers ()
 Runs of the active epoch, or the flat RUN_NUMBERS when none is set.
Int_t ActiveMaxFiles ()
 Cap on subfiles processed per run for the active epoch.
const std::map< std::pair< Int_t, Int_t >, TString > & ActiveChannelMap ()
 The channel map in force.

Variables

const DatasetConfigcfg
 The active dataset's configuration, flat block.
const Int_t ARR_SLOT_STRIP_0 = 0
 First anode strip, occupying the low end of the array.
const Int_t ARR_SLOT_STRIP_17 = 33
 Last anode strip. Strips run contiguously from ARR_SLOT_STRIP_0 to here.
const Int_t ARR_SLOT_CATHODE = 34
 Cathode signal.
const Int_t ARR_SLOT_GRID = 35
 Frisch grid signal.
const Int_t N_ARR_SLOTS = ARR_SLOT_GRID + 1
 Length of the per-event channel arrays.

Function Documentation

◆ ActiveCathodeMaxAdc()

Double_t Constants::ActiveCathodeMaxAdc ( )

Cathode full scale, in ADC.

Definition at line 369 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveChannelMap()

const std::map< std::pair< Int_t, Int_t >, TString > & Constants::ActiveChannelMap ( )

The channel map in force.

Returns
The active epoch's map when one is set, else the 64-channel map if populated, else the base map.
Warning
Aborts the process when none is configured. A run with no channel map cannot be interpreted at all, so continuing would produce confidently wrong output.

Definition at line 408 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), PulseHistory::BuildGroupMap(), Timing::BuildLongChannelList(), and EventBuilder::BuildSlotMap().

◆ ActiveDedupStrategy()

DedupStrategy Constants::ActiveDedupStrategy ( )

How repeated hits on one slot are resolved.

Definition at line 360 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and FinalizeEvent().

◆ ActiveDoBoardSync()

Bool_t Constants::ActiveDoBoardSync ( )

Whether to run the multi-board timing alignment.

Definition at line 332 of file Constants.cpp.

Referenced by Timing::CalcTimeShiftsBeamMethodFromHits(), and RunFusedPipelineForFile().

◆ ActiveDoSort()

Bool_t Constants::ActiveDoSort ( )

Whether to time-sort hits before event building.

Definition at line 335 of file Constants.cpp.

Referenced by RunFusedPipelineForFile().

◆ ActiveEventTimeWindowUs()

Double_t Constants::ActiveEventTimeWindowUs ( )

Coincidence window for event building, in microseconds.

Definition at line 345 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and PulseHistory::Measure().

◆ ActiveFileTag()

const TString & Constants::ActiveFileTag ( )

Output-name prefix of the active epoch.

Returns
The tag, or an empty string when none is set — leaving existing filenames unchanged.

Definition at line 402 of file Constants.cpp.

Referenced by FileSet::EventsName(), and FileSet::FileLabel().

◆ ActiveGridMaxAdc()

Double_t Constants::ActiveGridMaxAdc ( )

Grid full scale, in ADC.

Definition at line 372 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveHasCathode()

Bool_t Constants::ActiveHasCathode ( )

Whether this era instrumented the cathode.

Definition at line 338 of file Constants.cpp.

Referenced by CreateSummaryHistograms().

◆ ActiveLeftEvenMaxAdc()

Double_t Constants::ActiveLeftEvenMaxAdc ( )

Left-side ceiling for even strips, in ADC.

Definition at line 381 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveLeftOddMaxAdc()

Double_t Constants::ActiveLeftOddMaxAdc ( )

Left-side ceiling for odd strips, in ADC.

Definition at line 384 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveMaxFiles()

Int_t Constants::ActiveMaxFiles ( )

Cap on subfiles processed per run for the active epoch.

Returns
The cap, or -1 for all — which is also the answer with no epoch set.

Definition at line 406 of file Constants.cpp.

◆ ActiveNBoards()

Int_t Constants::ActiveNBoards ( )

◆ ActiveNChannels()

Int_t Constants::ActiveNChannels ( )

◆ ActiveReferenceChannel()

const TString & Constants::ActiveReferenceChannel ( )

Channel whose hits seed events.

Definition at line 349 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and PulseHistory::Measure().

◆ ActiveReferenceChannelMaxAdc()

Double_t Constants::ActiveReferenceChannelMaxAdc ( )

Upper energy gate on the seed channel, in ADC.

Definition at line 356 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and PulseHistory::Measure().

◆ ActiveReferenceChannelMinAdc()

Double_t Constants::ActiveReferenceChannelMinAdc ( )

Lower energy gate on the seed channel, in ADC.

Definition at line 352 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), and PulseHistory::Measure().

◆ ActiveRightEvenMaxAdc()

Double_t Constants::ActiveRightEvenMaxAdc ( )

Right-side ceiling for even strips, in ADC.

Definition at line 387 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveRightOddMaxAdc()

Double_t Constants::ActiveRightOddMaxAdc ( )

Right-side ceiling for odd strips, in ADC.

Definition at line 391 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveRunNumbers()

const std::vector< Int_t > & Constants::ActiveRunNumbers ( )

Runs of the active epoch, or the flat RUN_NUMBERS when none is set.

Definition at line 395 of file Constants.cpp.

◆ ActiveStrip0MaxAdc()

Double_t Constants::ActiveStrip0MaxAdc ( )

Strip 0 full scale, in ADC.

Definition at line 375 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveStrip17MaxAdc()

Double_t Constants::ActiveStrip17MaxAdc ( )

Strip 17 full scale, in ADC.

Definition at line 378 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveStripEMaxAdc()

Double_t Constants::ActiveStripEMaxAdc ( )

Upper bound of the per-strip energy range, in ADC.

Definition at line 366 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits(), FindBeamGateStrips(), and PulseHistory::Measure().

◆ ActiveStripEMinAdc()

Double_t Constants::ActiveStripEMinAdc ( )

Lower bound of the per-strip energy range, in ADC.

Definition at line 363 of file Constants.cpp.

Referenced by EventBuilder::BuildEventsFromSortedHits().

◆ ActiveTimingRefBoard()

UShort_t Constants::ActiveTimingRefBoard ( )

Board the others are timing-aligned against.

Definition at line 325 of file Constants.cpp.

Referenced by RunFusedPipelineForFile().

◆ ActiveTimingRefBoardChannels()

const std::vector< UShort_t > & Constants::ActiveTimingRefBoardChannels ( )

Reference channel per board, for the alignment.

Definition at line 328 of file Constants.cpp.

Referenced by RunFusedPipelineForFile().

◆ ActiveUseSolarisData()

Bool_t Constants::ActiveUseSolarisData ( )

Whether this era's data is SOLARIS rather than CoMPASS.

Definition at line 341 of file Constants.cpp.

Referenced by EnsureRunHeaderFused(), and RunFusedPipelineForFile().

◆ EpochForRun()

const RunEpoch * Constants::EpochForRun ( Int_t run)

The epoch owning a run number.

Parameters
runRun number.
Returns
The epoch, or null when no untagged epoch declares it.
Note
A tagged epoch reuses another era's run numbers and is addressed by tag, never by number alone — see RunEpoch::file_tag.

Definition at line 234 of file Constants.cpp.

◆ GetActiveEpoch()

const RunEpoch * Constants::GetActiveEpoch ( )

The currently active epoch, or null when none is set.

Definition at line 232 of file Constants.cpp.

◆ LookupTTFOffsetPs()

Long64_t Constants::LookupTTFOffsetPs ( Int_t board,
Int_t channel )
inline

Timing offset to apply to one channel's TTF timestamp.

The trapezoidal trigger filter introduces a channel-dependent delay, so timestamps from different boards and channels need aligning before events can be built across them. The offsets are a per-dataset measurement, held in Constants::cfg.ttfOffsetPs.

Parameters
boardDigitiser board id.
channelChannel index on that board.
Returns
The offset in picoseconds, or 0 for a channel with no entry. An empty ttfOffsetPs therefore disables the correction entirely rather than failing.

Definition at line 30 of file ChannelTiming.hpp.

Referenced by Timing::ApplyShiftsInPlace().

◆ MakeEpoch()

RunEpoch Constants::MakeEpoch ( const TString & name,
const std::vector< Int_t > & runs )

Build an epoch prefilled from the flat configuration block.

Carries the hardware layout, timing, reference channel, dedup strategy, ADC caps and channel map, so a dataset states its detector settings once and its epochs as one line each. Override fields on the result for an epoch that genuinely differs.

Parameters
nameEpoch name.
runsRun numbers belonging to it.
Returns
The prefilled epoch.
Warning
Call this after the flat block is set; it copies whatever is there at the time.

Definition at line 249 of file Constants.cpp.

◆ RunRange()

std::vector< Int_t > Constants::RunRange ( Int_t first,
Int_t last )

Consecutive run numbers, for MakeEpoch().

Parameters
firstFirst run, inclusive.
lastLast run, inclusive.

Definition at line 281 of file Constants.cpp.

◆ SetActiveEpoch()

void Constants::SetActiveEpoch ( const RunEpoch * epoch)

Set the epoch the Active*() accessors read from.

Pipeline sets this around each epoch's work. Every Active*() accessor reads it when set and falls back to the flat configuration block otherwise, so a dataset declaring no epochs behaves exactly as it did before epochs existed.

Parameters
epochEpoch to activate, or null to fall back to the flat block.

Definition at line 231 of file Constants.cpp.

Referenced by main(), and Pipeline::Run().

Variable Documentation

◆ ARR_SLOT_CATHODE

const Int_t Constants::ARR_SLOT_CATHODE = 34

◆ ARR_SLOT_GRID

const Int_t Constants::ARR_SLOT_GRID = 35

Frisch grid signal.

Definition at line 23 of file SlotLayout.hpp.

Referenced by EventBuilder::AssignHit(), and EventBuilder::BuildSlotMap().

◆ ARR_SLOT_STRIP_0

const Int_t Constants::ARR_SLOT_STRIP_0 = 0

First anode strip, occupying the low end of the array.

Definition at line 19 of file SlotLayout.hpp.

Referenced by EventBuilder::AssignHit(), and EventBuilder::BuildSlotMap().

◆ ARR_SLOT_STRIP_17

const Int_t Constants::ARR_SLOT_STRIP_17 = 33

Last anode strip. Strips run contiguously from ARR_SLOT_STRIP_0 to here.

Definition at line 21 of file SlotLayout.hpp.

Referenced by EventBuilder::AssignHit(), and EventBuilder::BuildSlotMap().

◆ cfg

const DatasetConfig& Constants::cfg
extern

The active dataset's configuration, flat block.

Prefer the Active*() accessors, which respect the epoch layer.

Referenced by ActiveCathodeMaxAdc(), ActiveChannelMap(), ActiveDedupStrategy(), ActiveDoBoardSync(), ActiveDoSort(), ActiveEventTimeWindowUs(), ActiveGridMaxAdc(), ActiveHasCathode(), ActiveLeftEvenMaxAdc(), ActiveLeftOddMaxAdc(), ActiveNBoards(), ActiveNChannels(), ActiveReferenceChannel(), ActiveReferenceChannelMaxAdc(), ActiveReferenceChannelMinAdc(), ActiveRightEvenMaxAdc(), ActiveRightOddMaxAdc(), ActiveRunNumbers(), ActiveStrip0MaxAdc(), ActiveStrip17MaxAdc(), ActiveStripEMaxAdc(), ActiveStripEMinAdc(), ActiveTimingRefBoard(), ActiveTimingRefBoardChannels(), ActiveUseSolarisData(), PulseHistory::Apply(), EventBuilder::BuildEventsFromSortedHits(), EventsSummary::BuildNormedSummaryHistograms(), EventsSummary::BuildTraceFromTotals(), StripSumScatter::CacheName(), BeamEnergies::CmFraction(), CollectAnchorSamplesOneSubfile(), FileSet::CompassBinPath(), CreateSummaryHistograms(), EnergyView::Decode(), FileSet::DiscoverRunSuffixes(), FileSet::DiscoverSolRunSuffixes(), DiscoverSolRunSuffixesFromBase(), EpochForRun(), FinalizeEvent(), FindBeamGateStrips(), Timing::FindShiftBeam(), FindStripCentroidAlignment(), GpuAccel::Init(), StripSumScatter::JumpMin(), LookupTTFOffsetPs(), main(), main(), main(), MakeEpoch(), PulseHistory::Measure(), StripSumScatter::PassesReaction(), StripSumScatter::PlaneXY(), Timing::PlotCostLandscape(), Timing::PlotExtremeEvents2D(), CalibrateBeam::Run(), CrossSection::Run(), Pipeline::Run(), StripSumScatter::Run(), TagEfficiency::Run(), RunFusedPipelineForFile(), SaveAndDeleteSummaryHistograms(), SaveBeamPeakChannelHistograms(), CalibrateBeam::SaveCalibSampleOverlay(), SaveDynamicRangeOverlay(), PulseHistory::SavePlots(), SaveRidgeFitPlots(), EventsSummary::SaveSampleTraces(), ScanShiftRange(), BeamEnergies::SimPath(), FileSet::SolBinPath(), StripSumScatter::StripSumScatter(), GpuAccel::TryAcquireSortSlot(), PulseHistory::WriteToEventsFile(), and StripSumScatter::YHiOf().

◆ N_ARR_SLOTS

const Int_t Constants::N_ARR_SLOTS = ARR_SLOT_GRID + 1

Length of the per-event channel arrays.

Indices run 0 to ARR_SLOT_GRID inclusive, so this is one past the last valid slot.

Definition at line 27 of file SlotLayout.hpp.

Referenced by EventBuilder::AssignHit(), EventsSummary::BuildNormedSummaryHistograms(), FinalizeEvent(), EventBuilder::ResetEventState(), and EventBuilder::ResetPerChannelData().