74{
75 G4Track* vTrack = aStep->GetTrack();
76
77 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
78
79 G4ThreeVector worldPosition = preStepPoint->GetPosition();
80 G4ThreeVector localPosition = preStepPoint->GetTouchableHandle()->
81 GetHistory()->GetTopTransform().TransformPoint(worldPosition);
82
83 G4ThreeVector mom = preStepPoint->GetMomentumDirection();
84
85
86 if (!(preStepPoint->GetStepStatus() == fGeomBoundary)) {return false;}
87
88 G4int vType = -1;
89 if(preStepPoint->GetMass() == 0 && preStepPoint->GetCharge() == 0) {
90 vType = 0;
91 }
92 else if(preStepPoint->GetMass() != 0 && preStepPoint->GetCharge() == 0) {
93 vType = 1;
94 }
95 else if(preStepPoint->GetMass() != 0 && preStepPoint->GetCharge() > 0) {
96 vType = 2;
97 }
98 else if(preStepPoint->GetMass() != 0 && preStepPoint->GetCharge() < 0) {
99 vType = 3;
100 }
101
102
104 aHit->
SetPos(localPosition);
107 aHit->
SetEnergy(preStepPoint->GetKineticEnergy());
108 aHit->
SetTime(preStepPoint->GetGlobalTime());
112
114
115 return true;
116}
void SetPos(G4ThreeVector xyz)
void SetWeight(G4double weight)
void SetEnergy(G4double energy)
void SetMom(G4ThreeVector xyz)