LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
sim::dump Namespace Reference

Functions to dump Monte Carlo object information into a stream. More...

Functions

template<typename Stream >
void DumpMCParticle (Stream &&out, simb::MCParticle const &particle, std::string indent, std::string firstIndent)
 Dumps the content of the specified particle in the output stream. More...
 
template<typename Stream >
void DumpMCParticle (Stream &&out, simb::MCParticle const &particle, std::string indent="")
 Dumps the content of the specified particle in the output stream. More...
 
template<typename Stream >
void DumpMCParticleTrajectory (Stream &&out, simb::MCTrajectory const &trajectory, unsigned int pointsPerLine, std::string indent)
 Dumps the specified particle trajectory into the output stream. More...
 
template<typename Stream >
void DumpMCParticleTrajectory (Stream &&out, simb::MCTrajectory const &trajectory)
 Dumps the specified particle trajectory into the output stream. More...
 
template<typename Stream >
void DumpMCNeutrino (Stream &&out, simb::MCNeutrino const &neutrino, std::string indent, std::string firstIndent)
 Dumps the content of the specified neutrino in the output stream. More...
 
template<typename Stream >
void DumpMCNeutrino (Stream &&out, simb::MCNeutrino const &neutrino, std::string indent="")
 Dumps the content of the specified neutrino in the output stream. More...
 
template<typename Stream >
void DumpMCTruth (Stream &&out, simb::MCTruth const &truth, unsigned int pointsPerLine, std::string indent, std::string firstIndent)
 Dumps the content of the specified MC truth in the output stream. More...
 
template<typename Stream >
void DumpMCTruth (Stream &&out, simb::MCTruth const &truth, unsigned int pointsPerLine, std::string indent="")
 Dumps the content of the specified MC truth in the output stream. More...
 
template<typename Stream >
void DumpMCTruth (Stream &&out, simb::MCTruth const &truth, std::string indent, std::string firstIndent)
 Dumps the content of the specified MC truth in the output stream. More...
 
template<typename Stream >
void DumpMCTruth (Stream &&out, simb::MCTruth const &truth, std::string indent="")
 Dumps the content of the specified MC truth in the output stream. More...
 
template<typename Stream >
void DumpGTruth (Stream &&out, simb::GTruth const &truth, std::string indent, std::string firstIndent)
 Dumps the content of the GENIE truth in the output stream. More...
 
template<typename Stream >
void DumpGTruth (Stream &&out, simb::GTruth const &truth, std::string indent="")
 Dumps the content of the GENIE truth in the output stream. More...
 

Detailed Description

Functions to dump Monte Carlo object information into a stream.

Function Documentation

template<typename Stream >
void sim::dump::DumpGTruth ( Stream &&  out,
simb::GTruth const &  truth,
std::string  indent,
std::string  firstIndent 
)

Dumps the content of the GENIE truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 379 of file MCDumpers.h.

References simb::GTruth::fDiffXsec, simb::GTruth::fFShadSystP4, simb::GTruth::fGint, simb::GTruth::fgQ2, simb::GTruth::fgq2, simb::GTruth::fGscatter, simb::GTruth::fgT, simb::GTruth::fgW, simb::GTruth::fgX, simb::GTruth::fgY, simb::GTruth::fHitNucP4, simb::GTruth::fIsCharm, simb::GTruth::fIsSeaQuark, simb::GTruth::fNumNeutron, simb::GTruth::fNumPi0, simb::GTruth::fNumPiMinus, simb::GTruth::fNumPiPlus, simb::GTruth::fNumProton, simb::GTruth::fprobability, simb::GTruth::fProbeP4, simb::GTruth::fProbePDG, simb::GTruth::fResNum, simb::GTruth::ftgtA, simb::GTruth::ftgtPDG, simb::GTruth::ftgtZ, simb::GTruth::fVertex, simb::GTruth::fweight, simb::GTruth::fXsec, and sim::ParticleName().

Referenced by sim::DumpGTruth::analyze(), DumpGTruth(), DumpMCTruth(), and evgen::GENIEGen::produce().

