CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
reco::InverseCrosstalkMatrix Class Reference

#include <CrosstalkInversion.h>

Public Member Functions

 InverseCrosstalkMatrix (const unsigned N, const float x)
 
float operator() (const unsigned i, const unsigned j) const
 

Static Public Member Functions

static std::vector< stats_t
< float > > 
unfold (const SiStripCluster &q, const float x)
 

Private Member Functions

float element (const unsigned, const unsigned) const
 

Private Attributes

const double denominator
 
const double lambdaM
 
const double lambdaP
 
const unsigned N
 
const double sq
 

Detailed Description

Definition at line 13 of file CrosstalkInversion.h.

Constructor & Destructor Documentation

reco::InverseCrosstalkMatrix::InverseCrosstalkMatrix ( const unsigned  N,
const float  x 
)

Definition at line 45 of file CrosstalkInversion.cc.

46  : N( x>0 ? N : 0 ),
47  sq( sqrt(-x*4+1)),
48  lambdaP( 1+(1+sq)/(-x*2) ),
49  lambdaM( 1+(1-sq)/(-x*2) ),
50  denominator( sq * ( pow(lambdaP,N+1) - pow(lambdaM,N+1) ) )
51 {}
T sqrt(T t)
Definition: SSEVec.h:48
Definition: DDAxes.h:10
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40

Member Function Documentation

float reco::InverseCrosstalkMatrix::element ( const unsigned  i,
const unsigned  j 
) const
inlineprivate

Definition at line 59 of file CrosstalkInversion.cc.

References denominator, lambdaM, lambdaP, N, and funct::pow().

Referenced by operator()().

60 { return ( pow(lambdaM,N+1-i) - pow(lambdaP,N+1-i) ) * ( pow(lambdaM,j) - pow(lambdaP,j) ) / denominator; }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
float reco::InverseCrosstalkMatrix::operator() ( const unsigned  i,
const unsigned  j 
) const

Definition at line 54 of file CrosstalkInversion.cc.

References denominator, element(), edm::isNotFinite(), and N.

55 { return N==0 || edm::isNotFinite(denominator) ? i==j : i>=j ? element(i,j) : element(j,i) ; }
int i
Definition: DBlmapReader.cc:9
bool isNotFinite(T x)
Definition: isFinite.h:10
int j
Definition: DBlmapReader.cc:9
float element(const unsigned, const unsigned) const
std::vector< stats_t< float > > reco::InverseCrosstalkMatrix::unfold ( const SiStripCluster q,
const float  x 
)
static

Definition at line 8 of file CrosstalkInversion.cc.

References funct::A, SiStripCluster::amplitudes(), i, j, N, lumiQueryAPI::q, SiStripMonitorClusterAlca_cfi::q0, q1, STATS, and x.

Referenced by StripCPEgeometric::localParameters().

8  {
9  auto const & q = clus.amplitudes();
10  const stats_t<float> suppressed(-5,100);
11  const stats_t<float> saturated(254,400);
12  #define STATS(value) ( (value<254) ? stats_t<float>(value) : saturated )
13 
14  const unsigned N=q.size();
15  std::vector<stats_t<float> > Q(N+2,stats_t<float>(0));
16  Q[0] = Q[N+1] = suppressed;
17 
18  if(N==1) //optimize N==1
19  Q[1] = STATS(q[0])/(1-2*x);
20  else if(N==2) { //optimize N==2
21  const double A=1-2*x;
22  const stats_t<float> q0 = STATS(q[0]);
23  const stats_t<float> q1 = STATS(q[1]);
24  Q[1] = ( A*q0 -x*q1 ) / (A*A-x*x);
25  Q[2] = ( A*q1 -x*q0 ) / (A*A-x*x);
26  }
27  else { //general case
28  const InverseCrosstalkMatrix inverse(N,x);
29  for(unsigned i=0; i<(N+1)/2; i++) {
30  for(unsigned j=i; j<N-i; j++) {
31  const float Cij = inverse(i+1,j+1);
32  Q[i+1] += Cij * STATS(q[ j ]) ; if( i!=j)
33  Q[j+1] += Cij * STATS(q[ i ]) ; if( N!=i+j+1) {
34  Q[N-i] += Cij * STATS(q[N-j-1]) ; if( i!=j)
35  Q[N-j] += Cij * STATS(q[N-i-1]) ;
36  }
37  }
38  }
39  }
40  #undef STATS
41  return Q;
42 }
#define STATS(value)
int i
Definition: DBlmapReader.cc:9
InverseCrosstalkMatrix(const unsigned N, const float x)
int j
Definition: DBlmapReader.cc:9
double q1[4]
Definition: TauolaWrapper.h:87
Definition: DDAxes.h:10
const std::vector< uint8_t > & amplitudes() const

Member Data Documentation

const double reco::InverseCrosstalkMatrix::denominator
private

Definition at line 21 of file CrosstalkInversion.h.

Referenced by cuy.divideElement::__init__(), element(), and operator()().

const double reco::InverseCrosstalkMatrix::lambdaM
private

Definition at line 21 of file CrosstalkInversion.h.

Referenced by element().

const double reco::InverseCrosstalkMatrix::lambdaP
private

Definition at line 21 of file CrosstalkInversion.h.

Referenced by element().

const unsigned reco::InverseCrosstalkMatrix::N
private

Definition at line 20 of file CrosstalkInversion.h.

Referenced by element(), operator()(), and unfold().

const double reco::InverseCrosstalkMatrix::sq
private

Definition at line 21 of file CrosstalkInversion.h.