ant
A2 ant: class-based analysis framework
|
Just another **AN**alysis **T**oolkit ant
, which can read from many input sources with minimal user intervention and let's you create Physics analyses within minutes.
Please see also the automatically generated Doxygen pages and the Wiki.
Note: A comprehensive installation guide can be found in the Wiki.
Please make sure that you fulfill the dependencies. Install ROOT and Pluto preferably in /opt/root
and /opt/pluto
to ensure auto-detection by ant's CMake.
Next, you need to get the APLCON C++ wrapper. The easiest way is to clone the repository relative to your ant
directory at ../APLCONpp
, then create the build directory at ../APLCONpp/build
. This way CMake will automatically detect it.
See also the detailed steps described in the corresponding Wiki section.
Now you should be able to compile the Ant framework. Therefore clone this respository, either directly from https://github.com/A2-Collaboration/ant.git or you may want to fork it. As mentioned above, the installation works best when the APLCONpp and ant folder reside in the same directory. Inside your ant directory create a build direcory:
mkdir build && cd build && cmake ..
Then start the parallel compilation for example on a QuadCore machine with make -j5
. You may want to add your ant/build/bin
directory to your $PATH
variable.
Ant is designed to run single threaded. This avoids a lot of programming problems and running it on the computation clusters is simpler and more efficient, since you only need to allocate one thread per job. For processing data we recommend to run an Ant process on each input file and then merge the results afterwards using Ant-hadd
, Ant-chain
, or ROOTs hadd
tool (but prefer Ant-hadd --native
for custom data type support).
There is also no builtin option to run over multiple input files in one go. This should be handled by external tools like GNU parallel
, or AntSubmit
on a cluster (see also --no_qsub
option), or your shell.
Check the Wiki to learn about the basic usage of Ant itself or how to run Ant tools on blaster using the provided job submission scripts like the aforementioned AntSubmit
. Have a look at the Getting Started Guide for Physics classes if you have no idea about Ant and how to start writing your own analysis.
Ant comes with a few tools to generate MC data. It can generate photoproduction processes and decays with Ant-pluto
, a frontend utilizing the Pluto event generator for A2 physics (includes the Tagger), shoot particles randomly in all directions using Ant-mcgun
, or simulate a complete cocktail of various photoproduction and decay channels according to their cross sections with Ant-cocktail
.
To use Pluto to simulate, for example, the omega —> pi0 gamma do:
This will generate 10k events in the incident photon energy range 1400 MeV to 1600 MeV, saving unstable particles. The pi0 will decay into different channels according to the Pluto database. Use the option --no-unstable
if you don't want to store intermediate particles and --no-bulk
to disable bulk decays using the Pluto database.
Shoot 1000 protons into TAPS, 1 proton/Event, 0 to 1 GeV
$PLUTOSYS
to tell CMake where to find it. If you installed Pluto inside your home directory, ~/pluto
or ~/src/pluto
, or placed it in /opt/pluto
, the make process may have failed. Please make sure you ran make
in your Pluto directory with a proper ROOT installation.make_shared
is called. This is fixed with the release of 8.3, and version prior to 8.2 are not affected as well.struct __xfer_bufptrs
), please update to a more recent ROOT version. As of November 2015, you need to clone the git branch which includes the patches. To do so:git clone -b v5-34-00-patches https://github.com/root-mirror/root.git
cd
in the cloned directorymkdir build_dir
cd
in it and run cmake .. && make -jN
, replace N
with the number of threads which should be used$ROOTSYS
accordinglyTKey::ReadObjWithBuffer msg='Unknown class foDoubly linked listZL
), make sure you recompiled Pluto properly with the identical $ROOTSYS
as Ant (in particular pay attention to ROOT debug/release builds).Please read the following sections if you want to contribute to this project. Always make sure to cover your code with tests, see the wiki. Run make build_and_test
before pushing.
#include
statements:Have a look at the Wiki as well.
The calibration modules specify physics classes, usually below src/analysis/physics/calibration
, which produce the histograms used in the GUI part of the module. The analysis classes can access all information organized in expconfig
. The slowcontrol
libraries are divided to ensure proper initialization order of static registries.
The solid arrows mean "links to", whereas the dashed arrows means "includes only".
Or, automatically generated with
The following items are still to-do:
Ant | Goat |
---|---|
CB | NaI |
PID | PID |
MWPC0 | MWPC |
MWPC1 | |
TAPS | BaF2 |
PbWO4 | |
TAPSVeto | Veto |
All other Ant detectors do not have a representation in Goat/Acqu.
The physics classes analyse TEvent
s provided by different sources or amenders. The main source of events is the AntReader, which itself is either fed by some unpacker or by already unpacked and possibly reconstructed treeEvents
. Additionally, the SlowControlManager needs to do proper buffering to make physics classes easy to implement.
Have a look at those very nice projects, which are used here: