19 LOG(fatal) <<
"KfTrajectory::MakeConsistent: fKfSetup is not set!";
35 std::vector<char> isMaterialLayerPresent(
fKfSetup->GetNofLayers(),
false);
38 for (
const auto& n :
fNodes) {
39 if (n.materialLayer >= 0 && n.materialLayer <
fKfSetup->GetNofLayers()) {
40 isMaterialLayerPresent[n.materialLayer] =
true;
46 double zMin =
fNodes.front().z;
47 double zMax =
fNodes.back().z;
48 unsigned int sizeOld =
fNodes.size();
50 for (
int ml = 0; ml <
fKfSetup->GetNofLayers(); ++ml) {
51 const auto& mat =
fKfSetup->GetMaterial(ml);
52 if (mat.GetZref() < zMin) {
55 if (mat.GetZref() > zMax) {
58 if (isMaterialLayerPresent[ml]) {
63 matNode.
z = mat.GetZref();
67 if (
fNodes.size() > sizeOld) {
72 for (
unsigned int i = 0; i <
fNodes.size(); i++) {
header file for the kf::Trajectory class
The class describes the particle's trajectory along its entire length.
T fQaChi2Downstream
chi2 from the downstream fit iteration, needed for QA
bool fIsFitted
true if the trajectory at all the nodes between the first and the last measurements are fitted
std::shared_ptr< const Setup< T > > fKfSetup
Kalman Filter setup.
int fFirstMeasurementNodeId
index of the first node with measurement
void MakeConsistent()
sort the nodes in Z, add missing material layers and set fFirstMeasureNode and fLastMeasureNode
std::vector< Node > fNodes
nodes on the trajectory
bool fIsFullyExtrapolated
true if the trajectory is successfully extrapolated beyond the first and last measurements
int fLastMeasurementNodeId
index of the last node with measurement
int fNmeasurements
number of nodes with measurements
The class represent a node on the trajectory.
T z
Z coordinate of the node.
int materialLayer
== Material information (if present)