/[PAMELA software]/PamCAL/PamVMC/run_g4.C
ViewVC logotype

Annotation of /PamCAL/PamVMC/run_g4.C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Nov 12 10:10:14 2007 UTC (17 years, 1 month ago) by nikolas
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
More basic files added

1 nikolas 1.1 // $Id: run_g4.C,v 1.0 2007/06/01
2     //
3     // Macro for running G4PAM_VMC with Geant4.
4    
5     void run_g4(const TString& configMacro = "g4Config.C")
6     {
7     // Load basic libraries
8     gROOT->LoadMacro("./macro/basiclibs.C");
9     basiclibs();
10    
11     // Load PAMELA libs
12     TString PAMLIB=gSystem->Getenv("PAM_LIB");
13     gSystem->Load(PAMLIB+"/libyoda.so");
14     gSystem->Load(PAMLIB+"/libDarthVader.so");
15     gSystem->Load(PAMLIB+"/libPamLevel2.so");
16    
17     // Load Geant4 libraries
18    
19     gROOT->LoadMacro("./macro/PamG4Libs.C");
20     PamG4Libs();
21    
22     // Load this example libraries
23     TString G4WD=gSystem->Getenv("G4WORKDIR");
24     TString PLAT=gSystem->Getenv("PLATFORM");
25     gSystem->Load(G4WD+"/lib/tgt_"+PLAT+"/libPam_VMC");
26    
27     // MC application
28     PamVMCApplication* appl
29     = new PamVMCApplication("PAMG4_VMC", "PAMELA GEANT4 VMC application");
30    
31     appl->GetPrimaryGenerator()->SetNofPrimaries(1);
32     ///appl->SetVerboseLevel(3);
33    
34     // Macro to run with primary = polarized optical photon
35     //gROOT->LoadMacro("optPhoton.C");
36     //optPhoton();
37    
38     // Initialize MC
39     appl->InitMC(configMacro);
40    
41     // Customise Geant4 setting after initialization:
42     // Physics list
43     ((TGeant4*)gMC)->ProcessGeantMacro("g4config2.in");
44     // Visualization settings
45     ((TGeant4*)gMC)->ProcessGeantMacro("g4vis.in");
46    
47     // Run MC
48     appl->RunMC(1);
49    
50     delete appl;
51     }

  ViewVC Help
Powered by ViewVC 1.1.23