Falaise  4.0.1
SuperNEMO Software Toolkit
calibrated_calorimeter_hit.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
2 /// \file falaise/snemo/datamodels/calibrated_calorimeter_hit.h
3 /* Author (s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2010-03-16
5  * Last modified: 2014-01-27
6  *
7  * License:
8  *
9  * Description:
10  * Calibrated calorimeter hit
11  *
12  * History:
13  *
14  */
15 
16 #ifndef FALAISE_SNEMO_DATAMODELS_CALIBRATED_CALORIMETER_HIT_H
17 #define FALAISE_SNEMO_DATAMODELS_CALIBRATED_CALORIMETER_HIT_H 1
18 
19 // Third party:
20 // - Bayeux/datatools:
21 #if defined(__clang__)
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wunused-local-typedefs"
24 #endif
25 #if defined(__GNUC__)
26 #pragma GCC diagnostic push
27 #pragma GCC diagnostic ignored "-Wunused"
28 #endif
29 #include <datatools/handle.h>
30 #if defined(__GNUC__)
31 #pragma GCC diagnostic pop
32 #endif
33 #if defined(__clang__)
34 #pragma clang diagnostic pop
35 #endif
36 
37 // - Bayeux/geomtools:
38 #include <geomtools/base_hit.h>
39 
40 namespace snemo {
41 
42 namespace datamodel {
43 
44 /// \brief Model of a calibrated calorimeter hit
46  public:
47  /// Handle of calibrated calorimeter hit
49 
50  /// Collection of handles of calibrated calorimeter hit
51  typedef std::vector<handle_type> collection_type;
52 
53  /// Return the time associated to the hit
54  double get_time() const;
55 
56  /// Set the time associated to the hit
57  void set_time(double);
58 
59  /// Return the error on the time associated to the hit
60  double get_sigma_time() const;
61 
62  /// Set the error on the time associated to the hit
63  void set_sigma_time(double);
64 
65  /// Return the energy associated to the hit
66  double get_energy() const;
67 
68  /// Set the energy associated to the hit
69  void set_energy(double);
70 
71  /// Return the error on the energy associated to the hit
72  double get_sigma_energy() const;
73 
74  /// Set the error on the energy associated to the hit
75  void set_sigma_energy(double);
76 
77  /// Constructor
79 
80  /// Destructor
82 
83  /// Check if the internal data of the hit are valid
84  bool is_valid() const;
85 
86  /// Invalidate the internal data of hit
87  void invalidate();
88 
89  /// Smart print
90  virtual void tree_dump(std::ostream& a_out = std::clog, const std::string& a_title = "",
91  const std::string& a_indent = "", bool a_inherit = false) const;
92 
93  /// Basic print
94  void dump() const;
95 
96  private:
97  double _energy_; //!< Energy associated to the hit
98  double _sigma_energy_; //!< Error on the energy associated to the hit
99  double _time_; //!< Time associated to the hit
100  double _sigma_time_; //!< Error on the time associated to the hit
101 
103 };
104 
105 } // end of namespace datamodel
106 
107 } // end of namespace snemo
108 
109 #endif // FALAISE_SNEMO_DATAMODELS_CALIBRATED_CALORIMETER_HIT_H
double get_energy() const
Return the energy associated to the hit.
bool is_valid() const
Check if the internal data of the hit are valid.
void set_sigma_time(double)
Set the error on the time associated to the hit.
datatools::handle< calibrated_calorimeter_hit > handle_type
Handle of calibrated calorimeter hit.
Definition: calibrated_calorimeter_hit.h:48
void set_time(double)
Set the time associated to the hit.
Model of a calibrated calorimeter hit.
Definition: calibrated_calorimeter_hit.h:45
#define DATATOOLS_SERIALIZATION_DECLARATION()
double get_sigma_time() const
Return the error on the time associated to the hit.
double get_sigma_energy() const
Return the error on the energy associated to the hit.
void invalidate()
Invalidate the internal data of hit.
double get_time() const
Return the time associated to the hit.
virtual void tree_dump(std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
Smart print.
Definition: calo_tapered_scin_box_model.h:54
void set_sigma_energy(double)
Set the error on the energy associated to the hit.
void set_energy(double)
Set the energy associated to the hit.
std::vector< handle_type > collection_type
Collection of handles of calibrated calorimeter hit.
Definition: calibrated_calorimeter_hit.h:51