CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
mkfit::axis_base< R, I, M, N > Struct Template Reference

#include <binnor.h>

Inheritance diagram for mkfit::axis_base< R, I, M, N >:
mkfit::axis< R, I, M, N > mkfit::axis_pow2_base< R, I, M, N > mkfit::axis_pow2< R, I, M, N > mkfit::axis_pow2_u1< R, I, M, N >

Classes

struct  I_pair
 

Public Types

typedef I index_t
 
typedef R real_t
 

Public Member Functions

 axis_base (R min, R max, unsigned M_size, unsigned N_size)
 
from_M_bin_to_N_bin (I m) const
 
I_pair from_R_minmax_to_N_bins (R rmin, R rmax) const
 
I_pair from_R_rdr_to_N_bins (R r, R dr) const
 
from_R_to_M_bin (R r) const
 
from_R_to_M_bin_safe (R r) const
 
from_R_to_N_bin (R r) const
 
from_R_to_N_bin_safe (R r) const
 
next_N_bin (I bin) const
 

Public Attributes

const I m_last_M_bin
 
const I m_last_N_bin
 
const R m_M_fac
 
const R m_N_fac
 
const R m_R_max
 
const R m_R_min
 

Static Public Attributes

static constexpr unsigned c_M = M
 
static constexpr unsigned c_M2N_shift = M - N
 
static constexpr unsigned c_N = N
 

Detailed Description

template<typename R, typename I, unsigned M, unsigned N>
struct mkfit::axis_base< R, I, M, N >

Definition at line 22 of file binnor.h.

Member Typedef Documentation

template<typename R , typename I , unsigned M, unsigned N>
typedef I mkfit::axis_base< R, I, M, N >::index_t

Definition at line 26 of file binnor.h.

template<typename R , typename I , unsigned M, unsigned N>
typedef R mkfit::axis_base< R, I, M, N >::real_t

Definition at line 23 of file binnor.h.

Constructor & Destructor Documentation

template<typename R , typename I , unsigned M, unsigned N>
mkfit::axis_base< R, I, M, N >::axis_base ( min,
max,
unsigned  M_size,
unsigned  N_size 
)
inline

Definition at line 44 of file binnor.h.

References cms::cuda::assert(), and N.

45  : m_R_min(min),
46  m_R_max(max),
47  m_M_fac(M_size / (max - min)),
48  m_N_fac(N_size / (max - min)),
49  m_last_M_bin(M_size - 1),
50  m_last_N_bin(N_size - 1) {
51  // Requested number of bins must fit within the intended bit-field (declared by binnor, later).
52  assert(N_size <= (1 << N));
53  }
assert(be >=bs)
const R m_R_max
Definition: binnor.h:32
const I m_last_M_bin
Definition: binnor.h:34
#define N
Definition: blowfish.cc:9
const R m_M_fac
Definition: binnor.h:33
const I m_last_N_bin
Definition: binnor.h:34
const R m_N_fac
Definition: binnor.h:33
const R m_R_min
Definition: binnor.h:32

Member Function Documentation

template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::from_M_bin_to_N_bin ( m) const
inline

Definition at line 61 of file binnor.h.

References mkfit::axis_base< R, I, M, N >::c_M2N_shift.

61 { return m >> c_M2N_shift; }
static constexpr unsigned c_M2N_shift
Definition: binnor.h:30
template<typename R , typename I , unsigned M, unsigned N>
I_pair mkfit::axis_base< R, I, M, N >::from_R_minmax_to_N_bins ( rmin,
rmax 
) const
inline

Definition at line 63 of file binnor.h.

References mkfit::axis_base< R, I, M, N >::from_R_to_N_bin_safe(), and Exhume::I.

Referenced by mkfit::axis_base< R, I, M, N >::from_R_rdr_to_N_bins().

