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),
45 LogDebug(
"TrackInformation") <<
" TrackWithHistory : created history for " <<
trackID_
53 math::XYZVectorD vposdir(gt->GetVertexPosition().x(),gt->GetVertexPosition().y(),gt->GetVertexPosition().z());
54 math::XYZVectorD vmomdir(gt->GetVertexMomentumDirection().x(),gt->GetVertexMomentumDirection().y(),gt->GetVertexMomentumDirection().z());
59 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory vertex position check failed"
61 <<
"\nAt end: " << vposdir;
65 if (dirDiff.Mag2() > eps2 &&
momentum_.Unit().R() > eps2) {
66 edm::LogWarning(
"TrackInformation") <<
"TrackWithHistory momentum direction check failed"
67 <<
"\nAt construction: " <<
momentum_.Unit()
68 <<
"\nAt end: " << vmomdir;
71 if (!ok)
throw SimG4Exception(
"TrackWithHistory::checkAtEnd failed");
75 void * vgprimary = gt->GetDynamicParticle()->GetPrimaryParticle();
76 if (vgprimary == 0)
return -1;
78 G4PrimaryParticle* gprimary = (G4PrimaryParticle*) vgprimary;
80 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)