Falaise  4.0.1
SuperNEMO Software Toolkit
base_tracker_fitter.h
Go to the documentation of this file.
1 /** \file falaise/snemo/processing/base_tracker_fitter.h
2  * Author(s) : Xavier Garrido <garrido@lal.in2p3.fr>
3  * Creation date : 2012-10-07
4  * Last modified : 2014-02-09
5  *
6  * Copyright (C) 2011-2014 Xavier Garrido <garrido@lal.in2p3.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  * Description:
24  *
25  * History:
26  */
27 
28 #ifndef FALAISE_SNEMO_PROCESSING_BASE_TRACKER_FITTER_H
29 #define FALAISE_SNEMO_PROCESSING_BASE_TRACKER_FITTER_H 1
30 
31 // Standard library:
32 #include <string>
33 
34 // Third party:
35 // - Boost:
36 #include <boost/cstdint.hpp>
37 // - Bayeux/datatools:
38 #include <datatools/logger.h>
40 
41 // Forward declaration :
42 namespace datatools {
43 class properties;
44 }
45 
46 namespace geomtools {
47 class manager;
48 }
49 
50 namespace snemo {
51 
52 namespace geometry {
53 class gg_locator;
54 }
55 
56 namespace datamodel {
57 class tracker_clustering_data;
58 class tracker_trajectory_data;
59 } // namespace datamodel
60 
61 namespace processing {
62 
63 /// \brief The base class for all tracker fitter algorithms
65  public:
66  /// Set logging priority level
67  void set_logging_priority(datatools::logger::priority logging_priority_);
68 
69  /// Get logging priority
71 
72  /// Return the clusterizer ID
73  const std::string &get_id() const;
74 
75  /// Return the tracker locator
77 
78  /// Check the geometry manager
79  bool has_geometry_manager() const;
80 
81  /// Address the geometry manager
82  void set_geometry_manager(const geomtools::manager &gmgr_);
83 
84  /// Return a non-mutable reference to the geometry manager
86 
87  /// Check if theclusterizer is initialized
88  bool is_initialized() const;
89 
90  /// Default constructor
91  base_tracker_fitter(const std::string &id_ = "anonymous");
92 
93  /// Destructor
94  virtual ~base_tracker_fitter();
95 
96  /// Main tracker trajectory driver
99 
100  /// Initialize the tracker trajectory fitter through configuration properties
101  virtual void initialize(const datatools::properties &setup_) = 0;
102 
103  /// Reset the tracker trajectory fitter
104  virtual void reset() = 0;
105 
106  /// Smart print
107  void tree_dump(std::ostream &out_ = std::clog, const std::string &title_ = "",
108  const std::string &indent_ = "", bool inherit_ = false) const;
109 
110  /// OCD support
112  const std::string &prefix_ = "");
113 
114  protected:
115  /// Initialize the clusterizer through configuration properties
116  void _initialize(const datatools::properties &setup_);
117 
118  /// Reset the clusterizer
119  void _reset();
120 
121  /// Set default attribute values
122  void _set_defaults();
123 
124  /// Set the initialization flag
125  void _set_initialized(bool);
126 
127  /// Specific fitting algorithm
128  virtual int _process_algo(const snemo::datamodel::tracker_clustering_data &clustering_,
130 
131  /// Post-processing operation
133 
134  protected:
135  datatools::logger::priority _logging_priority; /// Logging priority threshold
136 
137  private:
138  bool _initialized_; /// Initialization status
139  std::string _id_; /// Identifier of the fitter algorithm
140  const geomtools::manager *_geometry_manager_; /// The SuperNEMO geometry manager
142  *_gg_locator_; /// Locator dedicated to the SuperNEMO tracking chamber
143  size_t _maximum_number_of_fits_; /// The maximum number of fits to be saved
144 };
145 
146 } // end of namespace processing
147 
148 } // end of namespace snemo
149 
150 #endif // FALAISE_SNEMO_PROCESSING_BASE_TRACKER_FITTER_H
151 
152 /*
153 ** Local Variables: --
154 ** mode: c++ --
155 ** c-file-style: "gnu" --
156 ** tab-width: 2 --
157 ** End: --
158 */
datatools::logger::priority _logging_priority
Definition: base_tracker_fitter.h:135
const geomtools::manager & get_geometry_manager() const
Return a non-mutable reference to the geometry manager.
bool is_initialized() const
Check if theclusterizer is initialized.
SuperNEMO Tracker trajectory data model.
Definition: tracker_trajectory_data.h:32
base_tracker_fitter(const std::string &id_="anonymous")
Default constructor.
void set_logging_priority(datatools::logger::priority logging_priority_)
Set logging priority level.
const std::string & get_id() const
Return the clusterizer ID.
void _initialize(const datatools::properties &setup_)
Initialize the clusterizer through configuration properties.
datatools::logger::priority get_logging_priority() const
Get logging priority.
virtual ~base_tracker_fitter()
Destructor.
const snemo::geometry::gg_locator & get_gg_locator() const
Return the tracker locator.
virtual void initialize(const datatools::properties &setup_)=0
Initialize the tracker trajectory fitter through configuration properties.
void _set_defaults()
Set default attribute values.
void _reset()
Reset the clusterizer.
Definition: calo_tapered_scin_box_model.h:54
virtual void reset()=0
Reset the tracker trajectory fitter.
virtual int _process_algo(const snemo::datamodel::tracker_clustering_data &clustering_, snemo::datamodel::tracker_trajectory_data &trajectory_)=0
Specific fitting algorithm.
bool has_geometry_manager() const
Check the geometry manager.
void set_geometry_manager(const geomtools::manager &gmgr_)
Address the geometry manager.
The base class for all tracker fitter algorithms.
Definition: base_tracker_fitter.h:64
SuperNEMO tracker clustering data model.
Definition: tracker_clustering_data.h:129
int process(const snemo::datamodel::tracker_clustering_data &clustering_, snemo::datamodel::tracker_trajectory_data &trajectory_)
Main tracker trajectory driver.
virtual int _post_process(snemo::datamodel::tracker_trajectory_data &trajectory_)
Post-processing operation.
void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
static void ocd_support(datatools::object_configuration_description &, const std::string &prefix_="")
OCD support.
void _set_initialized(bool)
Set the initialization flag.
Fast locator class for SuperNEMO drift chamber volumes.
Definition: gg_locator.h:62