#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 std::vector< uint8_t > &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 |
Definition at line 11 of file CrosstalkInversion.h.
reco::InverseCrosstalkMatrix::InverseCrosstalkMatrix | ( | const unsigned | N, |
const float | x | ||
) |
float reco::InverseCrosstalkMatrix::element | ( | const unsigned | i, |
const unsigned | j | ||
) | const [inline, private] |
Definition at line 56 of file CrosstalkInversion.cc.
References denominator, lambdaM, lambdaP, N, and funct::pow().
Referenced by operator()().
float reco::InverseCrosstalkMatrix::operator() | ( | const unsigned | i, |
const unsigned | j | ||
) | const |
std::vector< stats_t< float > > reco::InverseCrosstalkMatrix::unfold | ( | const std::vector< uint8_t > & | q, |
const float | x | ||
) | [static] |
Definition at line 6 of file CrosstalkInversion.cc.
References funct::A, i, j, N, q1, STATS, and ExpressReco_HICollisions_FallBack::x.
Referenced by StripCPEgeometric::localParameters().
{ const stats_t<float> suppressed(-5,100); const stats_t<float> saturated(254,400); #define STATS(value) ( (value<254) ? stats_t<float>(value) : saturated ) const unsigned N=q.size(); std::vector<stats_t<float> > Q(N+2,stats_t<float>(0)); Q[0] = Q[N+1] = suppressed; if(N==1) //optimize N==1 Q[1] = STATS(q[0])/(1-2*x); else if(N==2) { //optimize N==2 const double A=1-2*x; const stats_t<float> q0 = STATS(q[0]); const stats_t<float> q1 = STATS(q[1]); Q[1] = ( A*q0 -x*q1 ) / (A*A-x*x); Q[2] = ( A*q1 -x*q0 ) / (A*A-x*x); } else { //general case const InverseCrosstalkMatrix inverse(N,x); for(unsigned i=0; i<(N+1)/2; i++) { for(unsigned j=i; j<N-i; j++) { const float Cij = inverse(i+1,j+1); Q[i+1] += Cij * STATS(q[ j ]) ; if( i!=j) Q[j+1] += Cij * STATS(q[ i ]) ; if( N!=i+j+1) { Q[N-i] += Cij * STATS(q[N-j-1]) ; if( i!=j) Q[N-j] += Cij * STATS(q[N-i-1]) ; } } } } #undef STATS return Q; }
const double reco::InverseCrosstalkMatrix::denominator [private] |
Definition at line 19 of file CrosstalkInversion.h.
Referenced by element(), and operator()().
const double reco::InverseCrosstalkMatrix::lambdaM [private] |
Definition at line 19 of file CrosstalkInversion.h.
Referenced by element().
const double reco::InverseCrosstalkMatrix::lambdaP [private] |
Definition at line 19 of file CrosstalkInversion.h.
Referenced by element().
const unsigned reco::InverseCrosstalkMatrix::N [private] |
Definition at line 18 of file CrosstalkInversion.h.
Referenced by element(), operator()(), and unfold().
const double reco::InverseCrosstalkMatrix::sq [private] |
Definition at line 19 of file CrosstalkInversion.h.