9 #include "G4VProcess.hh"
20 trackID_(0),particleID_(0),parentID_(0),momentum_(math::
XYZVectorD(0.,0.,0.)),
21 totalEnergy_(0),vertexPosition_(math::
XYZVectorD(0.,0.,0.)),globalTime_(0),
22 localTime_(0),properTime_(0),creatorProcess_(0),weight_(0),
43 LogDebug(
"TrackInformation") <<
" TrackWithHistory : created history for " <<
trackID_
51 math::XYZVectorD vposdir(gt->GetVertexPosition().x(),gt->GetVertexPosition().y(),gt->GetVertexPosition().z());
52 math::XYZVectorD vmomdir(gt->GetVertexMomentumDirection().x(),gt->GetVertexMomentumDirection().y(),gt->GetVertexMomentumDirection().z());
57 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory vertex position check failed"
59 <<
"\nAt end: " << vposdir;
63 if (dirDiff.Mag2() > eps2 &&
momentum_.Unit().R() > eps2) {
64 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory momentum direction check failed"
65 <<
"\nAt construction: " <<
momentum_.Unit()
66 <<
"\nAt end: " << vmomdir;
69 if (!ok)
throw SimG4Exception(
"TrackWithHistory::checkAtEnd failed");
73 void * vgprimary = gt->GetDynamicParticle()->GetPrimaryParticle();
74 if (vgprimary == 0)
return -1;
76 G4PrimaryParticle* gprimary = (G4PrimaryParticle*) vgprimary;
78 return ext(gprimary).id();
const G4VProcess * creatorProcess_
int extractGenID(const G4Track *gt) const
math::XYZVectorD vertexPosition_
math::XYZVectorD momentum_
static G4TrackToParticleID * theG4TrackToParticleID
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
G4Allocator< TrackWithHistory > TrackWithHistoryAllocator
void checkAtEnd(const G4Track *)
int particleID(const G4Track *)
TrackWithHistory(const G4Track *g4track)