#include <ISFG4Helper.h>
Definition at line 25 of file ISFG4Helper.h.
◆ ISFG4Helper()
iGeant4::ISFG4Helper::ISFG4Helper |
( |
| ) |
|
|
delete |
◆ attachTrackInfoToNewG4Track()
attach a new TrackInformation object to the given new (!) G4Track (the G4Track must not have a UserInformation object attached to it)
link the given G4Track to the given ISFParticle
Definition at line 78 of file ISFG4Helper.cxx.
83 if ( aTrack.GetUserInformation() ) {
85 description << G4String(
"ISFG4Helper::attachTrackInfoToNewG4Track: ")
86 <<
"Trying to attach new TrackInformation object to G4Track which already has a TrackUserInformation attached (trackID: "
87 << aTrack.GetTrackID() <<
", track pos: "<<aTrack.GetPosition() <<
", mom: "<<aTrack.GetMomentum()
88 <<
", parentID " << aTrack.GetParentID() <<
")";
89 G4Exception(
"ISFG4Helper::attachTrackInfoToNewG4Track",
"TrackUserInformationAlreadyExists", FatalException,
description);
94 if ( !truthBinding ) {
96 description << G4String(
"ISFG4Helper::attachTrackInfoToNewG4Track: ")
97 <<
"No TruthBinding present in base ISFParticle (trackID: "
98 << aTrack.GetTrackID() <<
", track pos: "<<aTrack.GetPosition() <<
", mom: "<<aTrack.GetMomentum()
99 <<
", parentID " << aTrack.GetParentID() <<
", ISFParticle: "<<baseIsp<<
")";
100 G4Exception(
"ISFG4Helper::attachTrackInfoToNewG4Track",
"NoISFTruthBinding", FatalException,
description);
105 trackInfo->SetPrimaryGenParticle( truthBinding->getPrimaryGenParticle() );
106 trackInfo->SetClassification( classification );
◆ convertG4TrackToISFParticle()
convert the given G4Track into an ISFParticle
Definition at line 31 of file ISFG4Helper.cxx.
35 const G4ThreeVector& g4pos = aTrack.GetPosition();
36 const double gTime = aTrack.GetGlobalTime();
39 const G4ThreeVector& g4mom = aTrack.GetMomentum();
42 const G4ParticleDefinition &particleDefinition = *aTrack.GetDefinition();
43 double mass = particleDefinition.GetPDGMass();
44 double charge = particleDefinition.GetPDGCharge();
45 int pdgID = particleDefinition.GetPDGEncoding();
◆ getAtlasG4EventUserInfo()
◆ getISFTrackInfo()
return a valid UserInformation object of the G4Track for use within the ISF
Definition at line 69 of file ISFG4Helper.cxx.
◆ setG4TrackInfoFromBaseISFParticle()
static void iGeant4::ISFG4Helper::setG4TrackInfoFromBaseISFParticle |
( |
G4Track & |
aTrack, |
|
|
const ISF::ISFParticle & |
baseIsp, |
|
|
bool |
setReturnToISF = false |
|
) |
| |
|
static |
link the given G4Track to the given ISFParticle
The documentation for this class was generated from the following files:
const TruthBinding * getTruthBinding() const
pointer to the simulation truth - optional, can be 0