DUNEAnaTrackUtils.h
Go to the documentation of this file.
1 /**
2  *
3  * @file dunereco/AnaUtils/DUNEAnaTrackUtils.h
4  *
5  * @brief Utility containing helpful functions for end users to access information about Tracks
6 */
7 
8 #ifndef DUNE_ANA_TRACK_UTILS_H
9 #define DUNE_ANA_TRACK_UTILS_H
10 
12 
14 
15 #include <string>
16 #include <vector>
17 
24 
26 
27 namespace anab
28 {
29 class Calorimetry;
30 }
31 
32 namespace dune_ana
33 {
34 /**
35  *
36  * @brief DUNEAnaTrackUtils class
37  *
38 */
40 {
41 public:
42  /**
43  * @brief Get the hits associated with the track.
44  *
45  * @param track is the track for which we want the hits
46  * @param evt is the underlying art event
47  * @param label is the label for the track producer
48  *
49  * @return vector of art::Ptrs to the hits
50  */
51  static std::vector<art::Ptr<recob::Hit>> GetHits(const art::Ptr<recob::Track> &pTrack, const art::Event &evt, const std::string &label);
52 
53  /**
54  * @brief Get the spacepoints associated with the track.
55  *
56  * @param track is the track for which we want the spacepoints
57  * @param evt is the underlying art event
58  * @param label is the label for the track producer
59  *
60  * @return vector of art::Ptrs to the spacepoints
61  */
62  static std::vector<art::Ptr<recob::SpacePoint>> GetSpacePoints(const art::Ptr<recob::Track> &pTrack, const art::Event &evt, const std::string &label);
63 
64  /**
65  * @brief Get the particle associated with the track.
66  *
67  * @param track is the track for which we want the particle
68  * @param evt is the underlying art event
69  * @param label is the label for the track producer
70  *
71  * @return art::Ptr to the particle
72  */
73  static art::Ptr<recob::PFParticle> GetPFParticle(const art::Ptr<recob::Track> &pTrack, const art::Event &evt, const std::string &label);
74 
75  /**
76  * @brief Get the particle associated with the track.
77  *
78  * @param track is the track for which we want the particle
79  * @param evt is the underlying art event
80  * @param trackLabel is the label for the track producer
81  * @param caloLabel is the label for the calorimetry producer
82  *
83  * @return art::Ptr to the calorimetry object
84  */
85  static art::Ptr<anab::Calorimetry> GetCalorimetry(const art::Ptr<recob::Track> &pTrack, const art::Event &evt, const std::string &trackLabel, const std::string &caloLabel);
86 
87  /**
88  * @brief Get the SquID track PID associated with the track.
89  *
90  * @param track is the track for which we want the particle
91  * @param evt is the underlying art event
92  * @param trackLabel is the label for the track producer
93  * @param caloLabel is the label for the SquiID track PID producer
94  *
95  * @return art::Ptr to the SquID PID result
96  */
97  static art::Ptr<ctp::CTPResult> GetSquIDResult(const art::Ptr<recob::Track> &pTrack, const art::Event &evt, const std::string &trackLabel, const std::string &squidLabel);
98 };
99 
100 } // namespace dune_ana
101 
102 #endif // DUNE_ANA_TRACK_UTILS_H
103 
DUNEAnaUtilsBase class containing some template functions.
Class storing the result from the convolutional track PID.
std::string string
Definition: nybbler.cc:12
DUNEAnaTrackUtils class.
Base class containing functionality to extract products from the event.
Declaration of signal hit object.
Provides recob::Track data product.
TCEvent evt
Definition: DataStructs.cxx:7