Message: Re: Help: Compton scattering times Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Help: Compton scattering times 

Forum: Event and Track Management
Re: Question Help: Compton scattering times (Xiao Tong)
Date: 20 Apr, 2015
From: Marc Verderi <Marc Verderi>

Dear Xiatong,

You should remove the test "if (0 == depositedEnergy) return true;". A 
gamma, except in special cases, does not deposit energy by itself.

Cheers,
Marc


On 04/20/2015 08:42 AM, Xiao Tong wrote:
> *** Discussion title: Event and Track Management
>
> Hello everyone: I am using mac pro to run Geant4.10.1 I want to record
> the times of Comton scattering when a 662 keV gamma ray is incident to a
> pixllated detector array (10x10). Below is part of my code:
>
> for (i=0; i<100; i++) {
>      BeamTestEmCalorimeterHit* aHit = new BeamTestEmCalorimeterHit(i);
>      fHitsCollection->insert(aHit);
>    }
> }
> G4int ComptTime(0);
> G4String processName="Compt";
> G4String CPName;
> G4bool BeamTestEmCalorimeter::ProcessHits(G4Step* aStep, G4TouchableHistory*)
> {
>
>    G4double depositedEnergy = aStep->GetTotalEnergyDeposit();
>    if (0 == depositedEnergy) return true;
>
>   G4Track* aTrack = aStep->GetTrack();
>
>   if(aStep->GetTrack()->GetCreatorProcess()!=0)
>      CPName = aTrack->GetCreatorProcess()->GetProcessName();
>      if (CPName == processName) ++ComptTime;
>
>    return true;
> }
>
> But the ComptTime is always 0, after running my program. Anyone can help
> me to find the reason? Thank you. Xiaotong
>
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/eventtrackmanage/1245.html

 Add Message Add Message
to: "Re: Help: Compton scattering times"

 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 ]