Skip to content

Compiling padme fw on Linux

taruggi edited this page May 19, 2023 · 8 revisions

After obtaining a copy of the PADME software framework with one of the procedures described in Installing the Software, you can compile one or more of the packages included in the framework using the following procedures.

Please note the following dependencies:

  • PadmeRoot, PadmeMC, PadmeReco, and PadmeAnalysis require the ROOT package
  • PadmeMC also requires the GEANT4 package
  • Other packages have additional dependencies: please contact the management to use them.

Initial configuration

Before compiling any package, the local environment must be configured using one of the scripts contained in the padme-fw/Configure directory.

If you are on a node mounting the /cvmfs distributed file system (recommended), you can choose one of the following scritps depending on the operative system you are using:

  • Scientific Linux 6: padme_init_cvmfs_slc6_root5.sh
  • CentOs 7: padme_init_cvmfs_centos7_root5.sh

If you are using a local installation of GEANT4 and ROOT on your node, you should make sure that the correct environment variables are set (e.g. ROOTSYS, G4INSTALL, etc.) and then you can use the padme_init.sh script.

After choosing the appropriate script, you can configure the environment with the command, e.g.

source padme_init_cvmfs_centos7_root5.sh

Compiling PadmeRoot

PadmeRoot is the library supporting all PADME persistency formats (rawdata, recodata, mcdata, etc.) and must be compiled before any other package. After configuring your environment, you can compile the library with the following commands:

cd padme-fw/PadmeRoot
make

This will create the file libPadmeRoot.so inside padme-fw/PadmeRoot/lib. The PADMEROOT environment variable, set by the configuration script, will allow all other packages to refer to this library and to the corresponding include files.

Compiling PadmeMC

PadmeMC is the program which simulates the PADME experiment with the MonteCarlo method. It is based on the GEANT4 toolkit and is highly configurable with the use of datacards.

After compiling PadmeRoot (see above), just cd to the PadmeMC directory and issue the make command: this will create the PadmeMC executable inside bin/Linux-g++ directory. Finally, to run PadmeMC interactively and with the graphical interface, you must copy the example vis.mac.example file into vis.mac:

cd padme-fw/PadmeMC
make
cp vis.mac.example vis.mac
bin/Linux-g++/PADMEMC

Compiling PadmeReco

PadmeReco is the program which reconstructs physics event starting either from rawdata events coming from the PADME DAQ or from mcdata events produced by PadmeMC.

After compiling PadmeRoot (see above), cd to the PadmeReco directory and use this command:

cp -r config.template/ config/

to copy the "config" and make all the changes you need without compromising the original develop configuration. Then issue the make command.

Clone this wiki locally