Message: Re: Defining initial track weight Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: Defining initial track weight 

Forum: Event and Track Management
Re: None Defining initial track weight (Vlasios Vasileiou)
Re: None Re: Defining initial track weight (Vladimir IVANTCHENKO )
Re: Question Re: Defining initial track weight (Vlasios Vasileiou)
Re: None Re: Defining initial track weight (Vlasios Vasileiou)
Date: 03 May, 2005
From: Gumplinger Peter <Gumplinger Peter>

Not that I am an expert with this 'weight business' but how you managed to solve your problem made me curious. The culprit is this code in AddSecondary:

 void G4VParticleChange::AddSecondary(G4Track *aTrack)
 {
   if (debugFlag) CheckSecondary(*aTrack);

   if (!fSetSecondaryWeightByProcess){
     // pass the weight of parent track 
     aTrack->SetWeight(theParentWeight);
   }

Obviously then you need to set 'fSetSecondaryWeightByProcess' to 'true'. This you should be able to do (in G4Cerenkov::AlongStepDoIt) with the method:

aParticleChange.SetSecondaryWeightByProcess(true);

before:

aParticleChange.AddSecondary(aSecondaryTrack);

(I don't know where all this 'weight-business' is documented or, for that matter, where there is an example)

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

 Add Message Add Message
to: "Re: Defining initial track weight"

 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 ]