I did not manage to run the macros, so I had to compile those on the fly in FairRunSim.cxx:
//----------------------------------------------Geant4 Config-----------------------------------------
if(strcmp(GetName(),"TGeant4") == 0 ) {
//cout << gSystem->GetIncludePath() << endl;
gSystem->AddIncludePath("-I/home/jasinski/bin/fairroot/include/Geant4");
//cout << gSystem->GetIncludePath() << endl;
gSystem->AddIncludePath("-I/home/jasinski/bin/sep12/transport/geant4_vmc/include/geant4vmc");
gSystem->AddIncludePath("-I/home/jasinski/bin/pandaroot/pnddata");
gSystem->AddIncludePath("-I/home/jasinski/bin/pandaroot/base");
gSystem->AddIncludePath("-I/home/jasinski/bin/pandaroot/fairtools");
TString g4LibMacro="g4libs.C";
...
gROOT->LoadMacro((LibMacro+"+").Data());
gROOT->ProcessLine(LibFunction.Data());
gROOT->LoadMacro((ConfigMacro+"+").Data());
gROOT->ProcessLine("Config()");
gROOT->LoadMacro((cuts+"+").Data());
gROOT->ProcessLine("SetCuts()");
revealing apart from the usual missing includes small bugs in the macros. Include directories should be fixed in terms of Path variables.
https://subversion.gsi.de/trac/fairroot/ticket/96#comment:3[/link]
Mostly that was it. Now I can run Geant4 VMC also standalone. I cannot say if this is not a waste of time. At least I had in the past always better experience with compiled programs than making CINT manage all this.
Cheers