In addition to the included basic plugins, it is possible (and necessary to do real work) to add further modules. They are grouped in Kits, so-called FlowKits. To add a FlowKit, unzip it where you like and
FlowComposer (Mac): drag the folder into the FlowKits list in FlowComposers preferences. If two folders with the same name are added, the plugins are both shown in the same category. If these folders contain plugins with the same name, position in the FlowKit list decides which one is used.
no FlowComposer (Unix): add the path of the folder to the environment variable LD_LIBRARY_PATH (for Mac, use DYLD_LIBRARY_PATH), analog to the instructions in installation.
Each FlowKit folder contains a short description of the included Plugins in "plugin_summary.txt"
Any "normal" data produced by modules (normal means plain C data types like float, double, int, etc, or C++ vectors of plain types) can be sent to standard output (if you don't see a terminal in FlowComposer (Mac), make sure the "redirect standard output..." and "Terminal window..." boxes are checked in Preferences/Misc and restart the application) by using the Display module.
Simply connect the desired output to Display's "data" input. You can specify optional pre- and suffixes (i.e. "Pulseheight:\t") to distinguish the output from several Displays. The default prefix is empty, the default suffix is a linebreak ("\n").
The WriteToFile module works exactly the same way, except that you specify a filename to write to instead of standard output.
These are all OpenScientist based AIDA-histograms. PlotVec simply takes a C++ vector of numbers at the "signal" input and plots it in the OpenScientist window. If you're using the BasicPlotter setup (Preferences/OpenScientist or environment variable ONXLAB_PLOTTER) it should show up in the main memory tree on the left, in other setups it may be on a different page.
If you want to plot several channels, fill in the "dimension" entry (i.e. "3 4" for three folders containing four histograms). You can label these dimensions with the "label" input, i.e. "Module Channel". Then use the address related outputs (i.e. "module", "channel" on VFDecoder) of the module producing the data to generate an address vector with Vectorize and connect the vector output to PlotVec's "address" input.
Additional information for the histograms Info box can be fed in via the "fw_values" input and selected and labeled via "infos".
The Histo modules are similar but different. They take numbers at their "fill" input(s) and fill a histogram. Range and binning have to be set via the appropriate inputs. Creation and addressing of several histograms works exactly as for PlotVec. There are several example pflow files included in the kit. For the more advanced features of histograms, please refer to the file PlotVecTest.pflow in the MidasFlow kit for a typical use of some of the modules.
All three of these modules also have inputs for a FlowEvent and accept the names of properties contained in the FlowEvent in some of the inputs (the "fill" and the "channel" inputs in particular). Binning and axis labels are taken from the FlowEvent automatically unless they are set manually by the user.
Remember to add this to your LD_LIBRARY_PATH / the FlowKits section in the FlowComposer preferences.
MidasFlow provides modules for interfacing with MIDAS. This also includes the handling of decoded events for several different sets of electronics.
If you plan to use Midas files, your first step should be to set the environment variable MIDASDATA (also in "Preferences/Misc" in Mac FlowComposer) to the path of the directory containing your Midas files (drag&drop works).
To open one or more Midas files, use MidasFile and enter the filename, or compile a list of filenames in a textfile and use that as "listfile". The file will be looked for in the path specified by MIDASDATA.
The "event" output will provide MidasEvents, the "bor"/"eor" outputs provide the copy of the ODB sent at begin-of-run/end-of-run.
MidasEvents can be sent to standard output (if you are running the Mac FlowComposer and don't see a terminal, make sure the "redirect standard output..." and "Terminal window..." boxes are checked in Preferences/Misc and restart the application) with the MidasEventOut module or decoded with a hardware-specific module like VFDecoder or StruckDecoder (look at the respective tooltips for help on these) or something for reading out standard Midas outputs like MidasValue. They can also be split by MidasSplitter according to their EventID before further processing (i.e. ID 1 to VFDecoder, ID 3 to MidasValue).
Since TACTIC uses VF48s, most hardware specific modules are VF48-related (they also work for VF64 and TIG10):
VFEventOut sends VFEvent information to standard output
VFCoincidentor sorts VFEvents in groups according to timestamp.
VFTimes compares timestamps/signal times of VFEvents to find coincidence times
VFSplitter provides the data from events at separate outputs
The kit includes pflow examples to explain the usage of some modules.
PlotVecTest.pflow reads a datafile and produces a hitpattern, a signal view and several addressed histograms. This is a good example for the creation of multiple histograms and the implemented addressing system.
The Midas file used in this example (a real TACTIC run) is to large to be included in the package but can be found here (140 MB). The file does not need to be unzipped to be read (but can be).
TigressTest.pflow reads data from the TIGRESS experiment. The example datafile is here.
To connect to a running Midas experiment use the MidasOnline module and set the parameters: host to the name of the computer running Midas (mserver), the default is localhost, experiment to the name of the experiment if more than one are defined, and IDs to the EventID you want (default: all).
It should be obvious that you should NEVER try to connect to somebody else's experiment without asking permission.
Remember to add this to your LD_LIBRARY_PATH / the FlowKits section in the FlowComposer preferences.
Specific to the TACTIC experiment.
The interface between the actual analysis of data from a TACTIC run and the more or less abstract MidasFlow is the module TacticFromVF. It takes a vector of VFEvents (from VFCoincidentor) and several parameters or slowly changing values (i.e. HV and pressure from MidasValue) to construct a TacticEvent, the basic structure for all following analysis.
These Tactic events can then be fed to TacticPlotter, a module that plots the ion tracks in the OpenScientist window (You need to be using TacticPlotter.onx for this.), or to TacticTracker, the module meant for doing the bulk of the track analysis (i.e. vertex reconstruction, angle calculation, energy calculation etc. -THIS IS VERY MUCH A WORK IN PROGRESS-) and filling in the additional data in the same TacticEvent object.
Toaster produces a string representation of the TacticEvent, ready to be written to a file for later visualisation with TOAST or to be presented on a server for online visualization with TOAST or taclet. (We don't have a working server at the moment.)
Finally, specific data can be extracted from a TacticEvent with TacticSplitter for histogramming and signal plots.
The included example TacticTest.pflow shows a typical setup (without the dozens of histograms attached to the TacticSplitter, this is left as an exercise for the reader.) It uses the same Midas file (140 MB) as the MidasFlow example PlotVecTest.pflow.
Remember to add this to your LD_LIBRARY_PATH / the FlowKits section in the FlowComposer preferences.
Specific to data produced by the TUDA DAQ. UK MIDAS is based on the EUROGAM data packet structure, see also here.
In order to analyse a UKMidas run file, use the UKMidasFile module, select it and click the variables button. Put the filename in the appropriate box (drag&drop works if the textbox is selected). The file will be searched in the directory specified in the environment variable UKMIDASDATA (also in "Preferences/Misc" in Mac FlowComposer) or by absolute path.
The "step" parameter decides how many events you want to read from the file (0 means all of them), "interval" is a pause between event reads.
To check if it works, attach a TudaEventOut to the output of UKMidasFile. If you click the green "Play" button, information should start to appear at standard output (if you don't see a terminal, make sure the "redirect standard output..." and "Terminal window..." boxes are checked in Preferences/Misc and restart the application)
When this succeeds, you can add TudaAdcFilter (you can remove or disconnect TudaEventOut if you don't want it anymore). Write the desired channel number into the approriate box and start if not still running. (If the file was read completely you will have to click Reset to restart from the beginning.)
The output "value" now provides the values of that channel which can be connected to a histogram, Display or other modules as described in PluginFlow.
The included example TudaTest.pflow is a simple test setup, reading a datafile and producing a hitpattern and an ADC histogram.
FlowComposer should open an OpenScientist window with a tree containing two Histograms on the left. If you select the ADC histogram after running a while, a click on the "Peakfind" button should produce a Gauss-fit. If not, open Analysis/Parameters and check "Gauss-fit". The fit output should show up in the terminal.
The UKMidas file used in this example (a TUDA run) is to large to be included in the package but can be found here (31 MB).