CMS 3D CMS Logo

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, NSMatDN
 
typedef ROOT::Math::SMatrix< T, N, D > SMatND
 
typedef ROOT::Math::SMatrix< T, N, NSMatNN
 

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 class-composition::H, mps_fire::i, ProjectMatrix< T, N, D >::index, 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  }
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:151
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 mps_fire::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  }
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:151
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 mps_fire::i, ProjectMatrix< T, N, D >::index, 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  }
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:151
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 mps_fire::i, ProjectMatrix< T, N, D >::index, gen::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  }
ROOT::Math::SMatrix< T, N, N > SMatNN
Definition: ProjectMatrix.h:12
int k[5][pyjets_maxn]
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:151
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 mps_fire::i, ProjectMatrix< T, N, D >::index, gen::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 k[5][pyjets_maxn]
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:151
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]