Message: Re: segmentation fault(core dumped) when G4PVReplica is used Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: segmentation fault(core dumped) when G4PVReplica is used 

Forum: Hits, Digitization and Pileup
Re: Question segmentation fault(core dumped) when G4PVReplica is used (Julien Zhu)
Date: 18 Feb, 2014
From: Tsukasa Aso <Tsukasa Aso>

Hi,

> 
> and the voxelscoring code:
> G4bool VoxelScoring::ProcessHits( G4Step *step, G4TouchableHistory *ROhist)
>  G4int which=ROhist->GetReplicaNumber();
> 

Please try following instead of "ROhist".
( You can find this kind of example in examples/basic/B4/B4c/src/B4cCalorimeterSD.cc )


  G4TouchableHistory* touchable
    = (G4TouchableHistory*)(step->GetPreStepPoint()->GetTouchable());

  // Get calorimeter cell id                                                              
  G4int layerNumber = touchable->GetReplicaNumber(1);


T.Aso

 Add Message Add Message
to: "Re: segmentation fault(core dumped) when G4PVReplica is used"

 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 ]