91d99d7495697dc7a2fcdbb1271a52c1a2e603c2
[u/mrichter/AliRoot.git] / AliFluka / alifluka.cxx
1 // $Id$
2
3 #include "TFluka.h"
4 #include "FGeometryInit.hh"
5
6 #include "AliDetConstructionHelper.h"
7 #include "AliRun.h"
8
9 #include <TROOT.h>
10
11 #define flukam flukam_
12
13 extern "C" void flukam(const G4int & GeoFlag);
14
15 int main(int argc, char** argv) 
16 {
17   // ROOT  ===================
18   TROOT aTROOT("Alice","Alice Flugg prototype Root I/O");
19
20   // AliRun
21   AliRun* run
22     = new AliRun("gAlice","The Alice run manager");
23   G4cout << "AliRun has been created." << G4endl;
24   
25   // TFluka
26   TFluka* fluka
27     = new TFluka("TFluka", "The Fluka Monte Carlo");
28   G4cout << "TFluka has been created." << G4endl;
29
30   // Detector construction helper
31   AliDetConstructionHelper* detHelper = new AliDetConstructionHelper();
32   G4cout << "Detector construction helper has been created." << G4endl;
33
34   // Flugg
35   FGeometryInit* theFGeometryInit = FGeometryInit::GetInstance();
36   theFGeometryInit->setDetConstruction(detHelper->DetConstruction());
37   G4cout << "Detector construction has been set to Flugg." << G4endl;
38
39   //flag for geometry:
40   const G4int flag = 1;
41         // 1 for GEANT4
42         // 0 for FLUKA
43         // 2 for Rubia
44
45   //call fluka
46   flukam(flag);
47
48   delete run;
49   
50   return 0;
51 }