Message: Re: information required from simulation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: information required from simulation 

Forum: Event and Track Management
Re: None information required from simulation (Shobhit Sharma)
Re: Feedback Re: information required from simulation (Gumplinger Peter)
Date: 04 Jul, 2012
From: Shobhit Sharma <Shobhit Sharma>

   Thanks a lot for your reply. I implemented that example into my code but I am still not getting the required result. I wanted to count the number of neutrons passing through a particular physical volume(phyBlock to HaloWorld). So, I wrote a code, which is something like this:


void ExN02SteppingAction::UserSteppingAction(const G4Step* astep)
    G4String thePrePVname=" ",thePostPVname=" ";

    //getting pre-point 
    G4StepPoint* thePrePoint = astep->GetPreStepPoint();
    G4VPhysicalVolume* thePrePV = thePrePoint->GetPhysicalVolume();
    thePrePVname = thePrePV->GetName();

    //getting post-point
    G4StepPoint* thePostPoint = astep->GetPostStepPoint();
      G4VPhysicalVolume* thePostPV = thePostPoint->GetPhysicalVolume();
      if(thePostPV) thePostPVname = thePostPV->GetName();

    //getting particle definition
    G4Track* theTrack = astep->GetTrack();
    G4ParticleDefinition* particleType = theTrack->GetDefinition();
    G4String theParticleName = particleType->GetParticleName();

    //checking if the particle crossed the required volume
      if (thePrePVname  == "phyBlock" && thePostPVname == "HaloWorld") 

I am not getting any kind of output through this and according to the extent till I have debugged, there is some problem with the "if" statement. Also, while I run the Geant4 code, I get some error which says something like "Filter: Auxiliary points are being memory leaked". What's that? This was present before implementing this code. I hope this is not creating any problem.

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

1 None: Re: information required from simulation   (Youming Yang - 04 Jul, 2012)
1 Question: Re: information required from simulation   (smith - 21 Oct, 2012)
2 None: Re: information required from simulation   (Youming Yang - 04 Jul, 2012)
 Add Message Add Message
to: "Re: information required from simulation"

 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 ]