Message: Re: Secondary generated electrons magnetic deviation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Secondary generated electrons magnetic deviation 

Forum: Physics List
Re: None Secondary generated electrons magnetic deviation (alex)
Date: 21 Mar, 2007
From: Vladimir IVANTCHENKO <vnivanch@mail.cern.ch>

On Wed, 21 Mar 2007, alex wrote:

> *** Discussion title: Physics List
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/phys-list/364"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hello,
> 
> I am trying to simulate the passage of protons throught a magnetic
> dipole, and I activated the following physics processes:
> 
> ---------------------------------------
> 
> // ExN01PhysicsList.cc
> 
> // generated by Geant4 Physics Editor at Thu Mar 01 23:17:47 EET 2007
> 
> #include "ExN01PhysicsList.hh"
> 
> #include "globals.hh"
> #include "G4ParticleDefinition.hh"
> #include "G4ParticleWithCuts.hh"
> #include "G4ProcessManager.hh"
> #include "G4ProcessVector.hh"
> #include "G4ParticleTypes.hh"
> #include "G4ParticleTable.hh"
> #include "G4ShortLivedConstructor.hh"
> #include "G4Material.hh"
> #include "G4MaterialTable.hh"
> 
> #include "G4ios.hh"
> 
> ExN01PhysicsList::ExN01PhysicsList(): G4VUserPhysicsList() { // Here
> used the default cut value you have typed in
> 
>   defaultCutValue = 1.0*cm;
>   SetVerboseLevel(1);
> }
> 
> ExN01PhysicsList::~ExN01PhysicsList() {}
> 
> void ExN01PhysicsList::ConstructParticle() { // Here are constructed all
> particles you have chosen
> 
>   ConstructBosons();
>   ConstructLeptons();
>   ConstructMesons();
>   ConstructBaryons();
>   ConstructAllShortLiveds();
> }
> 
> // In this method, static member functions should be called for ALL
> particles to be used.
> 
> void ExN01PhysicsList::ConstructBosons()
> {
>   //pseudo particles
>   G4Geantino::GeantinoDefinition();
>   G4ChargedGeantino::ChargedGeantinoDefinition();
> 
>   // gamma
>   G4Gamma::GammaDefinition();
> }
> void ExN01PhysicsList::ConstructLeptons()
> {
> 
>   // leptons
>   //  e+/-
>   G4Electron::ElectronDefinition();
>   G4Positron::PositronDefinition();
>   // mu+/-
>   G4MuonPlus::MuonPlusDefinition();
>   G4MuonMinus::MuonMinusDefinition();
>   // nu_e
>   G4NeutrinoE::NeutrinoEDefinition();
>   G4AntiNeutrinoE::AntiNeutrinoEDefinition();
>   // nu_mu
>   G4NeutrinoMu::NeutrinoMuDefinition();
>   G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 
> 
> } void ExN01PhysicsList::ConstructMesons() {
> 
>  //  mesons
>   //    light mesons
>   G4PionPlus::PionPlusDefinition();
>   G4PionMinus::PionMinusDefinition();
>   G4PionZero::PionZeroDefinition();
>   G4Eta::EtaDefinition();
>   G4EtaPrime::EtaPrimeDefinition();
>   G4KaonPlus::KaonPlusDefinition();
>   G4KaonMinus::KaonMinusDefinition();
>   G4KaonZero::KaonZeroDefinition();
>   G4AntiKaonZero::AntiKaonZeroDefinition();
>   G4KaonZeroLong::KaonZeroLongDefinition();
>   G4KaonZeroShort::KaonZeroShortDefinition();
> 
> }
> void ExN01PhysicsList::ConstructBaryons()
> {
>   //  barions
>   G4Proton::ProtonDefinition();
>   G4AntiProton::AntiProtonDefinition();
> 
>   G4Neutron::NeutronDefinition();
>   G4AntiNeutron::AntiNeutronDefinition();
> }
> void ExN01PhysicsList::ConstructAllShortLiveds()
> {
> // Here are contructed all short liveds
> 
> } void ExN01PhysicsList::ConstructProcess() { // Transportation,
> electromagnetic and general processes
> 
>   AddTransportation();
>   ConstructEM();
>   ConstructGeneral();
> }
> 
> #include "G4SynchrotronRadiation.hh"
> 
> #include "G4hIonisation.hh"
> #include "G4MultipleScattering.hh"
> 
> #include "G4ComptonScattering.hh"
> #include "G4GammaConversion.hh"
> #include "G4PhotoElectricEffect.hh"
> 
> #include "G4MultipleScattering.hh"
> 
> #include "G4eIonisation.hh"
> #include "G4eBremsstrahlung.hh"
> #include "G4eplusAnnihilation.hh"
> 
> #include "G4MuIonisation.hh"
> #include "G4MuBremsstrahlung.hh"
> #include "G4MuPairProduction.hh"
> 
> #include "G4hIonisation.hh"
> 
> #include "G4StepLimiter.hh"
> #include "G4UserSpecialCuts.hh"
> 
> void ExN01PhysicsList::ConstructEM()
> {
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     G4ProcessManager* pmanager = particle->GetProcessManager();
>     G4String particleName = particle->GetParticleName();
> 
>     if (particleName == "gamma") {
>       // gamma         
>       pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
>       pmanager->AddDiscreteProcess(new G4ComptonScattering);
>       pmanager->AddDiscreteProcess(new G4GammaConversion);
> 
>     } else if (particleName == "e-") {
>       //electron
>       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
>       pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
>       pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);      
> 
>     } else if (particleName == "e+") {
>       //positron
>       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
>       pmanager->AddProcess(new G4eIonisation,       -1, 2,2);
>       pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3,3);
>       pmanager->AddProcess(new G4eplusAnnihilation,  0,-1,4);
> 
>     } else if( particleName == "mu+" || 
>                particleName == "mu-"    ) {
>       //muon  
>       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
>       pmanager->AddProcess(new G4MuIonisation,      -1, 2,2);
>       pmanager->AddProcess(new G4MuBremsstrahlung,  -1, 3,3);
>       pmanager->AddProcess(new G4MuPairProduction,  -1, 4,4);       
> 
>     } else if ((!particle->IsShortLived()) &&
>                (particle->GetPDGCharge() != 0.0) && 
>                (particle->GetParticleName() != "chargedgeantino")) {
>       //all others charged particles except geantino
>       pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
>       pmanager->AddProcess(new G4hIonisation,       -1, 2,2);
>       //step limit
>       pmanager->AddProcess(new G4StepLimiter,       -1,-1,3);         
>       ///pmanager->AddProcess(new G4UserSpecialCuts,   -1,-1,4);  
>     }
>   }
> }
> 
> #include "G4Decay.hh"
> 
> void ExN01PhysicsList::ConstructGeneral()
> {
>    // Add Decay Process
>   G4Decay* theDecayProcess = new G4Decay();
>   theParticleIterator->reset();
>   while( (*theParticleIterator)() ){
>     G4ParticleDefinition* particle = theParticleIterator->value();
>     G4ProcessManager* pmanager = particle->GetProcessManager();
>     if (theDecayProcess->IsApplicable(*particle)) { 
>       pmanager ->AddProcess(theDecayProcess);
>       // set ordering for PostStepDoIt and AtRestDoIt
>       pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
>       pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
>     }
>   }
> }
> 
> void ExN01PhysicsList::SetCuts() { // defaultCutValue you have typed in
> is used
> 
>   if (verboseLevel >1){
>     G4cout << "ExN01PhysicsList::SetCuts:";
>   }
>   SetCutsWithDefault();
> }
> --------------------------------------------------
> 
> I obtained the following results:
> http://img233.imageshack.us/img233/2623/wiredoutputcr1.jpg
> 
> http://img144.imageshack.us/img144/5893/wiredoutput1uk1.jpg
> 
> The question is: why the secondary electrons (the red trajectories)
> observed into the magnetic field (into the box) are not deviated by it.
> Shouldn`t they create a spiral trajectory? I have to activate aditional
> interaction between the secondary e- and the magnetic field?
> 
> The incident protons have 1 GeV energy.
> 
> Thank you.
> 

Hello,

Please, add StepLimiter also for e- and e+ in order to see trajectories 
better.

VI

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Secondary generated electrons magnetic deviation   (alex - 23 Mar, 2007)
(_ None: Re: Secondary generated electrons magnetic deviation   (Vladimir IVANTCHENKO - 26 Mar, 2007)
 Add Message Add Message
to: "Re: Secondary generated electrons magnetic deviation"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]