/scratch0/jsnuveri/BDSIM/BDSIMgit/bdsim/src/BDSParameterisationPhysics.cc

00001 #include "BDSParameterisationPhysics.hh"
00002 #include "G4Gamma.hh"
00003 #include "G4Electron.hh"
00004 #include "G4Positron.hh"
00005 #include "G4ProcessManager.hh"
00006 #include "G4Version.hh"
00007 
00008 BDSParameterisationPhysics::BDSParameterisationPhysics():G4VPhysicsConstructor("BDSParameterisationPhysics"),_wasActivated(false),
00009                                                          _fastSimulationManagerProcess(NULL)
00010 {;}
00011 
00012 BDSParameterisationPhysics::~BDSParameterisationPhysics()
00013 {;}
00014 
00015 void BDSParameterisationPhysics::ConstructParticle(){
00016   G4Gamma::Gamma();
00017   G4Electron::Electron();
00018   G4Positron::Positron();    
00019   return;
00020 }
00021 
00022 void BDSParameterisationPhysics::ConstructProcess(){
00023   if(_wasActivated) return;
00024   _wasActivated=true;
00025   
00026   _fastSimulationManagerProcess =
00027     new G4FastSimulationManagerProcess();
00028   G4cout << "FastSimulationManagerProcess" <<G4endl;
00029 
00030 #if G4VERSION_NUMBER < 1000
00031   theParticleTable = G4ParticleTable::GetParticleTable();
00032   theParticleIterator = theParticleTable->GetIterator();
00033   G4ParticleTable::G4PTblDicIterator* aParticleIterator = theParticleIterator;
00034 #endif
00035 
00036   aParticleIterator->reset();
00037   //G4cout<<"---"<<G4endl;                                                                                                                                              
00038   while( (*aParticleIterator)() ){
00039     //G4cout<<"+++"<<G4endl;                                                                                                                                            
00040     G4ParticleDefinition* particle = aParticleIterator->value();
00041     // G4cout<<"--- particle "<<particle->GetParticleName()<<G4endl;                                                                                                    
00042     G4ProcessManager* pmanager = particle->GetProcessManager();
00043     // The fast simulation process becomes a discrete process only since 9.0:                                                                                                 
00044     pmanager->AddDiscreteProcess(_fastSimulationManagerProcess);
00045   }
00046   return;
00047 }
00048 
00049 

Generated on 28 Jun 2015 for BDSIM by  doxygen 1.4.7