CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/SimG4Core/Physics/interface/PhysicsListMaker.h

Go to the documentation of this file.
00001 #ifndef Physics_PhysicsListMaker_h
00002 #define Physics_PhysicsListMaker_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Physics
00006 // Class  :     PhysicsListMaker
00007 // 
00016 //
00017 // Original Author:  
00018 //         Created:  Tue Nov 22 13:03:44 EST 2005
00019 // $Id: PhysicsListMaker.h,v 1.4 2010/07/29 22:40:22 sunanda Exp $
00020 //
00021 
00022 // system include files
00023 #include <memory>
00024 
00025 // user include files
00026 #include "SimG4Core/Physics/interface/PhysicsListMakerBase.h"
00027 #include "SimG4Core/Notification/interface/SimActivityRegistryEnroller.h"
00028 
00029 // forward declarations
00030 
00031 template<class T>
00032 class PhysicsListMaker : public PhysicsListMakerBase
00033 {
00034 
00035    public:
00036       PhysicsListMaker(){}
00037 
00038       // ---------- const member functions ---------------------
00039       virtual std::auto_ptr<PhysicsList> make(G4LogicalVolumeToDDLogicalPartMap& map_,
00040                                               const HepPDT::ParticleDataTable * table_,
00041                                               sim::FieldBuilder * fieldBuilder_,
00042                                               const edm::ParameterSet& p,
00043                                               SimActivityRegistry& reg) const
00044       {
00045         std::auto_ptr<T> returnValue(new T(map_, table_, fieldBuilder_, p));
00046         SimActivityRegistryEnroller::enroll(reg, returnValue.get());
00047         
00048         return std::auto_ptr<PhysicsList>(returnValue);
00049       }
00050 
00051 };
00052 
00053 
00054 #endif