Falaise  4.0.1
SuperNEMO Software Toolkit
calorimeter_s2c_module.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
2 /** \file falaise/bipo3/processing/calorimeter_s2c_module.h
3  * Author (s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2011-01-12
5  * Last modified: 2014-01-30
6  *
7  * License:
8  *
9  * Description:
10  *
11  * Bipo3 simulation data processor for calorimeter MC hits
12  *
13  * History:
14  *
15  */
16 
17 #ifndef FALAISE_BIPO3_PROCESSING_CALORIMETER_S2C_MODULE_H
18 #define FALAISE_BIPO3_PROCESSING_CALORIMETER_S2C_MODULE_H 1
19 
20 // Standard library:
21 #include <map>
22 #include <string>
23 #include <vector>
24 
25 // Third party:
26 // - Bayeux/dpp:
27 #include <dpp/base_module.h>
28 // - Bayeux/mygsl:
29 #include <mygsl/rng.h>
30 
31 // This project:
34 
35 namespace geomtools {
36 class manager;
37 }
38 
39 namespace mctools {
40 class simulated_data;
41 }
42 
43 namespace bipo3 {
44 
45 namespace processing {
46 
48  public:
49  /// Missing method description
50  static void compute_classification(const std::string& particle_name_,
51  std::string& classification_);
52 
53  /// Collection of calorimeter regime
54  typedef std::map<std::string, snemo::processing::calorimeter_regime> calorimeter_regime_col_type;
55 
56  /// Collection of geometry category names
57  typedef std::vector<std::string> category_col_type;
58 
59  /// Setting geometry manager
60  void set_geom_manager(const geomtools::manager& gmgr_);
61 
62  /// Getting geometry manager
63  const geomtools::manager& get_geom_manager() const;
64 
65  /// Constructor
67 
68  /// Destructor
69  virtual ~calorimeter_s2c_module();
70 
71  /// Initialization
72  virtual void initialize(const datatools::properties& setup_,
73  datatools::service_manager& service_manager_,
74  dpp::module_handle_dict_type& module_dict_);
75 
76  /// Reset
77  virtual void reset();
78 
79  /// Data record processing
81 
82  protected:
83  /// Getting random number generator
85 
86  /// Digitize calorimeter hits
88  const mctools::simulated_data& simulated_data_,
90  calibrated_calorimeter_hits_);
91 
92  /// Calibrate calorimeter hits (energy/time resolution spread)
95 
96  /// Apply basic trigger effect
99 
100  /// Main process function
101  void _process(const mctools::simulated_data& simulated_data_,
103  calibrated_calorimeter_hits_);
104 
105  private:
106  const geomtools::manager* _geom_manager_; //!< Handle to an external geometry manager
107 
108  mygsl::rng _random_; //!< Embedded PRNG
109 
110  category_col_type _hit_categories_; //!< Calorimeter categories
111  calorimeter_regime_col_type _calorimeter_regimes_; //!< Calorimeter regime tools
112 
113  std::string _SD_label_; //!< The label of the simulated data bank
114  std::string _CD_label_; //!< The label of the calibrated data bank
115 
116  double _cluster_time_width_; //!< Time width of a calo cluster
117  bool _alpha_quenching_; //!< Flag to (dis)activate the alpha quenching
118 
119  // Macro to automate the registration of the module :
121 };
122 
123 } // end of namespace processing
124 
125 } // end of namespace bipo3
126 
127 #endif // FALAISE_BIPO3_PROCESSING_CALORIMETER_S2C_MODULE_H
void _process_calorimeter_trigger(snemo::datamodel::calibrated_data::calorimeter_hit_collection_type &calorimeter_hits_)
Apply basic trigger effect.
void _process(const mctools::simulated_data &simulated_data_, snemo::datamodel::calibrated_data::calorimeter_hit_collection_type &calibrated_calorimeter_hits_)
Main process function.
static void compute_classification(const std::string &particle_name_, std::string &classification_)
Missing method description.
virtual ~calorimeter_s2c_module()
Destructor.
Definition: calorimeter_s2c_module.h:47
virtual void initialize(const datatools::properties &setup_, datatools::service_manager &service_manager_, dpp::module_handle_dict_type &module_dict_)
Initialization.
const geomtools::manager & get_geom_manager() const
Getting geometry manager.
calorimeter_s2c_module(datatools::logger::priority=datatools::logger::PRIO_FATAL)
Constructor.
std::vector< calorimeter_hit_handle_type > calorimeter_hit_collection_type
Collection of handles on calibrated calorimeter hits.
Definition: calibrated_data.h:58
std::map< std::string, module_entry_type > module_handle_dict_type
void _process_calorimeter_calibration(snemo::datamodel::calibrated_data::calorimeter_hit_collection_type &calorimeter_hits_)
Calibrate calorimeter hits (energy/time resolution spread)
void set_geom_manager(const geomtools::manager &gmgr_)
Setting geometry manager.
#define DPP_MODULE_REGISTRATION_INTERFACE(T)
virtual process_status process(datatools::things &data_)
Data record processing.
Definition: calorimeter_s2c_module.h:43
void _process_calorimeter_digitization(const mctools::simulated_data &simulated_data_, snemo::datamodel::calibrated_data::calorimeter_hit_collection_type &calibrated_calorimeter_hits_)
Digitize calorimeter hits.
std::vector< std::string > category_col_type
Collection of geometry category names.
Definition: calorimeter_s2c_module.h:57
std::map< std::string, snemo::processing::calorimeter_regime > calorimeter_regime_col_type
Collection of calorimeter regime.
Definition: calorimeter_s2c_module.h:54
mygsl::rng & _get_random()
Getting random number generator.