Falaise  4.0.1
SuperNEMO Software Toolkit
geiger_regime.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
2 /* * \file falaise/snemo/processing/geiger_regime.h
3  * Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2011-01-09
5  * Last modified: 2014-02-24
6  *
7  * License:
8  *
9  * Description:
10  *
11  * Tools to model the Geiger regime in SuperNEMO drift cells.
12  *
13  * History:
14  *
15  */
16 
17 #ifndef FALAISE_SNEMO_PROCESSING_GEIGER_REGIME_H
18 #define FALAISE_SNEMO_PROCESSING_GEIGER_REGIME_H 1
19 
20 // Standard library:
21 #include <iostream>
22 #include <string>
23 
24 // Third party:
25 // - Bayeux/datatools
26 #include <datatools/i_tree_dump.h>
27 // - Bayeux/mygsl:
29 
30 namespace datatools {
31 class properties;
32 }
33 
34 namespace mygsl {
35 class rng;
36 }
37 
38 namespace snemo {
39 
40 namespace processing {
41 
42 /// \brief Modelling of the Geiger regime of the SuperNEMO drift cell
44  public:
45  /// Return the diameter of the cell
46  double get_cell_diameter() const;
47 
48  /// Return the radius of the cell
49  double get_cell_radius() const;
50 
51  /// Return the length of the cell
52  double get_cell_length() const;
53 
54  /// Return the error on anode drift time
55  double get_sigma_anode_time(double anode_time_) const;
56 
57  /// Return the error on cathode drift time
58  double get_sigma_cathode_time() const;
59 
60  /// Return the reference time
61  double get_t0() const;
62 
63  /// Return the maximum drift time to be calibrated
64  double get_tcut() const;
65 
66  /// Radius of a cell
67  double get_r0() const;
68 
69  /// Maximum sensitive distance from the anode wire
70  double get_rdiag() const;
71 
72  /// Return the base anode efficiency
73  double get_base_anode_efficiency() const;
74 
75  /// Return the base cathode efficiency
76  double get_base_cathode_efficiency() const;
77 
78  /// Return the anode efficiency
79  double get_anode_efficiency(double r_) const;
80 
81  /// Return the cathode efficiency
82  double get_cathode_efficiency() const;
83 
84  /// Return the plasma longitudinal speed
85  double get_plasma_longitudinal_speed() const;
86 
87  /// Return the error on the plasma longitudinal speed
89 
90  /// Return the tabulated radius/time calibration function
92 
93  /// Check initialization flag
94  bool is_initialized() const;
95 
96  /// Default constructor
97  geiger_regime();
98 
99  /// Destructor
100  virtual ~geiger_regime();
101 
102  /// Initialization from parameters
103  void initialize(const datatools::properties& config_);
104 
105  /// Reset
106  void reset();
107 
108  /// Randomize the longitudinal position of a Geiger hit
109  double randomize_z(mygsl::rng& ran_, double z_, double sigma_z_) const;
110 
111  /// Randomize the drift position of a Geiger hit
112  double randomize_r(mygsl::rng& ran_, double r_) const;
113 
114  /// Randomize the drift time from the drift distance of a Geiger hit
115  double randomize_drift_time_from_drift_distance(mygsl::rng& ran_, double drift_distance_) const;
116 
117  /// Compute the drift radius from the drift time
118  double base_t_2_r(double time_, int mode_ = 0) const;
119 
120  /// Return the error on longitudinal position
121  double get_sigma_z(double z_, size_t missing_cathodes_ = 0) const;
122 
123  /// Return the error on the drift distance
124  double get_sigma_r(double r_) const;
125 
126  /// Calibrate the drift radius from the drift time
127  void calibrate_drift_radius_from_drift_time(double drift_time_, double& drift_radius_,
128  double& sigma_drift_radius_) const;
129 
130  /// Smart print
131  virtual void tree_dump(std::ostream& a_out = std::clog, const std::string& a_title = "",
132  const std::string& a_indent = "", bool a_inherit = false) const;
133 
134  private:
135  bool _initialized_; //!< Initalization flag
136 
137  double _cell_diameter_; //!< Fiducial drift diameter of a cell
138  double _cell_length_; //!< Fiducial drift length of a cell
139  double _sigma_anode_time_; //!< Anode TDC resolution
140  double _sigma_cathode_time_; //!< Cathode TDC resolution
141  double _sigma_z_; //!< Longitudinal resolution
142  double _sigma_z_missing_cathode_; //!< Longitudinal resolution for one missing cathode
143 
144  // parameters for transverse resolution:
145  double _sigma_r_a_; //!< Parameters 0 for transverse resolution
146  double _sigma_r_b_; //!< Parameters 1 for transverse resolution
147  double _sigma_r_r0_; //!< Parameters 2 for transverse resolution
148 
149  double _base_anode_efficiency_; //!< Base anode efficiency
150  double _base_cathode_efficiency_; //!< Base cathode efficiency
151  double _plasma_longitudinal_speed_; //!< Plasma longitudinal speed
152  double _sigma_plasma_longitudinal_speed_; //!< Error on plasma longitudinal speed
153 
154  // internals:
156  _base_rt_; //!< Tabluated function for drift time<->drift radius association
157  double _t0_; //!< Time (not documented yet)
158  double _r0_; //!< Radius (not documented yet)
159  double _rdiag_; //!< Cut on drift radius (not documented yet)
160  double _tcut_; //!< Cut on drift time (not documented yet)
161 
162  private:
163  /// Set default values for attributes
164  void _init_defaults_();
165 };
166 
167 } // end of namespace processing
168 
169 } // end of namespace snemo
170 
171 /***************************
172  * OCD support : interface *
173  ***************************/
174 
175 #include <datatools/ocd_macros.h>
176 
177 // @arg snemo::processing::geiger_regime the name the registered class
179 
180 #endif // FALAISE_SNEMO_PROCESSING_GEIGER_REGIME_H
181 
182 // end of falaise/snemo/processing/geiger_regime.h
double get_cell_diameter() const
Return the diameter of the cell.
double get_tcut() const
Return the maximum drift time to be calibrated.
double get_plasma_longitudinal_speed() const
Return the plasma longitudinal speed.
double randomize_z(mygsl::rng &ran_, double z_, double sigma_z_) const
Randomize the longitudinal position of a Geiger hit.
double get_sigma_r(double r_) const
Return the error on the drift distance.
mygsl::tabulated_function & grab_base_rt()
Return the tabulated radius/time calibration function.
double get_r0() const
Radius of a cell.
Modelling of the Geiger regime of the SuperNEMO drift cell.
Definition: geiger_regime.h:43
double randomize_r(mygsl::rng &ran_, double r_) const
Randomize the drift position of a Geiger hit.
double get_anode_efficiency(double r_) const
Return the anode efficiency.
double get_sigma_anode_time(double anode_time_) const
Return the error on anode drift time.
bool is_initialized() const
Check initialization flag.
double base_t_2_r(double time_, int mode_=0) const
Compute the drift radius from the drift time.
DOCD_CLASS_DECLARATION(my::algo)
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.
double get_cathode_efficiency() const
Return the cathode efficiency.
virtual ~geiger_regime()
Destructor.
Definition: calo_tapered_scin_box_model.h:54
double get_cell_radius() const
Return the radius of the cell.
double get_t0() const
Return the reference time.
void calibrate_drift_radius_from_drift_time(double drift_time_, double &drift_radius_, double &sigma_drift_radius_) const
Calibrate the drift radius from the drift time.
double randomize_drift_time_from_drift_distance(mygsl::rng &ran_, double drift_distance_) const
Randomize the drift time from the drift distance of a Geiger hit.
double get_rdiag() const
Maximum sensitive distance from the anode wire.
geiger_regime()
Default constructor.
double get_base_cathode_efficiency() const
Return the base cathode efficiency.
double get_sigma_plasma_longitudinal_speed() const
Return the error on the plasma longitudinal speed.
void initialize(const datatools::properties &config_)
Initialization from parameters.
double get_base_anode_efficiency() const
Return the base anode efficiency.
double get_sigma_z(double z_, size_t missing_cathodes_=0) const
Return the error on longitudinal position.
double get_cell_length() const
Return the length of the cell.
double get_sigma_cathode_time() const
Return the error on cathode drift time.