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

Question Help: Compton scattering times 

Forum: Event and Track Management
Date: 19 Apr, 2015
From: Xiao Tong <Xiao Tong>

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

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

1 None: Re: Help: Compton scattering times   (Marc Verderi - 20 Apr, 2015)
 Add Message Add Message
to: "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 ]