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

Locating and naming the simulated data for a dataset's reactions. More...

#include <RemixSim.hpp>

Classes

struct  SimFileSpec
 One simulated dataset, identified by its tag. More...
struct  Event
 One entry of a simulation's events_MeV tree. More...

Static Public Member Functions

static TString ControlDir ()
 Absolute path to the control directory, <dataset>/sim_control.
static TString TagFromControlFile (const TString &filepath)
 Extract the simulation tag from a control file.
static std::vector< SimFileSpec > BuildFileSpecs ()
 Every simulation this dataset defines.
static TString TracesName (const SimFileSpec &s)
 On-disk basename, traces_<iso>_<tag>, with no directory or extension.
static TString SimRootPath (const SimFileSpec &s)
 Absolute path to a simulation's ROOT file.
static Int_t ReactionStripOf (const TString &tag)
 Which strip a simulated reaction occurs on.
static TString TagWithoutStrip (const TString &tag)
 The tag with any trailing _s<N> reaction-strip token removed.

Detailed Description

Locating and naming the simulated data for a dataset's reactions.

Simulations come from Remix-MUSIC-Sim, driven by the TOML control files in <dataset>/sim_control. Each control file that writes a traces_<iso>_ output contributes one simulation to compare against.

Definition at line 24 of file RemixSim.hpp.

Member Function Documentation

◆ BuildFileSpecs()

std::vector< RemixSim::SimFileSpec > RemixSim::BuildFileSpecs ( )
static

Every simulation this dataset defines.

Returns
One spec per control file that writes a traces_<iso>_ output, sorted by tag so colour and legend ordering stay stable between runs. Two control files for the same reaction at the same strip stop the run.

Definition at line 70 of file RemixSim.cpp.

Referenced by StripSumScatter::SimTagReport().

◆ ControlDir()

TString RemixSim::ControlDir ( )
static

Absolute path to the control directory, <dataset>/sim_control.

Definition at line 43 of file RemixSim.cpp.

Referenced by BuildFileSpecs().

◆ ReactionStripOf()

Int_t RemixSim::ReactionStripOf ( const TString & tag)
static

Which strip a simulated reaction occurs on.

Parameters
tagSimulation tag.
Returns
The strip index from a trailing _s<N> token, or -1 for an unreacted-beam tag, which carries no such suffix.

Definition at line 117 of file RemixSim.cpp.

Referenced by BuildFileSpecs(), StripSumScatter::SimTagReport(), and TagWithoutStrip().

◆ SimRootPath()

TString RemixSim::SimRootPath ( const SimFileSpec & s)
static

Absolute path to a simulation's ROOT file.

Parameters
sSimulation to locate.
Returns
<dataset>/sim_root_files/traces_<iso>_<tag>.root.

Definition at line 113 of file RemixSim.cpp.

Referenced by StripSumScatter::SimTagReport().

◆ TagFromControlFile()

TString RemixSim::TagFromControlFile ( const TString & filepath)
static

Extract the simulation tag from a control file.

Reads the output = ".../traces_<iso>_<tag>.root" line.

Parameters
filepathControl file to read.
Returns
The tag, or an empty string for a control file that writes something other than a traces_<iso>_ output.

Definition at line 45 of file RemixSim.cpp.

Referenced by BuildFileSpecs().

◆ TagWithoutStrip()

TString RemixSim::TagWithoutStrip ( const TString & tag)
static

The tag with any trailing _s<N> reaction-strip token removed.

Parameters
tagSimulation tag; one without a suffix passes through unchanged.

Definition at line 130 of file RemixSim.cpp.

Referenced by BuildFileSpecs(), and StripSumScatter::SimTagReport().

◆ TracesName()

TString RemixSim::TracesName ( const SimFileSpec & s)
static

On-disk basename, traces_<iso>_<tag>, with no directory or extension.

Parameters
sSimulation to name.

Definition at line 109 of file RemixSim.cpp.

Referenced by SimRootPath().


The documentation for this class was generated from the following files: