StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EvtExternalGenFactory.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 // This software is part of the EvtGen package. If you use all or part
5 // of it, please give an appropriate acknowledgement.
6 //
7 // Copyright Information: See EvtGen/COPYRIGHT
8 // Copyright (C) 2011 University of Warwick, UK
9 //
10 // Module: EvtExternalGenFactory
11 //
12 // Description: A factory type method to create engines for external physics
13 // generators like Pythia.
14 //
15 // Modification history:
16 //
17 // John Back April 2011 Module created
18 //
19 //------------------------------------------------------------------------------
20 //
21 
22 #ifndef EVTEXTERNALGENFACTORY_HH
23 #define EVTEXTERNALGENFACTORY_HH
24 
25 #include "EvtGenModels/EvtAbsExternalGen.hh"
26 
27 #include <map>
28 
30 
31 public:
32 
33  enum genId {PythiaGenId = 0, PhotosGenId, TauolaGenId};
34 
35  static EvtExternalGenFactory* getInstance();
36 
37  EvtAbsExternalGen* getGenerator(int genId = 0);
38 
39  void initialiseAllGenerators();
40 
41  void definePythiaGenerator(std::string xmlDir, bool convertPhysCodes, bool useEvtGenRandom = true);
42  void definePhotosGenerator(std::string photonType = "gamma", bool useEvtGenRandom = true);
43  void defineTauolaGenerator(bool useEvtGenRandom = true);
44 
45  //methods to add configuration commands to the pythia generators
46  //void addPythiaCommand( std::string generator, std::string module, std::string param, std::string value);
47  //void addPythia6Command(std::string generator, std::string module, std::string param, std::string value);
48 
49 protected:
50 
53 
54  typedef std::map<int, EvtAbsExternalGen*> ExtGenMap;
55  typedef std::map<int, std::map<std::string, std::vector<std::string> > > ExtGenCommandMap;
56 
57 private:
58 
60 
61  ExtGenMap _extGenMap;
62  ExtGenCommandMap _extGenCommandMap;
63 
64 };
65 
66 #endif