1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package. If you use all or part
5 // of it, please give an appropriate acknowledgement.
7 // Copyright Information: See EvtGen/COPYRIGHT
8 // Copyright (C) 2011 University of Warwick, UK
10 // Module: EvtExternalGenFactory
12 // Description: A factory type method to create engines for external physics
13 // generators like Pythia.
15 // Modification history:
17 // John Back April 2011 Module created
19 //------------------------------------------------------------------------------
22 #ifndef EVTEXTERNALGENFACTORY_HH
23 #define EVTEXTERNALGENFACTORY_HH
25 #include "EvtGenModels/EvtAbsExternalGen.hh"
29 class EvtExternalGenFactory {
33 enum genId {PythiaGenId = 0, PhotosGenId, TauolaGenId};
35 static EvtExternalGenFactory* getInstance();
37 EvtAbsExternalGen* getGenerator(int genId = 0);
39 void initialiseAllGenerators();
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);
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);
51 EvtExternalGenFactory();
52 ~EvtExternalGenFactory();
54 typedef std::map<int, EvtAbsExternalGen*> ExtGenMap;
55 typedef std::map<int, std::map<std::string, std::vector<std::string> > > ExtGenCommandMap;
59 EvtExternalGenFactory(const EvtExternalGenFactory&) {};
62 ExtGenCommandMap _extGenCommandMap;