382  {
383 
384  unsigned int const nCharged
385  = truth.fNumPiPlus + truth.fNumPiMinus + truth.fNumProton;
386  unsigned int const nNeutral = truth.fNumPi0 + truth.fNumNeutron;
387  unsigned int const nPions
388  = truth.fNumPiPlus + truth.fNumPiMinus + truth.fNumPi0;
389  unsigned int const nNucleons = truth.fNumProton + truth.fNumNeutron;
390  unsigned int const nTotalParticles = nCharged + nNeutral;
391 
392  out << firstIndent
393  << "interaction code: " << truth.fGint
394  << ", neutrino scattering code: " << truth.fGscatter
395  << " at " << truth.fVertex
396  << "\n" << indent
397  << "probe: " << ParticleName(truth.fProbePDG)
398  << " with cp=" << truth.fProbeP4
399  << " hit nucleon with cp=" << truth.fHitNucP4 << " GeV"
400  << " (" << (truth.fIsSeaQuark? "": "not a ") << "sea quark)"
401  << " in target: " << ParticleName(truth.ftgtPDG)
402  << " (Z: " << truth.ftgtZ << ", A: " << truth.ftgtA << ")"
403  << "\n" << indent
404  << "event interaction weight (genie internal): " << truth.fweight
405  << ", interaction probability: " << truth.fprobability
406  << ", cross section: " << truth.fXsec
407  << ", differential cross section: " << truth.fDiffXsec
408  << "\n" << indent
409  << "particles after reaction, before FSI: "
410  << truth.fNumPiPlus << " pi+"
411  << ", " << truth.fNumPiMinus << " pi-"
412  << ", " << truth.fNumPi0 << " pi0"
413  << ", " << truth.fNumProton << " p/pbar"
414  << ", " << truth.fNumNeutron << " n/nbar"
415  << "\n" << indent
416  << " total " << nTotalParticles << " particles after reaction before FSI"
417  ": " << nCharged << "/" << nNeutral << " charged/neutral"
418  ", " << nPions << " pions, " << nNucleons << " nucleons"
419  << "\n" << indent << "process "
420  << (truth.fIsCharm? "with": "without") << " charmed hadron";
421  if (truth.fResNum == -1) out << ", no resonance";
422  else out << ", resonance: #" << truth.fResNum;
423  out
424  << "\n" << indent
425  << "internal (on shell) genie kinematics: Q^2: " << truth.fgQ2 << " GeV^2"
426  << " q^2: " << truth.fgq2 << " GeV^2"
427  << ", w: " << truth.fgW << " GeV^2"
428  << ", t: " << truth.fgT << " GeV^2"
429  << ", x: " << truth.fgX
430  << ", y: " << truth.fgY
431  << "\n" << indent
432  << "FShadSyst: " << truth.fFShadSystP4
433  ;
434 
435 } // sim::DumpGTruth::DumpTruth()
std::string indent(std::size_t const i)
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
template<typename Stream >
void sim::dump::DumpGTruth ( Stream &&  out,
simb::GTruth const &  truth,
std::string  indent = "" 
)

Dumps the content of the GENIE truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 212 of file MCDumpers.h.

References DumpGTruth().

213  { DumpGTruth(std::forward<Stream>(out), truth, indent, indent); }
std::string indent(std::size_t const i)
void DumpGTruth(Stream &&out, simb::GTruth const &truth, std::string indent="")
Dumps the content of the GENIE truth in the output stream.
Definition: MCDumpers.h:212
template<typename Stream >
void sim::dump::DumpMCNeutrino ( Stream &&  out,
simb::MCNeutrino const &  neutrino,
std::string  indent,
std::string  firstIndent 
)

Dumps the content of the specified neutrino in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
neutrinothe neutrino to be dumped
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 310 of file MCDumpers.h.

References simb::MCNeutrino::CCNC(), DumpMCParticle(), simb::MCNeutrino::HitNuc(), simb::MCNeutrino::HitQuark(), simb::MCNeutrino::InteractionType(), simb::MCNeutrino::Lepton(), simb::MCNeutrino::Mode(), simb::MCNeutrino::Nu(), sim::ParticleName(), simb::MCNeutrino::Pt(), simb::MCNeutrino::QSqr(), simb::MCNeutrino::Target(), simb::MCNeutrino::Theta(), sim::TruthCCNCname(), sim::TruthInteractionTypeName(), sim::TruthReactionMode(), simb::MCNeutrino::W(), simb::MCNeutrino::X(), and simb::MCNeutrino::Y().

