Message: Re: How to retrieve Physics Interaction undergone by a particle Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: How to retrieve Physics Interaction undergone by a particle 

Forum: Medical Applications
Re: Question How to retrieve Physics Interaction undergone by a particle (Abigail)
Re: None Re: How to retrieve Physics Interaction undergone by a particle (Joseph Perl)
Re: Question Re: How to retrieve Physics Interaction undergone by a particle (Abigail)
Re: None Re: How to retrieve Physics Interaction undergone by a particle (Paul Nicholas Colin Gloster)
Date: 08 Mar, 2009
From: Abigail <Abigail>

Ok sir.

Taking your suggestion sir...

The problem was on the use of the G4VProcess.

And here are the revision of the codes used.

Before,
//------------------------------------------------------------------
void SteppingAction::UserSteppingAction(const G4Step* aStep)
{
 ...

const G4Track* track = aStep->GetTrack();

...

  const G4VProcess * creatorProcess = track->GetCreatorProcess();
 G4String pPhyInt = creatorProcess->GetProcessName();
...

 if(thePrePVname="water")

  {
     analMan->FillWithEnergy_perDepthx(x,edep);

   G4cout<<thePrePVname<<"  "<<x/cm<<"  "<<pName<<"     "<<pid<<" "<<pPhyInt<<G4endl;
 }

//-----------------------------------------------------------------

But now through the help of the example from Geant4 that uses G4VProcess

//-------------------------------------------------------------------- from geant4.9.0.p02/examples/extended/medical/fanoCavity/src/SteppingAction.cc

copying the format on how G4VProcess was used and plug it in my codes: ................. void SteppingAction::UserSteppingAction(const G4Step* aStep) {

......
 G4String pPhyInt;
  G4StepPoint* point2 = aStep->GetPostStepPoint();
  const G4VProcess* process = point2->GetProcessDefinedStep();
  if (process) pPhyInt=process->GetProcessName();

.......

if(thePrePVname="water")

  {
G4cout<<thePrePVname<<"  "<<x/cm<<"  "<<"  "<<pid<<"  "<<pPhyInt<<G4endl;

   }

................................

and the output was:

--------- Ranecu engine status ---------
 Initial seed (index) = 0
 Current couple of seeds = 9876, 54321
----------------------------------------
Start Run processing.

---> Begin of Event: 0
water  -12.314864    1  LowEnergyIoni
water  -12.313217    1  LowEnergyIoni
water  -12.313823    1  LowEnergyIoni
water  -12.313262    1  LowEnergyIoni
water  -12.313626    1  LowEnergyIoni
water  -12.31386    1  LowEnergyIoni
water  -12.31437    1  LowEnergyIoni
water  -1.3674324    1  LowEnergyIoni
water  -1.7820113    1  LowEnergyIoni
water  -1.6210994    0  LowEnPhotoElec
water  -1.262653    1  LowEnergyIoni
water  -1.7599642    0  LowEnPhotoElec
water  -1.6988842    1  LowEnergyIoni
water  -1.6987129    1  LowEnergyIoni
water  -1.6986297    1  LowEnergyIoni
water  -1.5633853    0  LowEnPhotoElec
water  -1.4474685    1  LowEnergyIoni
water  -1.4473534    1  LowEnergyIoni
water  -7.1898844    1  LowEnergyIoni
water  -1.7980192    0  LowEnPhotoElec
water  -1.7165996    1  LowEnergyIoni
water  -1.7163617    1  LowEnergyIoni
water  -1.7163139    1  LowEnergyIoni
water  -1.0017933    0  LowEnPhotoElec
water  -0.99426511    1  LowEnergyIoni
water  -1.0955236    1  msc
water  -1.0922874    1  msc
water  -1.7671127    0  LowEnPhotoElec
water  -1.7653319    1  LowEnergyIoni
water  -0.60366375    1  LowEnergyIoni
water  -0.60370913    1  LowEnergyIoni
water  -0.6037125    1  LowEnergyIoni
Run terminated.
Run Summary
  Number of events processed : 10
  User=0.01s Real=0.02s Sys=0s

--------- Ranecu engine status ---------
 Initial seed (index) = 0
 Current couple of seeds = 1497531012, 1935730160
----------------------------------------

...................................... //--------------------------------------------------------

I think everything look ok sir.. (Is it???)

//--------------------------------------------------------

thanks for the concern sir.....

Abby....

 Add Message Add Message
to: "Re: How to retrieve Physics Interaction undergone by a particle"

 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 ]