Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CexmcProductionModelFactory.hh
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 /*
27  * =============================================================================
28  *
29  * Filename: CexmcProductionModelFactory.hh
30  *
31  * Description: production model factory
32  *
33  * Version: 1.0
34  * Created: 03.11.2009 23:20:35
35  * Revision: none
36  * Compiler: gcc
37  *
38  * Author: Alexey Radkov (),
39  * Company: PNPI
40  *
41  * =============================================================================
42  */
43 
44 #ifndef CEXMC_PRODUCTION_MODEL_FACTORY_HH
45 #define CEXMC_PRODUCTION_MODEL_FACTORY_HH
46 
47 #include <G4VUserPhysicsList.hh>
48 #include <G4PionZero.hh>
49 #include <G4Eta.hh>
50 #include "CexmcPhysicsList.hh"
51 #include "CexmcCommon.hh"
52 
53 
54 namespace CexmcPrivate
55 {
56  template < typename >
58  {
60  };
61 
62 #ifdef CEXMC_USE_QGSP_BIC_EMY
63  template <>
64  struct CexmcBasePhysicsInstance< QGSP_BIC_EMY >
65  {
67  };
68 #else
69 #ifdef CEXMC_USE_QGSP_BERT
70  template <>
71  struct CexmcBasePhysicsInstance< QGSP_BERT >
72  {
74  };
75 #else
76  template <>
78  {
80  };
81 #endif
82 #endif
83 }
84 
85 
86 template < typename BasePhysics,
87  template < typename > class StudiedPhysics,
88  template < typename > class ProductionModel >
90 {
91  public:
92  static G4VUserPhysicsList * Create(
93  CexmcProductionModelType productionModelType );
94 
95  static CexmcBasePhysicsUsed GetBasePhysics( void );
96 
97  private:
99 };
100 
101 
102 template < typename BasePhysics,
103  template < typename > class StudiedPhysics,
104  template < typename > class ProductionModel >
106  BasePhysics, StudiedPhysics, ProductionModel >::
107  Create( CexmcProductionModelType productionModelType )
108 {
109  switch ( productionModelType )
110  {
112  return new CexmcPhysicsList< BasePhysics, StudiedPhysics,
113  ProductionModel< G4PionZero > >;
114  case CexmcEtaProduction :
115  return new CexmcPhysicsList< BasePhysics, StudiedPhysics,
116  ProductionModel< G4Eta > >;
117  default :
118  return NULL;
119  }
120 }
121 
122 
123 template < typename BasePhysics,
124  template < typename > class StudiedPhysics,
125  template < typename > class ProductionModel >
127  BasePhysics, StudiedPhysics, ProductionModel >::
128  GetBasePhysics( void )
129 {
131 }
132 
133 
134 #endif
135 
CexmcProductionModelType
Definition: CexmcCommon.hh:91
CexmcBasePhysicsUsed
Definition: CexmcCommon.hh:82
const XML_Char int const XML_Char * value
Definition: expat.h:331