/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/G4Svc/G4Svc-00-01-52/Physics_src/ExN03PhysicsList.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: ExN03PhysicsList.cxx,v 1.1.1.1 2004/09/28 05:16:53 liwd Exp $
00025 // GEANT4 tag $Name: G4Svc-00-01-52 $
00026 //
00027 // 
00028 
00029 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00030 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00031 
00032 #include "Physics/ExN03PhysicsList.hh"
00033 
00034 #include "G4ParticleDefinition.hh"
00035 #include "G4ParticleWithCuts.hh"
00036 #include "G4ProcessManager.hh"
00037 #include "G4ProcessVector.hh"
00038 #include "G4ParticleTypes.hh"
00039 #include "G4ParticleTable.hh"
00040 #include "G4Material.hh"
00041 #include "G4ios.hh"
00042 
00043 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00044 
00045 ExN03PhysicsList::ExN03PhysicsList():  G4VUserPhysicsList()
00046 {
00047  defaultCutValue = 1.0*mm;
00048  SetVerboseLevel(1);
00049 }
00050 
00051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00052 
00053 ExN03PhysicsList::~ExN03PhysicsList()
00054 {}
00055 
00056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00057 
00058 void ExN03PhysicsList::ConstructParticle()
00059 {
00060   // In this method, static member functions should be called
00061   // for all particles which you want to use.
00062   // This ensures that objects of these particle types will be
00063   // created in the program. 
00064 
00065   ConstructBosons();
00066   ConstructLeptons();
00067   ConstructMesons();
00068   ConstructBaryons();
00069 }
00070 
00071 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00072 
00073 void ExN03PhysicsList::ConstructBosons()
00074 {
00075   // pseudo-particles
00076   G4Geantino::GeantinoDefinition();
00077   G4ChargedGeantino::ChargedGeantinoDefinition();
00078 
00079   // gamma
00080   G4Gamma::GammaDefinition();
00081 
00082   // optical photon
00083   G4OpticalPhoton::OpticalPhotonDefinition();
00084 }
00085 
00086 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00087 
00088 void ExN03PhysicsList::ConstructLeptons()
00089 {
00090   // leptons
00091   G4Electron::ElectronDefinition();
00092   G4Positron::PositronDefinition();
00093   G4MuonPlus::MuonPlusDefinition();
00094   G4MuonMinus::MuonMinusDefinition();
00095 
00096   G4NeutrinoE::NeutrinoEDefinition();
00097   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00098   G4NeutrinoMu::NeutrinoMuDefinition();
00099   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00100 }
00101 
00102 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00103 
00104 void ExN03PhysicsList::ConstructMesons()
00105 {
00106  //  mesons
00107   G4PionPlus::PionPlusDefinition();
00108   G4PionMinus::PionMinusDefinition();
00109   G4PionZero::PionZeroDefinition();
00110   G4Eta::EtaDefinition();
00111   G4EtaPrime::EtaPrimeDefinition();
00112   G4KaonPlus::KaonPlusDefinition();
00113   G4KaonMinus::KaonMinusDefinition();
00114   G4KaonZero::KaonZeroDefinition();
00115   G4AntiKaonZero::AntiKaonZeroDefinition();
00116   G4KaonZeroLong::KaonZeroLongDefinition();
00117   G4KaonZeroShort::KaonZeroShortDefinition();
00118 }
00119 
00120 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00121 
00122 void ExN03PhysicsList::ConstructBaryons()
00123 {
00124 //  barions
00125   G4Proton::ProtonDefinition();
00126   G4AntiProton::AntiProtonDefinition();
00127   G4Neutron::NeutronDefinition();
00128   G4AntiNeutron::AntiNeutronDefinition();
00129 }
00130 
00131 
00132 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00133 
00134 void ExN03PhysicsList::ConstructProcess()
00135 {
00136   AddTransportation();
00137   ConstructEM();
00138   ConstructGeneral();
00139 }
00140 
00141 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00142 
00143 #include "G4ComptonScattering.hh"
00144 #include "G4GammaConversion.hh"
00145 #include "G4PhotoElectricEffect.hh"
00146 
00147 #include "G4MultipleScattering.hh"
00148 
00149 #include "G4eIonisation.hh"
00150 #include "G4eBremsstrahlung.hh"
00151 #include "G4eplusAnnihilation.hh"
00152 
00153 #include "G4MuIonisation.hh"
00154 #include "G4MuBremsstrahlung.hh"
00155 #include "G4MuPairProduction.hh"
00156 
00157 #include "G4hIonisation.hh"
00158 
00159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00160 
00161 void ExN03PhysicsList::ConstructEM()
00162 {
00163   theParticleIterator->reset();
00164   while( (*theParticleIterator)() ){
00165     G4ParticleDefinition* particle = theParticleIterator->value();
00166     G4ProcessManager* pmanager = particle->GetProcessManager();
00167     G4String particleName = particle->GetParticleName();
00168      
00169     if (particleName == "gamma") {
00170     // gamma
00171       pmanager->AddDiscreteProcess(new G4GammaConversion());
00172       pmanager->AddDiscreteProcess(new G4ComptonScattering());      
00173       pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
00174 
00175     } else if (particleName == "e-") {
00176     //electron
00177       G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
00178       G4VProcess* theeminusIonisation         = new G4eIonisation();
00179       G4VProcess* theeminusBremsstrahlung     = new G4eBremsstrahlung();
00180       //
00181       // add processes
00182       pmanager->AddProcess(theeminusMultipleScattering);
00183       pmanager->AddProcess(theeminusIonisation);
00184       pmanager->AddProcess(theeminusBremsstrahlung);
00185       //      
00186       // set ordering for AlongStepDoIt
00187       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
00188       pmanager->SetProcessOrdering(theeminusIonisation,         idxAlongStep,2);
00189       //
00190       // set ordering for PostStepDoIt
00191       pmanager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
00192       pmanager->SetProcessOrdering(theeminusIonisation,         idxPostStep,2);
00193       pmanager->SetProcessOrdering(theeminusBremsstrahlung,     idxPostStep,3);
00194 
00195     } else if (particleName == "e+") {
00196     //positron
00197       G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
00198       G4VProcess* theeplusIonisation         = new G4eIonisation();
00199       G4VProcess* theeplusBremsstrahlung     = new G4eBremsstrahlung();
00200       G4VProcess* theeplusAnnihilation       = new G4eplusAnnihilation();
00201       //
00202       // add processes
00203       pmanager->AddProcess(theeplusMultipleScattering);
00204       pmanager->AddProcess(theeplusIonisation);
00205       pmanager->AddProcess(theeplusBremsstrahlung);
00206       pmanager->AddProcess(theeplusAnnihilation);
00207       //
00208       // set ordering for AtRestDoIt
00209       pmanager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
00210       //
00211       // set ordering for AlongStepDoIt
00212       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
00213       pmanager->SetProcessOrdering(theeplusIonisation,         idxAlongStep,2);
00214       //
00215       // set ordering for PostStepDoIt
00216       pmanager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
00217       pmanager->SetProcessOrdering(theeplusIonisation,         idxPostStep,2);
00218       pmanager->SetProcessOrdering(theeplusBremsstrahlung,     idxPostStep,3);
00219       pmanager->SetProcessOrdering(theeplusAnnihilation,       idxPostStep,4);
00220   
00221     } else if( particleName == "mu+" || 
00222                particleName == "mu-"    ) {
00223     //muon  
00224       G4VProcess* aMultipleScattering = new G4MultipleScattering();
00225       G4VProcess* aBremsstrahlung     = new G4MuBremsstrahlung();
00226       G4VProcess* aPairProduction     = new G4MuPairProduction();
00227       G4VProcess* anIonisation        = new G4MuIonisation();
00228       //
00229       // add processes
00230       pmanager->AddProcess(anIonisation);
00231       pmanager->AddProcess(aMultipleScattering);
00232       pmanager->AddProcess(aBremsstrahlung);
00233       pmanager->AddProcess(aPairProduction);
00234       //
00235       // set ordering for AlongStepDoIt
00236       pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
00237       pmanager->SetProcessOrdering(anIonisation,        idxAlongStep,2);
00238       //
00239       // set ordering for PostStepDoIt
00240       pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
00241       pmanager->SetProcessOrdering(anIonisation,        idxPostStep,2);
00242       pmanager->SetProcessOrdering(aBremsstrahlung,     idxPostStep,3);
00243       pmanager->SetProcessOrdering(aPairProduction,     idxPostStep,4);
00244 
00245      } else if ((!particle->IsShortLived()) &&
00246                (particle->GetPDGCharge() != 0.0) && 
00247                (particle->GetParticleName() != "chargedgeantino")) {
00248      // all others charged particles except geantino     
00249      G4VProcess* aMultipleScattering = new G4MultipleScattering();
00250      G4VProcess* anIonisation        = new G4hIonisation();
00251      //
00252      // add processes
00253      pmanager->AddProcess(anIonisation);
00254      pmanager->AddProcess(aMultipleScattering);
00255      //
00256      // set ordering for AlongStepDoIt
00257      pmanager->SetProcessOrdering(aMultipleScattering, idxAlongStep,1);
00258      pmanager->SetProcessOrdering(anIonisation,        idxAlongStep,2);
00259      //
00260      // set ordering for PostStepDoIt
00261      pmanager->SetProcessOrdering(aMultipleScattering, idxPostStep,1);
00262      pmanager->SetProcessOrdering(anIonisation,        idxPostStep,2);
00263     }
00264   }
00265 }
00266 
00267 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00268 
00269 #include "G4Decay.hh"
00270 
00271 void ExN03PhysicsList::ConstructGeneral()
00272 {
00273   // Add Decay Process
00274    G4Decay* theDecayProcess = new G4Decay();
00275   theParticleIterator->reset();
00276   while( (*theParticleIterator)() ){
00277     G4ParticleDefinition* particle = theParticleIterator->value();
00278     G4ProcessManager* pmanager = particle->GetProcessManager();
00279     if (theDecayProcess->IsApplicable(*particle)) { 
00280       pmanager ->AddProcess(theDecayProcess);
00281       // set ordering for PostStepDoIt and AtRestDoIt
00282       pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00283       pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00284     }
00285   }
00286 }
00287 
00288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00289 
00290 void ExN03PhysicsList::SetCuts()
00291 {
00292   if (verboseLevel >0){
00293     G4cout << "ExN03PhysicsList::SetCuts:";
00294     G4cout << "CutLength : " << G4BestUnit(defaultCutValue,"Length") << G4endl;
00295   }
00296 
00297   // set cut values for gamma at first and for e- second and next for e+,
00298   // because some processes for e+/e- need cut values for gamma
00299   //
00300   SetCutValue(defaultCutValue, "gamma");
00301   SetCutValue(defaultCutValue, "e-");
00302   SetCutValue(defaultCutValue, "e+");
00303 
00304   if (verboseLevel>0) DumpCutValuesTable();
00305 }
00306 
00307 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00308 

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