Falaise  4.0.1
SuperNEMO Software Toolkit
tracker_trajectory.h
Go to the documentation of this file.
1 /// \file falaise/snemo/datamodels/tracker_trajectory.h
2 /* Author (s) : François Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2012-03-19
4  * Last modified: 2014-01-27
5  *
6  * Description: A trajectory fitted from a cluster of tracker hits
7  */
8 
9 #ifndef FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_H
10 #define FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_H 1
11 
12 // Third party:
13 // - Boost:
14 #include <boost/cstdint.hpp>
15 // - Bayeux/datatools:
16 #include <datatools/handle.h>
17 // - Bayeux/geomtools:
18 #include <geomtools/base_hit.h>
19 
20 // This project:
23 
24 namespace snemo {
25 
26 namespace datamodel {
27 
28 /// A trajectory of Geiger calibrated hits referenced by handles
30  public:
31  /// Handle on tracker trajectory
33 
34  /// Handle on tracker cluster
36 
37  /// Collection of handles on tracker clusters
38  typedef std::vector<handle_cluster> clusters_collection_type;
39 
40  /// Handle on trajectory pattern
42 
43  /// Collection of handles of calibrated tracker hit
45 
46  /// Default constructor
48 
49  /// Destructor
50  virtual ~tracker_trajectory();
51 
52  /// Check if there is a valid trajectory ID
53  bool has_trajectory_id() const;
54 
55  /// Get the trajectory ID
56  int get_trajectory_id() const;
57 
58  /// Set the trajectory ID
59  void set_trajectory_id(int32_t);
60 
61  /// Invalidate the trajectory ID
63 
64  /// Check if the cluster is present
65  bool has_cluster() const;
66 
67  /// Detach the cluster
68  void detach_cluster();
69 
70  /// Attach a cluster by handle
71  void set_cluster_handle(const handle_cluster& cluster_handle_);
72 
73  /// Return a mutable reference on the cluster handle
75 
76  /// Return a non mutable reference on the cluster handle
77  const handle_cluster& get_cluster_handle() const;
78 
79  /// Return a mutable reference on the cluster
81 
82  /// Return a non mutable reference on the cluster
83  const tracker_cluster& get_cluster() const;
84 
85  /// Check if there are some orphan hits along the fitted trajectory
86  bool has_orphans() const;
87 
88  /// Reset the collection of orphan hits
89  void reset_orphans();
90 
91  /// Return a mutable reference on the collection of orphan hits (handles)
93 
94  /// Return a non mutable reference on the collection of orphan hits (handles)
95  const orphans_collection_type& get_orphans() const;
96 
97  /// Check if the pattern is present
98  bool has_pattern() const;
99 
100  /// Detach the pattern
101  void detach_pattern();
102 
103  /// Attach a pattern by handle
104  void set_pattern_handle(const handle_pattern& pattern_handle_);
105 
106  /// Return a mutable reference on the pattern handle
108 
109  /// Return a non mutable reference on the pattern handle
110  const handle_pattern& get_pattern_handle() const;
111 
112  /// Return a mutable reference on the pattern
114 
115  /// Return a non mutable reference on the pattern
116  const base_trajectory_pattern& get_pattern() const;
117 
118  /// Reset the tracker trajectory (see clear)
119  void reset();
120 
121  /// Empty the contents of the tracker trajectory
122  virtual void clear();
123 
124  /// Smart print
125  virtual void tree_dump(std::ostream& out = std::clog, const std::string& title_ = "",
126  const std::string& indent_ = "", bool inherit_ = false) const;
127 
128  private:
129  handle_cluster _cluster_; ///< Handle to the fitted cluster
130  orphans_collection_type _orphans_; ///< Collection of orphan Geiger hit handles
131  handle_pattern _pattern_; ///< Handle to a trajectory fitted pattern
132 
134 };
135 
136 } // end of namespace datamodel
137 
138 } // end of namespace snemo
139 
140 #endif // FALAISE_SNEMO_DATAMODELS_TRACKER_TRAJECTORY_H
141 
142 /*
143 ** Local Variables: --
144 ** mode: c++ --
145 ** c-file-style: "gnu" --
146 ** tab-width: 2 --
147 ** End: --
148 */
void invalidate_trajectory_id()
Invalidate the trajectory ID.
tracker_cluster::handle_type handle_cluster
Handle on tracker cluster.
Definition: tracker_trajectory.h:35
const tracker_cluster & get_cluster() const
Return a non mutable reference on the cluster.
virtual void clear()
Empty the contents of the tracker trajectory.
calibrated_tracker_hit::collection_type orphans_collection_type
Collection of handles of calibrated tracker hit.
Definition: tracker_trajectory.h:44
const orphans_collection_type & get_orphans() const
Return a non mutable reference on the collection of orphan hits (handles)
datatools::handle< base_trajectory_pattern > handle_pattern
Handle on trajectory pattern.
Definition: tracker_trajectory.h:41
A cluster of Geiger calibrated hits referenced by handles.
Definition: tracker_cluster.h:28
bool has_pattern() const
Check if the pattern is present.
bool has_orphans() const
Check if there are some orphan hits along the fitted trajectory.
virtual ~tracker_trajectory()
Destructor.
base_trajectory_pattern & grab_pattern()
Return a mutable reference on the pattern.
#define DATATOOLS_SERIALIZATION_DECLARATION()
handle_pattern & grab_pattern_handle()
Return a mutable reference on the pattern handle.
A trajectory of Geiger calibrated hits referenced by handles.
Definition: tracker_trajectory.h:29
bool has_cluster() const
Check if the cluster is present.
datatools::handle< tracker_trajectory > handle_type
Handle on tracker trajectory.
Definition: tracker_trajectory.h:32
const base_trajectory_pattern & get_pattern() const
Return a non mutable reference on the pattern.
int get_trajectory_id() const
Get the trajectory ID.
The base class of fitted trajectory pattern.
Definition: base_trajectory_pattern.h:26
Definition: calo_tapered_scin_box_model.h:54
const handle_pattern & get_pattern_handle() const
Return a non mutable reference on the pattern handle.
virtual void tree_dump(std::ostream &out=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
const handle_cluster & get_cluster_handle() const
Return a non mutable reference on the cluster handle.
std::vector< handle_cluster > clusters_collection_type
Collection of handles on tracker clusters.
Definition: tracker_trajectory.h:38
void detach_cluster()
Detach the cluster.
handle_cluster & grab_cluster_handle()
Return a mutable reference on the cluster handle.
tracker_trajectory()
Default constructor.
bool has_trajectory_id() const
Check if there is a valid trajectory ID.
void set_trajectory_id(int32_t)
Set the trajectory ID.
orphans_collection_type & grab_orphans()
Return a mutable reference on the collection of orphan hits (handles)
void reset()
Reset the tracker trajectory (see clear)
void reset_orphans()
Reset the collection of orphan hits.
void set_pattern_handle(const handle_pattern &pattern_handle_)
Attach a pattern by handle.
std::vector< handle_type > collection_type
Alias for a collection of handles on calibrated tracker hits.
Definition: calibrated_tracker_hit.h:54
void set_cluster_handle(const handle_cluster &cluster_handle_)
Attach a cluster by handle.
tracker_cluster & grab_cluster()
Return a mutable reference on the cluster.
void detach_pattern()
Detach the pattern.