Message: Seg Fault when trying to fill HitsCollection Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Seg Fault when trying to fill HitsCollection 

Forum: Hits, Digitization and Pileup
Date: 18 Apr, 2013
From: Tony Price <Tony Price>

Hi All,

I am trying to set up an initial simulation where I have a beam entering a block of perspex and I measure the energy deposited within the perspex. I have read up on this and it seems that I need to make the perspex a sensitive detector and write a hit class which will get the information from my sensitive detector class. I am using some of the novice examples to help me do this but I am really confused. Basically, when I run the binary I get a seg fault. I have narrowed it down to when I add the hit to the hit collection as when I comment out this line the code runs fine. What is really confusing me however is that the hit collection is not a null pointer in Initialize or EndOfRun but seems to be ProcessHits function of DetectorSD.cc. I am really stumped for ideas here so any advice would be warmly received.

Regards,

   Tony

p.s I have attached my sensitive detector and hit classes

   Attachment:
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/04/18/02.17-46788-DetectorHit.cc
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/04/18/02.17-32161-DetectorSD.cc
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/04/18/02.17-47295-DetectorHit.hh
      http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2013/04/18/02.17-74762-DetectorSD.hh

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

1 None: Re: Seg Fault when trying to fill HitsCollection   (Tsukasa Aso - 18 Apr, 2013)
(_ None: Re: Seg Fault when trying to fill HitsCollection   (Tony Price - 18 Apr, 2013)
(_ None: Re: Seg Fault when trying to fill HitsCollection   (Tony Price - 19 Apr, 2013)
(_ None: Re: Seg Fault when trying to fill HitsCollection   (Tsukasa Aso - 19 Apr, 2013)
(_ None: Re: Seg Fault when trying to fill HitsCollection   (Tony Price - 22 Apr, 2013)
 Add Message Add Message
to: "Seg Fault when trying to fill HitsCollection"

 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 ]