source: trunk/environments/g4py/source/physics_lists/pyPhysicsLists.cc

Last change on this file was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 6.5 KB
Line 
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,v 1.11 2010/06/21 12:29:02 kmura Exp $
27// $Name: geant4-09-04-beta-01 $
28// ====================================================================
29//   pyPhysicsLists.cc
30//
31//                                         2007 Q
32// ====================================================================
33#include <boost/python.hpp>
34#include "G4Version.hh"
35#include <vector>
36#include <algorithm>
37
38#if G4VERSION_NUMBER >= 820
39
40#include "G4HadronInelasticQBBC.hh"
41#include "G4HadronInelasticQLHEP.hh"
42
43#include "FTFC.hh"
44#include "FTFP.hh"
45#include "LBE.hh"
46#include "LHEP.hh"
47#include "LHEP_BERT.hh"
48#include "LHEP_BERT_HP.hh"
49#include "LHEP_EMV.hh"
50#include "LHEP_PRECO_HP.hh"
51#include "QBBC.hh"
52#include "QGSC.hh"
53#include "QGSC_EMV.hh"
54#include "QGSP.hh"
55#include "QGSP_BERT.hh"
56#include "QGSP_BERT_HP.hh"
57#include "QGSP_BIC.hh"
58#include "QGSP_BIC_HP.hh"
59#include "QGSP_EMV.hh"
60#include "QGSP_QEL.hh"
61//#include "QGSC_EFLOW.hh"  (dropped at 9.4.0)
62//#include "QGSP_EMX.hh"    (dropped at 9.4.0)
63
64#if G4VERSION_NUMBER <= 830
65#include "LHEP_BIC.hh"
66#include "LHEP_BIC_HP.hh"
67#include "LHEP_HP.hh"
68#include "LHEP_LEAD.hh"
69#include "LHEP_LEAD_HP.hh"
70#include "LHEP_PRECO.hh"
71#include "QGSC_LEAD.hh"
72#include "QGSC_LEAD_HP.hh"
73#include "QGSP_HP.hh"
74#endif
75
76#endif
77
78#if G4VERSION_NUMBER >= 830
79//#include "FTFP_EMV.hh"  (dropped at 9.4.0)
80#include "QGSP_BERT_EMV.hh"
81#include "QGSP_BERT_NQE.hh"
82#include "QGSP_BERT_TRV.hh"
83#include "QGSP_EMV_NQE.hh"
84#include "QGSP_NQE.hh"
85#endif
86
87#if G4VERSION_NUMBER >= 910
88#include "FTFP_BERT.hh"
89#include "FTF_BIC.hh"
90#include "QGSC_BERT.hh"
91#include "QGS_BIC.hh"
92#include "QGSP_DIF.hh"
93#include "QGSP_BERT_DIF.hh"
94#endif
95
96#if G4VERSION_NUMBER >= 930
97#include "CHIPS.hh"
98#include "FTFP_BERT_EMV.hh"
99#include "FTFP_BERT_EMX.hh"
100#include "FTFP_BERT_TRV.hh"
101#include "QGSC_CHIPS.hh"
102#include "QGSC_QGSC.hh"
103#include "QGSP_BERT_EMX.hh"
104#include "QGSP_BERT_NOLEP.hh"
105#include "QGSP_BIC_EMY.hh"
106#include "QGSP_FTFP_BERT.hh"
107#include "QGSP_INCL_ABLA.hh"
108#endif
109
110#if G4VERSION_NUMBER >= 940
111#include "QGSP_BERT_CHIPS.hh"
112#endif
113
114// macro for adding physics lists
115#define ADD_PHYSICS_LIST(plname) \
116  class_<plname, plname*, bases<G4VUserPhysicsList>, boost::noncopyable> \
117    (#plname, #plname " physics list") \
118    ; \
119  AddPhysicsList(#plname);
120
121using namespace boost::python;
122
123// ====================================================================
124// thin wrappers
125// ====================================================================
126namespace pyPhysicsLists {
127
128  static std::vector<std::string> plList;
129
130void AddPhysicsList(const G4String& plname) {
131  plList.push_back(plname);
132}
133
134void ListPhysicsList() {
135  for (G4int i=0; i< plList.size(); i++) {
136    G4cout << plList[i] << G4endl;
137  }
138}
139
140};
141
142using namespace pyPhysicsLists;
143
144// ====================================================================
145// module definition
146// ====================================================================
147void export_PhysicsLists()
148{
149  def("ListPhysicsList",   ListPhysicsList);
150
151#if G4VERSION_NUMBER >= 820
152  ADD_PHYSICS_LIST(FTFC);
153  ADD_PHYSICS_LIST(FTFP);
154  ADD_PHYSICS_LIST(LBE);
155  ADD_PHYSICS_LIST(LHEP);
156  ADD_PHYSICS_LIST(LHEP_BERT);
157  ADD_PHYSICS_LIST(LHEP_BERT_HP);
158  ADD_PHYSICS_LIST(LHEP_EMV);
159  ADD_PHYSICS_LIST(LHEP_PRECO_HP);
160  ADD_PHYSICS_LIST(QBBC);
161  ADD_PHYSICS_LIST(QGSC);
162  ADD_PHYSICS_LIST(QGSC_EMV);
163  ADD_PHYSICS_LIST(QGSP);
164  ADD_PHYSICS_LIST(QGSP_BERT);
165  ADD_PHYSICS_LIST(QGSP_BERT_HP);
166  ADD_PHYSICS_LIST(QGSP_BIC);
167  ADD_PHYSICS_LIST(QGSP_BIC_HP);
168  ADD_PHYSICS_LIST(QGSP_EMV);
169  ADD_PHYSICS_LIST(QGSP_QEL);
170  //ADD_PHYSICS_LIST(QGSC_EFLOW);
171  //ADD_PHYSICS_LIST(QGSP_EMX);
172
173#if G4VERSION_NUMBER <= 830
174  ADD_PHYSICS_LIST(LHEP_BIC);
175  ADD_PHYSICS_LIST(LHEP_BIC_HP);
176  ADD_PHYSICS_LIST(LHEP_HP);
177  ADD_PHYSICS_LIST(LHEP_LEAD);
178  ADD_PHYSICS_LIST(LHEP_LEAD_HP);
179  ADD_PHYSICS_LIST(LHEP_PRECO);
180  ADD_PHYSICS_LIST(QGSC_LEAD);
181  ADD_PHYSICS_LIST(QGSC_LEAD_HP);
182  ADD_PHYSICS_LIST(QGSP_HP);
183#endif
184
185#endif
186
187#if G4VERSION_NUMBER >= 830
188  //ADD_PHYSICS_LIST(FTFP_EMV);
189  ADD_PHYSICS_LIST(QGSP_BERT_EMV);
190  ADD_PHYSICS_LIST(QGSP_BERT_NQE);
191  ADD_PHYSICS_LIST(QGSP_BERT_TRV);
192  ADD_PHYSICS_LIST(QGSP_EMV_NQE);
193  ADD_PHYSICS_LIST(QGSP_NQE);
194#endif
195
196#if G4VERSION_NUMBER >= 910
197  ADD_PHYSICS_LIST(FTFP_BERT);
198  ADD_PHYSICS_LIST(FTF_BIC);
199  ADD_PHYSICS_LIST(QGSC_BERT);
200  ADD_PHYSICS_LIST(QGS_BIC);
201  ADD_PHYSICS_LIST(QGSP_DIF);
202  ADD_PHYSICS_LIST(QGSP_BERT_DIF);
203#endif
204
205#if G4VERSION_NUMBER >= 930
206  ADD_PHYSICS_LIST(CHIPS);
207  ADD_PHYSICS_LIST(FTFP_BERT_EMV);
208  ADD_PHYSICS_LIST(FTFP_BERT_EMX);
209  ADD_PHYSICS_LIST(FTFP_BERT_TRV);
210  ADD_PHYSICS_LIST(QGSC_CHIPS);
211  ADD_PHYSICS_LIST(QGSC_QGSC);
212  ADD_PHYSICS_LIST(QGSP_BERT_EMX);
213  ADD_PHYSICS_LIST(QGSP_BERT_NOLEP);
214  ADD_PHYSICS_LIST(QGSP_BIC_EMY);
215  ADD_PHYSICS_LIST(QGSP_FTFP_BERT);
216  ADD_PHYSICS_LIST(QGSP_INCL_ABLA);
217#endif
218
219#if G4VERSION_NUMBER >= 930
220  ADD_PHYSICS_LIST(QGSP_BERT_CHIPS);
221#endif
222
223  // sort PL vector
224  std::sort(plList.begin(), plList.end());
225
226}
227
Note: See TracBrowser for help on using the repository browser.