Referenced by DumpMCNeutrino(), DumpMCParticleTrajectory(), and DumpMCTruth().

313  {
314 
315  out << firstIndent
316  << "from " << TruthCCNCname(nu.CCNC())
317  << ", " << TruthInteractionTypeName(nu.InteractionType())
318  << ", mode: " << nu.Mode() << " (" << TruthReactionMode(nu.Mode()) << ")"
319  << '\n' << indent
320  << "target: " << nu.Target() << " (" << ParticleName(nu.Target()) << ")"
321  ;
322  if (nu.HitNuc() != 0) {
323  out << ", hit nucleon: " << nu.HitNuc()
324  << " (" << ParticleName(nu.HitNuc()) << ")";
325  }
326  if (nu.HitQuark() != 0) {
327  out << ", hit quark: " << nu.HitQuark()
328  << " (" << ParticleName(nu.HitQuark()) << ")";
329  }
330  out
331  << '\n' << indent
332  << "x=" << nu.X() << " y=" << nu.Y() << " w=" << nu.W()
333  << " Q^2=" << nu.QSqr() << " GeV^2; theta=" << nu.Theta()
334  << " rad pT=" << nu.Pt() << " GeV/c"
335  ;
336  out << '\n' << indent << "neutrino: ";
337  DumpMCParticle(std::forward<Stream>(out), nu.Nu(), indent + " ", "");
338  out << '\n' << indent << "outgoing lepton: ";
339  DumpMCParticle(std::forward<Stream>(out), nu.Lepton(), indent + " ", "");
340 
341 } // sim::dump::DumpMCNeutrino()
std::string TruthInteractionTypeName(int type)
std::string TruthCCNCname(int ccnc)
std::string TruthReactionMode(int mode)
Returns the "mode" of the reaction (a lesser version of interaction type).
std::string indent(std::size_t const i)
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
void DumpMCParticle(Stream &&out, simb::MCParticle const &particle, std::string indent="")
Dumps the content of the specified particle in the output stream.
Definition: MCDumpers.h:61
template<typename Stream >
void sim::dump::DumpMCNeutrino ( Stream &&  out,
simb::MCNeutrino const &  neutrino,
std::string  indent = "" 
)

Dumps the content of the specified neutrino in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
neutrinothe neutrino to be dumped
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 126 of file MCDumpers.h.

References DumpMCNeutrino(), and DumpMCTruth().

127  { DumpMCNeutrino(std::forward<Stream>(out), neutrino, indent, indent); }
void DumpMCNeutrino(Stream &&out, simb::MCNeutrino const &neutrino, std::string indent="")
Dumps the content of the specified neutrino in the output stream.
Definition: MCDumpers.h:126
std::string indent(std::size_t const i)
template<typename Stream >
void sim::dump::DumpMCParticle ( Stream &&  out,
simb::MCParticle const &  particle,
std::string  indent,
std::string  firstIndent 
)

Dumps the content of the specified particle in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
particlethe particle to be dumped
indentbase indentation string (default: none)
firstIndentindentation of first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 228 of file MCDumpers.h.

References simb::MCParticle::EndMomentum(), simb::MCParticle::EndPosition(), simb::MCParticle::EndProcess(), simb::MCParticle::FirstDaughter(), simb::MCParticle::GetGvtx(), simb::MCParticle::LastDaughter(), simb::MCParticle::Mass(), simb::MCParticle::Momentum(), simb::MCParticle::Mother(), simb::MCParticle::NumberDaughters(), simb::MCParticle::NumberTrajectoryPoints(), sim::ParticleName(), sim::ParticleStatusName(), simb::MCParticle::PdgCode(), simb::MCParticle::Polarization(), simb::MCParticle::Position(), simb::MCParticle::Process(), simb::MCParticle::Rescatter(), simb::MCParticle::StatusCode(), simb::MCTrajectory::TotalLength(), simb::MCParticle::TrackId(), simb::MCParticle::Trajectory(), lar::dump::vector3D(), and simb::MCParticle::Weight().

Referenced by DumpMCNeutrino(), DumpMCParticle(), sim::DumpMCParticles::DumpMCParticle(), DumpMCTruth(), and larg4::LArG4::produce().

