All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 namespace simb { class MCParticle; }
18 
19 namespace lar {
20  namespace example {
21 
22 
23  /**
24  * @brief Reconstructs tracks from simulated particles.
25  * @ingroup TotallyCheatTracks
26  * @see @ref TotallyCheatTracks "TotallyCheatTracks example overview"
27  *
28  * This totally cheating tracking algorithm will return one
29  * `lar::example::CheatTrack` object for each `simb::MCParticle` inserted.
30  * The information of the track will perfectly reflect the content of
31  * the simulated particle trajectory.
32  *
33  * @note The produced track is not a standard LArSoft `recob::Track`.
34  *
35  * Example of usage:
36  * -------------------------------------------------------------------{.cpp}
37  * lar::example::TotallyCheatTrackingAlg cheaterAlg({});
38  * cheaterAlg.setup();
39  *
40  * std::vector<lar::example::CheatTrack> tracks;
41  * for (auto const& mcParticle: mcParticles)
42  * tracks.push_back(cheaterAlg.makeTrack(mcParticle));
43  * -------------------------------------------------------------------
44  * (assuming `mcParticles` a collection of `simb::MCParticle`).
45  *
46  *
47  * Configuration
48  * ==============
49  *
50  * Currently, none.
51  *
52  *
53  * Dependencies and setup
54  * =======================
55  *
56  * Currently none.
57  *
58  */
60 
61  public:
62  struct Config {};
63 
64  /// Constructor: accepts a configuration (currently unused).
66 
67 
68  /// Set up the algorithm (currently no operation).
69  void setup() {}
70 
71  /**
72  * @brief Returns a reconstructed track from the specified particle.
73  * @param mcParticle the simulated particle to be reconstructed
74  * @return a reconstructed `lar::example::CheatTrack` track
75  *
76  * The reconstucted track has one trajectory point per trajectory
77  * point of the input particle.
78  */
80  (simb::MCParticle const& mcParticle) const;
81 
82 
83  }; // class TotallyCheatTrackingAlg
84 
85 
86  } // namespace example
87 } // namespace lar
88 
89 
90 
91 #endif // LAREXAMPLES_ALGORITHMS_TOTALLYCHEATTRACKS_TOTALLYCHEATTRACKINGALG_H
TotallyCheatTrackingAlg(Config const &)
Constructor: accepts a configuration (currently unused).
Reconstructs tracks from simulated particles.
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).