How to add libaries such as #include <th1f.h>

Hello guys, i am new to root and pythia and i am confused.

i have downloaded root software and installed it through brew since i am using mac os and i have downloaded pythia8.3

i have made some run test to check if i had installed it correctly and the run test went well.

then i have downloaded another file to make another run but it gave me this error fatal error: ‘TH1F.h’ file not found
#include <TH1F.h>

i know that there is missing package i need to install it (because there more includes in main023), so my question how i can install these packages ? or there is anyway that the terminal can detect the missing packages and install it automatically?

i cant upload file cause my account is new

When building your program you should pass the include Path, by using root-config --cflags:

g++ -c `root-config --cflags`


after running the command line above it gives me fatal error: ‘Pythia8/Pythia.h’ file not found
#include “Pythia8/Pythia.h”
1 error generated.

where this path should be relative

i think the make command doesnt get the path of my include files
what shall i do?

You need to add the Path to Pythia8 in your Makefile, or to your compilation command:

g++ -c `root-config --cflags`  -I${PYTHIA_INCLUDE_DIR}

where PYTHIA_INCLUDE_DIR defines the include path to Pythia8.