|Message: Step size in Magnetic Tracking||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hello, I'm trying to track an electron in an magnetic field. I use the following code in the DetectorConstrction class to set the magnetic field: G4UniformMagField* magField = new G4UniformMagField(G4ThreeVector(0.,1.*gauss,0.)); G4FieldManager *pFieldMgr; G4MagIntegratorStepper *pStepper; G4EqMagElectricField *fEquation = new G4EqMagElectricField(magField); pStepper=new G4ClassicalRK4(fEquation); pFieldMgr=G4TransportationManager::GetTransportationManager()->GetFieldManager(); pFieldMgr->SetDetectorField(magField); // pFieldMgr->CreateChordFinder(magField); G4MagInt_Driver* fIntgrDriver; G4double fMinStep = 0.010*mm; fIntgrDriver = new G4MagInt_Driver(fMinStep, pStepper, pStepper->GetNumberOfVariables() ); G4ChordFinder *pChordFinder = new G4ChordFinder(fIntgrDriver); pFieldMgr->SetChordFinder(pChordFinder); AND the following code for an incoming electron in PrimaryGeneratorAction: G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); G4String particleName; G4ParticleDefinition* particle = particleTable->FindParticle(particleName="e-"); particleGun->SetParticleDefinition(particle); particleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.5,0.)); particleGun->SetParticleEnergy(5.*MeV); G4double position = 0; //-0.5*(ExN03Detector->GetWorldSizeX()); particleGun->SetParticlePosition(G4ThreeVector(position,0.*cm,0.*cm)); particleGun->GeneratePrimaryVertex(anEvent); I'm expecting a spiral track but I always get errors. When the fMinStep is small, I get: G4MagIntegratorDriver::OneGoodStep: Stepsize underflow in Stepper Step's start x=0.22 and end x= 0.22 are equal !! Due to step-size= 5e-18 . Note that input step was 0.05 G4MagIntegratorDriver::OneGoodStep: Stepsize underflow in Stepper Step's start x=0.23 and end x= 0.23 are equal !! Due to step-size= 5e-18 . Note that input step was 0.05 ... ... When the fMinStep is big(>10cm), or I use the FieldManager->CreateChordFinder instead of the manual ChordFinder, it tells me that the Track Was killed becasue it is loop or stucked. What's wrong with my program? Thanks. -Dvorak
|Inline Depth:||Outline Depth:||Add message:|