Difference between revisions of "How to start using the ACTS framework"

From ALICE Wiki
Jump to navigation Jump to search
(Formatting)
m (Format)
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
=== '''Setup:''' ===
 
=== '''Setup:''' ===
  
* On the Stoomboot cluster, start by navigating to your user account directory. <code>/data/alice/<username></code>
+
* On the Stoomboot cluster, start by navigating to your user account directory. <blockquote><code>/data/alice/<username></code></blockquote>
  
* Next, activate a compatible LCG (LHC Computing Grid) software environment. LCG provides a pre-packaged set of libraries and compilers. For the Acts framework, a view containing GCC 13 or later is required for C++20 compatibility. A working example: <code>source /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc13-opt/setup.sh</code>     ''This command must be executed in every new shell session.''
+
* Next, activate a compatible LCG (LHC Computing Grid) software environment. LCG provides a pre-packaged set of libraries and compilers. For the Acts framework, a view containing GCC 13 or later is required for C++20 compatibility. A working example: <blockquote><code>source /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc13-opt/setup.sh</code>       <br />''This command must be executed in every new shell session.''</blockquote>
  
* Clone the  [https://github.com/acts-project/acts/tree/main Acts repository] from GitHub to your local machine. Replace `<source>` with your desired directory name.   <code>git clone <nowiki>https://github.com/acts-project/acts</nowiki> <nowiki><source></nowiki></code>
+
* Clone the  [https://github.com/acts-project/acts/tree/main Acts repository] from GitHub to your local machine. Replace `<source>` with your desired directory name. <blockquote><code>git clone <nowiki>https://github.com/acts-project/acts</nowiki> <nowiki><source></nowiki></code></blockquote>
  
* Navigate into the cloned repository and configure the build with ''cmake''. To enable the Python bindings for the examples, you must explicitly pass the corresponding flags. <code>cd <source></code> <code>cmake -B build -S . -DACTS_BUILD_EXAMPLES=ON -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON -DPYBIND11_USE_FETCHCONTENT=ON</code>
+
* Navigate into the cloned repository and configure the build with ''cmake''. To enable the Python bindings for the examples, you must explicitly pass the corresponding flags.<blockquote><code>cd <source></code>   <br /><code>cmake -B build -S . -DACTS_BUILD_EXAMPLES=ON -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON -DPYBIND11_USE_FETCHCONTENT=ON</code></blockquote>
  
* Next, compile the project. <code>cmake --build build</code>
+
* Next, compile the project. <blockquote><code>cmake --build build</code></blockquote>
  
 
=== '''Run Examples:''' ===
 
=== '''Run Examples:''' ===
  
* Before running the Python scripts, you must run the <code>setup.sh</code> script to configure your environment. This script modifies your PYTHONPATH, an environment variable that tells Python where to look for modules.   <code>source build/python/setup.sh</code>   ''This command must be executed in every new shell session.''
+
* Before running the Python scripts, you must run the <code>setup.sh</code> script to configure your environment. This script modifies your PYTHONPATH, an environment variable that tells Python where to look for modules. This process is essential because it enables your Python code to call the high-performance '''C++ functions''' defined within the Acts framework.  <blockquote><code>source build/python/setup.sh</code>       <br />''This command must be executed in every new shell session.''</blockquote>
* Once your environment is set up, you can execute any of the Python example scripts. The files are located in the <code>Examples/Scripts/Python</code> directory. For example, to run the particle propagation script, use the following command:  <code>python Examples/Scripts/Python/propagation.py</code>
+
* Once your environment is set up, you can execute any of the Python example scripts. The files are located in the <code>Examples/Scripts/Python</code> directory. For example, to run the particle propagation script, use the following command:  <blockquote><code>python Examples/Scripts/Python/propagation.py</code></blockquote>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
and <code>[/code]</code>
 

Latest revision as of 15:51, 9 September 2025

The Acts (A Common Tracking Software) framework is an open-source project designed for track reconstruction and simulation in particle physics experiments. This guide explains how to set up a local working environment on the Stoomboot cluster and run the included Python examples, following the Acts 'getting started' page with minor adjustments.

Setup:

  • On the Stoomboot cluster, start by navigating to your user account directory.

    /data/alice/<username>

  • Next, activate a compatible LCG (LHC Computing Grid) software environment. LCG provides a pre-packaged set of libraries and compilers. For the Acts framework, a view containing GCC 13 or later is required for C++20 compatibility. A working example:

    source /cvmfs/sft.cern.ch/lcg/views/LCG_108/x86_64-el9-gcc13-opt/setup.sh
    This command must be executed in every new shell session.

  • Clone the Acts repository from GitHub to your local machine. Replace `<source>` with your desired directory name.

    git clone https://github.com/acts-project/acts <source>

  • Navigate into the cloned repository and configure the build with cmake. To enable the Python bindings for the examples, you must explicitly pass the corresponding flags.

    cd <source>
    cmake -B build -S . -DACTS_BUILD_EXAMPLES=ON -DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON -DPYBIND11_USE_FETCHCONTENT=ON

  • Next, compile the project.

    cmake --build build

Run Examples:

  • Before running the Python scripts, you must run the setup.sh script to configure your environment. This script modifies your PYTHONPATH, an environment variable that tells Python where to look for modules. This process is essential because it enables your Python code to call the high-performance C++ functions defined within the Acts framework.

    source build/python/setup.sh
    This command must be executed in every new shell session.

  • Once your environment is set up, you can execute any of the Python example scripts. The files are located in the Examples/Scripts/Python directory. For example, to run the particle propagation script, use the following command:

    python Examples/Scripts/Python/propagation.py