231  {
232  out << firstIndent
233  << "ID=" << particle.TrackId() << ": " << ParticleName(particle.PdgCode())
234  << " mass=" << particle.Mass() << " GeV/c2 "
235  << " status=" << particle.StatusCode()
236  << " (" << ParticleStatusName(particle.StatusCode()) << ")"
237  ;
238  if (particle.Weight() != 1.0) out << " weight=" << particle.Weight();
239  if (particle.Rescatter()) {
240  out << " rescattered (" << particle.Rescatter()
241  << ") at vertex " << particle.GetGvtx();
242  }
243  out << "\n" << indent << "created via "
244  << (particle.Process().empty()? "magics": particle.Process());
245  if (particle.Mother() == 0) out << " by the gods";
246  else out << " from ID=" << particle.Mother();
247 
248  const unsigned int nDaughters = particle.NumberDaughters();
249  const unsigned int nPoints = particle.NumberTrajectoryPoints();
250  if (nPoints > 0) {
251  TLorentzVector const& start = particle.Position();
252  TLorentzVector const& start_mom = particle.Momentum();
253  out << " at " << start << " cm with momentum " << start_mom << " GeV/c";
254  }
255  if (particle.Polarization().Mag2() != 0.) {
256  out
257  << " with polarization " << lar::dump::vector3D(particle.Polarization());
258  }
259  // does this particle seem to stop? (by decay, or because of extended traj.)
260  if ((nPoints > 1) || (nDaughters > 0)) {
261  out << "\n" << indent << ((nDaughters > 0)? "ends": "stops") << " by "
262  << (particle.EndProcess().empty()? "magics": particle.EndProcess());
263  if (nPoints > 1) {
264  TLorentzVector const& stop = particle.EndPosition();
265  TLorentzVector const& stop_mom = particle.EndMomentum();
266  out << " at " << stop << " cm with momentum " << stop_mom << " GeV/c";
267  }
268  if (nDaughters > 0) {
269  out << " into ";
270  if (nDaughters == 1)
271  out << "particle ID=" << particle.FirstDaughter();
272  else {
273  out << nDaughters << " particles from ID=" << particle.FirstDaughter()
274  << " to ID=" << particle.LastDaughter();
275  }
276  } // if daughters
277  } // if it stops
278  if (nPoints > 1) {
279  simb::MCTrajectory const& traj = particle.Trajectory();
280  out << "\n" << indent << "comes with a trajectory " << traj.TotalLength()
281  << " cm long in " << nPoints << " points";
282  } // if has points
283 
284 } // sim::dump::DumpMCParticle()
auto vector3D(Vector3D const &v)
Returns a manipulator which will print the specified vector.
Definition: DumpUtils.h:301
std::string indent(std::size_t const i)
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
double TotalLength() const
std::string ParticleStatusName(int code)
Describes the status of a particle (simb::MCParticle::StatusCode()).
template<typename Stream >
void sim::dump::DumpMCParticle ( Stream &&  out,
simb::MCParticle const &  particle,
std::string  indent = "" 
)

