Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JMuonEnergyParameters_t.hh
Go to the documentation of this file.
1#ifndef __JRECONSTRUCTION__JMUONENERGYPARAMETERS__
2#define __JRECONSTRUCTION__JMUONENERGYPARAMETERS__
3
4#include <limits>
5
6#include <TROOT.h>
7#include <TObject.h>
8
9#include "JFit/JMEstimator.hh"
10
11
12/**
13 * \author mdejong
14 */
15
16namespace JRECONSTRUCTION {}
17namespace JPP { using namespace JRECONSTRUCTION; }
18
19namespace JRECONSTRUCTION
20{
21 /**
22 * Data structure for fit parameters.
23 */
25 public TObject
26 {
27 /**
28 * Default constructor.
29 */
31 {
32 this->reset();
33 }
34
35 /**
36 * Virtual destructor.
37 */
39 {}
40
41 /**
42 * Reset fit parameters.
43 */
44 void reset()
45 {
46 roadWidth_m = std::numeric_limits<double>::max();
47 R_Hz = 6.0e3;
49 EMin_log = 1.0;
50 EMax_log = 8.0;
51 TMin_ns = -50.0;
52 TMax_ns = +450.0;
53 ZMin_m = std::numeric_limits<double>::lowest();
54 resolution = 0.01;
56 }
57
58 /**
59 * Equality
60 *
61 * \param parameters fit parameters
62 * \return true if equals; else false
63 */
64 bool equals(const JMuonEnergyParameters_t& parameters) const
65 {
66 return (this->roadWidth_m == parameters.roadWidth_m &&
67 this->R_Hz == parameters.R_Hz &&
68 this->numberOfPrefits == parameters.numberOfPrefits &&
69 this->EMin_log == parameters.EMin_log &&
70 this->EMax_log == parameters.EMax_log &&
71 this->TMin_ns == parameters.TMin_ns &&
72 this->TMax_ns == parameters.TMax_ns &&
73 this->ZMin_m == parameters.ZMin_m &&
74 this->resolution == parameters.resolution &&
75 this->mestimator == parameters.mestimator);
76 }
77
79
80 double roadWidth_m; ///< road width [m]
81 double R_Hz; ///< default rate [Hz]
82 size_t numberOfPrefits; ///< number of prefits
83 double EMin_log; ///< minimal energy [log10(GeV)]
84 double EMax_log; ///< maximal energy [log10(GeV)]
85 double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns]
86 double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns]
87 double ZMin_m; ///< minimal z-position [m]
88 double resolution; ///< energy resolution [log10(GeV)]
89 int mestimator; ///< M-estimator
90 };
91}
92
93/**
94 * Read fit parameters from input.
95 *
96 * \param in input stream
97 * \param parameters fit parameters
98 * \return input stream
99 */
100std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JMuonEnergyParameters_t& parameters);
101
102/**
103 * Write fit parameters to output.
104 *
105 * \param out output stream
106 * \param parameters fit parameters
107 * \return output stream
108 */
109std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JMuonEnergyParameters_t& parameters);
110
111#endif
Maximum likelihood estimator (M-estimators).
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JMuonEnergyParameters_t &parameters)
Write fit parameters to output.
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JMuonEnergyParameters_t &parameters)
Read fit parameters from input.
@ EM_NORMAL
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Model fits to data.
ClassDef(JMuonEnergyParameters_t, 2)
virtual ~JMuonEnergyParameters_t()
Virtual destructor.
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double resolution
energy resolution [log10(GeV)]
bool equals(const JMuonEnergyParameters_t &parameters) const
Equality.
double EMin_log
minimal energy [log10(GeV)]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
double EMax_log
maximal energy [log10(GeV)]