Layout of the analysis package

Last update: 19 May 2023 [History] [Edit]

Now let’s look at the MyAnalysis 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 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 all 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 sources and private header files go. We are not actually creating any Athena sources 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 is 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. 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 scripts 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.

Warning Whenever you create a new package, you need to have cmake pick it up with:

cd ../build/
cmake ../source/
make

and then call source build/x86_64*/setup.sh.