Jpp  master_rocky
the software that should make you happy
JMuonStartParameters_t.hh
Go to the documentation of this file.
1 #ifndef __JRECONSTRUCTION__JMUONSTARTPARAMETERS__
2 #define __JRECONSTRUCTION__JMUONSTARTPARAMETERS__
3 
4 #include <limits>
5 
6 #include <TROOT.h>
7 #include <TObject.h>
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JRECONSTRUCTION {}
14 namespace JPP { using namespace JRECONSTRUCTION; }
15 
16 namespace JRECONSTRUCTION
17 {
18  /**
19  * Data structure for fit parameters.
20  */
22  public TObject
23  {
24  /**
25  * Default constructor.
26  */
28  {
29  this->reset();
30  }
31 
32  /**
33  * Virtual destructor.
34  */
36  {}
37 
38  /**
39  * Reset fit parameters.
40  */
41  void reset()
42  {
43  roadWidth_m = std::numeric_limits<double>::max();
44  R_Hz = 6.0e3;
45  numberOfPrefits = 0;
46  TMin_ns = -25.0;
47  TMax_ns = +75.0;
48  Pmin1 = 0.0;
49  Pmin2 = 0.0;
50  Nmax2 = 2;
51  reprocess = false;
52  }
53 
54  /**
55  * Equality
56  *
57  * \param parameters fit parameters
58  * \return true if equals; else false
59  */
60  bool equals(const JMuonStartParameters_t& parameters) const
61  {
62  return (this->roadWidth_m == parameters.roadWidth_m &&
63  this->R_Hz == parameters.R_Hz &&
64  this->numberOfPrefits == parameters.numberOfPrefits &&
65  this->TMin_ns == parameters.TMin_ns &&
66  this->TMax_ns == parameters.TMax_ns &&
67  this->Pmin1 == parameters.Pmin1 &&
68  this->Pmin2 == parameters.Pmin2 &&
69  this->Nmax2 == parameters.Nmax2 &&
70  this->reprocess == parameters.reprocess);
71  }
72 
74 
75  double roadWidth_m; ///< road width [m]
76  double R_Hz; ///< default rate [Hz]
77  size_t numberOfPrefits; ///< number of prefits
78  double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns]
79  double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns]
80  double Pmin1; ///< minimal probability single observation
81  double Pmin2; ///< minimal probability for twofold observations
82  int Nmax2; ///< maximal number for twofold observations
83  bool reprocess; ///< reprocess
84  };
85 }
86 
87 /**
88  * Read fit parameters from input.
89  *
90  * \param in input stream
91  * \param parameters fit parameters
92  * \return input stream
93  */
94 std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JMuonStartParameters_t& parameters);
95 
96 /**
97  * Write fit parameters to output.
98  *
99  * \param out output stream
100  * \param parameters fit parameters
101  * \return output stream
102  */
103 std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JMuonStartParameters_t& parameters);
104 
105 #endif
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JMuonStartParameters_t &parameters)
Write fit parameters to output.
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JMuonStartParameters_t &parameters)
Read fit parameters from input.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Model fits to data.
Data structure for fit parameters.
virtual ~JMuonStartParameters_t()
Virtual destructor.
int Nmax2
maximal number for twofold observations
double Pmin1
minimal probability single observation
bool equals(const JMuonStartParameters_t &parameters) const
Equality.
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double Pmin2
minimal probability for twofold observations
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
ClassDef(JMuonStartParameters_t, 2)
Definition: JRoot.hh:19