Message: Changing Hit Info During Event Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Changing Hit Info During Event 

Forum: Hits, Digitization and Pileup
Date: 22 Jul, 2010
From: Derek Mackay <Derek Mackay>

Hi,

I'd like to change hit info for a SD during the event - is this possible? I want to change the energy deposit from the current step in the PostStepDoIt of a Physics class I wrote. I tried:

    G4SDManager *fSDM = G4SDManager::GetSDMpointer();
    LXeHitCollectionID = fSDM->GetCollectionID("LXeHitsCollection");

    G4RunManager* fRM = G4RunManager::GetRunManager();
    const G4Event* currentEvent = fRM->GetCurrentEvent();

    G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent();
    EXOLXeHitsCollection* LXeHC = (EXOLXeHitsCollection*)(HCE->GetHC(LXeHitCollectionID));

And then with the line:

G4int nhits = LXeHC->entries();

I get a seg. fault. I assume it's because I'm using the way that you retrieve hit info after the completion of the event during the event.

Any suggestions?

Thanks, Derek.

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

1 None: RE: Changing Hit Info During Event   (Asai, Makoto - 22 Jul, 2010)
 Add Message Add Message
to: "Changing Hit Info During Event"

 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 ]