CMS 3D CMS Logo

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

#include <EquidistantSequence.h>

Inheritance diagram for npstat::EquidistantInLinearSpace:

Public Member Functions

 EquidistantInLinearSpace (double minScale, double maxScale, unsigned nScales)
 
virtual ~EquidistantInLinearSpace ()
 

Private Member Functions

 EquidistantInLinearSpace ()=delete
 

Detailed Description

A sequence of points equidistant in linear space. Note that std::vector destructor is not virtual, so do not destroy this class by base pointer or reference.

Definition at line 22 of file EquidistantSequence.h.

Constructor & Destructor Documentation

◆ EquidistantInLinearSpace() [1/2]

npstat::EquidistantInLinearSpace::EquidistantInLinearSpace ( double  minScale,
double  maxScale,
unsigned  nScales 
)

Definition at line 7 of file EquidistantSequence.cc.

10  : std::vector<double>() {
11  switch (nScales) {
12  case 0:
13  break;
14 
15  case 1: {
16  this->reserve(nScales);
17  const double sc = (minScale == maxScale ? minScale : (minScale + maxScale) / 2.0);
18  push_back(sc);
19  } break;
20 
21  default: {
22  this->reserve(nScales);
23  const double step = (maxScale - minScale) / (nScales - 1);
24  push_back(minScale);
25  for (unsigned i = 1; i < nScales - 1; ++i)
26  push_back(minScale + i * step);
27  push_back(maxScale);
28  } break;
29  }
30  }

References mps_fire::i, fftjetcommon_cfi::maxScale, fftjetcommon_cfi::minScale, and fftjetcommon_cfi::nScales.

◆ ~EquidistantInLinearSpace()

virtual npstat::EquidistantInLinearSpace::~EquidistantInLinearSpace ( )
inlinevirtual

Definition at line 25 of file EquidistantSequence.h.

25 {}

◆ EquidistantInLinearSpace() [2/2]

npstat::EquidistantInLinearSpace::EquidistantInLinearSpace ( )
privatedelete
mps_fire.i
i
Definition: mps_fire.py:355
fftjetcommon_cfi.nScales
nScales
Definition: fftjetcommon_cfi.py:111
step
step
Definition: StallMonitor.cc:94
fftjetcommon_cfi.maxScale
maxScale
Definition: fftjetcommon_cfi.py:110
fftjetcommon_cfi.minScale
minScale
Definition: fftjetcommon_cfi.py:109