/[PAMELA software]/PamVMC/examples/run_g3.C
ViewVC logotype

Annotation of /PamVMC/examples/run_g3.C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jun 12 18:39:14 2009 UTC (15 years, 8 months ago) by pam-rm2
Branch: MAIN
Changes since 1.2: +0 -0 lines
File MIME type: text/plain
- Introduced user-defined names of output files and random seeds number.
Users can do it use options of PamVMCApplication constructor:
PamVMCApplication(const char* name,  const char *title, const char*
filename="pamtest", Int_t seed=0).
The Random object that I use is TRandom3 object which has astronomical
large period (in case of default initialization 0). All random generators
in the code use this object by calling of gRandom singleton which keeps
it.

- Corrected TOF digitization routine. No problems with TDC hits due to
hadronic interactions anymore.

- Some small changes was done to compile code under Root 5.23. +
geant4_vmc v. 2.6 without any warnings

- Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
2.6.Some obsolete classes was deleted as soon as developers implemented
regions.

- Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
VMC web page written that as soon as Geant4 has no option ONLY/MANY
translation of overlapped geometry to Geant4 through VGM could be wrong.
I'd like to stay with Root navigation:
http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
option.

- New Tracker digitization routine written by Sergio was implemented

- PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
 The problem was that ROOT developers introduced in TVirtualMC class a new
method SetMagField and new base class:TVirtualMagField from which
user-defined classes shoukd be derived

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

  ViewVC Help
Powered by ViewVC 1.1.23