CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes
ProjectMatrix< T, N, D > Struct Template Reference

#include <ProjectMatrix.h>

Public Types

typedef ROOT::Math::SMatrix< T,
D, D, ROOT::Math::MatRepSym< T,
D > > 
SMatDD
 
typedef ROOT::Math::SMatrix< T,
D, N
SMatDN
 
typedef ROOT::Math::SMatrix< T,
N, D > 
SMatND
 
typedef ROOT::Math::SMatrix< T,
N, N
SMatNN
 

Public Member Functions

void fromH (SMatDN const &H)
 
SMatDN matrix () const
 
SMatND project (SMatDD const &s) const
 
SMatNN project (SMatND const &k) const
 
void projectAndSubtractFrom (SMatNN &__restrict__ s, SMatND const &__restrict__ k) const
 

Public Attributes

unsigned int index [D]
 

Detailed Description

template<typename T, unsigned int N, unsigned int D>
struct ProjectMatrix< T, N, D >

Definition at line 10 of file ProjectMatrix.h.

Member Typedef Documentation

template<typename T, unsigned int N, unsigned int D>
typedef ROOT::Math::SMatrix<T,D,D,ROOT::Math::MatRepSym<T,D> > ProjectMatrix< T, N, D >::SMatDD

Definition at line 11 of file ProjectMatrix.h.

template<typename T, unsigned int N, unsigned int D>
typedef ROOT::Math::SMatrix<T,D,N > ProjectMatrix< T, N, D >::SMatDN

Definition at line 14 of file ProjectMatrix.h.

template<typename T, unsigned int N, unsigned int D>
typedef ROOT::Math::SMatrix<T,N,D > ProjectMatrix< T, N, D >::SMatND

Definition at line 13 of file ProjectMatrix.h.

template<typename T, unsigned int N, unsigned int D>
typedef ROOT::Math::SMatrix<T,N,N > ProjectMatrix< T, N, D >::SMatNN

Definition at line 12 of file ProjectMatrix.h.

Member Function Documentation

template<typename T, unsigned int N, unsigned int D>
void ProjectMatrix< T, N, D >::fromH ( SMatDN const &  H)
inline

Definition at line 28 of file ProjectMatrix.h.

References data-class-funcs::H, i, ProjectMatrix< T, N, D >::index, j, and N.

28  {
29  for (unsigned int i=0; i<D; i++) {
30  index[i]=N;
31  for (unsigned int j=0; j<N; j++)
32  if ( H(i,j)>0 ) { index[i]=j; break;}
33  }
34  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
unsigned int index[D]
Definition: ProjectMatrix.h:62
template<typename T, unsigned int N, unsigned int D>
SMatDN ProjectMatrix< T, N, D >::matrix ( void  ) const
inline

Definition at line 20 of file ProjectMatrix.h.

References i, ProjectMatrix< T, N, D >::index, and alignCSCRings::r.

20  {
21  SMatDN r;
22  for (unsigned int i=0; i<D; i++)
23  r(i,index[i]) = T(1.);
24  return r;
25  }
int i
Definition: DBlmapReader.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
ROOT::Math::SMatrix< T, D, N > SMatDN
Definition: ProjectMatrix.h:14
unsigned int index[D]
Definition: ProjectMatrix.h:62
long double T
template<typename T, unsigned int N, unsigned int D>
SMatND ProjectMatrix< T, N, D >::project ( SMatDD const &  s) const
inline

Definition at line 37 of file ProjectMatrix.h.

References i, ProjectMatrix< T, N, D >::index, j, alignCSCRings::r, and alignCSCRings::s.

37  {
38  SMatND r;
39  for (unsigned int i=0; i<D; i++)
40  for (unsigned int j=0; j<D; j++)
41  r(index[i],j) = s(i,j);
42  return r;
43  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
unsigned int index[D]
Definition: ProjectMatrix.h:62
ROOT::Math::SMatrix< T, N, D > SMatND
Definition: ProjectMatrix.h:13
template<typename T, unsigned int N, unsigned int D>
SMatNN ProjectMatrix< T, N, D >::project ( SMatND const &  k) const
inline

Definition at line 46 of file ProjectMatrix.h.

References i, ProjectMatrix< T, N, D >::index, j, roll_playback::k, N, and alignCSCRings::s.

46  {
47  SMatNN s;
48  for (unsigned int i=0; i<N; i++)
49  for (unsigned int j=0; j<D; j++)
50  s(i,index[j]) = k(i,j);
51  return s;
52  }
int i
Definition: DBlmapReader.cc:9
ROOT::Math::SMatrix< T, N, N > SMatNN
Definition: ProjectMatrix.h:12
int j
Definition: DBlmapReader.cc:9
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
unsigned int index[D]
Definition: ProjectMatrix.h:62
template<typename T, unsigned int N, unsigned int D>
void ProjectMatrix< T, N, D >::projectAndSubtractFrom ( SMatNN &__restrict__  s,
SMatND const &__restrict__  k 
) const
inline

Definition at line 55 of file ProjectMatrix.h.

References i, ProjectMatrix< T, N, D >::index, j, roll_playback::k, N, and alignCSCRings::s.

55  {
56  for (unsigned int i=0; i<N; i++)
57  for (unsigned int j=0; j<D; j++)
58  s(i,index[j]) -= k(i,j);
59  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
unsigned int index[D]
Definition: ProjectMatrix.h:62

Member Data Documentation

template<typename T, unsigned int N, unsigned int D>
unsigned int ProjectMatrix< T, N, D >::index[D]