Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyPhysicsLists.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: pyPhysicsLists.cc 101514 2016-11-18 15:30:57Z gcosmo $
27 // ====================================================================
28 // pyPhysicsLists.cc
29 //
30 // 2007 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include <vector>
34 #include <algorithm>
35 #include "FTFP_BERT.hh"
36 #include "FTFP_BERT_ATL.hh"
37 #include "FTFP_BERT_HP.hh"
38 #include "FTFP_BERT_TRV.hh"
39 #include "FTFP_INCLXX.hh"
40 #include "FTFP_INCLXX_HP.hh"
41 #include "FTF_BIC.hh"
42 #include "LBE.hh"
43 #include "NuBeam.hh"
44 #include "QBBC.hh"
45 #include "QGSP_BERT.hh"
46 #include "QGSP_BERT_HP.hh"
47 #include "QGSP_BIC.hh"
48 #include "QGSP_BIC_AllHP.hh"
49 #include "QGSP_BIC_HP.hh"
50 #include "QGSP_FTFP_BERT.hh"
51 #include "QGSP_INCLXX.hh"
52 #include "QGSP_INCLXX_HP.hh"
53 #include "QGS_BIC.hh"
54 #include "Shielding.hh"
55 
56 
57 // macro for adding physics lists
58 #define ADD_PHYSICS_LIST(plname) \
59  class_<plname, plname*, bases<G4VUserPhysicsList>, boost::noncopyable> \
60  (#plname, #plname " physics list") \
61  ; \
62  AddPhysicsList(#plname);
63 
64 using namespace boost::python;
65 
66 // ====================================================================
67 // thin wrappers
68 // ====================================================================
69 namespace pyPhysicsLists {
70 
71  static std::vector<std::string> plList;
72 
73 void AddPhysicsList(const G4String& plname) {
74  plList.push_back(plname);
75 }
76 
78  for (G4int i=0; i< plList.size(); i++) {
79  G4cout << plList[i] << G4endl;
80  }
81 }
82 
83 }
84 
85 using namespace pyPhysicsLists;
86 
87 // ====================================================================
88 // module definition
89 // ====================================================================
91 {
92  def("ListPhysicsList", ListPhysicsList);
93 
114 
115  // sort PL vector
116  std::sort(plList.begin(), plList.end());
117 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
static std::vector< std::string > plList
#define ADD_PHYSICS_LIST(plname)
#define G4endl
Definition: G4ios.hh:61
void ListPhysicsList()
Definition: LBE.hh:61
void export_PhysicsLists()
Definition: QBBC.hh:44
void AddPhysicsList(const G4String &plname)