9 #include "G4VProcess.hh" 18 trackID_(0),particleID_(0),parentID_(0),momentum_(
math::
XYZVectorD(0.,0.,0.)),
19 totalEnergy_(0),vertexPosition_(
math::
XYZVectorD(0.,0.,0.)),globalTime_(0),
20 localTime_(0),properTime_(0),creatorProcess_(0),weight_(0),
42 LogDebug(
"TrackInformation") <<
" TrackWithHistory : created history for " <<
trackID_ 50 math::XYZVectorD vposdir(gt->GetVertexPosition().x(),gt->GetVertexPosition().y(),gt->GetVertexPosition().z());
51 math::XYZVectorD vmomdir(gt->GetVertexMomentumDirection().x(),gt->GetVertexMomentumDirection().y(),gt->GetVertexMomentumDirection().z());
56 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory vertex position check failed" 58 <<
"\nAt end: " << vposdir;
62 if (dirDiff.Mag2() > eps2 &&
momentum_.Unit().R() > eps2) {
63 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory momentum direction check failed" 64 <<
"\nAt construction: " <<
momentum_.Unit()
65 <<
"\nAt end: " << vmomdir;
68 if (!ok)
throw SimG4Exception(
"TrackWithHistory::checkAtEnd failed");
72 void * vgprimary = gt->GetDynamicParticle()->GetPrimaryParticle();
73 if (vgprimary == 0)
return -1;
75 G4PrimaryParticle* gprimary = (G4PrimaryParticle*) vgprimary;
77 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 *)
TrackWithHistory(const G4Track *g4track)