Jpp master_rocky-44-g75b7c4f75
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 reprocess = false;
57 }
58
59 /**
60 * Equality
61 *
62 * \param parameters fit parameters
63 * \return true if equals; else false
64 */
65 bool equals(const JMuonEnergyParameters_t& parameters) const
66 {
67 return (this->roadWidth_m == parameters.roadWidth_m &&
68 this->R_Hz == parameters.R_Hz &&
69 this->numberOfPrefits == parameters.numberOfPrefits &&
70 this->EMin_log == parameters.EMin_log &&
71 this->EMax_log == parameters.EMax_log &&
72 this->TMin_ns == parameters.TMin_ns &&
73 this->TMax_ns == parameters.TMax_ns &&
74 this->ZMin_m == parameters.ZMin_m &&
75 this->resolution == parameters.resolution &&
76 this->mestimator == parameters.mestimator &&
77 this->reprocess == parameters.reprocess);
78 }
79
81
82 double roadWidth_m; ///< road width [m]
83 double R_Hz; ///< default rate [Hz]
84 size_t numberOfPrefits; ///< number of prefits
85 double EMin_log; ///< minimal energy [log10(GeV)]
86 double EMax_log; ///< maximal energy [log10(GeV)]
87 double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns]
88 double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns]
89 double ZMin_m; ///< minimal z-position [m]
90 double resolution; ///< energy resolution [log10(GeV)]
91 int mestimator; ///< M-estimator
92 bool reprocess; ///< reprocess
93 };
94}
95
96/**
97 * Read fit parameters from input.
98 *
99 * \param in input stream
100 * \param parameters fit parameters
101 * \return input stream
102 */
103std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JMuonEnergyParameters_t& parameters);
104
105/**
106 * Write fit parameters to output.
107 *
108 * \param out output stream
109 * \param parameters fit parameters
110 * \return output stream
111 */
112std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JMuonEnergyParameters_t& parameters);
113
114#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.
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.
ClassDef(JMuonEnergyParameters_t, 1)
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)]