/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/G4Svc/G4Svc-00-01-52/Physics_src/ExN02PhysicsList.cxx

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * DISCLAIMER                                                       *
00004 // *                                                                  *
00005 // * The following disclaimer summarizes all the specific disclaimers *
00006 // * of contributors to this software. The specific disclaimers,which *
00007 // * govern, are listed with their locations in:                      *
00008 // *   http://cern.ch/geant4/license                                  *
00009 // *                                                                  *
00010 // * Neither the authors of this software system, nor their employing *
00011 // * institutes,nor the agencies providing financial support for this *
00012 // * work  make  any representation or  warranty, express or implied, *
00013 // * regarding  this  software system or assume any liability for its *
00014 // * use.                                                             *
00015 // *                                                                  *
00016 // * This  code  implementation is the  intellectual property  of the *
00017 // * GEANT4 collaboration.                                            *
00018 // * By copying,  distributing  or modifying the Program (or any work *
00019 // * based  on  the Program)  you indicate  your  acceptance of  this *
00020 // * statement, and all its terms.                                    *
00021 // ********************************************************************
00022 //
00023 //
00024 // $Id: ExN02PhysicsList.cxx,v 1.1.1.1 2004/09/28 05:16:53 liwd Exp $
00025 // GEANT4 tag $Name: G4Svc-00-01-52 $
00026 //
00027 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00028 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00029 
00030 #include "globals.hh"
00031 #include "Physics/ExN02PhysicsList.hh"
00032 
00033 #include "G4ParticleDefinition.hh"
00034 #include "G4ParticleWithCuts.hh"
00035 #include "G4ProcessManager.hh"
00036 #include "G4ProcessVector.hh"
00037 #include "G4ParticleTypes.hh"
00038 #include "G4ParticleTable.hh"
00039 #include "G4Material.hh"
00040 #include "G4ios.hh"
00041 
00042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00043 
00044 ExN02PhysicsList::ExN02PhysicsList():  G4VUserPhysicsList()
00045 {
00046   defaultCutValue = 1.0*cm;
00047    SetVerboseLevel(1);
00048 }
00049 
00050 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00051 
00052 ExN02PhysicsList::~ExN02PhysicsList()
00053 {}
00054 
00055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00056 
00057 void ExN02PhysicsList::ConstructParticle()
00058 {
00059   // In this method, static member functions should be called
00060   // for all particles which you want to use.
00061   // This ensures that objects of these particle types will be
00062   // created in the program. 
00063 
00064   ConstructBosons();
00065   ConstructLeptons();
00066   ConstructMesons();
00067   ConstructBaryons();
00068 
00069 }
00070 
00071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00072 
00073 void ExN02PhysicsList::ConstructBosons()
00074 {
00075   // pseudo-particles
00076   G4Geantino::GeantinoDefinition();
00077   G4ChargedGeantino::ChargedGeantinoDefinition();
00078 
00079   // gamma
00080   G4Gamma::GammaDefinition();
00081 }
00082 
00083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00084 
00085 void ExN02PhysicsList::ConstructLeptons()
00086 {
00087   // leptons
00088   //  e+/-
00089   G4Electron::ElectronDefinition();
00090   G4Positron::PositronDefinition();
00091   // mu+/-
00092   G4MuonPlus::MuonPlusDefinition();
00093   G4MuonMinus::MuonMinusDefinition();
00094   // nu_e
00095   G4NeutrinoE::NeutrinoEDefinition();
00096   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00097   // nu_mu
00098   G4NeutrinoMu::NeutrinoMuDefinition();
00099   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00100 }
00101 
00102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00103 
00104 void ExN02PhysicsList::ConstructMesons()
00105 {
00106   //  mesons
00107   //    light mesons
00108   G4PionPlus::PionPlusDefinition();
00109   G4PionMinus::PionMinusDefinition();
00110   G4PionZero::PionZeroDefinition();
00111   G4Eta::EtaDefinition();
00112   G4EtaPrime::EtaPrimeDefinition();
00113   G4KaonPlus::KaonPlusDefinition();
00114   G4KaonMinus::KaonMinusDefinition();
00115   G4KaonZero::KaonZeroDefinition();
00116   G4AntiKaonZero::AntiKaonZeroDefinition();
00117   G4KaonZeroLong::KaonZeroLongDefinition();
00118   G4KaonZeroShort::KaonZeroShortDefinition();
00119 }
00120 
00121 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00122 
00123 void ExN02PhysicsList::ConstructBaryons()
00124 {
00125   //  barions
00126   G4Proton::ProtonDefinition();
00127   G4AntiProton::AntiProtonDefinition();
00128 
00129   G4Neutron::NeutronDefinition();
00130   G4AntiNeutron::AntiNeutronDefinition();
00131 }
00132 
00133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00134 
00135 void ExN02PhysicsList::ConstructProcess()
00136 {
00137   AddTransportation();
00138   ConstructEM();
00139   ConstructGeneral();
00140 }
00141 
00142 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00143 
00144 #include "G4ComptonScattering.hh"
00145 #include "G4GammaConversion.hh"
00146 #include "G4PhotoElectricEffect.hh"
00147 
00148 #include "G4MultipleScattering.hh"
00149 
00150 #include "G4eIonisation.hh"
00151 #include "G4eBremsstrahlung.hh"
00152 #include "G4eplusAnnihilation.hh"
00153 
00154 #include "G4MuIonisation.hh"
00155 #include "G4MuBremsstrahlung.hh"
00156 #include "G4MuPairProduction.hh"
00157 
00158 #include "G4hIonisation.hh"
00159 
00160 #include "G4UserSpecialCuts.hh"
00161 
00162 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00163 
00164 void ExN02PhysicsList::ConstructEM()
00165 {
00166   theParticleIterator->reset();
00167   while( (*theParticleIterator)() ){
00168     G4ParticleDefinition* particle = theParticleIterator->value();
00169     G4ProcessManager* pmanager = particle->GetProcessManager();
00170     G4String particleName = particle->GetParticleName();
00171      
00172     if (particleName == "gamma") {
00173     // gamma
00174       pmanager->AddDiscreteProcess(new G4GammaConversion());
00175       pmanager->AddDiscreteProcess(new G4ComptonScattering());      
00176       pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
00177 
00178     } else if (particleName == "e-") {
00179     //electron
00180       G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
00181       G4VProcess* theeminusIonisation         = new G4eIonisation();
00182       G4VProcess* theeminusBremsstrahlung     = new G4eBremsstrahlung();
00183       //
00184       // add processes
00185       pmanager->AddProcess(theeminusMultipleScattering);
00186       pmanager->AddProcess(theeminusIonisation);
00187       pmanager->AddProcess(theeminusBremsstrahlung);
00188       //      
00189       // set ordering for AlongStepDoIt
00190       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
00191       pmanager->SetProcessOrdering(theeminusIonisation,         idxAlongStep,2);
00192       //
00193       // set ordering for PostStepDoIt
00194       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
00195       pmanager->SetProcessOrdering(theeminusIonisation,         idxPostStep,2);
00196       pmanager->SetProcessOrdering(theeminusBremsstrahlung,     idxPostStep,3);
00197 
00198     } else if (particleName == "e+") {
00199     //positron
00200       G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
00201       G4VProcess* theeplusIonisation         = new G4eIonisation();
00202       G4VProcess* theeplusBremsstrahlung     = new G4eBremsstrahlung();
00203       G4VProcess* theeplusAnnihilation       = new G4eplusAnnihilation();
00204       //
00205       // add processes
00206       pmanager->AddProcess(theeplusMultipleScattering);
00207       pmanager->AddProcess(theeplusIonisation);
00208       pmanager->AddProcess(theeplusBremsstrahlung);
00209       pmanager->AddProcess(theeplusAnnihilation);
00210       //
00211       // set ordering for AtRestDoIt
00212       pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
00213       //
00214       // set ordering for AlongStepDoIt
00215       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
00216       pmanager->SetProcessOrdering(theeplusIonisation,         idxAlongStep,2);
00217       //
00218       // set ordering for PostStepDoIt
00219       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
00220       pmanager->SetProcessOrdering(theeplusIonisation,         idxPostStep,2);
00221       pmanager->SetProcessOrdering(theeplusBremsstrahlung,     idxPostStep,3);
00222       pmanager->SetProcessOrdering(theeplusAnnihilation,       idxPostStep,4);
00223   
00224     } else if( particleName == "mu+" || 
00225                particleName == "mu-"    ) {
00226     //muon  
00227       G4VProcess* aMultipleScattering = new G4MultipleScattering();
00228       G4VProcess* aBremsstrahlung     = new G4MuBremsstrahlung();
00229       G4VProcess* aPairProduction     = new G4MuPairProduction();
00230       G4VProcess* anIonisation        = new G4MuIonisation();
00231       //
00232       // add processes
00233       pmanager->AddProcess(anIonisation);
00234       pmanager->AddProcess(aMultipleScattering);
00235       pmanager->AddProcess(aBremsstrahlung);
00236       pmanager->AddProcess(aPairProduction);
00237       //
00238       // set ordering for AlongStepDoIt
00239       pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
00240       pmanager->SetProcessOrdering(anIonisation,        idxAlongStep,2);
00241       //
00242       // set ordering for PostStepDoIt
00243       pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
00244       pmanager->SetProcessOrdering(anIonisation,        idxPostStep,2);
00245       pmanager->SetProcessOrdering(aBremsstrahlung,     idxPostStep,3);
00246       pmanager->SetProcessOrdering(aPairProduction,     idxPostStep,4);
00247 
00248     } else if ((!particle->IsShortLived()) &&
00249                (particle->GetPDGCharge() != 0.0) && 
00250                (particle->GetParticleName() != "chargedgeantino")) {
00251      // all others charged particles except geantino
00252      G4VProcess* aMultipleScattering = new G4MultipleScattering();
00253      G4VProcess* anIonisation        = new G4hIonisation();     
00255      
00256      //
00257      // add processes
00258      pmanager->AddProcess(anIonisation);
00259      pmanager->AddProcess(aMultipleScattering);    
00261      
00262      //
00263      // set ordering for AlongStepDoIt
00264      pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
00265      pmanager->SetProcessOrdering(anIonisation,        idxAlongStep,2);
00266      
00267      //
00268      // set ordering for PostStepDoIt
00269      pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
00270      pmanager->SetProcessOrdering(anIonisation,        idxPostStep,2);
00272     }
00273   }
00274 }
00275 
00276 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00277 
00278 #include "G4Decay.hh"
00279 void ExN02PhysicsList::ConstructGeneral()
00280 {
00281   // Add Decay Process
00282   G4Decay* theDecayProcess = new G4Decay();
00283   theParticleIterator->reset();
00284   while( (*theParticleIterator)() ){
00285     G4ParticleDefinition* particle = theParticleIterator->value();
00286     G4ProcessManager* pmanager = particle->GetProcessManager();
00287     if (theDecayProcess->IsApplicable(*particle)) { 
00288       pmanager ->AddProcess(theDecayProcess);
00289       // set ordering for PostStepDoIt and AtRestDoIt
00290       pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00291       pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00292     }
00293   }
00294 }
00295 
00296 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00297 
00298 void ExN02PhysicsList::SetCuts()
00299 {
00300   //G4VUserPhysicsList::SetCutsWithDefault method sets 
00301   //the default cut value for all particle types 
00302   //
00303   SetCutsWithDefault();
00304      
00305   if (verboseLevel>0) DumpCutValuesTable();
00306 }
00307 
00308 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00309 

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