52 fAffineTransformationDefined( false ),
53 fEnvelope ( anEnvelope ),
54 fIsUnique ( IsUnique ),
55 fEnvelopeLogicalVolume ( nullptr ),
56 fEnvelopePhysicalVolume ( nullptr ),
57 fEnvelopeSolid ( nullptr )
85 if (!fAffineTransformationDefined || !fIsUnique) FRecordsAffineTransformation(theNavigator);
99 fLocalTrackDirection = fLocalTrackMomentum.
unit();
111G4FastTrack::FRecordsAffineTransformation(
const G4Navigator* theNavigator)
121 if(theNavigator !=
nullptr ) NavigatorToUse = theNavigator;
130 G4int depth = (
G4int)history->GetHistory()->GetDepth();
133 for (idepth = 0; idepth <= depth; ++idepth)
139 fEnvelopePhysicalVolume = currPV;
140 fEnvelopeLogicalVolume = currLV;
141 fEnvelopeSolid = currLV->
GetSolid();
152 ed <<
"Can't find transformation for `" << fEnvelopePhysicalVolume->
GetName() <<
"'" <<
G4endl;
153 G4Exception(
"G4FastTrack::FRecordsAffineTransformation()",
162 fAffineTransformation = history->GetHistory()->GetTransform(idepth);
163 fInverseAffineTransformation = fAffineTransformation.
Inverse();
165 fAffineTransformationDefined =
true;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4FastTrack(G4Envelope *anEnvelope, G4bool IsUnique)
void SetCurrentTrack(const G4Track &, const G4Navigator *a=0)
G4VSolid * GetSolid() const
G4bool IsRootRegion() const
G4Region * GetRegion() const
virtual G4TouchableHistoryHandle CreateTouchableHistoryHandle() const
const G4ThreeVector & GetPosition() const
G4ThreeVector GetMomentum() const
const G4ThreeVector & GetPolarization() const
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const