1818
1919using namespace VertexFitterActs ;
2020using namespace Acts ::UnitLiterals;
21- using namespace ReconstructedParticle2Track ;
2221
2322
2423VertexingUtils::FCCAnalysesVertex VertexFitterActs::VertexFitterFullBilloir (ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData> recoparticles,
@@ -134,18 +133,6 @@ VertexingUtils::FCCAnalysesVertex VertexFitterActs::VertexFitterFullBilloir(ROOT
134133 tracksPtr.push_back (&trk);
135134 }
136135
137-
138- Acts::Vertex<Acts::BoundTrackParameters> fittedVertex =
139- billoirFitter.fit (tracksPtr, linearizer, vfOptions, state).value ();
140- // Acts::Vertex<Acts::BoundTrackParameters> fittedVertexConstraint =
141- // billoirFitter.fit(tracksPtr, linearizer, vfOptionsConstr, state).value();
142-
143-
144- // std::cout << "Fitting nTracks: " << Ntr << std::endl;
145- // std::cout << "Fitted Vertex: " << fittedVertex.position() << std::endl;
146- // std::cout << "Fitted constraint Vertex: "
147- // << fittedVertexConstraint.position() << std::endl;
148-
149136 VertexingUtils::FCCAnalysesVertex TheVertex;
150137 edm4hep::VertexData edm4hep_vertex;
151138 ROOT::VecOps::RVec<float > reco_chi2;
@@ -162,6 +149,23 @@ VertexingUtils::FCCAnalysesVertex VertexFitterActs::VertexFitterFullBilloir(ROOT
162149 TheVertex.updated_track_momentum_at_vertex = updated_track_momentum_at_vertex;
163150
164151
152+ TheVertex.ntracks = Ntr;
153+ if ( Ntr <= 1 ) return TheVertex; // can not reconstruct a vertex with only one track...
154+
155+
156+ Acts::Vertex<Acts::BoundTrackParameters> fittedVertex =
157+ billoirFitter.fit (tracksPtr, linearizer, vfOptions, state).value ();
158+ // Acts::Vertex<Acts::BoundTrackParameters> fittedVertexConstraint =
159+ // billoirFitter.fit(tracksPtr, linearizer, vfOptionsConstr, state).value();
160+
161+
162+ // std::cout << "Fitting nTracks: " << Ntr << std::endl;
163+ // std::cout << "Fitted Vertex: " << fittedVertex.position() << std::endl;
164+ // std::cout << "Fitted constraint Vertex: "
165+ // << fittedVertexConstraint.position() << std::endl;
166+
167+
168+
165169 TheVertex.ntracks = Ntr;
166170 edm4hep_vertex.chi2 = fittedVertex.fitQuality ().first / fittedVertex.fitQuality ().second ;
167171 edm4hep_vertex.position = edm4hep::Vector3f ( fittedVertex.position ()[0 ],
0 commit comments