CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimG4Core/Physics/src/PhysicsList.cc

Go to the documentation of this file.
00001 #include "SimG4Core/Physics/interface/PhysicsList.h"
00002 #include "SimG4Core/Physics/interface/DDG4ProductionCuts.h"
00003 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00004 
00005 #include "G4LossTableManager.hh"
00006 
00007 PhysicsList::PhysicsList(G4LogicalVolumeToDDLogicalPartMap & map,
00008                          const HepPDT::ParticleDataTable * table_,
00009                          sim::FieldBuilder *fieldBuilder_,
00010                          const edm::ParameterSet & p) 
00011   : G4VModularPhysicsList(), m_pPhysics(p),  prodCuts(0) {
00012   m_Verbosity = m_pPhysics.getUntrackedParameter<int>("Verbosity",0);
00013   prodCuts = new DDG4ProductionCuts(map, m_Verbosity);  
00014 }
00015  
00016 PhysicsList::~PhysicsList() {
00017   if (m_Verbosity > 1)
00018     LogDebug("Physics") << " G4BremsstrahlungThreshold was " 
00019                         << G4LossTableManager::Instance()->BremsstrahlungTh()/GeV 
00020                         << " GeV ";
00021   if (prodCuts!=0) delete prodCuts;
00022 }
00023 
00024 void PhysicsList::SetCuts() { 
00025 
00026   SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue")*cm);
00027   SetCutsWithDefault();
00028 
00029   G4LossTableManager::Instance()->SetBremsstrahlungTh
00030     (m_pPhysics.getParameter<double>("G4BremsstrahlungThreshold")*GeV);
00031 
00032   if ( m_pPhysics.getParameter<bool>("CutsPerRegion") ) {
00033     prodCuts->update();
00034   }
00035 
00036   if ( m_Verbosity > 1) {
00037     G4LossTableManager::Instance()->SetVerbose(m_Verbosity-1);
00038     G4VUserPhysicsList::DumpCutValuesTable();
00039   }
00040 
00041   return ;
00042 
00043 }
00044