tutorial/AnalysisTutorial/source/MyAnalysis
Now let’s look at the package that you cloned. Your analysis package could be named anything you want, but be aware that the rest of the tutorial assumes this name and would need to be updated according. For now, it is probably best to stick with this name.
Let’s look at the basic package directory structure:
MyAnalysis
: This is where all of your (public) C++ header files
go. By ATLAS convention it is always named the same as the package
itself. This makes it easy for users to identify what package a header
file goes with.
Root
: This is where most of your C++ source files go, as well as
any private header files. A private header file is a header file that
your users do not need to include, e.g. an interface definition would
be a public header file while the actual implementation would be in a
private header file. If you have no clue what we are talking about
here, don’t worry about it for now.
src
: This is where Athena-specific C++ source files and private
header files go. Generally, files in Root
are visible in both Athena
and AnalysisBase, while files in src
are only visible in Athena.
We are not actually creating any Athena source files in this
tutorial, but it doesn’t hurt to have the directories already. It
also contains a sub-directory src/components
which holds the source
files for component libraries. The latter are used if you go through
the Athena path of this tutorial, and will be discussed when setting
up an algorithm.
share
: This is where configuration and small data
files go that you need to pick up at run time. Note as these files
will be recorded by your version control system this should really
only contain small files, and ideally no binary files (e.g. text
files are OK, but ROOT files should be avoided). Particularly
if this package is meant to go into the offline release, there are
strict restrictions as to what you can put in there.
python
: This is where python modules go. In particular,
files here are used to schedule predefined algorithms that should
be executed in addition to your analysis algorithm.
There is also another CMakeLists.txt
file inside the package. This
contains the information about how the package gets compiled. We will
look at it in more detail in the next section.
After compilation, python modules in your package will be visible in standard python. For example, you will be able to execute
import MyAnalysis.MyModuleName
in python.