Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JShowerEnergyPrefitParameters_t.hh
Go to the documentation of this file.
1 #ifndef __JRECONSTRUCTION__JSHOWERENERGYPREFITPARAMETERS__
2 #define __JRECONSTRUCTION__JSHOWERENERGYPREFITPARAMETERS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 #include "JFit/JMEstimator.hh"
8 #include "JFit/JEnergy.hh"
9 
10 /**
11  * \author adomi
12  */
13 namespace JRECONSTRUCTION {
14 
15  /**
16  * Data structure for fit parameters.
17  */
19  public TObject
20  {
21  /**
22  * Default constructor.
23  */
25  {
26  this->reset();
27  }
28 
29  /**
30  * Virtual destructor.
31  */
33 
34  /**
35  * Reset fit parameters.
36  */
37  void reset()
38  {
39  TMax_ns = 500;
40  TMin_ns = -500;
41  roadWidth_m = 80;
42  Emin_GeV = 1;
43  Emax_GeV = 100;
44  resolution = 0.01;
45  R_Hz = 10.0e3;
47  numberOfPrefits = std::numeric_limits<size_t>::max();
48  }
49 
50  /**
51  * Equality
52  *
53  * \param parameters fit parameters
54  * \return true if equals; else false
55  */
57  {
58  return (this->TMax_ns == parameters.TMax_ns &&
59  this->TMin_ns == parameters.TMin_ns &&
60  this->numberOfPrefits == parameters.numberOfPrefits &&
61  this->roadWidth_m == parameters.roadWidth_m &&
62  this->Emin_GeV == parameters.Emin_GeV &&
63  this->Emax_GeV == parameters.Emax_GeV &&
64  this->resolution == parameters.resolution &&
65  this->R_Hz == parameters.R_Hz &&
66  this->mestimator == parameters.mestimator);
67  }
68 
70 
71  double TMax_ns;
72  double TMin_ns;
73  double roadWidth_m;
74  double Emin_GeV;
75  double Emax_GeV;
76  double resolution;
77  double R_Hz;
80  };
81 }
82 
83 /**
84  * Read fit parameters from input.
85  *
86  * \param in input stream
87  * \param parameters fit parameters
88  * \return input stream
89  */
91 
92 /**
93  * Write fit parameters to output.
94  *
95  * \param out output stream
96  * \param parameters fit parameters
97  * \return output stream
98  */
99 std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JShowerEnergyPrefitParameters_t& parameters);
100 
101 #endif
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
ClassDef(JShowerEnergyPrefitParameters_t, 1)
Definition: JRoot.hh:19
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
Definition: JHead.hh:1278
std::ostream & operator<<(std::ostream &stream, const CLBCommonHeader &header)
bool equals(const JShowerEnergyPrefitParameters_t &parameters) const
Equality.
Maximum likelihood estimator (M-estimators).