Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JShowerPointSimplexParameters_t.hh
Go to the documentation of this file.
1 #ifndef __JRECONSTRUCTION__JSHOWERPOINTSIMPLEXPARAMETERS__
2 #define __JRECONSTRUCTION__JSHOWERPOINTSIMPLEXPARAMETERS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 #include "JTools/JRange.hh"
8 
9 /**
10  * \author adomi
11  */
12 namespace JRECONSTRUCTION {
13 
15  public TObject
16  {
17  /**
18  * Default constructor.
19  */
21  {
22  this->reset();
23  }
24 
25  /**
26  * Virtual destructor.
27  */
29  {}
30 
31  /**
32  * Reset fit parameters.
33  */
34  void reset()
35  {
36  using namespace JPP;
37 
38  numberOfPrefits = 0; // 0 means process all inputs
39  numberOfOutfits = 100;
40  minPrefitsSize = 8;
41  sigma_ns = 1;
42  TMaxLocal_ns = 10;
43  TMax_ns = 60.0;
44  TMin_ns = -60.0;
45  roadWidth_m = 50.0;
46  ctMin = 0.2;
47  TWindow_ns = JRange<double>(-130, 120);
48  pos_grid_m = JRange<double>( -20, 20);
49  pos_step_m = 20;
50  time_grid_ns = JRange<double>( -90, 90);
51  time_step_ns = 20;
52  simplex_step_m = 5;
53  simplex_step_ns = 10;
54  tukey_std_dev = 20;
55  NMax = 1000;
56  }
57 
58  /**
59  * Equality
60  *
61  * \param parameters fit parameters
62  * \return true if equals; else false
63  */
65  {
66  return (this->numberOfPrefits == parameters.numberOfPrefits &&
67  this->numberOfOutfits == parameters.numberOfOutfits &&
68  this->minPrefitsSize == parameters.minPrefitsSize &&
69  this->sigma_ns == parameters.sigma_ns &&
70  this->TMaxLocal_ns == parameters.TMaxLocal_ns &&
71  this->TMax_ns == parameters.TMax_ns &&
72  this->TMin_ns == parameters.TMin_ns &&
73  this->roadWidth_m == parameters.roadWidth_m &&
74  this->ctMin == parameters.ctMin &&
75  this->TWindow_ns == parameters.TWindow_ns &&
76  this->pos_grid_m == parameters.pos_grid_m &&
77  this->pos_step_m == parameters.pos_step_m &&
78  this->time_grid_ns == parameters.time_grid_ns &&
79  this->time_step_ns == parameters.time_step_ns &&
80  this->simplex_step_m == parameters.simplex_step_m &&
81  this->simplex_step_ns == parameters.simplex_step_ns &&
82  this->tukey_std_dev == parameters.tukey_std_dev &&
83  this->NMax == parameters.NMax);
84  }
85 
87 
88  size_t numberOfPrefits; ///< number of prefits
89  size_t numberOfOutfits; ///< number of fits to be saved in output
90  size_t minPrefitsSize; ///< number of prefits under which an event is treated as a very low energy one
91  double sigma_ns; ///< time resolution [ns]
92  double TMaxLocal_ns; ///< time window for local coincidences [ns]
93  double TMax_ns; ///< maximum time for local coincidences [ns]
94  double TMin_ns; ///< minimum time for local coincidences [ns]
95  double roadWidth_m; ///< road width [m]
96  double ctMin; ///< minimal cosine space angle between PMT axes
97  JTOOLS::JRange<double> TWindow_ns; ///< time window for local coincidences [ns] for events with few prefits
98  JTOOLS::JRange<double> pos_grid_m; ///< edges in [m] of the position grid
99  double pos_step_m; ///< step in [m] of position grid
100  JTOOLS::JRange<double> time_grid_ns; ///< edges in [ns] of the time grid
101  double time_step_ns; ///< step in [ns] of time grid
102  double simplex_step_m; ///< step in [m] of JSimplex minimiser
103  double simplex_step_ns; ///< step in [ns] of JSimplex minimiser
104  double tukey_std_dev; ///< standard deviation of Tukey estimator
105  int NMax; ///< maximum number of iterations
106  };
107 }
108 
109 /**
110  * Read fit parameters from input.
111  *
112  * \param in input stream
113  * \param parameters fit parameters
114  * \return input stream
115  */
117 
118 /**
119  * Write fit parameters to output.
120  *
121  * \param out output stream
122  * \param parameters fit parameters
123  * \return output stream
124  */
125 std::ostream& operator<<(std::ostream& out, const JRECONSTRUCTION::JShowerPointSimplexParameters_t& parameters);
126 
127 #endif
bool equals(const JShowerPointSimplexParameters_t &parameters) const
Equality.
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
ClassDef(JShowerPointSimplexParameters_t, 1)
JTOOLS::JRange< double > time_grid_ns
edges in [ns] of the time grid
size_t numberOfOutfits
number of fits to be saved in output
JTOOLS::JRange< double > pos_grid_m
edges in [m] of the position grid
double TMaxLocal_ns
time window for local coincidences [ns]
double simplex_step_ns
step in [ns] of JSimplex minimiser
Range of values.
Definition: JRange.hh:38
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
Definition: JHead.hh:1618
double TMax_ns
maximum time for local coincidences [ns]
Auxiliary class to define a range between two values.
size_t minPrefitsSize
number of prefits under which an event is treated as a very low energy one
std::ostream & operator<<(std::ostream &stream, const CLBCommonHeader &header)
double TMin_ns
minimum time for local coincidences [ns]
JTOOLS::JRange< double > TWindow_ns
time window for local coincidences [ns] for events with few prefits
double tukey_std_dev
standard deviation of Tukey estimator
double ctMin
minimal cosine space angle between PMT axes
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41