slic/src
diff -u -r1.22 -r1.23
--- PhysicsListFactory.cc 22 Oct 2007 13:26:07 -0000 1.22
+++ PhysicsListFactory.cc 17 Dec 2007 23:45:47 -0000 1.23
@@ -1,13 +1,16 @@
-// $Header: /cvs/lcd/slic/src/PhysicsListFactory.cc,v 1.22 2007/10/22 13:26:07 wenzel Exp $
+// $Header: /cvs/lcd/slic/src/PhysicsListFactory.cc,v 1.23 2007/12/17 23:45:47 jeremy Exp $
#include "PhysicsListFactory.hh"
// geant4 physics lists
#ifdef HAVE_G4PHYSICSLISTS
+
#include "FTFC.hh"
#include "FTFP.hh"
+
#ifdef HAVE_FTFP_EMV
#include "FTFP_EMV.hh"
#endif
+
#include "LBE.hh"
#include "LHEP.hh"
#include "LHEP_BERT.hh"
@@ -20,29 +23,63 @@
#include "QGSC_EMV.hh"
#include "QGSP.hh"
#include "QGSP_BERT.hh"
+
#ifdef HAVE_QGSP_BERT_EMV
#include "QGSP_BERT_EMV.hh"
#endif
+
#include "QGSP_BERT_HP.hh"
+
#ifdef HAVE_QGSP_BERT_NQE
#include "QGSP_BERT_NQE.hh"
#endif
+
#ifdef HAVE_QGSP_BERT_TRV
#include "QGSP_BERT_TRV.hh"
#endif
+
#include "QGSP_BIC.hh"
#include "QGSP_BIC_HP.hh"
#include "QGSP_EMV.hh"
+
#ifdef HAVE_QGSP_EMV_NQE
#include "QGSP_EMV_NQE.hh"
#endif
+
#include "QGSP_EMX.hh"
+
#ifdef HAVE_QGSP_NQE
#include "QGSP_NQE.hh"
#endif
+
#include "QGSP_QEL.hh"
+
+#ifdef HAVE_FTFP_BERT
+#include "FTFP_BERT.hh"
+#endif
+
+#ifdef HAVE_QGSC_BERT
+#include "QGSC_BERT.hh"
#endif
+#ifdef HAVE_QGSP_DIF
+#include "QGSP_DIF.hh"
+#endif
+
+#ifdef HAVE_QGSP_BERT_DIF
+#include "QGSP_BERT_DIF.hh"
+#endif
+
+#ifdef HAVE_QGS_BIC
+#include "QGS_BIC.hh"
+#endif
+
+#ifdef HAVE_FTF_BIC
+#include "FTF_BIC.hh"
+#endif
+
+#endif // HAVE_G4PHYSICSLISTS
+
// lcphys
#ifdef SLIC_USE_LCPHYS
#include "LCPhysicsList.hh"
@@ -56,35 +93,6 @@
/**
* A macro to add a TPhysicsListBuilder for a single physics list.
*
- * Physics lists in Geant4 9.0.p01.
- *
- * FTFC
- * FTFP
- * FTFP_EMV
- * LBE
- * LHEP
- * LHEP_BERT
- * LHEP_BERT_HP
- * LHEP_EMV
- * LHEP_PRECO_HP
- * QBBC
- * QGSC
- * QGSC_EFLOW
- * QGSC_EMV
- * QGSP
- * QGSP_BERT
- * QGSP_BERT_EMV
- * QGSP_BERT_HP
- * QGSP_BERT_NQE
- * QGSP_BERT_TRV
- * QGSP_BIC
- * QGSP_BIC_HP
- * QGSP_EMV
- * QGSP_EMV_NQE
- * QGSP_EMX
- * QGSP_NQE
- * QGSP_QEL
- *
* @param list The class name of the list.
* @param name The name of the list which will be used to instantiate it.
* @param description A short description of the list.
@@ -97,119 +105,151 @@
namespace slic
{
- PhysicsListFactory::PhysicsListFactory()
- : Module("PhysicsListFactory")
- {
- initializeBuilders();
- }
+ PhysicsListFactory::PhysicsListFactory()
+ : Module("PhysicsListFactory")
+ {
+ initializeBuilders();
+ }
- PhysicsListFactory::~PhysicsListFactory()
- {
- for ( BuilderMap::const_iterator it = m_builders.begin();
- it != m_builders.end();
- it++ ) {
- delete it->second;
- }
- m_builders.clear();
- }
+ PhysicsListFactory::~PhysicsListFactory()
+ {
+ for ( BuilderMap::const_iterator it = m_builders.begin();
+ it != m_builders.end();
+ it++ ) {
+ delete it->second;
+ }
+ m_builders.clear();
+ }
- G4VUserPhysicsList* PhysicsListFactory::create( const std::string& name )
- {
- log().okay("Creating physics list <" + name + ">.");
+ G4VUserPhysicsList* PhysicsListFactory::create( const std::string& name )
+ {
+ log().okay("Creating physics list <" + name + ">.");
- G4VUserPhysicsList* physicslist = 0;
+ G4VUserPhysicsList* physicslist = 0;
- VPhysicsListBuilder* builder = m_builders[ name ];
+ VPhysicsListBuilder* builder = m_builders[ name ];
- if ( builder != 0 ) {
- physicslist = builder->create();
- }
- else {
- G4Exception("ERROR: No builder found for physics list <" + name + "> .");
- }
+ if ( builder != 0 ) {
+ physicslist = builder->create();
+ }
+ else {
+ G4Exception("ERROR: No builder found for physics list <" + name + "> .");
+ }
- return physicslist;
- }
+ return physicslist;
+ }
- void PhysicsListFactory::printAvailableLists()
- {
- log() << LOG::okay << LOG::done;
- log() << LOG::okay << "----GEANT4 PHYSICS LISTS----" << LOG::endl << LOG::done;
- log() << LOG::okay << "NAME DESCRIPTION" << LOG::done;
- log() << LOG::okay << "----------------------------------------------------------------------" << LOG::done;
- for ( BuilderMap::const_iterator it = m_builders.begin();
- it != m_builders.end();
- it++ ) {
- log().width(15);
- log() << LOG::okay << left << it->first;
- log() << LOG::okay << it->second->getDescription() << LOG::done;
+ void PhysicsListFactory::printAvailableLists()
+ {
+ log() << LOG::okay << LOG::done;
+ log() << LOG::okay << "----GEANT4 PHYSICS LISTS----" << LOG::endl << LOG::done;
+ log() << LOG::okay << "NAME DESCRIPTION" << LOG::done;
+ log() << LOG::okay << "----------------------------------------------------------------------" << LOG::done;
+ for ( BuilderMap::const_iterator it = m_builders.begin();
+ it != m_builders.end();
+ it++ ) {
+ log().width(15);
+ log() << LOG::okay << left << it->first;
+ log() << LOG::okay << it->second->getDescription() << LOG::done;
+ }
}
- }
- void PhysicsListFactory::initializeBuilders()
- {
+ void PhysicsListFactory::initializeBuilders()
+ {
#ifdef SLIC_USE_LCPHYS
- BUILDER_LCPHYS(LCPhysicsList, "LCPhys", "ILC Physics List by Dennis Wright.")
+ BUILDER_LCPHYS(LCPhysicsList, "LCPhys", "ILC Physics List by Dennis Wright.")
#endif
#ifdef HAVE_G4PHYSICSLISTS
- BUILDER(FTFC, "Fritiof with CHIPS")
- BUILDER(FTFP, "Fritiof with precompound")
+
+ BUILDER(FTFC, "Fritiof with CHIPS")
+ BUILDER(FTFP, "Fritiof with precompound")
+
#ifdef HAVE_FTFP_EMV
- BUILDER(FTFP_EMV, "FTFP with v 7.1 EM processes")
+ BUILDER(FTFP_EMV, "FTFP with v 7.1 EM processes")
#endif
- BUILDER(LBE, "Low backgrounds experiment with low energy EM")
- BUILDER(LHEP, "Low and High Energy Parameterised")
- BUILDER(LHEP_BERT, "LHEP with Bertini Cascade")
- BUILDER(LHEP_BERT_HP, "LHEP with Bertini Cascade and high precision neutrons")
- BUILDER(LHEP_EMV, "LHEP with v 7.1 EM processes")
- BUILDER(LHEP_PRECO_HP, "LHEP_PRECO with HP")
- BUILDER(QBBC, "Uses best cross section data within QGSP")
- BUILDER(QGSC, "Quark Gluon-String (QGS) with CHIPS")
- BUILDER(QGSC_EFLOW, "QGSC using energy flow methods from CHIPS model")
- BUILDER(QGSC_EMV, "QGSC with v 7.1 EM processes")
- BUILDER(QGSP, "QGS with precompound")
- BUILDER(QGSP_BERT, "QGSP with Bertini Cascade")
+
+ BUILDER(LBE, "Low backgrounds experiment with low energy EM")
+ BUILDER(LHEP, "Low and High Energy Parameterised")
+ BUILDER(LHEP_BERT, "LHEP with Bertini Cascade")
+ BUILDER(LHEP_BERT_HP, "LHEP with Bertini Cascade and high precision neutrons")
+ BUILDER(LHEP_EMV, "LHEP with v 7.1 EM processes")
+ BUILDER(LHEP_PRECO_HP, "LHEP_PRECO with HP")
+ BUILDER(QBBC, "Uses best cross section data within QGSP")
+ BUILDER(QGSC, "Quark Gluon-String (QGS) with CHIPS")
+ BUILDER(QGSC_EFLOW, "QGSC using energy flow methods from CHIPS model")
+ BUILDER(QGSC_EMV, "QGSC with v 7.1 EM processes")
+ BUILDER(QGSP, "QGS with precompound")
+ BUILDER(QGSP_BERT, "QGSP with Bertini Cascade")
+
#ifdef HAVE_QGSP_BERT_EMV
- BUILDER(QGSP_BERT_EMV, "QGSP_BERT with v 7.1 EM processes")
+ BUILDER(QGSP_BERT_EMV, "QGSP_BERT with v 7.1 EM processes")
#endif
- BUILDER(QGSP_BERT_HP, "QGSP with Bertini Cascade and high precision neutrons")
+
+ BUILDER(QGSP_BERT_HP, "QGSP with Bertini Cascade and high precision neutrons")
+
#ifdef HAVE_QGSP_BERT_NQE
- BUILDER(QGSP_BERT_NQE, "QGSP_BERT with quasi-elastic processes removed")
+ BUILDER(QGSP_BERT_NQE, "QGSP_BERT with quasi-elastic processes removed")
#endif
+
#ifdef HAVE_QGSP_BERT_TRV
- BUILDER(QGSP_BERT_TRV, "QGSP_BERT with transition to Bertini at 5 GeV")
+ BUILDER(QGSP_BERT_TRV, "QGSP_BERT with transition to Bertini at 5 GeV")
#endif
- BUILDER(QGSP_BIC, "QGSP with Binary Cascade")
- BUILDER(QGSP_BIC_HP, "QGSP with Binary Cascade")
- BUILDER(QGSP_EMV, "LHEP with v 7.1 EM processes")
+
+ BUILDER(QGSP_BIC, "QGSP with Binary Cascade")
+ BUILDER(QGSP_BIC_HP, "QGSP with Binary Cascade")
+ BUILDER(QGSP_EMV, "LHEP with v 7.1 EM processes")
+
#ifdef HAVE_QGSP_EMV_NQE
- BUILDER(QGSP_EMV_NQE, "QGSP with v 7.1 EM processes and quasi-elastic processes removed")
+ BUILDER(QGSP_EMV_NQE, "QGSP with v 7.1 EM processes and quasi-elastic processes removed")
#endif
- BUILDER(QGSP_EMX, "QGSP with v 7.2 EM processes")
+
+ BUILDER(QGSP_EMX, "QGSP with v 7.2 EM processes")
+
#ifdef HAVE_QGSP_NQE
- BUILDER(QGSP_NQE, "QGSP with quasi-elastic processes removed")
+ BUILDER(QGSP_NQE, "QGSP with quasi-elastic processes removed")
+#endif
+
+ BUILDER(QGSP_QEL, "QGSP with elastic cross sections and model from CHIPS")
+
+#ifdef HAVE_FTFP_BERT
+ BUILDER(FTFP_BERT, "FTFP with Bertini Cascade")
#endif
- BUILDER(QGSP_QEL, "QGSP with elastic cross sections and model from CHIPS")
+
+#ifdef HAVE_QGSC_BERT
+ BUILDER(QGSC_BERT, "QGSC with Bertini Cascade")
#endif
- }
- void PhysicsListFactory::addBuilder( VPhysicsListBuilder* builder)
- {
- const G4String& name = builder->getName();
+#ifdef HAVE_QGSP_DIF
+ BUILDER(QGSP_DIF, "QGSP with CHIPS diffractive scattering")
+#endif
+
+#ifdef HAVE_QGSP_BERT_DIF
+ BUILDER(QGSP_BERT_DIF, "QGSP_BERT with CHIPS diffractive scattering")
+#endif
- if ( m_builders.find( name ) != m_builders.end() ) {
- log() << LOG::warning << "Ignoring duplicate physics list builder for <" << name << "> ." << LOG::done;
- }
- else {
- m_builders[ name ] = builder;
- }
- }
-}
-/*
+#ifdef HAVE_QGS_BIC
+ BUILDER(QGS_BIC, "QGS with new Bertini developments")
+#endif
+
+#ifdef HAVE_FTF_BIC
+ BUILDER(FTF_BIC, "FTF with new Bertini developments")
+#endif
-physics lists in Geant4 9.0
+#endif
+ }
-*/
+ void PhysicsListFactory::addBuilder( VPhysicsListBuilder* builder)
+ {
+ const G4String& name = builder->getName();
+
+ if ( m_builders.find( name ) != m_builders.end() ) {
+ log() << LOG::warning << "Ignoring duplicate physics list builder for <" << name << "> ." << LOG::done;
+ }
+ else {
+ m_builders[ name ] = builder;
+ }
+ }
+}