Message: Re: Questions about SetLargestAcceptableStep() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Questions about SetLargestAcceptableStep()  

Keywords: SetLargestAcceptableStep
Forum: Fields: Magnetic and Otherwise
Re: None Questions about SetLargestAcceptableStep()
Re: Feedback Re: Questions about SetLargestAcceptableStep() (Gumplinger Peter)
Date: 22 Jul, 2007
From: <throwpen@163.com>

Today i tried it again. 

if i didn't set the maximum acceptable step in the program. 
I encountered the same problem as Ilya reported in 
http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/emfields/96.html
which was called "Electrons bouncing on the volume boundary in pure magnetic field"
When it happened, electrons didn't lost their energies in the volume(not vacumm).
After more than 1000000 steps, then suddenly, electrons stopped bounding and lost their energies by
MSC process. But a great deal of time was wasted in the boucing

*********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 11,   Parent ID = 1
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0       18     22.6    -27.8     0.001        0        0         0    collim21 initStep
    1       18     22.6    -27.8   0.00081 0.000195   5e-006    5e-006    collim21 msc
    2       18     22.6    -27.8  0.000758 5.14e-005   5e-006    1e-005    collim21 msc
    3       18     22.6    -27.8  0.000722 3.63e-005   5e-006  1.5e-005    collim21 msc
    4       18     22.6    -27.8  0.000714 8.37e-006 4.85e-007 1.55e-005     expHall Transportation
    5       18     22.6    -27.8  0.000714        0        0 1.55e-005    collim21 Transportation
    6       18     22.6    -27.8  0.000714        0        0 1.55e-005     expHall Transportation
    7       18     22.6    -27.8  0.000714        0        0 1.55e-005    collim21 Transportation
    8       18     22.6    -27.8  0.000714        0        0 1.55e-005     expHall Transportation
    9       18     22.6    -27.8  0.000714        0 4.19e-007 1.59e-005     expHall Transportation
   10       18     22.6    -27.8  0.000714        0 2.79e-006 1.87e-005    collim21 Transportation
   11       18     22.6    -27.8  0.000714        0        0 1.87e-005     expHall Transportation
   12       18     22.6    -27.8  0.000714        0        0 1.87e-005    collim21 Transportation
   13       18     22.6    -27.8  0.000714        0        0 1.87e-005     expHall Transportation
   14       18     22.6    -27.8  0.000714        0 3.51e-007  1.9e-005     expHall Transportation
   15       18     22.6    -27.8  0.000714        0 2.44e-006 2.15e-005    collim21 Transportation
   ....
   ....
   ....
3605172       18     22.8    -27.5  0.000491        0        0     0.491    collim21 Transportation
3605173       18     22.8    -27.5  0.000491        0        0     0.491     expHall Transportation
3605174       18     22.8    -27.5  0.000491        0 4.08e-007     0.491    collim21 Transportation
3605175       18     22.8    -27.5  0.000491        0        0     0.491     expHall Transportation
3605176       18     22.8    -27.5  0.000491        0        0     0.491    collim21 Transportation
3605177       18     22.8    -27.5  0.000491        0        0     0.491     expHall Transportation
3605178       18     22.8    -27.5  0.000491        0 3.11e-007     0.491    collim21 Transportation
3605179       18     22.8    -27.5  0.000491        0        0     0.491     expHall Transportation
3605180       18     22.8    -27.5  0.000491        0        0     0.491    collim21 Transportation
3605181       18     22.8    -27.5  0.000491        0        0     0.491     expHall Transportation
3605182       18     22.8    -27.5  0.000491        0 1.02e-007     0.491    collim21 Transportation
3605183       18     22.8    -27.5  0.000322 0.000169   5e-006     0.491    collim21 msc
3605184       18     22.8    -27.5 5.71e-005 0.000265   5e-006     0.491    collim21 msc
3605185       18     22.8    -27.5 3.97e-005 1.74e-005 7.72e-007     0.491     expHall Transportation
3605186       18     22.8    -27.5 3.97e-005        0        0     0.491    collim21 Transportation
3605187       18     22.8    -27.5         0 3.97e-005 2.32e-006     0.491    collim21 LowEnergyIoni
Track (trackID 11, parentID 1) is processed with stopping code 2
### pop requested out of 9 stacked tracks.


But if i set the maximum acceptable step as the following:

G4TransportationManager* tmanager = G4TransportationManager::GetTransportationManager();
tmanager->GetPropagatorInField()->SetLargestAcceptableStep(0.1*mm);

the problem didn't show up.


Something about my program:

Primary particle: electrons(0.1 to 0.5MeV)
the direction of momentum: +x
Magnetic field: uniform field(in +Z direction,about 4000 Gauss)

void ExN01Field::GetFieldValue(const double Point[3],double *Bfield) const
{
  
  
  G4double px=(Point[0]/mm);
  G4double py=(Point[1]/mm);
  G4double pz=(Point[2]/mm);

	  Bfield[0]=0.001*tesla;
	  Bfield[1]=0.001*tesla;
	  Bfield[2]=0.001*tesla;

  if(px>=0&&px<=45)
	  if(py>=-30&&py<=30)
	  if(pz>=-30&&pz<=30)
	{
	  Bfield[0]=0*tesla;
	  Bfield[1]=0.4*tesla;
	  Bfield[2]=0*tesla;
	}
  

}




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

 Add Message Add Message
to: "Re: Questions about SetLargestAcceptableStep() "

 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 ]