/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/BesSim/BesSim-00-01-24/src/StepLimiter.cc

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //      BOOST --- BESIII Object_Oriented Simulation Tool                     //
00003 //---------------------------------------------------------------------------//
00004 //Description: Includes G4Steplimiter as process for the different Particles.
00005 //             However, particles will only be affected by this process, if
00006 //             G4UserLimit is associated to a volume. This method is used in
00007 //             BesTofConstruction::ConstructMRPC()
00008 //Author: Matthias Ullrich
00009 //Created: October, 2011
00010 //Modified:
00011 //Comment:
00012 //---------------------------------------------------------------------------//
00013 //$ID: StepLimiter.hh 
00014 
00015 
00016 
00017 
00018 
00019 #include "G4ParticleDefinition.hh"
00020 #include "G4ProcessManager.hh"
00021 #include "G4LossTableManager.hh"
00022 
00023 
00024 
00025 #include "G4Gamma.hh"
00026 #include "G4Electron.hh"
00027 #include "G4Positron.hh"
00028 #include "G4MuonPlus.hh"
00029 #include "G4MuonMinus.hh"
00030 #include "G4PionPlus.hh"
00031 #include "G4PionMinus.hh"
00032 #include "G4KaonPlus.hh"
00033 #include "G4KaonMinus.hh"
00034 #include "G4Proton.hh"
00035 #include "G4AntiProton.hh"
00036 #include "G4Deuteron.hh"
00037 #include "G4Triton.hh"
00038 #include "G4He3.hh"
00039 #include "G4Alpha.hh"
00040 #include "G4GenericIon.hh"
00041 
00042 
00043 #include "G4StepLimiter.hh"
00044 #include "StepLimiter.hh"
00045 
00046 StepLimiter::StepLimiter(G4int ver, const G4String& name)
00047   : G4VPhysicsConstructor(name), verbose(ver)
00048 {
00049   G4LossTableManager::Instance();
00050 }
00051 
00052 StepLimiter::~StepLimiter()
00053 {}
00054 
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......                                                                                                                                
00056 
00057 void StepLimiter::ConstructParticle()
00058 {
00059   // gamma
00060   G4Gamma::Gamma();
00061 
00062   // leptons
00063   G4Electron::Electron();
00064   G4Positron::Positron();
00065   G4MuonPlus::MuonPlus();
00066   G4MuonMinus::MuonMinus();
00067 
00068   // mesons
00069   G4PionPlus::PionPlusDefinition();
00070   G4PionMinus::PionMinusDefinition();
00071   G4KaonPlus::KaonPlusDefinition();
00072   G4KaonMinus::KaonMinusDefinition();
00073 
00074   // barions
00075   G4Proton::Proton();
00076   G4AntiProton::AntiProton();
00077 
00078   // ions
00079   G4Deuteron::Deuteron();
00080   G4Triton::Triton();
00081   G4He3::He3();
00082   G4Alpha::Alpha();
00083   G4GenericIon::GenericIonDefinition();
00084 }
00085 
00086 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......                                                                                                                                
00087 
00088 void StepLimiter::ConstructProcess()
00089 {
00090 
00091   theParticleIterator->reset();
00092   while( (*theParticleIterator)() ){
00093     G4ParticleDefinition* particle = theParticleIterator->value();
00094     G4ProcessManager* pmanager = particle->GetProcessManager();
00095     G4String particleName = particle->GetParticleName();
00096 
00097     if (particleName == "gamma") {
00098       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00099     } else if (particleName == "e-") {
00100       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00101     } else if (particleName == "e+") {
00102       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00103     } else if (particleName == "mu+" ||
00104                particleName == "mu-"    ) {
00105       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00106     } else if (particleName == "alpha" ||
00107                particleName == "He3") {
00108       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00109     } else if (particleName == "GenericIon") {
00110       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00111     } else if (particleName == "pi+" ||
00112                particleName == "pi-" ||
00113                particleName == "kaon+" ||
00114                particleName == "kaon-" ||
00115                particleName == "proton" ||
00116                particleName == "anti_proton"           ) {
00117       pmanager ->AddDiscreteProcess(new G4StepLimiter());
00118     }
00119 
00120   }
00121 
00122 }
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 

Generated on Tue Nov 29 23:14:23 2016 for BOSS_7.0.2 by  doxygen 1.4.7