Message: Re: energy deposition through multilayer geometry Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: energy deposition through multilayer geometry 

Keywords: energy depositon interface multilayer
Forum: Event and Track Management
Re: Question energy deposition through multilayer geometry (Luís)
Date: 02 Dec, 2004
From: Jeremy McCormick <Jeremy McCormick>

Hi.

It sounds like you are running into a known bug related to 
parameterised volumes.  This is caused by the G4MaterialCutsCouple not 
being updated in the case of parameterised volumes.  It would certainly
affect the medical examples, which use parameterised box volumes.

It will definitely be corrected in the next Geant4 release, 7.0.  I
think it was also fixed in 6.2.p02.  Which version are you using?

You may be able to correct this error by adding the following
function to the ComputeMaterial() method of your parameterisation 
class.

#include "G4ProductionCutsTable.hh"
#include "G4MaterialCutsCouple.hh"

void LCSliceParameterisation::checkMaterialCutsCouple(G4Material *mat,
                                                      G4VPhysicalVolume *PV)
{
  if (PV->GetLogicalVolume()->GetMaterialCutsCouple() != 0) {
    if (PV->GetLogicalVolume()->GetMaterialCutsCouple()->GetMaterial() != mat) {
      const G4MaterialCutsCouple* couple = G4ProductionCutsTable::GetProductionCutsTable()
        -> GetMaterialCutsCouple(mat,
                                 PV->GetLogicalVolume()->GetRegion()->GetProductionCuts()
                                 );
      PV->GetLogicalVolume()
        ->SetMaterialCutsCouple((G4MaterialCutsCouple*)couple);
    }
  }
}

If this doesn't work, you might try contacting Makoto Asai 
<asai@SLAC.Stanford.EDU>, who has been tracking this problem
in detail.  

--Jeremy McCormick, SLAC

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

 Add Message Add Message
to: "Re: energy deposition through multilayer geometry"

 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 ]