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 8 of file ProjectMatrix.h.

Member Typedef Documentation

◆ SMatDD

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 9 of file ProjectMatrix.h.

◆ SMatDN

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

Definition at line 12 of file ProjectMatrix.h.

◆ SMatND

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

Definition at line 11 of file ProjectMatrix.h.

◆ SMatNN

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

Definition at line 10 of file ProjectMatrix.h.

Member Function Documentation

◆ fromH()

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

Definition at line 25 of file ProjectMatrix.h.

25  {
26  for (unsigned int i = 0; i < D; i++) {
27  index[i] = N;
28  for (unsigned int j = 0; j < N; j++)
29  if (H(i, j) > 0) {
30  index[i] = j;
31  break;
32  }
33  }
34  }

References class-composition::H, mps_fire::i, ProjectMatrix< T, N, D >::index, dqmiolumiharvest::j, and N.

◆ matrix()

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

Definition at line 17 of file ProjectMatrix.h.

17  {
18  SMatDN r;
19  for (unsigned int i = 0; i < D; i++)
20  r(i, index[i]) = T(1.);
21  return r;
22  }

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

◆ project() [1/2]

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.

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  }

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

◆ project() [2/2]

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.

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  }

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

◆ projectAndSubtractFrom()

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.

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  }

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

Member Data Documentation

◆ index

template<typename T, unsigned int N, unsigned int D>
unsigned int ProjectMatrix< T, N, D >::index[D]
class-composition.H
H
Definition: class-composition.py:31
mps_fire.i
i
Definition: mps_fire.py:355
ProjectMatrix::SMatNN
ROOT::Math::SMatrix< T, N, N > SMatNN
Definition: ProjectMatrix.h:10
alignCSCRings.s
s
Definition: alignCSCRings.py:92
ProjectMatrix::index
unsigned int index[D]
Definition: ProjectMatrix.h:62
N
#define N
Definition: blowfish.cc:9
dqmdumpme.k
k
Definition: dqmdumpme.py:60
ProjectMatrix::SMatDN
ROOT::Math::SMatrix< T, D, N > SMatDN
Definition: ProjectMatrix.h:12
alignCSCRings.r
r
Definition: alignCSCRings.py:93
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
T
long double T
Definition: Basic3DVectorLD.h:48
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ProjectMatrix::SMatND
ROOT::Math::SMatrix< T, N, D > SMatND
Definition: ProjectMatrix.h:11