Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JMuonGandalfParameters_t.hh
Go to the documentation of this file.
1#ifndef __JRECONSTRUCTION__JMUONGANDALFPARAMETERS__
2#define __JRECONSTRUCTION__JMUONGANDALFPARAMETERS__
3
4#include <limits>
5
6#include <TROOT.h>
7#include <TObject.h>
8
9/**
10 * \author gmaggi
11 */
12
13namespace JRECONSTRUCTION {}
14namespace JPP { using namespace JRECONSTRUCTION; }
15
16namespace 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 */
37
38 /**
39 * Reset fit parameters.
40 */
41 void reset()
42 {
43 roadWidth_m = std::numeric_limits<double>::max();
44 R_Hz = 6.0e3;
46 TTS_ns = 2;
47 E_GeV = 1.0e3;
48 TMin_ns = -50.0;
49 TMax_ns = +450.0;
50 ZMin_m = 0.0;
51 ZMax_m = 0.0;
52 VMax_npe = 10.0;
53 NMax = 1000;
54 }
55
56 /**
57 * Equality
58 *
59 * \param parameters fit parameters
60 * \return true if equals; else false
61 */
62 bool equals(const JMuonGandalfParameters_t& parameters) const
63 {
64 return (this->roadWidth_m == parameters.roadWidth_m &&
65 this->R_Hz == parameters.R_Hz &&
66 this->numberOfPrefits == parameters.numberOfPrefits &&
67 this->TTS_ns == parameters.TTS_ns &&
68 this->E_GeV == parameters.E_GeV &&
69 this->TMin_ns == parameters.TMin_ns &&
70 this->TMax_ns == parameters.TMax_ns &&
71 this->ZMin_m == parameters.ZMin_m &&
72 this->ZMax_m == parameters.ZMax_m &&
73 this->VMax_npe == parameters.VMax_npe &&
74 this->NMax == parameters.NMax);
75 }
76
78
79 double roadWidth_m; ///< road width [m]
80 double R_Hz; ///< default rate [Hz]
81 size_t numberOfPrefits; ///< number of prefits
82 double TTS_ns; ///< transition-time spread [ns]
83 double E_GeV; ///< energy [GeV]
84 double TMin_ns; ///< minimal time w.r.t. Cherenkov hypothesis [ns]
85 double TMax_ns; ///< maximal time w.r.t. Cherenkov hypothesis [ns]
86 double ZMin_m; ///< minimal z-positon [m]
87 double ZMax_m; ///< maximal z-positon [m]
88 double VMax_npe; ///< maximum number of of photo-electrons
89 int NMax; ///< maximum number of iterations
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::JMuonGandalfParameters_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::JMuonGandalfParameters_t& parameters);
110
111#endif
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JMuonGandalfParameters_t &parameters)
Write fit parameters to output.
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JMuonGandalfParameters_t &parameters)
Read fit parameters from input.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Model fits to data.
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
double VMax_npe
maximum number of of photo-electrons
ClassDef(JMuonGandalfParameters_t, 3)
bool equals(const JMuonGandalfParameters_t &parameters) const
Equality.