TotallyCheatTrackingAlg.h
Go to the documentation of this file.
1 /**
2  * @file larexamples/Algorithms/TotallyCheatTracks/TotallyCheatTrackingAlg.h
3  * @brief Algorithm to "reconstruct" trajectories from simulated particles.
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date December 26, 2017
6  * @see larexamples/Algorithms/TotallyCheatTracks/TotallyCheatTrackingAlg.cxx
7  * @ingroup TotallyCheatTracks
8  *
9  */
10 
11 #ifndef LAREXAMPLES_ALGORITHMS_TOTALLYCHEATTRACKS_TOTALLYCHEATTRACKINGALG_H
12 #define LAREXAMPLES_ALGORITHMS_TOTALLYCHEATTRACKS_TOTALLYCHEATTRACKINGALG_H
13 
14 // LArSoft libraries
16 
17 // nusimdata libraries
19 
20 namespace lar {
21  namespace example {
22 
23 
24  /**
25  * @brief Reconstructs tracks from simulated particles.
26  * @ingroup TotallyCheatTracks
27  * @see @ref TotallyCheatTracks "TotallyCheatTracks example overview"
28  *
29  * This totally cheating tracking algorithm will return one
30  * `lar::example::CheatTrack` object for each `simb::MCParticle` inserted.
31  * The information of the track will perfectly reflect the content of
32  * the simulated particle trajectory.
33  *
34  * @note The produced track is not a standard LArSoft `recob::Track`.
35  *
36  * Example of usage:
37  * -------------------------------------------------------------------{.cpp}
38  * lar::example::TotallyCheatTrackingAlg cheaterAlg({});
39  * cheaterAlg.setup();
40  *
41  * std::vector<lar::example::CheatTrack> tracks;
42  * for (auto const& mcParticle: mcParticles)
43  * tracks.push_back(cheaterAlg.makeTrack(mcParticle));
44  * -------------------------------------------------------------------
45  * (assuming `mcParticles` a collection of `simb::MCParticle`).
46  *
47  *
48  * Configuration
49  * ==============
50  *
51  * Currently, none.
52  *
53  *
54  * Dependencies and setup
55  * =======================
56  *
57  * Currently none.
58  *
59  */
61 
62  public:
63  struct Config {};
64 
65  /// Constructor: accepts a configuration (currently unused).
67 
68 
69  /// Set up the algorithm (currently no operation).
70  void setup() {}
71 
72  /**
73  * @brief Returns a reconstructed track from the specified particle.
74  * @param mcParticle the simulated particle to be reconstructed
75  * @return a reconstructed `lar::example::CheatTrack` track
76  *
77  * The reconstucted track has one trajectory point per trajectory
78  * point of the input particle.
79  */
81  (simb::MCParticle const& mcParticle) const;
82 
83 
84  }; // class TotallyCheatTrackingAlg
85 
86 
87  } // namespace example
88 } // namespace lar
89 
90 
91 
92 #endif // LAREXAMPLES_ALGORITHMS_TOTALLYCHEATTRACKS_TOTALLYCHEATTRACKINGALG_H
TotallyCheatTrackingAlg(Config const &)
Constructor: accepts a configuration (currently unused).
Reconstructs tracks from simulated particles.
Particle class.
Pseudo-track data product for TotallyCheatTracks example.
Pseudo-track object for TotallyCheatTracks example.
Definition: CheatTrack.h:52
lar::example::CheatTrack makeTrack(simb::MCParticle const &mcParticle) const
Returns a reconstructed track from the specified particle.
void setup()
Set up the algorithm (currently no operation).
LArSoft-specific namespace.