Message: Re: Get the the Number of secondary electron? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Get the the Number of secondary electron? 

Forum: Medical Applications
Re: Question Get the the Number of secondary electron?
Re: None Re: Get the the Number of secondary electron?
Re: Feedback Re: Get the the Number of secondary electron? (Pedro Arce)
Date: 04 Apr, 2008
From: <jfgao@mdanderson.org>

I can run it in the Geant4 9.1 version now as following:

   //for scoring secondary electron number..................
   G4int id = aStep->GetTrack()->GetVolume()->GetCopyNo(); 
   std::map<G4int,G4int> nElec; 
   G4TrackVector* trkList = aStep->GetSecondary();
   G4TrackVector::const_iterator ite;
   for( ite = trkList->begin(); ite != trkList->end(); ite++)
   {
   if( (*ite)->GetDefinition() == G4Electron::Electron()) nElec[id]++;
   }

   G4cout<<"0,id,nElec====="<<G4ThreeVector(0,id,nElec[id])<<G4endl; 
   //for scoring secondary electron number..................

 But nElec is always 0 in the output as following:

  *********************************************************************************************************
* G4Track Information:   Particle = e-,   Track ID = 2,   Parent ID = 1
*********************************************************************************************************

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0 -4.04e-05 -1.95e-06 -4.05e-06   0.00118        0        0         0     NanoPhy initStep
    1 -3.9e-05 -7.5e-07 -3.48e-06  0.000974 0.000201 2.33e-06  2.33e-06     NanoPhy msc
0,id,nElec=====(0,0,0)
    2 -3.99e-05 8.14e-07 -2.96e-06  0.000971 2.49e-06 2.33e-06  4.67e-06     NanoPhy msc
0,id,nElec=====(0,0,0)
    3 -3.93e-05 2.59e-06 -3.2e-06  0.000789 0.000182 2.33e-06     7e-06     NanoPhy msc
0,id,nElec=====(0,0,0)

So I think "id" still didn't get the right copyNumber which was 
parameterized in my HadrontherapyPhantomROG.cc. How can I get the right 
copyNumber in Readout Geometry?
thank you!  

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

 Add Message Add Message
to: "Re: Get the the Number of secondary electron?"

 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 ]