Message: Storing neutron events using SD Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Storing neutron events using SD 

Forum: Event and Track Management
Date: 29 Oct, 2012
From: C Mos <C Mos>

Hi I am using a sensitive detector to detect particles in a specific volume. This is what I have:

//=====================================

  G4bool APIdrdcSpatialSD::ProcessHits(G4Step* aStep,G4TouchableHistory*){
  G4double edep = aStep->GetTotalEnergyDeposit();
  G4int partPDGencoding=aTrack->GetDefinition()->GetPDGEncoding();

  //Next line for debugging purposes
  if(partPDGencoding==G4Neutron::Definition()->GetPDGEncoding())  G4cout << "Neutron!..." << G4endl; 

  //Only collect data if there was energy deposit.
  if(edep==0.) return false;

  //Only collect data for gamma and neutrons
  if(partPDGencoding!=G4ParticleTable::GetParticleTable()->FindParticle("gamma")->GetPDGEncoding() &&
  partPDGencoding!=G4Neutron::Definition()->GetPDGEncoding()) return false;  
  //Data collection next...
  }

//=====================================

I notice that I can identify neutron hits but they always seem to have 0. energy deposit. Is there a proper way to detect energy deposit by these wonderful particles?

Cheers,
  Chris

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

1 Warning: Re: Storing neutron events using SD   (Michael H. Kelsey - 29 Oct, 2012)
(_ More: Re: Storing neutron events using SD   (C Mos - 01 Nov, 2012)
(_ None: Re: Storing neutron events using SD   (Mike Kelsey - 01 Nov, 2012)
 Add Message Add Message
to: "Storing neutron events using SD"

 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 ]