/[PAMELA software]/PamVMC_update/config/g4Config.C
ViewVC logotype

Annotation of /PamVMC_update/config/g4Config.C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Mar 27 15:43:38 2015 UTC (9 years, 8 months ago) by pam-fi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +7 -2 lines
File MIME type: text/plain
Use dummy argc and argv in constructor of TGeant4 (avoid issue described at https://sft.its.cern.ch/jira/browse/VMC-7).

1 pam-fi 1.2 // $Id: g4Config.C,v 1.1.1.1 2013-10-15 15:51:32 formato Exp $
2 formato 1.1 //
3     // Configuration macro for Geant4 VirtualMC for PamG4VMC
4     // for geometry defined with Root and selected Geant4 native navigation
5    
6     void Config()
7     {
8     printf("---> Config()\n");
9     // gSystem->Load("libG4phys_builders");
10     gSystem->Load("libG4physicslists");
11    
12     TString PAM_VMC=gSystem->Getenv("PAM_VMC");
13     TString PLAT=gSystem->Getenv("PLATFORM");
14    
15     gSystem->Load(PAM_VMC+"/lib/tgt_"+PLAT+"/libPamG4RunConfiguration");
16     //std::cout<<PAM_VMC+"/lib/tgt_"+PLAT+"/libPamG4RunConfiguration"<<std::endl;
17     PamG4RunConfiguration* runConfiguration
18     = new PamG4RunConfiguration("geomRoot","FTFP_BERT");
19    
20     printf("Config() :: runConfiguration created\n");
21    
22 pam-fi 1.2 char **argv = (char**) new char*[1];
23    
24     argv[0] = new char[10];
25     strcpy("PamVMC.exe", argv[0]);
26    
27 formato 1.1 TGeant4* geant4
28 pam-fi 1.2 = new TGeant4("TGeant4_PAMELA", "The Geant4 PAMELA Monte Carlo", runConfiguration, 1, argv);
29 formato 1.1
30     printf("Config() :: TGeant4 object created\n");
31    
32     //std::cout<<"TGeant config created..."<<std::endl;
33     geant4->ProcessGeantMacro(PAM_VMC+"/config/g4config.in");
34     //std::cout<<"TGeant macro g4config.in processed..."<<std::endl;
35    
36     printf("<--- Config()\n");
37     }

  ViewVC Help
Powered by ViewVC 1.1.23