/[PAMELA software]/trieste/pamVMC/run_fluka_testTRK.C
ViewVC logotype

Contents of /trieste/pamVMC/run_fluka_testTRK.C

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed Mar 4 12:51:03 2009 UTC (15 years, 8 months ago) by pamelats
Branch: MAIN, pamVMC
CVS Tags: start, v0r00, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Test pamVMC

1 // $Id: run_g4.C,v 1.0 2007/06/01
2 //
3 // Macro for running G4PAM_VMC with
4 class TFluka;
5
6 void run_fluka_testTRK(const TString& configMacro = "flukaConfig.C")
7 {
8 // Load basic libraries
9 gROOT->LoadMacro("./macro/basiclibs.C");
10 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
19 // Load TFluka libraries
20 gSystem->Load("/home/nikolas/francesco/vmc/fluka_vmc/lib/tgt_linux/libfluka");
21 //gSystem->Load("/cern/fluka_vmc/lib/tgt_linux/libfluka");
22 // Load this example libraries
23 TString G4WD=gSystem->Getenv("G4WORKDIR");
24 TString PLAT=gSystem->Getenv("PLATFORM");
25 gSystem->Load(G4WD+"/lib/tgt_"+PLAT+"/libPamVMC_fc");
26
27 // MC application
28 PamVMCApplication* appl
29 = new PamVMCApplication("PAMFLUKA_VMC", "PAMELA GEANT4 VMC application");
30
31
32 appl->SetVerboseLevel(1);
33
34
35 // Initialize MC
36
37 appl->InitMC(configMacro);
38 // appl->SetVerboseLevel(1);
39
40 // Run MC
41
42
43 appl->GetPrimaryGenerator()->SetParticle(kProton);
44 appl->GetPrimaryGenerator()->SetDirection(0.,0.);
45 appl->GetPrimaryGenerator()->SetKinEnergy(1.);
46 appl->GetPrimaryGenerator()->SetPosition(1.,1.,130.);
47
48 for (Int_t i=0; i<200; i++){
49 cout<<"Event "<<i<<endl;
50 appl->RunMC(1);
51 }
52
53
54 appl->FinishRun();
55 delete appl;
56
57 // return
58
59 }

  ViewVC Help
Powered by ViewVC 1.1.23