LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 377 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().

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

References DumpGTruth().

210  {
211  DumpGTruth(std::forward<Stream>(out), truth, indent, indent);
212  }
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:209
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().

314 {
315 
316  out << firstIndent << "from " << TruthCCNCname(nu.CCNC()) << ", "
317  << TruthInteractionTypeName(nu.InteractionType()) << ", mode: " << nu.Mode() << " ("
318  << TruthReactionMode(nu.Mode()) << ")" << '\n'
319  << indent << "target: " << nu.Target() << " (" << ParticleName(nu.Target()) << ")";
320  if (nu.HitNuc() != 0) {
321  out << ", hit nucleon: " << nu.HitNuc() << " (" << ParticleName(nu.HitNuc()) << ")";
322  }
323  if (nu.HitQuark() != 0) {
324  out << ", hit quark: " << nu.HitQuark() << " (" << ParticleName(nu.HitQuark()) << ")";
325  }
326  out << '\n'
327  << indent << "x=" << nu.X() << " y=" << nu.Y() << " w=" << nu.W() << " Q^2=" << nu.QSqr()
328  << " GeV^2; theta=" << nu.Theta() << " rad pT=" << nu.Pt() << " GeV/c";
329  out << '\n' << indent << "neutrino: ";
330  DumpMCParticle(std::forward<Stream>(out), nu.Nu(), indent + " ", "");
331  out << '\n' << indent << "outgoing lepton: ";
332  DumpMCParticle(std::forward<Stream>(out), nu.Lepton(), indent + " ", "");
333 
334 } // 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:59
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 122 of file MCDumpers.h.

References DumpMCNeutrino(), and DumpMCTruth().

123  {
124  DumpMCNeutrino(std::forward<Stream>(out), neutrino, indent, indent);
125  }
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:122
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 226 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::s_uninitialized, 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().

230 {
231  out << firstIndent << "ID=" << particle.TrackId() << ": " << ParticleName(particle.PdgCode())
232  << " mass=" << particle.Mass() << " GeV/c2 "
233  << " status=" << particle.StatusCode() << " (" << ParticleStatusName(particle.StatusCode())
234  << ")";
235  if (particle.Weight() != 1.0) out << " weight=" << particle.Weight();
236  if (particle.Rescatter() != simb::MCParticle::s_uninitialized) {
237  out << " rescattered (" << particle.Rescatter() << ")";
238  }
239  out << "; generator vertex " << particle.GetGvtx();
240  out << "\n"
241  << indent << "created via " << (particle.Process().empty() ? "magics" : particle.Process());
242  if (particle.Mother() == 0)
243  out << " by the gods";
244  else
245  out << " from ID=" << particle.Mother();
246 
247  const unsigned int nDaughters = particle.NumberDaughters();
248  const unsigned int nPoints = particle.NumberTrajectoryPoints();
249  if (nPoints > 0) {
250  TLorentzVector const& start = particle.Position();
251  TLorentzVector const& start_mom = particle.Momentum();
252  out << " at " << start << " cm with momentum " << start_mom << " GeV/c";
253  }
254  if (particle.Polarization().Mag2() != 0.) {
255  out << " with polarization " << lar::dump::vector3D(particle.Polarization());
256  }
257  // does this particle seem to stop? (by decay, or because of extended traj.)
258  if ((nPoints > 1) || (nDaughters > 0)) {
259  out << "\n"
260  << indent << ((nDaughters > 0) ? "ends" : "stops") << " by "
261  << (particle.EndProcess().empty() ? "magics" : particle.EndProcess());
262  if (nPoints > 1) {
263  TLorentzVector const& stop = particle.EndPosition();
264  TLorentzVector const& stop_mom = particle.EndMomentum();
265  out << " at " << stop << " cm with momentum " << stop_mom << " GeV/c";
266  }
267  if (nDaughters > 0) {
268  out << " into ";
269  if (nDaughters == 1)
270  out << "particle ID=" << particle.FirstDaughter();
271  else {
272  out << nDaughters << " particles from ID=" << particle.FirstDaughter()
273  << " to ID=" << particle.LastDaughter();
274  }
275  } // if daughters
276  } // if it stops
277  if (nPoints > 1) {
278  simb::MCTrajectory const& traj = particle.Trajectory();
279  out << "\n"
280  << indent << "comes with a trajectory " << traj.TotalLength() << " cm long in " << nPoints
281  << " 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:326
static const int s_uninitialized
Definition: MCParticle.h:28
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 59 of file MCDumpers.h.

References DumpMCParticle(), and DumpMCParticleTrajectory().

60  {
61  DumpMCParticle(std::forward<Stream>(out), particle, indent, indent);
62  }
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:59
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 288 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
300  out << " -- ";
301 
302  TLorentzVector const& pos = pair.first;
303  out << pos;
304  } // for trajectory points
305 
306 } // 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 92 of file MCDumpers.h.

