@@ -111,27 +111,6 @@ ProcessCode RootParticleWriter::finalize() {
111111 ACTS_INFO (" Wrote particles to tree '" << m_cfg.treeName << " ' in '"
112112 << m_cfg.filePath << " '" );
113113
114- if (m_nNonFinite > 0 ) {
115- ACTS_WARNING (m_nNonFinite << " / " << m_nTotal
116- << " particle(s) had non-finite mass or charge" );
117- }
118- if (m_nZeroCharge > 0 ) {
119- ACTS_WARNING (m_nZeroCharge
120- << " / " << m_nTotal
121- << " zero-charge particle(s) linearly extrapolated to "
122- " perigee" );
123- }
124- if (m_nGlobalToLocalFailed > 0 ) {
125- ACTS_ERROR (m_nGlobalToLocalFailed
126- << " / " << m_nZeroCharge
127- << " global-to-local transformation(s) failed" );
128- }
129- if (m_nPropagationFailed > 0 ) {
130- ACTS_ERROR (m_nPropagationFailed
131- << " / " << m_nCharged
132- << " propagation(s) to perigee surface failed" );
133- }
134-
135114 return ProcessCode::SUCCESS ;
136115}
137116
@@ -142,7 +121,6 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
142121
143122 m_eventId = ctx.eventNumber ;
144123 for (const auto & particle : particles) {
145- ++m_nTotal;
146124 m_particleHash.push_back (particle.particleId ().hash ());
147125 m_particleType.push_back (particle.pdg ());
148126 m_process.push_back (static_cast <std::uint32_t >(particle.process ()));
@@ -158,7 +136,7 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
158136
159137 // particle constants
160138 if (!std::isfinite (particle.mass ()) || !std::isfinite (particle.charge ())) {
161- ++m_nNonFinite ;
139+ ACTS_WARNING ( " Particle mass or charge is not finite, can't write it " ) ;
162140 }
163141
164142 m_m.push_back (
@@ -219,7 +197,8 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
219197
220198 // Neutral particles have no helix -> linearly extrapolate to perigee
221199 if (particle.charge () == 0 ) {
222- ++m_nZeroCharge;
200+ ACTS_WARNING (
201+ " Particle has zero charge, linearly extrapolating to perigee" );
223202 // Initialize the truth particle info
224203 auto perigeeD0 = NaNfloat;
225204 auto perigeeZ0 = NaNfloat;
@@ -233,7 +212,7 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
233212 perigeeD0 = lpResult.value ()[Acts::BoundIndices::eBoundLoc0];
234213 perigeeZ0 = lpResult.value ()[Acts::BoundIndices::eBoundLoc1];
235214 } else {
236- ++m_nGlobalToLocalFailed ;
215+ ACTS_ERROR ( " Global to local transformation did not succeed. " ) ;
237216 }
238217 // truth parameters at perigee are the same as at production vertex
239218 m_perigeePhi.push_back (Acts::clampValue<float >(particle.phi ()));
@@ -258,7 +237,6 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
258237 continue ;
259238 }
260239
261- ++m_nCharged;
262240 // Charged particles: propagate helix to perigee
263241 // Build a propagator and propagate the *truth parameters* to the
264242 // perigee Stepper + propagator
@@ -283,7 +261,7 @@ ProcessCode RootParticleWriter::writeT(const AlgorithmContext& ctx,
283261 // Do the propagation to the perigee surface
284262 auto propRes = propagator->propagate (startParams, *pSurface, pOptions);
285263 if (!propRes.ok () || !propRes->endParameters .has_value ()) {
286- ++m_nPropagationFailed ;
264+ ACTS_ERROR ( " Propagation to perigee surface failed. " ) ;
287265 m_perigeePhi.push_back (NaNfloat);
288266 m_perigeeTheta.push_back (NaNfloat);
289267 m_perigeeQop.push_back (NaNfloat);
0 commit comments