Auxiliary class for start or end point evaluation.
More...
#include <JStart.hh>
|
| JStart () |
| Default constructor.
|
|
| JStart (const double Pmin1, const double Pmin2, const int Nmax2) |
| Constructor.
|
|
bool | is_valid () const |
| Check validity of start or end point conditions.
|
|
template<class T > |
T | find (T __begin, T __end) const |
| Get start point of muon trajectory.
|
|
|
double | Pmin1 |
| minimal probability single observation
|
|
double | Pmin2 |
| minimal probability for twofold observations
|
|
int | Nmax2 |
| maximal number for twofold observations
|
|
|
std::istream & | operator>> (std::istream &in, JStart ¶meters) |
| Read parameters from input.
|
|
std::ostream & | operator<< (std::ostream &out, const JStart ¶meters) |
| Write parameters to output.
|
|
Auxiliary class for start or end point evaluation.
Definition at line 21 of file JStart.hh.
◆ JStart() [1/2]
JRECONSTRUCTION::JStart::JStart |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 25 of file JStart.hh.
25 :
29 {}
int Nmax2
maximal number for twofold observations
double Pmin2
minimal probability for twofold observations
double Pmin1
minimal probability single observation
◆ JStart() [2/2]
JRECONSTRUCTION::JStart::JStart |
( |
const double | Pmin1, |
|
|
const double | Pmin2, |
|
|
const int | Nmax2 ) |
|
inline |
Constructor.
- Parameters
-
Pmin1 | minimal probability single observation |
Pmin2 | minimal probability for twofold observations |
Nmax2 | maximal number for twofold observations |
Definition at line 39 of file JStart.hh.
◆ is_valid()
bool JRECONSTRUCTION::JStart::is_valid |
( |
| ) |
const |
|
inline |
Check validity of start or end point conditions.
- Returns
- true if valid; else false
Definition at line 53 of file JStart.hh.
◆ find()
template<class T >
T JRECONSTRUCTION::JStart::find |
( |
T | __begin, |
|
|
T | __end ) const |
|
inline |
Get start point of muon trajectory.
The template parameter should correspond to a data type which has the member method:
double getP() const; // return probability
The input data should have been sorted along the muon path beforehand.
A start point is triggered when an observed probability is less than Pmin1 or when there are two probabilities less than Pmin2 within Nmax2 consecutive observations.
The start or end point can found by providing the data in ascending or descending order, respectively.
- Parameters
-
__begin | begin of data |
__end | end of data |
- Returns
- start point
Definition at line 77 of file JStart.hh.
78 {
79 for (T p = __begin; p != __end; ++p) {
80
81 if (p->getP() < this->Pmin1) {
82 return p;
83 }
84
85 if (p->getP() < this->Pmin2) {
87 if (q->getP() < this->Pmin2) {
88 return p;
89 }
90 }
91 }
92 }
93
94 return __end;
95 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
◆ operator>>
std::istream & operator>> |
( |
std::istream & | in, |
|
|
JStart & | parameters ) |
|
friend |
Read parameters from input.
- Parameters
-
in | input stream |
parameters | parameters |
- Returns
- input stream
Definition at line 105 of file JStart.hh.
106 {
107 in >> parameters.Pmin1 >> parameters.Pmin2 >> parameters.Nmax2;
108
109 return in;
110 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JStart & | parameters ) |
|
friend |
Write parameters to output.
- Parameters
-
out | output stream |
parameters | parameters |
- Returns
- output stream
Definition at line 120 of file JStart.hh.
121 {
122 out << parameters.Pmin1 << ' ' << parameters.Pmin2 << ' ' << parameters.Nmax2;
123
124 return out;
125 }
◆ Pmin1
double JRECONSTRUCTION::JStart::Pmin1 |
minimal probability single observation
Definition at line 128 of file JStart.hh.
◆ Pmin2
double JRECONSTRUCTION::JStart::Pmin2 |
minimal probability for twofold observations
Definition at line 129 of file JStart.hh.
◆ Nmax2
int JRECONSTRUCTION::JStart::Nmax2 |
maximal number for twofold observations
Definition at line 130 of file JStart.hh.
The documentation for this struct was generated from the following file: