Message: Re: Track stuck or not moving with too small voxel sizes Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Track stuck or not moving with too small voxel sizes 

Forum: Geometry
Re: None Track stuck or not moving with too small voxel sizes (shirin Abbasinejad Enger)
Re: None Re: Track stuck or not moving with too small voxel sizes (shirin Abbasinejad Enger)
Re: None Re: Track stuck or not moving with too small voxel sizes (John Apostolakis)
Date: 27 Nov, 2012
From: shirin Abbasinejad Enger <shirin Abbasinejad Enger>

Hi,

Thanks for you reply.

I have a point source in the origin (0,0,0), gamma, and use livermore physics, geant4.9.5 patch 1.

This are lines from my detectorconstruction: I set voxel dimensions in the constructor. As Joseph mentions number of voxels influence wether one gets the warnings or not, which probbaly has to do if the origin ends up on a boundary or not.

DetectorConstruction::DetectorConstruction():Air(0),Water(0),adipose(0),muscle(0),constructed(false) {

  fphantomSize1.setX(5.0*cm);
  fphantomSize1.setY(5.0*cm);
  fphantomSize1.setZ(5.0*cm);
  fNx1 = 50;
  fNy1 =50; 
  fNz1 = 50;

}

void DetectorConstruction::SetupGeometry()
{
. 
.
.
G4ThreeVector phantomSize1 = fphantomSize1; 
  G4Box * solidPhantom1= new G4Box("Phantom1",phantomSize1.x()/2., phantomSize1.y()/2., phantomSize1.z()/2.);
  G4LogicalVolume * logicPhantom1= new G4LogicalVolume(solidPhantom1, Water, "Phantom1");  
  new G4PVPlacement(0,G4ThreeVector(0.0*mm,0.0*mm,0.0*mm),logicPhantom1,"Phantom1",logicWorld,false,0);              
  G4int nxCells1 = fNx1;
  G4int nyCells1 = fNy1;
  G4int nzCells1 = fNz1;
  G4ThreeVector sensSize1;
  sensSize1.setX(phantomSize1.x()/(G4double)nxCells1);
  sensSize1.setY(phantomSize1.y()/(G4double)nyCells1);
  sensSize1.setZ(phantomSize1.z()/(G4double)nzCells1);
  // Y Slice
  G4String yRep1Name("Rep1Y");
  G4VSolid* solYRep1 =new G4Box(yRep1Name,phantomSize1.x()/2.,sensSize1.y()/2.,phantomSize1.z()/2.);
  G4LogicalVolume* logYRep1 =new G4LogicalVolume(solYRep1,Water,yRep1Name);

  new G4PVReplica(yRep1Name,logYRep1,logicPhantom1,kYAxis,fNy1,sensSize1.y());
  // X Slice
  G4String xRep1Name("Rep1X");
  G4VSolid* solXRep1 =new G4Box(xRep1Name,sensSize1.x()/2.,sensSize1.y()/2.,phantomSize1.z()/2.);
  G4LogicalVolume* logXRep1 =new G4LogicalVolume(solXRep1,Water,xRep1Name);
  new G4PVReplica(xRep1Name,logXRep1,logYRep1,kXAxis,fNx1,sensSize1.x());

  // Z Slice
  G4String zVox1Name("phantomSens1");
  G4VSolid* solVoxel1 = 
    new G4Box(zVox1Name,sensSize1.x()/2.,sensSize1.y()/2.,sensSize1.z()/2.);
  G4LogicalVolume* logicPhantom1Sens = new G4LogicalVolume(solVoxel1,Water,zVox1Name);

  std::vector<G4Material*> phantomMat1(1,Water);
  NestedPhantomParameterisation* paramPhantom1 = new NestedPhantomParameterisation(sensSize1/2.,nzCells1,phantomMat1);
  new G4PVParameterised("Phantom1Sens",logicPhantom1Sens,logXRep1,kUndefined,nzCells1, paramPhantom1);

}

Shirin

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

1 None: Re: Track stuck or not moving with too small voxel sizes   (Clare Huang - 07 Jan, 2015)
 Add Message Add Message
to: "Re: Track stuck or not moving with too small voxel sizes"

 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 ]