Message: Re: Problem with gun energy changing and output in EndOfEventAction. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Disagree Re: Problem with gun energy changing and output in EndOfEventAction. 

Forum: Event and Track Management
Re: Question Problem with gun energy changing and output in EndOfEventAction. (kunli)
Date: 20 May, 2014
From: Gumplinger Peter <Gumplinger Peter>

Well, I see one error:

> runManager->SetUserAction(new SteppingAction(new DetectorConstruction(config),new EventAction(PGAct)));
> runManager->SetUserAction(new EventAction(PGAct));

e.g. the EventAction (pointer) known to the runManager is not the same EventAction known to your SteppingAction. Change your code to:

PrimaryGeneratorAction* PGAct = new PrimaryGeneratorAction(config);

DetectorConstruction* detectorConstruction = new DetectorConstruction(config);

EventAction* eventAction = new EventAction(PGAct);

SteppingAction* steppingAction = new SteppingAction(detectorConstruction,eventAction);

runManager->SetUserAction(detectorConstruction);

runManager->SetUserAction(eventAction);

runManager->SetUserAction(steppingAction);

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

1 Ok: Re: Problem with gun energy changing and output in EndOfEventAction.   (kunli - 21 May, 2014)
 Add Message Add Message
to: "Re: Problem with gun energy changing and output in EndOfEventAction."

 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 ]