CMS 3D CMS Logo

CoordinateSelector.h
Go to the documentation of this file.
1 #ifndef NPSTAT_COORDINATESELECTOR_HH_
2 #define NPSTAT_COORDINATESELECTOR_HH_
3 
15 #include <climits>
17 
19 
20 namespace npstat {
26  public:
27  inline explicit CoordinateSelector(const unsigned i) : index_(i) {}
28 
29  CoordinateSelector() = delete;
30 
31  inline ~CoordinateSelector() override {}
32 
33  inline double operator()(const double* point, const unsigned dim) const override {
34  if (dim <= index_)
36  "In npstat::CoordinateSelector::operator(): "
37  "input array dimensionality is too small");
38  return point[index_];
39  }
40  inline unsigned minDim() const override { return index_ + 1U; }
41  inline unsigned maxDim() const override { return UINT_MAX; }
42 
43  private:
44  unsigned index_;
45  };
46 } // namespace npstat
47 
48 #endif // NPSTAT_COORDINATESELECTOR_HH_
npstat::CoordinateSelector::~CoordinateSelector
~CoordinateSelector() override
Definition: CoordinateSelector.h:31
mps_fire.i
i
Definition: mps_fire.py:428
npstat::CoordinateSelector::CoordinateSelector
CoordinateSelector(const unsigned i)
Definition: CoordinateSelector.h:27
npstat::AbsMultivariateFunctor
Definition: AbsMultivariateFunctor.h:18
npstat::CoordinateSelector::index_
unsigned index_
Definition: CoordinateSelector.h:44
npstat::CoordinateSelector::operator()
double operator()(const double *point, const unsigned dim) const override
Definition: CoordinateSelector.h:33
npstat
Definition: AbsArrayProjector.h:14
npstat::CoordinateSelector::CoordinateSelector
CoordinateSelector()=delete
npstat::NpstatInvalidArgument
Definition: NpstatException.h:38
AbsMultivariateFunctor.h
Interface definition for multidimensional functors.
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
npstat::CoordinateSelector
Definition: CoordinateSelector.h:25
npstat::CoordinateSelector::maxDim
unsigned maxDim() const override
Definition: CoordinateSelector.h:41
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
NpstatException.h
Exceptions for the npstat namespace.
npstat::CoordinateSelector::minDim
unsigned minDim() const override
Definition: CoordinateSelector.h:40