Message: Tracking problem with concentric tori | Not Logged In (login) |
I am observing a weird result when looking at tracking details within two concentric tori (toruses?). The following results are from Geant4 version 7.1, but I get the same using pre-release version 7.1.ref03. First of all, this is my printout routine in SteppingVerbose: if( verboseLevel >= 1 ){ G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " " << std::setw(6) << G4BestUnit(fPostStepPoint->GetPosition().x(),"Length") << std::setw(6) << G4BestUnit(fPostStepPoint->GetPosition().y(),"Length") << std::setw(6) << G4BestUnit(fPostStepPoint->GetPosition().z(),"Length") << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy") << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy") << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length") << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length"); if( fTrack->GetNextVolume() != 0 ) { G4cout << std::setw(11) << fPreStepPoint->GetPhysicalVolume()->GetName(); G4cout << std::setw(11) << fPostStepPoint->GetPhysicalVolume()->GetName(); } else { G4cout << std::setw(11) << fPreStepPoint->GetPhysicalVolume()->GetName(); G4cout << std::setw(11) << "OutOfWorld"; } if(fPostStepPoint->GetProcessDefinedStep() != NULL){ G4cout << std::setw(15) << fPostStepPoint->GetProcessDefinedStep()->GetProcessName(); } else { G4cout << std::setw(15) << "UserLimit"; } As you see, I am printing the Pre and Post step volumes and then the process which defined this step. I started by defining a half-torus with: G4Torus* solidFiber = new G4Torus("fiber",0.,8.625*cm,76.3685*cm,0.*deg,180.*deg); G4LogicalVolume* logicFiber = new G4LogicalVolume(solidFiber,Glue,"Fiber",0,0,0); G4ThreeVector positionFiber = (0.,0.,-72.1917*m); new G4PVPlacement(0,positionFiber,logicFiber,"TestFiber",logicWorld,false,0); and shot a geantino to it with these parameters: particleGun->SetParticlePosition(G4ThreeVector(-985.*mum,-746.*mum,-200.*m)); particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,62.,10000.)); Looking at geantino tracking details I saw: ********************************************************************************************************* * G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0 ********************************************************************************************************* Step# X Y Z KineE dEStep StepLeng TrakLeng PreVolume PostVolume Process 0 -985 mum -746 mum -200 m 500 MeV 0 eV 0 fm 0 fm World initStep 1 -985 mum 79.1 cm -72.3 m 500 MeV 0 eV 128 m 128 m World TestFiber Transportation 2 -985 mum 79.2 cm -72.1 m 500 MeV 0 eV 16.3 cm 128 m TestFiber World Transportation 3 -985 mum 2.79 m 250 m 500 MeV 0 eV 322 m 450 m World OutOfWorld Transportation which looks fine. I then positioned a second half-torus inside the first: G4Torus* solidCore = new G4Torus("core",0.,7.5*cm,76.3685*cm,0.*deg,180.*deg); G4LogicalVolume* logicCore = new G4LogicalVolume(solidCore,Scintillator,"FiberCore",0,0,0); new G4PVPlacement(0,0,logicCore,"FiberCore",logicFiber,false,0); With this setup I get the following tracking information: ********************************************************************************************************* * G4Track Information: Particle = geantino, Track ID = 1, Parent ID = 0 ********************************************************************************************************* Step# X Y Z KineE dEStep StepLeng TrakLeng PreVolume PostVolume Process 0 -985 mum -746 mum -200 m 500 MeV 0 eV 0 fm 0 fm World initStep 1 -985 mum 79.1 cm -72.3 m 500 MeV 0 eV 128 m 128 m World TestFiber Transportation 2 -985 mum 79.1 cm -72.3 m 500 MeV 0 eV 1.2 cm 128 m TestFiber FiberCore Transportation 3 -985 mum 79.2 cm -72.1 m 500 MeV 0 eV 13.9 cm 128 m FiberCore World Transportation 4 -985 mum 79.2 cm -72.1 m 500 MeV 0 eV 1.2 cm 128 m World TestFiber Transportation 5 -985 mum 79.2 cm -72.1 m 500 MeV 0 eV 0 fm 128 m TestFiber World Transportation 6 -985 mum 2.79 m 250 m 500 MeV 0 eV 322 m 450 m World OutOfWorld Transportation I expected a World->TestFiber->FiberCore->TestFiber->World volume traversal pattern, while here I see that a portion of the World volume has appeared between FiberCore and TestFiber. Also, a 0-length step has appeared on the boundary between TestFiber and World. Why am I getting these results? Am I doing something wrong? Thanks Emanuele Leonardi |
Inline Depth: | Outline Depth: | Add message: |
to: |