Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
JShowerPrefitParameters_t.hh
Go to the documentation of this file.
1 #ifndef __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__
2 #define __JRECONSTRUCTION__JSHOWERPREFITPARAMETERS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 /**
8  * \author adomi, vcarretero
9  */
10 namespace JRECONSTRUCTION {
11 
12  /**
13  * Data structure for fit parameters.
14  */
16  public TObject
17  {
18  /**
19  * Default constructor.
20  */
22  {
23  this->reset();
24  }
25 
26  /**
27  * Virtual destructor.
28  */
30  {}
31 
32  /**
33  * Reset fit parameters.
34  */
35  void reset()
36  {
37  factoryLimit = 40;
38  sigma_ns = 3.0;
39  numberOfOutliers = 4;
40  TMaxLocal_ns = 20.0;
41  TMaxExtra_ns = 60.0;
42  ctMin = 0.0;
43  DMax_m = 50.0;
44  numberOfPrefits = 100;
45  numberOfGrids = 2;
46  numberOfL1 = 10;
47  pos_grid_m = 10;
48  pos_step_m = 10;
49  time_grid_ns = 60;
50  time_step_ns = 60;
51  }
52 
53  /**
54  * Equality
55  *
56  * \param parameters fit parameters
57  * \return true if equals; else false
58  */
59  bool equals(const JShowerPrefitParameters_t& parameters) const
60  {
61  return (this->factoryLimit == parameters.factoryLimit &&
62  this->sigma_ns == parameters.sigma_ns &&
63  this->numberOfOutliers == parameters.numberOfOutliers &&
64  this->TMaxExtra_ns == parameters.TMaxExtra_ns &&
65  this->TMaxLocal_ns == parameters.TMaxLocal_ns &&
66  this->ctMin == parameters.ctMin &&
67  this->DMax_m == parameters.DMax_m &&
68  this->numberOfPrefits == parameters.numberOfPrefits &&
69  this->numberOfGrids == parameters.numberOfGrids &&
70  this->pos_grid_m == parameters.pos_grid_m &&
71  this->pos_step_m == parameters.pos_step_m &&
72  this->time_grid_ns == parameters.time_grid_ns &&
73  this->time_step_ns == parameters.time_step_ns &&
74  this->numberOfL1 == parameters.numberOfL1);
75  }
76 
78 
79  size_t numberOfPrefits; ///< number of prefits
80  int factoryLimit; ///< factory limit for combinatorics
81  double sigma_ns; ///< time resolution [ns]
82  int numberOfOutliers; ///< maximum number of outliers
83  double TMaxLocal_ns; ///< time window for local coincidences [ns]
84  double TMaxExtra_ns; ///< time window for extra coincidences [ns]
85  double ctMin; ///< minimal cosine space angle between PMT axes
86  double DMax_m; ///< maximal distance to optical module [m]
87  size_t numberOfL1; ///< minimal number of L1
88  int pos_grid_m; ///< edge [m] of the position grid
89  int pos_step_m; ///< step in [m] of position grid
90  int time_grid_ns; ///< edge [ns] of the time grid
91  int time_step_ns; ///< step in [ns] of time grid
92  size_t numberOfGrids; ///< number of prefits to be used to build a grid around
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  */
103 std::istream& operator>>(std::istream& in, JRECONSTRUCTION::JShowerPrefitParameters_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  */
112 std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JShowerPrefitParameters_t& parameters);
113 
114 #endif
std::istream & operator>>(std::istream &in, JRECONSTRUCTION::JShowerPrefitParameters_t &parameters)
Read fit parameters from input.
std::ostream & operator<<(std::ostream &out, const JRECONSTRUCTION::JShowerPrefitParameters_t &parameters)
Write fit parameters to output.
Model fits to data.
int factoryLimit
factory limit for combinatorics
double DMax_m
maximal distance to optical module [m]
double ctMin
minimal cosine space angle between PMT axes
size_t numberOfGrids
number of prefits to be used to build a grid around
double TMaxLocal_ns
time window for local coincidences [ns]
ClassDef(JShowerPrefitParameters_t, 3)
bool equals(const JShowerPrefitParameters_t &parameters) const
Equality.
double TMaxExtra_ns
time window for extra coincidences [ns]
Definition: JRoot.hh:19