CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Member Functions | Private Attributes

StripCPEgeometric::WrappedCluster Class Reference

List of all members.

Public Member Functions

void addSuppressedEdgeStrip ()
stats_t< float > centroid () const
bool deformed () const
void dropSmallerEdgeStrip ()
stats_t< float > eta () const
stats_t< float > maxProjection () const
float middle () const
int sign () const
stats_t< float > smallerEdgeStrip () const
stats_t< float > sumQ () const
 WrappedCluster (const std::vector< stats_t< float > > &)

Public Attributes

uint16_t N

Private Member Functions

const stats_t< float > & last () const

Private Attributes

std::vector< stats_t< float >
>::const_iterator 
clusterFirst
std::vector< stats_t< float >
>::const_iterator 
first

Detailed Description

Definition at line 43 of file StripCPEgeometric.h.


Constructor & Destructor Documentation

StripCPEgeometric::WrappedCluster::WrappedCluster ( const std::vector< stats_t< float > > &  Q)

Definition at line 98 of file StripCPEgeometric.cc.

                                                    : 
  N(Q.size()-2),
  clusterFirst(Q.begin()+1),
  first(clusterFirst)
  {}

Member Function Documentation

void StripCPEgeometric::WrappedCluster::addSuppressedEdgeStrip ( ) [inline]

Definition at line 106 of file StripCPEgeometric.cc.

References eta(), first, prof2calltree::last, and MultiGaussianStateTransform::N.

Referenced by StripCPEgeometric::offset_from_firstStrip().

                         {
  if( eta().sigmaFrom(0) < 1 ) { first--; N+=2; } 
  else if( *first > last() )   { first--; N+=1; } 
  else                         {          N+=1; }
}
stats_t< float > StripCPEgeometric::WrappedCluster::centroid ( ) const [inline]

Definition at line 127 of file StripCPEgeometric.cc.

References first, i, and MultiGaussianStateTransform::N.

Referenced by StripCPEgeometric::offset_from_firstStrip().

                 { 
  stats_t<float> sumXQ(0);
  for(std::vector<stats_t<float> >::const_iterator i = first; i<first+N; i++) sumXQ += (i-clusterFirst)*(*i);
  return sumXQ/sumQ() + 0.5;
}
bool StripCPEgeometric::WrappedCluster::deformed ( ) const [inline]

Definition at line 145 of file StripCPEgeometric.cc.

References first, prof2calltree::last, max(), and MultiGaussianStateTransform::N.

Referenced by StripCPEgeometric::offset_from_firstStrip().

{  return  N>2  &&  std::max((*first)(),last()()) > accumulate(first+1,first+N-1,stats_t<float>(0))() / (N-2);}
void StripCPEgeometric::WrappedCluster::dropSmallerEdgeStrip ( ) [inline]

Definition at line 114 of file StripCPEgeometric.cc.

References first, prof2calltree::last, and MultiGaussianStateTransform::N.

Referenced by StripCPEgeometric::offset_from_firstStrip(), and StripCPEgeometric::useNMinusOne().

                       {
  if( *first < last() ) { first++; N-=1; } else 
  if( last() < *first ) {          N-=1; } else  
                        { first++; N-=2; } 
}
stats_t< float > StripCPEgeometric::WrappedCluster::eta ( void  ) const [inline]

Definition at line 140 of file StripCPEgeometric.cc.

References first, and prof2calltree::last.

Referenced by StripCPEgeometric::geometric_position(), and StripCPEgeometric::useNMinusOne().

{ return  ( last() - *first ) / sumQ() ;}
const stats_t<float>& StripCPEgeometric::WrappedCluster::last ( ) const [inline, private]

Definition at line 58 of file StripCPEgeometric.h.

References first, and N.

{return *(first+N-1);}
stats_t< float > StripCPEgeometric::WrappedCluster::maxProjection ( ) const [inline]
float StripCPEgeometric::WrappedCluster::middle ( ) const [inline]
int StripCPEgeometric::WrappedCluster::sign ( void  ) const [inline]

Definition at line 160 of file StripCPEgeometric.cc.

References first, and prof2calltree::last.

Referenced by StripCPEgeometric::useNMinusOne().

{ return ( *first < last() ) ? 1  : -1; }
stats_t< float > StripCPEgeometric::WrappedCluster::smallerEdgeStrip ( ) const [inline]

Definition at line 155 of file StripCPEgeometric.cc.

References first, prof2calltree::last, and min.

Referenced by StripCPEgeometric::ambiguousSize(), and StripCPEgeometric::useNMinusOne().

{ return std::min(*first, last()); }
stats_t< float > StripCPEgeometric::WrappedCluster::sumQ ( ) const [inline]

Definition at line 135 of file StripCPEgeometric.cc.

References first, and MultiGaussianStateTransform::N.

{ return accumulate(first, first+N, stats_t<float>(0));}

Member Data Documentation

std::vector<stats_t<float> >::const_iterator StripCPEgeometric::WrappedCluster::clusterFirst [private]

Definition at line 59 of file StripCPEgeometric.h.

std::vector<stats_t<float> >::const_iterator StripCPEgeometric::WrappedCluster::first [private]

Definition at line 59 of file StripCPEgeometric.h.

Referenced by last().