63  {
64  return I_pair(from_R_to_N_bin_safe(rmin), from_R_to_N_bin_safe(rmax) + I{1});
65  }
const std::complex< double > I
Definition: I.h:8
I from_R_to_N_bin_safe(R r) const
Definition: binnor.h:59
template<typename R , typename I , unsigned M, unsigned N>
I_pair mkfit::axis_base< R, I, M, N >::from_R_rdr_to_N_bins ( r,
dr 
) const
inline

Definition at line 67 of file binnor.h.

References mkfit::axis_base< R, I, M, N >::from_R_minmax_to_N_bins().

Referenced by mkfit::StdSeq::clean_cms_seedtracks_iter().

67 { return from_R_minmax_to_N_bins(r - dr, r + dr); }
I_pair from_R_minmax_to_N_bins(R rmin, R rmax) const
Definition: binnor.h:63
template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::from_R_to_M_bin ( r) const
inline
template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::from_R_to_M_bin_safe ( r) const
inline

Definition at line 58 of file binnor.h.

References mkfit::axis_base< R, I, M, N >::from_R_to_M_bin(), mkfit::axis_base< R, I, M, N >::m_last_M_bin, and mkfit::axis_base< R, I, M, N >::m_R_max.

58 { return r <= m_R_min ? 0 : (r >= m_R_max ? m_last_M_bin : from_R_to_M_bin(r)); }
I from_R_to_M_bin(R r) const
Definition: binnor.h:55
const R m_R_max
Definition: binnor.h:32
const I m_last_M_bin
Definition: binnor.h:34
template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::from_R_to_N_bin ( r) const
inline
template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::from_R_to_N_bin_safe ( r) const
inline
template<typename R , typename I , unsigned M, unsigned N>
I mkfit::axis_base< R, I, M, N >::next_N_bin ( bin) const
inline

Definition at line 68 of file binnor.h.

Referenced by mkfit::StdSeq::clean_cms_seedtracks_iter().

68 { return bin + 1; }

Member Data Documentation

template<typename R , typename I , unsigned M, unsigned N>
constexpr unsigned mkfit::axis_base< R, I, M, N >::c_M = M
static

Definition at line 28 of file binnor.h.

template<typename R , typename I , unsigned M, unsigned N>
constexpr unsigned mkfit::axis_base< R, I, M, N >::c_M2N_shift = M - N
static

Definition at line 30 of file binnor.h.

Referenced by mkfit::axis_base< R, I, M, N >::from_M_bin_to_N_bin().

template<typename R , typename I , unsigned M, unsigned N>
constexpr unsigned mkfit::axis_base< R, I, M, N >::c_N = N
static

Definition at line 29 of file binnor.h.

template<typename R , typename I , unsigned M, unsigned N>
const I mkfit::axis_base< R, I, M, N >::m_last_M_bin

Definition at line 34 of file binnor.h.

Referenced by mkfit::axis_base< R, I, M, N >::from_R_to_M_bin_safe().

template<typename R , typename I , unsigned M, unsigned N>
const I mkfit::axis_base< R, I, M, N >::m_last_N_bin

Definition at line 34 of file binnor.h.

Referenced by mkfit::axis_base< R, I, M, N >::from_R_to_N_bin_safe().

template<typename R , typename I , unsigned M, unsigned N>
const R mkfit::axis_base< R, I, M, N >::m_M_fac

Definition at line 33 of file binnor.h.

Referenced by mkfit::axis_base< R, I, M, N >::from_R_to_M_bin().

template<typename R , typename I , unsigned M, unsigned N>
const R mkfit::axis_base< R, I, M, N >::m_N_fac

Definition at line 33 of file binnor.h.

Referenced by mkfit::axis_base< R, I, M, N >::from_R_to_N_bin().

template<typename R , typename I , unsigned M, unsigned N>
const R mkfit::axis_base< R, I, M, N >::m_R_max
template<typename R , typename I , unsigned M, unsigned N>
const R mkfit::axis_base< R, I, M, N >::m_R_min