ステップポイントの運動量をしりたい(G4StepPoint::GetMomentum
)
1auto pre_step = aStep-GetPreStepPoint();
2G4ThreeVector momentum = pre_step->GetMomentum();
3
4G4debug << momentum << G4endl;
5// (0.382287,0.161188,1.37889)
6
7G4debug << G4BestUnit(momentum, "Energy") << G4endl;
8// 0.382287 0.161188 1.37889 MeV
GetMomentum
で運動量の合計を取得できます。
注釈
G4BestUnit
のカテゴリーに運動量(Momentum
)はありません。
単位のオーダーは同じになると思うので、Energy
で代用しています。
ステップ点の運動方向をしりたい(GetMomentumDirection
)
1auto pre_step = aStep-GetPreStepPoint();
2G4ThreeVector direction = pre_step->GetMomentumDirection();
3
4G4debug << direction << G4endl;
5(0.265486,0.11194,0.957594)
GetMomentumDirection
で運動量の単位ベクトル成分を取得できます。
注釈
あるイベントの、あるステップに対して
GetMomentum
と
GetMomentumDirection
で
得られた値を並べてみました。
1G4debug << momenum << G4endl;
2// (0.382287,0.161188,1.37889)
3
4G4debug << direction << G4endl;
5// (0.265486,0.11194,0.957594)
それぞれの違いがいまいち分かっていません。