References DumpMCNeutrino(), and DumpMCParticleTrajectory().

93  {
94  DumpMCParticleTrajectory(std::forward<Stream>(out), trajectory, 0U, "");
95  }
void DumpMCParticleTrajectory(Stream &&out, simb::MCTrajectory const &trajectory)
Dumps the specified particle trajectory into the output stream.
Definition: MCDumpers.h:92
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 338 of file MCDumpers.h.

References DumpMCNeutrino(), DumpMCParticle(), DumpMCParticleTrajectory(), for(), simb::MCGeneratorInfo::generator, simb::MCTruth::GeneratorInfo(), 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().

343 {
344  // add a dumper of the generator info
345  auto genInfo = truth.GeneratorInfo();
346  out << "Generator ID: " << (int)genInfo.generator << "\n";
347  out << "Generator Version: " << genInfo.generatorVersion << "\n";
348  out << "Generator configuration string map. Pairs separated by colons. "
349  << "\n";
350  for (const auto& gci : genInfo.generatorConfig) {
351  out << " " << gci.first << " : " << gci.second << "\n";
352  }
353 
354  unsigned int const nParticles = truth.NParticles();
355  out << firstIndent << nParticles << " particles from " << TruthOriginName(truth.Origin());
356  if (truth.NeutrinoSet()) {
357  out << '\n' << indent << "neutrino information: ";
358  DumpMCNeutrino(std::forward<Stream>(out), truth.GetNeutrino(), indent + " ", "");
359  }
360  for (unsigned int i = 0; i < nParticles; ++i) {
361  out << '\n' << indent << "[#" << i << "] ";
362  simb::MCParticle const& particle = truth.GetParticle(i);
363  DumpMCParticle(std::forward<Stream>(out), particle, indent + " ", "");
364 
365  const unsigned int nPoints = particle.NumberTrajectoryPoints();
366  if ((nPoints > 0) && (pointsPerLine > 0)) {
367  out << ":";
369  std::forward<Stream>(out), particle.Trajectory(), pointsPerLine, indent + " ");
370  } // if has points
371  } // for all particles
372 
373 } // sim::dump::DumpMCTruth()
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:219
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:122
const simb::MCTrajectory & Trajectory() const
Definition: MCParticle.h:254
for(Int_t i=0;i< nentries;i++)
Definition: comparison.C:30
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:59
void DumpMCParticleTrajectory(Stream &&out, simb::MCTrajectory const &trajectory)
Dumps the specified particle trajectory into the output stream.
Definition: MCDumpers.h:92
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 161 of file MCDumpers.h.

References DumpMCTruth().

165  {
166  DumpMCTruth(std::forward<Stream>(out), truth, pointsPerLine, indent, indent);
167  }
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:179
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 170 of file MCDumpers.h.

References DumpMCTruth().

174  {
175  DumpMCTruth(std::forward<Stream>(out), truth, 0, indent, firstIndent);
176  }
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:179
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 179 of file MCDumpers.h.

References DumpGTruth(), and DumpMCTruth().

180  {
181  DumpMCTruth(std::forward<Stream>(out), truth, indent, indent);
182  }
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:179