Tuesday, July 29, 2014

G4BestUnit

In order to check if the GetPMTPos() is working in the modified GEANT4 example I'm working with but returning 0,0,0 due to some units problem, tried to include G4BestUnit in the cout. As an example, LXeSteppingVerbose.cc has
std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")

For this to work, the include file needed is
#include "G4UnitsTable.hh"

But even with this, GetPMTPos() returns zeros - units set to femto-metres! So, we have to work with GetPMTNumber() instead, since that is working fine. 

No comments:

Post a Comment