LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Pseudo-track object for TotallyCheatTracks example. More...
#include "CheatTrack.h"
Public Types | |
using | PDGID_t = int |
Type of the particle ID. More... | |
Public Member Functions | |
CheatTrack ()=default | |
Default constructor, only for ROOT I/O (do not use it!). More... | |
CheatTrack (recob::Trajectory &&traj, PDGID_t pid) | |
Constructor from trajectory (stolen) and particle ID. More... | |
recob::Trajectory const & | trajectory () const |
Returns the trajectory of this track. More... | |
Access to data | |
double | momentum () const |
Returns the initial momentum of the particle [MeV]. More... | |
PDGID_t | particleId () const |
Returns the particle ID, in PDG standard. More... | |
bool | hasParticleId () const |
Returns whether the particle ID is valid. More... | |
Static Public Attributes | |
static constexpr PDGID_t | InvalidParticleID = 0 |
Value of a particle ID that denotes it as invalid. More... | |
Private Attributes | |
recob::Trajectory | fTraj |
The trejectory of this track. More... | |
PDGID_t | fPDGID = InvalidParticleID |
Particle ID in PDG standard. More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &out, lar::example::CheatTrack const &track) |
Printing data | |
static constexpr unsigned int | DefaultDumpVerbosity = 1U |
Default verbosity level. More... | |
static constexpr unsigned int | MaxDumpVerbosity = recob::Trajectory::MaxDumpVerbosity |
Maximum verbosity level. More... | |
template<typename Stream > | |
void | dump (Stream &&out, unsigned int verbosity, std::string indent, std::string firstIndent) const |
Prints the content of this object into an output stream. More... | |
template<typename Stream > | |
void | dump (Stream &&out, unsigned int verbosity=DefaultDumpVerbosity, std::string indent="") const |
Default verbosity level. More... | |
Pseudo-track object for TotallyCheatTracks example.
This class represents a reconstructed track via a trajectory in phase space (position plus momentum), sampled in many points, and in addition a particle identification code representing the type of the original particle.
It is expected to be unrealistically precise for a reconstructed object, by being constructed from simulated "truth" information.
This track object does not implement the standard interface of a LArSoft track (recob::Track
). It can present a standard LArSoft recob::Trajectory
though.
Definition at line 52 of file CheatTrack.h.
using lar::example::CheatTrack::PDGID_t = int |
Type of the particle ID.
Definition at line 56 of file CheatTrack.h.
|
default |
Default constructor, only for ROOT I/O (do not use it!).
|
inline |
Constructor from trajectory (stolen) and particle ID.
traj | the reconstructed trajectory of the track |
pid | particle ID, in PDG standard |
The trajectory in traj
is moved into this object, and it will not be valid in the caller scope any more.
Definition at line 72 of file CheatTrack.h.
void lar::example::CheatTrack::dump | ( | Stream && | out, |
unsigned int | verbosity, | ||
std::string | indent, | ||
std::string | firstIndent | ||
) | const |
Prints the content of this object into an output stream.
Stream | type of the output text stream |
out | the output text stream |
verbosity | the amount of information printed (default: DefaultDumpVerbosity ) |
indent | indentation string for all output except the first line (default: none) |
firstIndent | indentation string for the first line (default: as indent ) |
Verbosity level is the same as the one of recob::Trajectory::Dump()
. In addition, the momentum and particle ID are always printed.
Definition at line 168 of file CheatTrack.h.
References recob::Trajectory::Dump(), momentum(), particleId(), and trajectory().
Referenced by dump().
|
inline |
Default verbosity level.
Definition at line 130 of file CheatTrack.h.
References dump(), and art::detail::indent().
|
inline |
Returns whether the particle ID is valid.
Definition at line 92 of file CheatTrack.h.
References InvalidParticleID, and particleId().
|
inline |
Returns the initial momentum of the particle [MeV].
Definition at line 86 of file CheatTrack.h.
References recob::Trajectory::StartMomentum(), and trajectory().
Referenced by dump().
|
inline |
Returns the particle ID, in PDG standard.
Definition at line 89 of file CheatTrack.h.
References fPDGID.
Referenced by dump(), and hasParticleId().
|
inline |
Returns the trajectory of this track.
Definition at line 79 of file CheatTrack.h.
References fTraj.
Referenced by dump(), and momentum().
|
static |
Default verbosity level.
Definition at line 102 of file CheatTrack.h.
|
private |
Particle ID in PDG standard.
Definition at line 144 of file CheatTrack.h.
Referenced by particleId().
|
private |
The trejectory of this track.
Definition at line 143 of file CheatTrack.h.
Referenced by trajectory().
|
static |
Value of a particle ID that denotes it as invalid.
Definition at line 59 of file CheatTrack.h.
Referenced by hasParticleId().
|
static |
Maximum verbosity level.
Definition at line 106 of file CheatTrack.h.