Dumps the content of the specified particle in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
particlethe particle to be dumped
indentbase indentation string (default: none)
firstIndentindentation of first line (default: as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The output starts on the current line, and the last line is NOT broken.

Definition at line 61 of file MCDumpers.h.

References DumpMCParticle(), and DumpMCParticleTrajectory().

62  { DumpMCParticle(std::forward<Stream>(out), particle, indent, indent); }
std::string indent(std::size_t const i)
void DumpMCParticle(Stream &&out, simb::MCParticle const &particle, std::string indent="")
Dumps the content of the specified particle in the output stream.
Definition: MCDumpers.h:61
template<typename Stream >
void sim::dump::DumpMCParticleTrajectory ( Stream &&  out,
simb::MCTrajectory const &  trajectory,
unsigned int  pointsPerLine,
std::string  indent 
)

Dumps the specified particle trajectory into the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
trajectorythe particle trajectory to be dumped
pointsPerLinenumber of points dumped per line (default: all)
indentbase indentation string (default: none)

All points of the specified Monte Carlo trajectory are printed on screen, pointsPerLine on each line. The points are printed starting on a new line, and each line is applied the same indentation string (indent). As an exception, if pointsPerLine is not specified, all points are printed on the current line and indent is ignored.

The last line of the output is NOT broken.

Definition at line 289 of file MCDumpers.h.

Referenced by DumpMCParticle(), sim::DumpMCParticles::DumpMCParticle(), DumpMCParticleTrajectory(), and DumpMCTruth().

292  {
293  unsigned int page = 0;
294  for (auto const& pair: trajectory) {
295  if ((pointsPerLine > 0) && (page-- == 0)) {
296  out << "\n" << indent << " ";
297  page = pointsPerLine - 1;
298  }
299  else out << " -- ";
300 
301  TLorentzVector const& pos = pair.first;
302  out << pos;
303  } // for trajectory points
304 
305 } // sim::dump::DumpMCParticleTrajectory()
std::string indent(std::size_t const i)
template<typename Stream >
void sim::dump::DumpMCParticleTrajectory ( Stream &&  out,
simb::MCTrajectory const &  trajectory 
)

Dumps the specified particle trajectory into the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
trajectorythe particle trajectory to be dumped
pointsPerLinenumber of points dumped per line (default: all)
indentbase indentation string (default: none)

All points of the specified Monte Carlo trajectory are printed on screen, pointsPerLine on each line. The points are printed starting on a new line, and each line is applied the same indentation string (indent). As an exception, if pointsPerLine is not specified, all points are printed on the current line and indent is ignored.

The last line of the output is NOT broken.

Definition at line 94 of file MCDumpers.h.

References DumpMCNeutrino(), and DumpMCParticleTrajectory().

95  {
96  DumpMCParticleTrajectory(std::forward<Stream>(out), trajectory, 0U, "");
97  }
void DumpMCParticleTrajectory(Stream &&out, simb::MCTrajectory const &trajectory)
Dumps the specified particle trajectory into the output stream.
Definition: MCDumpers.h:94
template<typename Stream >
void sim::dump::DumpMCTruth ( Stream &&  out,
simb::MCTruth const &  truth,
unsigned int  pointsPerLine,
std::string  indent,
std::string  firstIndent 
)

Dumps the content of the specified MC truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
pointsPerLine(optional) number of trajectory points dumped per line (default: 0, no points shown)
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: same as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The argument pointsPerLine regulates the dump of trajectory points from all the particles in the record (except the ones stored in the neutrino object). Setting it to 0, or leaving it out, will suppress the dump of particle trajectories completely. There is no option to reduce the number of printed trajectory points: it's just all or none.

The output starts on the current line, and the last line is NOT broken.

Definition at line 346 of file MCDumpers.h.

References DumpMCNeutrino(), DumpMCParticle(), DumpMCParticleTrajectory(), simb::MCTruth::GetNeutrino(), simb::MCTruth::GetParticle(), simb::MCTruth::NeutrinoSet(), simb::MCTruth::NParticles(), simb::MCParticle::NumberTrajectoryPoints(), simb::MCTruth::Origin(), simb::MCParticle::Trajectory(), and sim::TruthOriginName().

Referenced by sim::DumpMCTruth::analyze(), DumpMCNeutrino(), DumpMCTruth(), evgen::GENIEGen::produce(), and larg4::LArG4::produce().

349  {
350  unsigned int const nParticles = truth.NParticles();
351  out << firstIndent
352  << nParticles << " particles from "
353  << TruthOriginName(truth.Origin());
354  if (truth.NeutrinoSet()) {
355  out << '\n' << indent << "neutrino information: ";
357  (std::forward<Stream>(out), truth.GetNeutrino(), indent + " ", "");
358  }
359  for (unsigned int i = 0; i < nParticles; ++i) {
360  out << '\n' << indent << "[#" << i << "] ";
361  simb::MCParticle const& particle = truth.GetParticle(i);
362  DumpMCParticle(std::forward<Stream>(out), particle, indent + " ", "");
363 
364  const unsigned int nPoints = particle.NumberTrajectoryPoints();
365  if ((nPoints > 0) && (pointsPerLine > 0)) {
366  out << ":";
368  std::forward<Stream>(out), particle.Trajectory(),
369  pointsPerLine, indent + " "
370  );
371  } // if has points
372  } // for all particles
373 
374 } // sim::dump::DumpMCTruth()
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:222
void DumpMCNeutrino(Stream &&out, simb::MCNeutrino const &neutrino, std::string indent="")
Dumps the content of the specified neutrino in the output stream.
Definition: MCDumpers.h:126
const simb::MCTrajectory & Trajectory() const
Definition: MCParticle.h:257
std::string indent(std::size_t const i)
void DumpMCParticle(Stream &&out, simb::MCParticle const &particle, std::string indent="")
Dumps the content of the specified particle in the output stream.
Definition: MCDumpers.h:61
void DumpMCParticleTrajectory(Stream &&out, simb::MCTrajectory const &trajectory)
Dumps the specified particle trajectory into the output stream.
Definition: MCDumpers.h:94
std::string TruthOriginName(simb::Origin_t origin)
Returns a string representing the specified process origin.
template<typename Stream >
void sim::dump::DumpMCTruth ( Stream &&  out,
simb::MCTruth const &  truth,
unsigned int  pointsPerLine,
std::string  indent = "" 
)

