Message: Re: setting secondaries at G4VFastSimulationModel's DoIt Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: setting secondaries at G4VFastSimulationModel's DoIt 

Forum: Event and Track Management
Re: Question setting secondaries at G4VFastSimulationModel's DoIt (Sergey Podolsky)
Date: 26 Jun, 2012
From: Marc Verderi <Marc Verderi>

Hello Sergey,

To create secondaries, you have to tell first to fastStep how many of 
them you create:

     fastStep.SetNumberOfSecondaryTracks(G4int);

and then invoke the helper method CreateSecondaryTrack(...) for each of 
them calling either:

     fastStep.CreateSecondaryTrack(dynamicParticle,  // const 
G4DynamicParticle&
                                   polarization,     // G4ThreeVector
                                   position,         // G4ThreeVector
                                   time,             // G4double,
                                   localCoordinates  // G4bool, with a 
default value "true");

or

    fastStep.CreateSecondaryTrack(dynamicParticle,  // const 
G4DynamicParticle&
                                  position,         // G4ThreeVector
                                  time,             // G4double,
                                  localCoordinates  // G4bool, with a 
default value "true");


these two methods return a G4Track pointer on the track created.

You may alternatively create a G4Track by yourself and pass it to fastStep:

     G4Track* secondary = new G4Track(...);
     fastStep.AddSecondary(secondary);


You can look at the G4FastStep.hh header file in 
source/processes/parameterisation/include for more details.

Please let me know if this helps.

Cheers,
Marc


On 06/25/2012 11:21 PM, Sergey Podolsky wrote:
> *** Discussion title: Event and Track Management
>
> I make my implementation of the G4VFastSimulationModel. I successfully
> implemented energy deposition in my parameterization, but then I also
> needed to put few secondary tracks for detailed simulation into model. I
> haven't seen any tips how to do it, so could you give some notes, how to
> put secondary tracks in DoIt(const G4FastTrack& fastTrack, G4FastStep&
> fastStep) function?
>
> A lot of thanks!
>
> Sergey.
>
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanage/1069.html

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

1 Ok: Re: setting secondaries at G4VFastSimulationModel's DoIt   (Sergey Podolsky - 28 Jun, 2012)
 Add Message Add Message
to: "Re: setting secondaries at G4VFastSimulationModel's DoIt"

 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 ]