Message: Re: Manually creating PMT hits like in the LXe example Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Manually creating PMT hits like in the LXe example 

Forum: Processes Involving Optical Photons
Re: Question Manually creating PMT hits like in the LXe example (Clarisse)
Date: 26 Mar, 2009
From: Gumplinger Peter <Gumplinger Peter>

Dear Clarisse,

You can't really expect me to debug your code, but I did....

Also, do you know about gdb? You can run it:

> gdb ../../../bin/Linux-g++/executable core.###

......

(gdb) where

It'll tell you at least which method/class it segment faulted.

The LXe example reads:

  G4int n=pmtHitCollection->entries();

  LXePMTHit* hit=NULL;

  for(G4int i=0;i<n;i++){

    if((*pmtHitCollection)[i]->GetPMTNumber()==pmtNumber){

      hit=(*pmtHitCollection)[i];

      break;

    }

  }

You only have:

  myDetPMTHit* hit = (*pmtHitCollection)[0];

I can see why this happened - the comment: "//Find the correct hit collection" is misleading - wrong; we are looking for how many hits have already been collected. G4int n is the number of hits already stored in the pmtHitCollection.

Peter

 Add Message Add Message
to: "Re: Manually creating PMT hits like in the LXe example"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews