CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
npstat::CoordinateSelector Class Reference

#include <CoordinateSelector.h>

Inheritance diagram for npstat::CoordinateSelector:
npstat::AbsMultivariateFunctor

Public Member Functions

 CoordinateSelector (const unsigned i)
 
unsigned maxDim () const override
 
unsigned minDim () const override
 
double operator() (const double *point, const unsigned dim) const override
 
 ~CoordinateSelector () override
 
- Public Member Functions inherited from npstat::AbsMultivariateFunctor
virtual ~AbsMultivariateFunctor ()
 

Private Member Functions

 CoordinateSelector ()=delete
 

Private Attributes

unsigned index_
 

Detailed Description

A trivial implementation of AbsMultivariateFunctor which selects an element with a certain index from the input array

Definition at line 25 of file CoordinateSelector.h.

Constructor & Destructor Documentation

◆ CoordinateSelector() [1/2]

npstat::CoordinateSelector::CoordinateSelector ( const unsigned  i)
inlineexplicit

Definition at line 27 of file CoordinateSelector.h.

27 : index_(i) {}

◆ ~CoordinateSelector()

npstat::CoordinateSelector::~CoordinateSelector ( )
inlineoverride

Definition at line 29 of file CoordinateSelector.h.

29 {}

◆ CoordinateSelector() [2/2]

npstat::CoordinateSelector::CoordinateSelector ( )
privatedelete

Member Function Documentation

◆ maxDim()

unsigned npstat::CoordinateSelector::maxDim ( ) const
inlineoverridevirtual

Maximum expected dimensionality (will typically be equal to the minimum)

Reimplemented from npstat::AbsMultivariateFunctor.

Definition at line 39 of file CoordinateSelector.h.

39 { return UINT_MAX; }

◆ minDim()

unsigned npstat::CoordinateSelector::minDim ( ) const
inlineoverridevirtual

Minimum expected dimensionality

Implements npstat::AbsMultivariateFunctor.

Definition at line 38 of file CoordinateSelector.h.

38 { return index_ + 1U; }

References index_, and mitigatedMETSequence_cff::U.

◆ operator()()

double npstat::CoordinateSelector::operator() ( const double *  point,
const unsigned  dim 
) const
inlineoverridevirtual

Function value

Implements npstat::AbsMultivariateFunctor.

Definition at line 31 of file CoordinateSelector.h.

31  {
32  if (dim <= index_)
34  "In npstat::CoordinateSelector::operator(): "
35  "input array dimensionality is too small");
36  return point[index_];
37  }

References index_, and point.

Member Data Documentation

◆ index_

unsigned npstat::CoordinateSelector::index_
private

Definition at line 43 of file CoordinateSelector.h.

Referenced by minDim(), and operator()().

mps_fire.i
i
Definition: mps_fire.py:428
npstat::CoordinateSelector::index_
unsigned index_
Definition: CoordinateSelector.h:43
npstat::NpstatInvalidArgument
Definition: NpstatException.h:38
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
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