9 #include "G4VProcess.hh"
27 creatorProcess_(nullptr),
31 if (g4trk !=
nullptr) {
51 LogDebug(
"TrackInformation") <<
" TrackWithHistory : created history for " <<
trackID_ <<
" with mother "
58 math::XYZVectorD vposdir(gt->GetVertexPosition().x(), gt->GetVertexPosition().y(), gt->GetVertexPosition().z());
60 gt->GetVertexMomentumDirection().x(), gt->GetVertexMomentumDirection().y(), gt->GetVertexMomentumDirection().z());
63 double eps2 = epsilon *
epsilon;
65 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory vertex position check failed"
70 if (dirDiff.Mag2() > eps2 &&
momentum_.Unit().R() > eps2) {
71 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory momentum direction check failed"
72 <<
"\nAt construction: " <<
momentum_.Unit()
73 <<
"\nAt end: " << vmomdir;
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
int extractGenID(const G4Track *gt) const
math::XYZVectorD vertexPosition_
math::XYZVectorD momentum_
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)