|
#include <NtRectangularCut.hh>
|
| NtRectangularCut () |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4, unsigned long c5, const T &min5, const T &max5) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4, unsigned long c5, const T &min5, const T &max5, unsigned long c6, const T &min6, const T &max6) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4, unsigned long c5, const T &min5, const T &max5, unsigned long c6, const T &min6, const T &max6, unsigned long c7, const T &min7, const T &max7) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4, unsigned long c5, const T &min5, const T &max5, unsigned long c6, const T &min6, const T &max6, unsigned long c7, const T &min7, const T &max7, unsigned long c8, const T &min8, const T &max8) |
|
template<typename T > |
| NtRectangularCut (unsigned long c0, const T &min0, const T &max0, unsigned long c1, const T &min1, const T &max1, unsigned long c2, const T &min2, const T &max2, unsigned long c3, const T &min3, const T &max3, unsigned long c4, const T &min4, const T &max4, unsigned long c5, const T &min5, const T &max5, unsigned long c6, const T &min6, const T &max6, unsigned long c7, const T &min7, const T &max7, unsigned long c8, const T &min8, const T &max8, unsigned long c9, const T &min9, const T &max9) |
|
template<typename T > |
| NtRectangularCut (const std::vector< unsigned long > &ntupleColumns, const BoxND< T > &acceptedBox) |
|
template<typename T > |
NtRectangularCut & | addCut (unsigned long cutColumn, const T &min, const T &max, bool inverted=false) |
|
template<typename T > |
NtRectangularCut & | addCut (const NtRectangularCut< T > &another) |
|
void | invert () |
|
unsigned long | dim () const |
|
unsigned long | cutColumn (const unsigned long cutNumber) const |
|
void | cutInterval (unsigned long cutNumber, Numeric *minValue, Numeric *maxValue) const |
|
bool | isInverted (unsigned long cutNumber) const |
|
unsigned long | nUniqueColumns () const |
|
std::vector< unsigned long > | ntupleColumns () const |
|
BoxND< Numeric > | acceptedBox () const |
|
bool | operator() (unsigned long rowNumber, const Numeric *row, unsigned long nCols) const |
|
bool | operator== (const NtRectangularCut< Numeric > &r) const |
|
bool | operator!= (const NtRectangularCut< Numeric > &r) const |
|
gs::ClassId | classId () const |
|
bool | write (std::ostream &of) const |
|
|
static const char * | classname () |
|
static unsigned | version () |
|
static void | restore (const gs::ClassId &id, std::istream &in, NtRectangularCut *cut) |
|
template<typename Numeric>
class npstat::NtRectangularCut< Numeric >
This convenience class implements simple rectangular cuts on ntuple contents. Cut lower bound is included and cut upper bound is excluded from the passing sample. It is possible to specify min >= max for any rectangle dimension. In this case no ntuple rows will be accepted by the cut.
The template parameter should coincide with the ntuple value_type.
For use inside "conditionalCycleOverRows", and other similar methods of AbsNtuple.
◆ NtRectangularCut() [1/3]
template<typename Numeric >
Default constructor creates an "all pass" cut
◆ NtRectangularCut() [2/3]
template<typename Numeric >
template<typename T >
For this convenience constructor, there must be an automatic conversion from type T to Numeric.
It is assumed that correctness of the ntuple column numbers has already been verified. Use "validColumn()" ntuple method or other similar checks to ensure this correctness and do not reuse cut objects with ntuples that might have different column structure.
◆ NtRectangularCut() [3/3]
template<typename Numeric >
template<typename T >
Constructor for a cut of arbitrary dimensionality. Note that it is impossible to specify a box with negative side length.
◆ addCut() [1/2]
template<typename Numeric >
template<typename T >
Add all cuts from another object of similar kind
◆ addCut() [2/2]
template<typename Numeric >
template<typename T >
Add a cut on column contents to the set. Returns *this, so that a bunch of calls of this method can be stacked.
◆ classId()
template<typename Numeric >
Method related to "geners" I/O
◆ cutColumn()
template<typename Numeric >
In this method, cutNumber parameter should be less than dim()
◆ cutInterval()
template<typename Numeric >
void npstat::NtRectangularCut< Numeric >::cutInterval |
( |
unsigned long |
cutNumber, |
|
|
Numeric * |
minValue, |
|
|
Numeric * |
maxValue |
|
) |
| const |
In principle, min can be larger than max. Because of this, we can't just return Interval<Numeric> when inspecting cut values.
◆ dim()
template<typename Numeric >
The number of cuts defined so far
◆ invert()
template<typename Numeric >
Invert the meaning of all cuts added so far to this object
◆ isInverted()
template<typename Numeric >
Was the cut meaning inverted?
◆ ntupleColumns()
template<typename Numeric >
Convert to column vector / cut box. Intervals in which min >= max are converted into [min, min]. "acceptedBox" method will throw std::invalid_argument if any of the cuts have been inverted.
◆ nUniqueColumns()
template<typename Numeric >
The following method returns the number of unique columns. It may be useful to check that nUniqueColumns() == dim() after the cut is fully constructed (unless you intentionally include more than one cut for some column).
◆ operator!=()
template<typename Numeric >
Logical negation of operator==
◆ operator()()
template<typename Numeric >
bool npstat::NtRectangularCut< Numeric >::operator() |
( |
unsigned long |
rowNumber, |
|
|
const Numeric * |
row, |
|
|
unsigned long |
nCols |
|
) |
| const |
Operator which returns "true" if an ntuple row passes the cut
◆ operator==()
template<typename Numeric >
The documentation for this class was generated from the following file:
|