8 #include "G4VProcess.hh" 26 creatorProcess_(nullptr),
30 if (g4trk !=
nullptr) {
50 LogDebug(
"TrackInformation") <<
" TrackWithHistory : created history for " <<
trackID_ <<
" with mother " 57 math::XYZVectorD vposdir(
gt->GetVertexPosition().x(),
gt->GetVertexPosition().y(),
gt->GetVertexPosition().z());
59 gt->GetVertexMomentumDirection().x(),
gt->GetVertexMomentumDirection().y(),
gt->GetVertexMomentumDirection().z());
64 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory vertex position check failed" 69 if (dirDiff.Mag2() > eps2 &&
momentum_.Unit().R() > eps2) {
70 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory momentum direction check failed" 71 <<
"\nAt construction: " <<
momentum_.Unit()
72 <<
"\nAt end: " << vmomdir;
77 G4Exception(
"TrackWithHistory::checkAtEnd()",
"mc001", FatalException,
"check at track end failed");
81 void* vgprimary =
gt->GetDynamicParticle()->GetPrimaryParticle();
82 if (vgprimary ==
nullptr)
85 G4PrimaryParticle* gprimary = (G4PrimaryParticle*)vgprimary;
87 return ext(gprimary).id();
const G4VProcess * creatorProcess_
G4ThreadLocal G4Allocator< TrackWithHistory > * fpTrackWithHistoryAllocator
math::XYZVectorD vertexPosition_
math::XYZVectorD momentum_
int extractGenID(const G4Track *gt) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
void checkAtEnd(const G4Track *)
static int particleID(const G4Track *)
Log< level::Warning, false > LogWarning
TrackWithHistory(const G4Track *g4track)