do
mv "$file" "`basename $file .dat`.QGSjetII.dat"
done
where basename command removing directories and suffix from file names
for example
basename include/stdio.h .h
Output "stdio".
basename include/stdio.h .h
Output "stdio".
Assuming TH1* h, you can do
h->GetMean()
h->GetRMS()
h->GetEntries()