Message: accessing G4 event number from UserSteppingAction? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None accessing G4 event number from UserSteppingAction? 

Forum: Event and Track Management
Date: 24 Mar, 2011
From: Emil Frlez <Emil Frlez>

 I want to access G4 event number from the UserSteppingAction (I am using
the modified examples/extended/electromagnetic/TestEm5)

 So, 

void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
...
 evtNb = ?
 if (aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetParticleName() == "e-" &&
     (aStep->GetTrack()->GetNextVolume()=="AuCoverL" || aStep->GetTrack()->GetNextVolume()=="AuCoverR") &&
     aStep->GetTrack()->GetNextVolume()=="World" ) {
     fprintf ( pFile1, " %d %f %f %f %f %f %f %f\n",
                           evtNb,
                           aStep->GetPostStepPoint()->GetPosition().x()/mm,
...
}

 What is the easiest way to do that? I have spent several hours
 trying to expand serSteppingAction, so it would know G4Event variables  
 like

 G4int evtNb = evt->GetEventID();

 with no success ;8=)
                                               TIA, Emil

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

1 None: Re: accessing G4 event number from UserSteppingAction?   (Makoto Asai - 24 Mar, 2011)
2 None: Re: accessing G4 event number from UserSteppingAction?   (Tom Roberts - 24 Mar, 2011)
 Add Message Add Message
to: "accessing G4 event number from UserSteppingAction?"

 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 ]