CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
StripCPEgeometric::WrappedCluster Class Reference

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 33 of file StripCPEgeometric.h.

Constructor & Destructor Documentation

◆ WrappedCluster()

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

Definition at line 100 of file StripCPEgeometric.cc.

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

Member Function Documentation

◆ addSuppressedEdgeStrip()

void StripCPEgeometric::WrappedCluster::addSuppressedEdgeStrip ( )
inline

Definition at line 103 of file StripCPEgeometric.cc.

103  {
104  if (eta().sigmaFrom(0) < 1) {
105  first--;
106  N += 2;
107  } else if (*first > last()) {
108  first--;
109  N += 1;
110  } else {
111  N += 1;
112  }
113 }

References PVValHelper::eta, first, dqmdumpme::last, and N.

Referenced by StripCPEgeometric::offset_from_firstStrip().

◆ centroid()

stats_t< float > StripCPEgeometric::WrappedCluster::centroid ( ) const
inline

Definition at line 129 of file StripCPEgeometric.cc.

129  {
130  stats_t<float> sumXQ(0);
131  for (std::vector<stats_t<float> >::const_iterator i = first; i < first + N; i++)
132  sumXQ += (i - clusterFirst) * (*i);
133  return sumXQ / sumQ() + 0.5;
134 }

References first, mps_fire::i, N, hcaldqm::utilities::sumQ(), and trackerHitRTTI::vector.

Referenced by StripCPEgeometric::offset_from_firstStrip().

◆ deformed()

bool StripCPEgeometric::WrappedCluster::deformed ( ) const
inline

Definition at line 142 of file StripCPEgeometric.cc.

142  {
143  return N > 2 && std::max((*first)(), last()()) > accumulate(first + 1, first + N - 1, stats_t<float>(0))() / (N - 2);
144 }

References first, dqmdumpme::last, SiStripPI::max, and N.

Referenced by StripCPEgeometric::offset_from_firstStrip().

◆ dropSmallerEdgeStrip()

void StripCPEgeometric::WrappedCluster::dropSmallerEdgeStrip ( )
inline

Definition at line 115 of file StripCPEgeometric.cc.

115  {
116  if (*first < last()) {
117  first++;
118  N -= 1;
119  } else if (last() < *first) {
120  N -= 1;
121  } else {
122  first++;
123  N -= 2;
124  }
125 }

References first, dqmdumpme::last, and N.

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

◆ eta()

stats_t< float > StripCPEgeometric::WrappedCluster::eta ( void  ) const
inline

◆ last()

const stats_t<float>& StripCPEgeometric::WrappedCluster::last ( ) const
inlineprivate

Definition at line 49 of file StripCPEgeometric.h.

49 { return *(first + N - 1); }

References first, and N.

◆ maxProjection()

stats_t< float > StripCPEgeometric::WrappedCluster::maxProjection ( ) const
inline

Definition at line 146 of file StripCPEgeometric.cc.

146  {
147  return N * (1 + sign() * eta()).inverse();
148 }

References PVValHelper::eta, N, and Validation_hcalonly_cfi::sign.

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

◆ middle()

float StripCPEgeometric::WrappedCluster::middle ( ) const
inline

Definition at line 127 of file StripCPEgeometric.cc.

127 { return (first - clusterFirst) + N / 2.; }

References first, and N.

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

◆ sign()

int StripCPEgeometric::WrappedCluster::sign ( void  ) const
inline

Definition at line 152 of file StripCPEgeometric.cc.

152 { return (*first < last()) ? 1 : -1; }

References first, and dqmdumpme::last.

Referenced by StripCPEgeometric::useNMinusOne().

◆ smallerEdgeStrip()

stats_t< float > StripCPEgeometric::WrappedCluster::smallerEdgeStrip ( ) const
inline

Definition at line 150 of file StripCPEgeometric.cc.

150 { return std::min(*first, last()); }

References first, dqmdumpme::last, and min().

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

◆ sumQ()

stats_t< float > StripCPEgeometric::WrappedCluster::sumQ ( ) const
inline

Definition at line 136 of file StripCPEgeometric.cc.

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

References first, and N.

Member Data Documentation

◆ clusterFirst

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

Definition at line 50 of file StripCPEgeometric.h.

◆ first

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

Definition at line 50 of file StripCPEgeometric.h.

Referenced by last().

◆ N

uint16_t StripCPEgeometric::WrappedCluster::N
mps_fire.i
i
Definition: mps_fire.py:428
StripCPEgeometric::WrappedCluster::eta
stats_t< float > eta() const
Definition: StripCPEgeometric.cc:140
min
T min(T a, T b)
Definition: MathUtil.h:58
StripCPEgeometric::WrappedCluster::N
uint16_t N
Definition: StripCPEgeometric.h:46
StripCPEgeometric::WrappedCluster::last
const stats_t< float > & last() const
Definition: StripCPEgeometric.h:49
stats_t
Definition: ErrorPropogationTypes.h:38
StripCPEgeometric::WrappedCluster::sumQ
stats_t< float > sumQ() const
Definition: StripCPEgeometric.cc:136
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
StripCPEgeometric::WrappedCluster::first
std::vector< stats_t< float > >::const_iterator first
Definition: StripCPEgeometric.h:50
StripCPEgeometric::WrappedCluster::sign
int sign() const
Definition: StripCPEgeometric.cc:152
StripCPEgeometric::WrappedCluster::clusterFirst
std::vector< stats_t< float > >::const_iterator clusterFirst
Definition: StripCPEgeometric.h:50