Message: Re: Negative CopyNoZ in ComputeMaterial using NestedParam and Magnetic Field Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Negative CopyNoZ in ComputeMaterial using NestedParam and Magnetic Field 

Forum: Geometry
Re: None Negative CopyNoZ in ComputeMaterial using NestedParam and Magnetic Field (Youming Yang)
Date: 13 Jul, 2012
From: Youming Yang <Youming Yang>

Hello all,

After a bit of digging, I've found that in a different voxelization method in Geant4 (G4PhantomParameterisation: http://www.lcsim.org/software/geant4/doxygen/html/G4PhantomParameterisation_8cc_source.html ), lines 356-360 have the following:

00356| if( nz < 0 )

00357| {

00358| nz = 0;

00359| isOK = false;

00360| }

These lines are found in the parameterisation class's GetReplicaNo, which is that was sending the CopyNoZ=-1 to my ComputeMaterial in the NestedParam version.

I am not sure if the same check exists in the NestedParam class, nor if setting any negative values to zero is the correct method, but it's what I've done for the time being.

Ming

On Tue, 10 Jul 2012 19:14:34 GMT, Youming Yang wrote:

> Hello again Geant Community,
> 
> My ComputeMaterial portion of my Nested Parameterisation is being called
> with a negative CopyNoZ. This only occurs when I enable a magnetic
> field, in an otherwise identical voxelized geometry with the same
> inputs.
> 
> It seems to still have reasonable replicanumbers numbers for the first
> (planar slab) and second (voxelized rod) replicas, but the very last
> z'th voxel copyNoZ=-1. This throws off my computematerials mapping by
> quite a bit.
> 
> I am wondering if there is a reason for this occuring that could be
> related to the magnetic field? I implemented that via:
> 
> void ctgeoDetectorConstruction::SetMagField(G4ThreeVector Bfield)
> {
>   //apply a global uniform magnetic field
>   G4FieldManager* fieldMgr 
>    = G4TransportationManager::GetTransportationManager()->GetFieldManager();
> 
>   if (magField) delete magField;        //delete the existing magn field
> 
>       magField = new G4UniformMagField(Bfield*tesla);        
>       fieldMgr->SetDetectorField(magField);
>       fieldMgr->CreateChordFinder(magField);
> }
> 
> which is called during Construct()
> 
> Thanks, Ming
> 

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

1 None: Re: Negative CopyNoZ in ComputeMaterial using NestedParam and Magnetic Field   (John Apostolakis - 15 Jul, 2012)
 Add Message Add Message
to: "Re: Negative CopyNoZ in ComputeMaterial using NestedParam and Magnetic Field"

 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 ]