Dumps the content of the specified MC truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
pointsPerLine(optional) number of trajectory points dumped per line (default: 0, no points shown)
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: same as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The argument pointsPerLine regulates the dump of trajectory points from all the particles in the record (except the ones stored in the neutrino object). Setting it to 0, or leaving it out, will suppress the dump of particle trajectories completely. There is no option to reduce the number of printed trajectory points: it's just all or none.

The output starts on the current line, and the last line is NOT broken.

Definition at line 163 of file MCDumpers.h.

References DumpMCTruth().

167  {
169  (std::forward<Stream>(out), truth, pointsPerLine, indent, indent);
170  }
std::string indent(std::size_t const i)
void DumpMCTruth(Stream &&out, simb::MCTruth const &truth, std::string indent="")
Dumps the content of the specified MC truth in the output stream.
Definition: MCDumpers.h:180
template<typename Stream >
void sim::dump::DumpMCTruth ( Stream &&  out,
simb::MCTruth const &  truth,
std::string  indent,
std::string  firstIndent 
)

Dumps the content of the specified MC truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
pointsPerLine(optional) number of trajectory points dumped per line (default: 0, no points shown)
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: same as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The argument pointsPerLine regulates the dump of trajectory points from all the particles in the record (except the ones stored in the neutrino object). Setting it to 0, or leaving it out, will suppress the dump of particle trajectories completely. There is no option to reduce the number of printed trajectory points: it's just all or none.

The output starts on the current line, and the last line is NOT broken.

Definition at line 173 of file MCDumpers.h.

References DumpMCTruth().

177  { DumpMCTruth(std::forward<Stream>(out), truth, 0, indent, firstIndent); }
std::string indent(std::size_t const i)
void DumpMCTruth(Stream &&out, simb::MCTruth const &truth, std::string indent="")
Dumps the content of the specified MC truth in the output stream.
Definition: MCDumpers.h:180
template<typename Stream >
void sim::dump::DumpMCTruth ( Stream &&  out,
simb::MCTruth const &  truth,
std::string  indent = "" 
)

Dumps the content of the specified MC truth in the output stream.

Template Parameters
Streamthe type of output stream
Parameters
outthe output stream
truththe truth information to be dumped
pointsPerLine(optional) number of trajectory points dumped per line (default: 0, no points shown)
indentbase indentation string (default: none)
firstIndentstring to be used for indentation of the first line (default: same as indent)

The indent string is prepended to every line of output, except for the first one, where firstIndent is used.

The argument pointsPerLine regulates the dump of trajectory points from all the particles in the record (except the ones stored in the neutrino object). Setting it to 0, or leaving it out, will suppress the dump of particle trajectories completely. There is no option to reduce the number of printed trajectory points: it's just all or none.

The output starts on the current line, and the last line is NOT broken.

Definition at line 180 of file MCDumpers.h.

References DumpGTruth(), and DumpMCTruth().

183  { DumpMCTruth(std::forward<Stream>(out), truth, indent, indent); }
std::string indent(std::size_t const i)
void DumpMCTruth(Stream &&out, simb::MCTruth const &truth, std::string indent="")
Dumps the content of the specified MC truth in the output stream.
Definition: MCDumpers.h:180