Your “Mau AF11225_5x20x20.TKA” and “Khongbia.TKA” data files are also needed in order to run your macro.
The first problem that I see is that you have:
const int n = 2000000;
Double_t y1[n],y[n];
and this uses more than 30MB on “stack” (quite often, the “stack” is limited to something like 8MB).
See, for example: No error when macro crashes
You also try to create two TFile objects with names which end with “.pdf” (which suggests “Adobe PDF” files, not ROOT files).
Notes:
- Always try to precompile your macro using ACLiC, in order to find source code problems, e.g. try something like (inspect all reported warnings and errors):
root [0] .L YourRootMacro.cxx++ - You can “debug” many problems using “valgrind”. See, for example: Segmentation Fault depending on linux distribution