{
  TString rootsys = gSystem->Getenv("ROOTSYS");
  TString pamlib = gSystem->Getenv("PAM_LIB");
  TString paminc = gSystem->Getenv("PAM_INC");
  TString clhepinc = gSystem->Getenv("CLHEP_INCLUDE_DIR");
  TString clheplib = gSystem->Getenv("CLHEP_LIB_DIR");
  TString g4inc = gSystem->Getenv("G4INCLUDE");
  TString g4vmc = gSystem->Getenv("G4VMC_DIR");	
  TString pamvmc = gSystem->Getenv("PAM_VMC");
  TString vgm = gSystem->Getenv("VGM_INSTALL");
  TString g4lib = gSystem->Getenv("G4LIB");
  gROOT->ProcessLine(".include "+paminc);
  gROOT->ProcessLine(".include "+paminc+"/yoda");
  gROOT->ProcessLine(".include "+pamvmc+"/include");
  gROOT->ProcessLine(".include "+pamvmc+"/aux/spectra_generator");
  gROOT->ProcessLine(".include "+pamvmc+"/cal/include");
  gROOT->ProcessLine(".include "+pamvmc+"/ac/include");
  gROOT->ProcessLine(".include "+pamvmc+"/nd/include");
  gROOT->ProcessLine(".include "+pamvmc+"/s4/include");
  gROOT->ProcessLine(".include "+pamvmc+"/tof/include");
  gROOT->ProcessLine(".include "+pamvmc+"/trk/include");
  gROOT->ProcessLine(".include "+clhepinc+"/include");
  gROOT->ProcessLine(".include "+g4inc);
  gROOT->ProcessLine(".include "+g4vmc+"/include");
  gSystem->SetDynamicPath(pamlib+":"+rootsys+"/lib"+":"+rootsys+"/cint/cint/stl"+":"+g4lib+"/Linux-g++"+":"+clheplib+":/usr/lib:"+vgm+"/lib/Linux-g++:"+g4vmc+"/lib/tgt_linux");

  gSystem->Load("libCore.so");
  gSystem->Load("libRIO.so");
  gSystem->Load("libTree.so");
  gSystem->Load("libTMVA.so");



  gSystem->Load("libyoda.so");
  gSystem->Load("libGLTables.so");

  gSystem->Load("libsgp4.so");

  gSystem->Load("libDarthVader.so");
 gSystem->Load("libTrkParams.so");
  gSystem->Load("libMatrix.so");
  gSystem->Load("libOrbitalInfo.so");
  gSystem->Load("libNDLevel2.so");
  gSystem->Load("libAcLevel2.so");
  gSystem->Load("libS4Level2.so");
  gSystem->Load("libTrkCore.so");

  gSystem->Load("libTrigLevel2.so");
  gSystem->Load("libTrkLevel0.so");
  gSystem->Load("libTrkLevel2.so");
  gSystem->Load("libCaloLevel1.so");
  gSystem->Load("libCaloLevel2.so");
  gSystem->Load("libToFLevel2.so");
  gSystem->Load("libPamLevel2.so");
  gSystem->Load("libGeom");
  gSystem->Load("libVMC");
  gSystem->Load("libEG");
  gSystem->Load("libPhysics");

  gROOT->LoadMacro(pamvmc+"/macro/PamG4Libs.C");
  PamG4Libs();

  TString PLAT=gSystem->Getenv("PLATFORM");
  gSystem->Load(pamvmc+"/lib/tgt_"+PLAT+"/libPamVMC_fc.so");
  gSystem->Load(pamvmc+"/lib/tgt_"+PLAT+"/libPamG4RunConfiguration.so");
  gSystem->Load(pamvmc+"/aux/spectra_generator/libPrimaryInfo.so");
  gSystem->Load("libgeant4vmc.so");

  gROOT->SetStyle("Plain");
  gStyle->SetPalette(1);
  gStyle->SetPalette(1);
  gStyle->SetPadTickX(1);
  gStyle->SetPadTickY(1);
}
