Message: Re: Counting the number of characteristic X-ray produced in an X-ray tube Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Counting the number of characteristic X-ray produced in an X-ray tube 

Forum: Event and Track Management
Re: None Counting the number of characteristic X-ray produced in an X-ray tube (Brent van der Heyden)
Date: Feb 18, 05:54
From: Brent van der Heyden <Brent van der Heyden>

I found a fairly simple solution based on one of the Geant4 examples (extended/electromagnetic/TestEm5).

In the G4UserTrackingAction::PostUserTrackingAction you can track the CreatorModelID of the G4Track. In the PostUserTrackingAction function you should be able to check different creator processes.

E.g.


G4int fPhotoGamma = G4PhysicsModelCatalog::GetIndex("phot_fluo");
G4int fComptGamma = G4PhysicsModelCatalog::GetIndex("compt_fluo");
G4int fPhotoAuger = G4PhysicsModelCatalog::GetIndex("phot_auger");
G4int fComptAuger = G4PhysicsModelCatalog::GetIndex("compt_auger");
G4int fPixeGamma = G4PhysicsModelCatalog::GetIndex("gammaPIXE");
G4int fPixeAuger = G4PhysicsModelCatalog::GetIndex("e-PIXE");
G4int fEBrem = G4PhysicsModelCatalog::GetIndex("eBrem");
G4int fCompt = G4PhysicsModelCatalog::GetIndex("compt");

void MyTrackingAction::PostUserTrackingAction(const G4Track* aTrack) {
  if (aTrack->GetCreatorModelID()==fPixeGamma || ... (other conditions)) {
   // do something
  }
}

 Add Message Add Message
to: "Re: Counting the number of characteristic X-ray produced in an X-ray tube"

 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 ]