Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JShowerFitParameters_t.hh
Go to the documentation of this file.
1 #ifndef __JRECONSTRUCTION__JSHOWERFITPARAMETERS__
2 #define __JRECONSTRUCTION__JSHOWERFITPARAMETERS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 #include "JFit/JMEstimator.hh"
7 
8 /**
9  * \author adomi, gmaggi
10  */
11 namespace JRECONSTRUCTION {
12 
13  /**
14  * Data structure for fit parameters.
15  */
17  public TObject
18  {
19  /**
20  * Default constructor.
21  */
23  {
24  this->reset();
25  }
26 
27  /**
28  * Virtual destructor.
29  */
31 
32  /**
33  * Reset fit parameters.
34  */
35  void reset()
36  {
37  numberOfPrefits = 4;
38  TMax_ns = 30;
39  TMin_ns = -30;
40  DStep_m = 0;
41  DMax_m = 60;
42  R_Hz = 10.0e3;
44  Vmax_npe = 20;
45  }
46 
47  /**
48  * Equality
49  *
50  * \param parameters fit parameters
51  * \return true if equals; else false
52  */
53  bool equals(const JShowerFitParameters_t& parameters) const
54  {
55  return (this->TMax_ns == parameters.TMax_ns &&
56  this->TMin_ns == parameters.TMin_ns &&
57  this->numberOfPrefits == parameters.numberOfPrefits &&
58  this->DStep_m == parameters.DStep_m &&
59  this->DMax_m == parameters.DMax_m &&
60  this->R_Hz == parameters.R_Hz &&
61  this->mestimator == parameters.mestimator &&
62  this->Vmax_npe == parameters.Vmax_npe
63  );
64  }
65 
67 
68 
69  size_t numberOfPrefits; ///< number of prefits
70  double TMax_ns; ///< maximum time for local coincidences [ns]
71  double TMin_ns; ///< minimum time for local coincidences [ns]
72  double DStep_m; ///< step increase for the distance to optical module [m]
73  double R_Hz; ///< default rate [Hz]
74  int mestimator; ///< M-estimator
75  double Vmax_npe; ///< maximum number of of photo-electrons
76  double DMax_m; ///< maximal distance to optical module [m]
77  };
78 }
79 
80 /**
81  * Read fit parameters from input.
82  *
83  * \param in input stream
84  * \param parameters fit parameters
85  * \return input stream
86  */
87  std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerFitParameters_t& parameters);
88 
89  /**
90  * Write fit parameters to output.
91  *
92  * \param out output stream
93  * \param parameters fit parameters
94  * \return output stream
95  */
96  std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JShowerFitParameters_t& parameters);
97 
98 #endif
Maximum likelihood estimator (M-estimators).
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JShowerFitParameters_t &parameters)
Read fit parameters from input.
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JShowerFitParameters_t &parameters)
Write fit parameters to output.
@ EM_NULL
Definition: JMEstimator.hh:189
Model fits to data.
Data structure for fit parameters.
double Vmax_npe
maximum number of of photo-electrons
ClassDef(JShowerFitParameters_t, 2)
double DMax_m
maximal distance to optical module [m]
virtual ~JShowerFitParameters_t()
Virtual destructor.
double TMax_ns
maximum time for local coincidences [ns]
bool equals(const JShowerFitParameters_t &parameters) const
Equality.
double TMin_ns
minimum time for local coincidences [ns]
double DStep_m
step increase for the distance to optical module [m]
Definition: JRoot.hh:19