### Run On-the-Fly Analysis Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Execute a trivial 'on-the-fly' analysis example to get familiar with the FLOW package and QC output. This method samples particles from hardwired p.d.f.s. ```bash cp $ALICE_PHYSICS/PWGCF/FLOW/macros/runFlowAnalysisOnTheFly.C . aliroot runFlowAnalysisOnTheFly.C ``` -------------------------------- ### General Install Settings Source: https://github.com/alisw/aliphysics/blob/master/PWG/Tools/yaml-cpp/CMakeLists.txt Defines installation directories for headers and libraries. Sets up runtime, library, and archive destinations for installed files. Use to configure where build artifacts are placed after installation. ```cmake set(INCLUDE_INSTALL_ROOT_DIR "include") set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp) set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}") set(_INSTALL_DESTINATIONS RUNTIME DESTINATION bin LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ) ``` -------------------------------- ### Install AliRoot Source: https://github.com/alisw/aliphysics/blob/master/INSTALL.txt Install AliRoot after a successful build using the 'make install' command. This command can also utilize parallel processing. ```bash make -jNR_OF_PROCESSORS install ``` -------------------------------- ### Install Library and Headers Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/Correlations/JCORRAN/Pro/CMakeLists.txt Defines installation rules for the built library and header files. Specifies the destination directories within the installation prefix. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Installation Rules Source: https://github.com/alisw/aliphysics/blob/master/RUN3/CMakeLists.txt Defines how the built targets and headers should be installed. ```cmake # Installation install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES ${HDRS} DESTINATION include) # Install the macros install(DIRECTORY . DESTINATION RUN3 FILES_MATCHING PATTERN "*.C") install(DIRECTORY . DESTINATION RUN3 FILES_MATCHING PATTERN "benchmark/*.C") ``` -------------------------------- ### Install Macros with CMake Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/CMakeLists.txt The `install` command with `DIRECTORY` is used to install files or directories to a specified destination. This example installs macros to the PWGCF/FLOW directory. ```cmake install(DIRECTORY Forward/macros DESTINATION PWGCF/FLOW) install(DIRECTORY macros DESTINATION PWGCF/FLOW) ``` -------------------------------- ### Install Library and Headers Source: https://github.com/alisw/aliphysics/blob/master/PWGDQ/dielectron/CMakeLists.txt Installs the target library and header files to their respective destinations. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) ``` ```cmake install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Example Macro for Running EMCal Jet Task Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/doc/READMEjetfw.txt This is an example path to a macro used for running the EMCal Jet Sample Task. It is typically found within the AliPhysics installation directory. ```text /PWGJE/EMCalJetTasks/macros/runEMCalJetSampleTask.C ``` -------------------------------- ### Install Test Directory Source: https://github.com/alisw/aliphysics/blob/master/CMakeLists.txt Installs the 'test' directory to the specified installation prefix. This makes the test scripts and data available after installation. ```cmake install(DIRECTORY test DESTINATION ${CMAKE_INSTALL_PREFIX}) ``` -------------------------------- ### Install Macro Files Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/ppVsMult/CMakeLists.txt Installs macro files (.C) from specific directories into the appropriate locations within the installation structure. This makes analysis scripts and macros available after installation. ```cmake install(DIRECTORY dNdEtaPP13/macros DESTINATION PWGLF/ppVsMult/dNdEtaPP13 FILES_MATCHING PATTERN "*.C") install(DIRECTORY dNdEtaPP13/task DESTINATION PWGLF/ppVsMult/dNdEtaPP13 FILES_MATCHING PATTERN "*.C") ``` -------------------------------- ### Install Aliphysics Headers Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/CaloTrackCorrelations/CMakeLists.txt Installs the header files for Aliphysics into the include directory. ```cmake install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Install Library and Headers Source: https://github.com/alisw/aliphysics/blob/master/PWGMM/UE/CMakeLists.txt Installs the compiled library to the 'lib' directory and header files to the 'include' directory. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) ``` ```cmake install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Create Build and Install Directories Source: https://github.com/alisw/aliphysics/blob/master/INSTALL.txt Create separate directories for the build artifacts and the final installation. These directories should be distinct from the source directory. ```bash mkdir build ``` ```bash mkdir install ``` -------------------------------- ### Install Targets and Files Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/EMCALTasks/CMakeLists.txt Defines installation rules for library archives, shared libraries, and header files. Ensure ${MODULE} and ${HDRS} are defined. ```cmake # Installation install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Install ALiPhysics Targets Source: https://github.com/alisw/aliphysics/blob/master/PWGHF/vertexingHF/vHFML/CMakeLists.txt Installs the specified targets, archives, and libraries to their respective destinations. ```cmake install(TARGETS ${MODULEHFML} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) ``` ```cmake install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Install Macros Source: https://github.com/alisw/aliphysics/blob/master/PWG/muon/CMakeLists.txt Installs all files matching the '*.C' pattern from the current directory to the 'PWG/muon' destination. ```cmake install(DIRECTORY . DESTINATION PWG/muon FILES_MATCHING PATTERN "*.C") ``` -------------------------------- ### Install Library and Headers Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/EMCALtasks/CMakeLists.txt Install the built library targets (archives, libraries) to the lib directory and header files to the include directory. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Install Input Files Source: https://github.com/alisw/aliphysics/blob/master/PWG/HMTF/CMakeLists.txt Installs various input files, including JDL, parameter, options, and script files, to a designated directory. These files are likely used for configuration or running simulations. ```cmake set (INPUT_FILES MonteCarlo/template.jdl MonteCarlo/templateEPOS3111.jdl MonteCarlo/DIPSYpp_HepMC.in MonteCarlo/crmc_template.param MonteCarlo/pp.optns MonteCarlo/pPb.optns MonteCarlo/PbPb.optns MonteCarlo/LoadLibs.C MonteCarlo/rungen.C MonteCarlo/runTask.C ) install (FILES ${INPUT_FILES} MonteCarlo/parse_opts.sh MonteCarlo/prepare_runscript.sh DESTINATION PWG/HMTF/MonteCarlo) ``` -------------------------------- ### Install EMCAL Macros and Config Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/CMakeLists.txt Installs the 'macros' and 'config' directories to the PWG/EMCAL destination within the installation prefix. ```cmake install (DIRECTORY macros DESTINATION PWG/EMCAL) ``` ```cmake install (DIRECTORY config DESTINATION PWG/EMCAL) ``` -------------------------------- ### Install Project Directories Source: https://github.com/alisw/aliphysics/blob/master/PWGMM/UE/CMakeLists.txt Installs various project subdirectories to the specified destination within the PWGMM/UE path. ```cmake install(DIRECTORY UeSpectra DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeSpherocity DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UePid DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeKNO DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeMpi DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeMultDep DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeSpectraRT DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY UeDphi DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY macros DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY Flatenicity DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY FlatenicityPiKp DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY FlatenicityLambdaK0s DESTINATION PWGMM/UE) ``` ```cmake install(DIRECTORY SpeedOfSound DESTINATION PWGMM/UE) ``` -------------------------------- ### Install Macros Source: https://github.com/alisw/aliphysics/blob/master/PWGUD/UPC/CMakeLists.txt Installs macros from the current directory to the 'PWGUD/UPC' destination, matching files with the '.C' extension. This is for installing specific macro files. ```cmake install(DIRECTORY . DESTINATION PWGUD/UPC FILES_MATCHING PATTERN "*.C") ``` -------------------------------- ### Install CMake Configuration Files Source: https://github.com/alisw/aliphysics/blob/master/PWG/Tools/yaml-cpp/CMakeLists.txt Installs the generated CMake configuration files to the appropriate directory for package discovery. ```cmake install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev) install(EXPORT yaml-cpp-targets DESTINATION ${INSTALL_CMAKE_DIR}) ``` -------------------------------- ### Install Aliphysics Targets Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/CaloTrackCorrelations/CMakeLists.txt Installs the main Aliphysics targets, including archives and libraries, into specified destinations. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) ``` -------------------------------- ### Suggested Parameter List for ClusterizerFast Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/READMEclustcorr.txt Example of a suggested parameter list for the AddTaskClusterizerFast macro, demonstrating typical values. ```cxx "ClusterizerFast", "", "", kClusterizerType, 0.05,0.1, kEMCtimeMin, kEMCtimeMax, kEMCtimeCut, kFALSE, kFALSE, AliAnalysisTaskEMCALClusterizeFast::kFEEData ``` -------------------------------- ### Install Module Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGMM/MC/CMakeLists.txt Installs a directory named 'aligenqa' to the 'PWGMM/' destination. This is a CMake command for managing build artifacts. ```cmake install( DIRECTORY aligenqa DESTINATION PWGMM/ ) ``` -------------------------------- ### Example: Process Fast Simulation Output with Lite Protocol Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/FORWARD/analysis2/sim/README_FAST.md Example of processing fast simulation output using the 'lite' protocol. It analyzes 1000 events from a specified input file and performs a 'CENTV0M' type analysis, writing results to 'out.root'. ```c++ ProcessFast.C("lite:///${PWD}/Hijing_000138190_AA_02760_10k.root?events=1000&type=CENTV0M","out.root") ``` -------------------------------- ### Example: Run Fast Simulation with Lite Protocol Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/FORWARD/analysis2/sim/README_FAST.md Example of running a fast simulation using the 'lite' protocol for multi-threaded local execution. It specifies 10000 events, the default event generator, and anchors in run 138190. ```c++ RunFast.C("lite:///?events=10000&eg=default&run=138190") ``` -------------------------------- ### Install Pkg-config File for UNIX Source: https://github.com/alisw/aliphysics/blob/master/PWG/Tools/yaml-cpp/CMakeLists.txt Generates and installs the yaml-cpp.pc file for pkg-config on UNIX-like systems. ```cmake if(UNIX) set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc) configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY) install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) endif() ``` -------------------------------- ### Check Installation Path Source: https://github.com/alisw/aliphysics/blob/master/CMakeLists.txt Ensures that the installation prefix is not the same as the source directory to prevent accidental overwriting of source files. ```cmake if(CMAKE_INSTALL_PREFIX STREQUAL "${AliPhysics_SOURCE_DIR}") message(FATAL_ERROR "Please choose a different installation point than the source tree!") endif() ``` -------------------------------- ### Install Macros Directories Source: https://github.com/alisw/aliphysics/blob/master/PWGDQ/dielectron/CMakeLists.txt Installs directories containing macros to a specified destination. ```cmake install(DIRECTORY macros macrosJPSI macrosLMEE DESTINATION PWGDQ/dielectron) ``` -------------------------------- ### Install yaml-cpp Library and Headers Source: https://github.com/alisw/aliphysics/blob/master/PWG/Tools/yaml-cpp/CMakeLists.txt Installs the yaml-cpp library targets and header files to the specified destinations. ```cmake install(TARGETS yaml-cpp EXPORT yaml-cpp-targets ${_INSTALL_DESTINATIONS}) install( DIRECTORY ${header_directory} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" ) ``` -------------------------------- ### Install Aliphysics Macros Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/CaloTrackCorrelations/CMakeLists.txt Installs macro files (e.g., YAML) into the specified directory structure for Aliphysics. ```cmake install(DIRECTORY macros yaml DESTINATION PWGGA/CaloTrackCorrelations) ``` -------------------------------- ### Install Library Target and Headers with CMake Source: https://github.com/alisw/aliphysics/blob/master/PWGHF/correlationHF/CMakeLists.txt Installs the built library target to the 'lib' directory and header files to the 'include' directory. Ensure ${MODULE} and ${HDRS} are correctly defined. ```cmake install(TARGETS ${MODULE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) ``` ```cmake install(FILES ${HDRS} DESTINATION include) ``` -------------------------------- ### Setup AliAnalysisTaskEmcal using Named Constructor Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/READMEcorefw.txt Use the named constructor in the Add macro to set up the task and attach it to the analysis manager. ```c++ Add("AliAnalysisTaskEmcal", "MyEmcalAnalysisTask"); ``` -------------------------------- ### Create AliQnCorrectionsManager Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/EVCHAR/FlowVectorCorrections/QnCorrections/AliQnCorrections.md Instantiate the central framework manager. This is the starting point for configuring the correction framework. ```c++ /* create the framework manager */ AliQnCorrectionsManager *QnManager = new AliQnCorrectionsManager(); ``` -------------------------------- ### Setup Analysis Task with AddTask Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/doc/READMEjetfw.txt Use AddTask to set up your analysis task for execution. Avoid complex code here as debugging can be difficult. ```C++ AddTask ``` -------------------------------- ### Example: Copying files and setting up output directory Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/FORWARD/analysis2/sim/README.md This command demonstrates how to prepare JDL files and copy them to a specified location, setting the base output directory and AliROOT release without submitting jobs. The `-s -1` option prevents job submission. ```bash ./doit.sh -a v5-05-Rev-11 \ -d /alice/cern.ch/user/a/aliprod/PWGLFforwardMC \ -o /alice/sim/2014 \ -c \ -s -1 ``` -------------------------------- ### Create Standard ESD Track Cuts Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/READMEtracks.txt Example of creating a standard AliESDtrackCuts object for ESD analysis. ```cxx AliESDtrackCuts* myCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kFALSE,1); ``` -------------------------------- ### Install Macros Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/Hyperon/CMakeLists.txt Installs the 'macros' directory to a specific destination within the installation path. This is used for installing custom macros. ```cmake install(DIRECTORY macros DESTINATION PWGGA/Hyperon) ``` -------------------------------- ### Setup AliCFContainer for pt-y analysis Source: https://context7.com/alisw/aliphysics/llms.txt Initializes and configures AliCFContainer for storing multi-dimensional distributions. Sets bin limits and titles for variables and selection steps. ```cpp // Setting up a Correction Framework container for pt-y analysis const Int_t nSteps = 4; // Selection steps const Int_t nVars = 2; // Variables: pt, y const Int_t nBinsPt = 20; // pt bins const Int_t nBinsY = 10; // rapidity bins Int_t bins[2] = {nBinsPt, nBinsY}; AliCFContainer* container = new AliCFContainer("CFContainer", "Container for corrections", nSteps, nVars, bins); // Set bin limits for pt (0-10 GeV/c) Double_t ptBins[nBinsPt+1]; for (Int_t i = 0; i <= nBinsPt; i++) ptBins[i] = 0.5 * i; container->SetBinLimits(0, ptBins); // Set bin limits for rapidity (-1 to 1) Double_t yBins[nBinsY+1]; for (Int_t i = 0; i <= nBinsY; i++) yBins[i] = -1.0 + 0.2 * i; container->SetBinLimits(1, yBins); // Label the variables and steps container->SetVarTitle(0, "p_{T} (GeV/c)"); container->SetVarTitle(1, "y"); container->SetStepTitle(0, "MC Generated"); container->SetStepTitle(1, "MC in Acceptance"); container->SetStepTitle(2, "Reconstructed"); container->SetStepTitle(3, "After PID"); // Fill container in analysis loop Double_t vars[2] = {track->Pt(), track->Y()}; container->Fill(vars, 0); // Fill step 0 (generated) ``` -------------------------------- ### Create Build Directory Source: https://github.com/alisw/aliphysics/blob/master/PWG/Tools/yaml-cpp/README.md Navigate into the source directory and create a build directory. ```bash mkdir build cd build ``` -------------------------------- ### Make Chain of Information Tree Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/PWGPPREADME.txt Loads libraries and sets up a chain for information trees using AliXRDPROOFtoolkit. Requires ROOT and ALICE_ROOT environment variables. ```c++ .x ~/rootlogon.C gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros") gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+") AliXRDPROOFtoolkit tool; TChain * chain = tool.MakeChain("cmp.txt","ESDcmpTracks",0,1000) chain->Lookup(); .L $ALICE_PHYSICS/PWGPP/AliComparisonSelector.cxx+ ``` -------------------------------- ### Instantiate Charged Jet Finder Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/doc/READMEjetfw.txt Example of how to instantiate the AliEmcalJetTask for charged jet finding. Ensure proper track selection is performed beforehand. ```cxx AliEmcalJetTask* jetFinderCh = AliEmcalJetTask("usedefault", "", AliJetContainer::antikt_algorithm, 0.4, AliJetContainer::kChargedJet) ``` -------------------------------- ### Conditional Installation of Calibration Data Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/CMakeLists.txt This CMake snippet demonstrates conditional installation of a 'database' directory. The installation only occurs if the directory exists in the current source path, ensuring that only valid data is installed. ```cmake if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/database) install(DIRECTORY database DESTINATION PWGCF/FLOW) endif() ``` -------------------------------- ### Configure Install RPATH on macOS Source: https://github.com/alisw/aliphysics/blob/master/CMakeLists.txt Enables the use of install RPATH on macOS to speed up installation by allowing the build to use the install path. It sets the RPATH to look in the 'lib' subdirectory relative to the executable. ```cmake # Build targets with install rpath on Mac to dramatically speed up installation set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(CMAKE_INSTALL_RPATH "@loader_path/../lib") endif() endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) endif() unset(isSystemDir) ``` -------------------------------- ### Install Directory in CMake Source: https://github.com/alisw/aliphysics/blob/master/PWGGA/NtuplizerTask/CMakeLists.txt Installs a directory to a specified destination. This is useful for installing configuration files, macros, or other directory-based assets. ```cmake install(DIRECTORY GJNtuples DESTINATION PWGGA/NtuplizerTask) ``` -------------------------------- ### Create Install Doxygen Target Source: https://github.com/alisw/aliphysics/blob/master/doxygen/CMakeLists.txt Defines a custom CMake target named 'install-doxygen' to install the generated Doxygen documentation to the installation prefix. This target depends on the 'doxygen' target to ensure documentation is generated before installation. ```cmake add_custom_target(install-doxygen rsync -a --delete "${CMAKE_CURRENT_BINARY_DIR}/html/" "${CMAKE_INSTALL_PREFIX}/doxygen/" DEPENDS doxygen COMMENT "Installing AliPhysics reference manual" ) ``` -------------------------------- ### Build AliRoot Source: https://github.com/alisw/aliphysics/blob/master/INSTALL.txt Execute the 'make' command to build AliRoot. Parallel builds can be enabled using the '-j' flag with the number of processors. ```bash make ``` ```bash make -jNR_OF_PROCESSORS ``` -------------------------------- ### Install PostProcessing Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/RESONANCES/CMakeLists.txt Installs the 'PostProcessing' directory to a specific location within the installation path. This is for distributing post-processing related files. ```cmake install(DIRECTORY PostProcessing DESTINATION PWGLF/RESONANCES) ``` -------------------------------- ### Launch AliPhysics Analysis Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Initializes the analysis manager, prints its status, sets up a progress bar, and starts the analysis locally using a provided chain of events. ```cxx // check if we can initialize the manager if(!mgr->InitAnalysis()) return; // print the status of the manager to screen mgr->PrintStatus(); // print to screen how the analysis is progressing mgr->SetUseProgressBar(1, 25); // start the analysis locally, reading the events from the tchain mgr->StartAnalysis("local", chain); ``` -------------------------------- ### Display aligenqa help Source: https://github.com/alisw/aliphysics/blob/master/PWGMM/MC/aligenqa/README.md Shows the available commands and options for the aligenqa tool. Use this to understand the basic structure and arguments. ```shell $ aligenqa --help usage: aligenqa [-h] [-v] {prepare_plots,summarize,compare} ... positional arguments: {prepare_plots,summarize,compare} optional arguments: -h, --help show this help message and exit -v, --verbose ``` -------------------------------- ### Install Analysis Task Macro Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/Correlations/DPhi/CMakeLists.txt Installs a specific C++ macro file to a designated directory within the project's installation structure. ```cmake install(FILES MuonHadron/AddAnalysisTaskMuonHadronCorrelations.C DESTINATION PWGCF/Correlations/DPhi/MuonHadron/) ``` -------------------------------- ### Install Analysis Macros Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/CMakeLists.txt Installs C++ analysis macros to specific destinations within the PWGPP directory. Ensure the source files exist before installation. ```cmake install(FILES vdM/AddAnalysisTaskVdM.C DESTINATION PWGPP/vdM) ``` -------------------------------- ### Install Macros in CMake Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/Correlations/CMakeLists.txt This CMake command installs the 'macros' directory to the specified destination. This is typically used for installing common utility files or scripts. ```cmake install(DIRECTORY macros DESTINATION PWGCF/Correlations) ``` -------------------------------- ### Example: Submitting simulation jobs Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/FORWARD/analysis2/sim/README.md This command submits simulation jobs with specified parameters, including the number of jobs, events per job, and run number. It also specifies the data directory, production tag, and GEANT release (PhoJet). Output will be organized under a specific directory structure. ```bash ./doit.sh -d /alice/cern.ch/user/a/aliprod/PWGLFforwardMC \ -i LHC14z9a -r 118506 -s 0 -n 100 -m 10 -g PhoJet ``` -------------------------------- ### Install Macros Source: https://github.com/alisw/aliphysics/blob/master/PWG/HMTF/CMakeLists.txt Installs macro files (.C) to a specific subdirectory within the installation path. These macros are likely helper scripts or functions for using the module. ```cmake install (FILES macros/AddMCGenDPMJET.C macros/AddTaskHMTFMCMultEst.C macros/AddTaskTrackingUncertHMTF.C DESTINATION PWG/HMTF/macros) ``` -------------------------------- ### Install Macros Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/FlavourJetTasks/CMakeLists.txt Installs the 'macros' directory to a specific destination. ```cmake install (DIRECTORY macros DESTINATION PWGJE/FlavourJetTasks) ``` -------------------------------- ### Fast Prototyping with AliTreeDraw Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/PWGPPREADME.txt Uses AliTreeDraw for rapid prototyping of queries. Requires 'libPWGPP' to be loaded and a 'tree' object to be set. ```c++ gSystem->Load("libPWGPP"); AliTreeDraw comp; comp.SetTree(tree) ``` -------------------------------- ### Instantiate Standard Global Track Cuts Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Demonstrates how to instantiate and use a pre-defined set of standard global track cuts. Ensure the correct static method is called for the desired track type. ```cxx AliFlowTrackCuts* myCuts = AliFlowTrackCuts::GetStandardGlobalTrackCuts2010(); ``` -------------------------------- ### Install Corrections Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGLF/STRANGENESS/CMakeLists.txt Conditionally installs the 'corrections' directory if it exists within the Cascades subdirectory. ```cmake if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Cascades/corrections) install(DIRECTORY Cascades/corrections DESTINATION PWGLF/STRANGENESS/Cascades) endif() ``` -------------------------------- ### Build MC Info Tree Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/PWGPPREADME.txt Loads necessary libraries and creates an MC information tree from a root file. Ensure 'libANALYSIS' and 'libPWGPP' are available. ```c++ gSystem->Load("libANALYSIS"); gSystem->Load("libPWGPP") AliGenInfoMaker *t = new AliGenInfoMaker("galice.root","genTracks.root",0,0) t->Exec(); ``` -------------------------------- ### Display summarize help Source: https://github.com/alisw/aliphysics/blob/master/PWGMM/MC/aligenqa/README.md Shows the usage for the `summarize` command, detailing how to generate summary slides for a specific generator. Quotes are needed for generator names with spaces. ```shell $ aligenqa summarize --help usage: aligenqa summarize [-h] [--gen_name GEN_NAME] input_file Create summary slides for all triggers of a given generator. Remember to use quotes if the generator name contains spaces and be careful with special characters. positional arguments: input_file Path to file containing the input data optional arguments: -h, --help show this help message and exit --gen_name GEN_NAME Name of the generator and tune. If not given, deduced from filename ``` -------------------------------- ### Install python-pptx Package Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/doc/READMEjetQA.txt Install the python-pptx package using pip. This is a prerequisite for the plotPowerpoint.py script. ```bash pip install python-pptx ``` -------------------------------- ### Install Data Directory Conditionally Source: https://github.com/alisw/aliphysics/blob/master/PWGDQ/dielectron/CMakeLists.txt Installs a data directory if it exists in the current source directory. ```cmake if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/files) install(DIRECTORY files DESTINATION PWGDQ/dielectron) endif() ``` -------------------------------- ### Run Compact Tree Maker Source: https://github.com/alisw/aliphysics/blob/master/PWG/muondep/READMEcompact.txt Initiates the `AliMuonCompactTreeMaker` to process simulation data and create compacted ROOT files. Ensure the input list of ESD files is correctly specified. ```cxx .x runCompactTreeMaker("list.esd.txt","compacttreemaker.root"); ``` -------------------------------- ### Configure Embedding Helper Task Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/READMEemcEmbedding.txt Create and configure the AliAnalysisTaskEmcalEmbeddingHelper. Set file patterns, list filenames, and specify if the embedded file is an ESD. Always initialize the helper after configuration. ```c++ // Create the Embedding Helper AliAnalysisTaskEmcalEmbeddingHelper * embeddingHelper = AliAnalysisTaskEmcalEmbeddingHelper::AddTaskEmcalEmbeddingHelper(); // Set the file pattern. This example uses ptHardBin 4 of LHC12a15e_fix. // The pT hard bin and anchor run can also be set by adding a printf() wild card to the string (ie %d) // See the documentation of AliAnalysisTaskEmcalEmbeddingHelper::GetFilenames() // For the grid. Include "alien://" and don't use this locally!! It will be very slow and cause strain on the grid! embeddingHelper->SetFilePattern("alien:///alice/sim/2012/LHC12a15e_fix/169838/%d/AOD149"); // For local use. File should be formatted the same as the normal list of input files (one filename per line). // Again, don't use AliEn locally!! It will be very slow and cause strain on the grid! embeddingHelper->SetFileListFilename("aodFilesEmbedData.txt"); // If the embedded file is an ESD, then set: embeddingHelper->SetESD(); // Add additional configure as desired. // For some examples... // ... randomly select which file to start from: embeddingHelper->SetRandomFileAccess(kTRUE); // ... Start from a random event within each file embeddingHelper->SetRandomEventNumberAccess(kTRUE); // ... Set pt hard bin properties embeddingHelper->SetPtHardBin(4); embeddingHelper->SetNPtHardBins(11); // etc.. // As your last step, always initialize the helper! embeddingHelper->Initialize(); ``` -------------------------------- ### Open Analysis File and Retrieve Output Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Opens a ROOT analysis file and retrieves the 'outputQCanalysis' directory. Ensure the file 'AnalysisResults.root' exists in the current directory. ```cxx // open the file TFile f("AnalysisResults.root"); // get the qc analysis output directory TDirectoryFile* dir = (TDirectoryFile*)f.Get("outputQCanalysis"); ``` -------------------------------- ### Load FLOW Library Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Load the necessary FLOW library into the AliROOT prompt before browsing the AnalysisResults.root file. ```c++ root [0] gSystem->Load("libPWGflowBase"); ``` -------------------------------- ### Install BeamGasMonitoring Macros Source: https://github.com/alisw/aliphysics/blob/master/PWGPP/CMakeLists.txt Installs BeamGasMonitoring macros to the PWGPP/BeamGasMonitoring/macros destination. These macros are part of the QA analysis for beam-gas interactions. ```cmake install(FILES BeamGasMonitoring/macros/AddTaskBGMonitorQAHLT.C BeamGasMonitoring/macros/AddTaskBGMonitorQATrain.C DESTINATION PWGPP/BeamGasMonitoring/macros) ``` -------------------------------- ### Run Local Analysis Macro Source: https://context7.com/alisw/aliphysics/llms.txt This C++ macro demonstrates how to set up and run an analysis task locally using AliPhysics. It includes loading necessary libraries, configuring input handlers, adding physics selection, and starting the analysis with a TChain. ```cpp // runAnalysis.C - Local analysis macro void runAnalysis() { // Load libraries gSystem->Load("libANALYSIS"); gSystem->Load("libANALYSISalice"); gSystem->Load("libPWGEMCALbase"); gSystem->Load("libPWGEMCALtasks"); // Create analysis manager AliAnalysisManager *mgr = new AliAnalysisManager("MyAnalysis"); // Input handler (AOD) AliAODInputHandler* aodHandler = new AliAODInputHandler(); mgr->SetInputEventHandler(aodHandler); // MC handler (if needed) AliMCEventHandler* mcHandler = new AliMCEventHandler(); mgr->SetMCtruthEventHandler(mcHandler); // Add physics selection gROOT->LoadMacro("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C"); AddTaskPhysicsSelection(kTRUE); // Add your analysis task gROOT->LoadMacro("AddTaskMyAnalysis.C"); AliMyAnalysisTask* task = AddTaskMyAnalysis(); // Create input chain TChain* chain = new TChain("aodTree"); chain->Add("/path/to/AliAOD.root"); // Initialize and run if (!mgr->InitAnalysis()) return; mgr->PrintStatus(); mgr->StartAnalysis("local", chain); } ``` -------------------------------- ### Clone AliRoot Repository Source: https://github.com/alisw/aliphysics/blob/master/INSTALL.txt Use this command to clone the AliRoot repository. Choose the public interface for simple builds or the private interface for development purposes. ```bash git clone http://git.cern.ch/pub/AliRoot AliRoot ``` ```bash git clone https://git.cern.ch/reps/AliRoot AliRoot ``` -------------------------------- ### Instantiate Flow Analysis Methods Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Initializes the AliFlowAnalysisWithMCEventPlane and AliFlowAnalysisWithQCumulants objects for flow analysis. ```cxx AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane(); AliFlowAnalysisWithQCumulants *qc = new AliFlowAnalysisWithQCumulants(); ``` -------------------------------- ### Install CMake Macros Source: https://github.com/alisw/aliphysics/blob/master/PWGJE/CMakeLists.txt Installs a directory named 'macros' to the 'PWGJE' destination during the build process. This is used to deploy reusable macro definitions. ```cmake install (DIRECTORY macros DESTINATION PWGJE) ``` -------------------------------- ### Setup and Connect Flow Analysis Tasks Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Creates and configures multiple flow analysis tasks (AliAnalysisTaskQCumulants), setting their harmonic numbers and connecting them to the flow event output. Each task's output is directed to a separate container. ```cxx // declare necessary pointers AliAnalysisDataContainer *coutputQC[3]; AliAnalysisTaskQCumulants *taskQC[3]; // the tasks will be created and added to the manager in a loop for(Int_t i = 0; i < 3; i++) { // create the flow analysis tasks taskQC[i] = new AliAnalysisTaskQCumulants(Form("TaskQCumulants_n=%i", i+2)); // set thei triggers taskQC[i]->SelectCollisionCandidates(AliVEvent::kMB); // and set the correct harmonic n taskQC[i]->SetHarmonic(i+2); // connect the task to the analysis manager mgr->AddTask(taskQC[i]); // create and connect the output containers TString outputQC = file; // create a sub-folder in the output file for each flow analysis task's output outputQC += Form(":QC_output_for_n=%i", i+2); /// create the output containers coutputQC[i] = mgr->CreateContainer( outputQC.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, outputQC); // connect the output of the flow event task to the flow analysis task mgr->ConnectInput(taskQC[i], 0, coutputFE); // and connect the output of the flow analysis task to the output container // which will be written to the output file mgr->ConnectOutput(taskQC[i], 1, coutputQC[i]); } ``` -------------------------------- ### Install Macros and Data Source: https://github.com/alisw/aliphysics/blob/master/PWGDQ/dielectronJet/CMakeLists.txt Installs macros and data files into the package structure. This ensures that auxiliary files required by the module are correctly deployed. ```cmake install(DIRECTORY macros DESTINATION PWGDQ/dielectronJet) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/files) install(DIRECTORY files DESTINATION PWGDQ/dielectronJet) endif() ``` -------------------------------- ### Create Analysis Manager and Input Chain Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FLOW/Documentation/doxygen/README.md Initializes the analysis manager and creates a TChain to manage input AliAOD.root files. Ensure the file paths are correct for your data. ```cxx // create the analysis manager AliAnalysisManager* mgr = new AliAnalysisManager("MyManager"); // create a tchain which will point to an aod tree TChain* chain = new TChain("aodTree"); // add a few files to the chain chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0003/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0003/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0004/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0005/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0006/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0007/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0008/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0009/AliAOD.root"); chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0010/AliAOD.root"); // create an input handler AliVEventHandler* inputH = new AliAODInputHandler(); // and connect it to the manager mgr->SetInputEventHandler(inputH); ``` -------------------------------- ### Install Macros Directory Source: https://github.com/alisw/aliphysics/blob/master/PWGHF/jetsHF/CMakeLists.txt Installs a directory containing macros to a specific destination within the project. This makes the macros available for use in other parts of the project. ```cmake install (DIRECTORY macros DESTINATION PWGHF/jetsHF) ``` -------------------------------- ### Installing Macros Directory (CMake) Source: https://github.com/alisw/aliphysics/blob/master/PWGCF/FEMTOSCOPY/CMakeLists.txt Installs a directory named 'macros' to the destination 'PWGCF/FEMTOSCOPY' during the build process. This is used for distributing common macro definitions. ```cmake install(DIRECTORY macros DESTINATION PWGCF/FEMTOSCOPY) ``` -------------------------------- ### Get Track Index from ESD Cluster Source: https://github.com/alisw/aliphysics/blob/master/PWG/EMCAL/READMEclustcorr.txt Retrieve the index of a matched track for an ESD cluster. The index can then be used to get the actual track object. ```cxx Int_t iTrack = cluster->GetTrackMatchedIndex(i); ```