Message: Identifying secondary particles associated with a hit Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Identifying secondary particles associated with a hit 

Keywords: Particle identification
Forum: Hits, Digitization and Pileup
Date: 08 Aug, 2005
From: Greg <>

Hello to all,

I'm just an lowly REU student trying to get a Geant 4 simulation to run. I am looking at the decay of a muon as it passes through a series of drift chambers and copper plates. I'm haveing trouble figuring out how to get Geant to tell me whether a hit was caused by the muon or by the daughter electron (positron). I tried implimenting in my Hit.hh:

   G4ParticleDefinition * the ParticleType;
   inline G4ParticleDefinition * GetParticleType() const {return theParticleType;}
   virtual G4ParticleDefinition* GetDefinition() const {return theParticleType;}

Then in my

   const Hit& Hit::operator=(const Hit &right)
   theParticleType = right.GetDefinition();

But when I print theParticleType, all that I get are 0's. Unfortunately, my knowledge of C++ is limited, so I don't really know what to do (I snitched most of this coding from an example).

Any help would be appreciated.

Cheers, Greg

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

 Add Message Add Message
to: "Identifying secondary particles associated with a hit"

 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 ]