CMS 3D CMS Logo

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

#include <SiStripCluster.h>

Public Types

typedef std::vector
< SiStripDigi >
::const_iterator 
SiStripDigiIter
 
typedef std::pair
< SiStripDigiIter,
SiStripDigiIter
SiStripDigiRange
 

Public Member Functions

const std::vector< uint8_t > & amplitudes () const
 
float barycenter () const
 
uint16_t firstStrip () const
 
float getSplitClusterError () const
 
void setSplitClusterError (float errx)
 
 SiStripCluster ()
 
 SiStripCluster (const SiStripDigiRange &range)
 
template<typename Iter >
 SiStripCluster (const uint16_t &firstStrip, Iter begin, Iter end)
 

Private Attributes

std::vector< uint8_t > amplitudes_
 
float error_x
 
uint16_t firstStrip_
 

Detailed Description

Definition at line 8 of file SiStripCluster.h.

Member Typedef Documentation

typedef std::vector<SiStripDigi>::const_iterator SiStripCluster::SiStripDigiIter

Definition at line 11 of file SiStripCluster.h.

Definition at line 12 of file SiStripCluster.h.

Constructor & Destructor Documentation

SiStripCluster::SiStripCluster ( )
inline

Construct from a range of digis that form a cluster and from a DetID. The range is assumed to be non-empty.

Definition at line 18 of file SiStripCluster.h.

18 : error_x( -99999.9 ) {}
SiStripCluster::SiStripCluster ( const SiStripDigiRange range)
explicit

check if digis consecutive

Definition at line 4 of file SiStripCluster.cc.

References amplitudes_, i, and j.

4  :
5  firstStrip_(range.first->strip()),
6  error_x(-99999.9)
7 {
8 
9  amplitudes_.reserve( range.second - range.first);
10 
11  uint16_t lastStrip=0;
12  bool firstInloop = true;
13  for (SiStripDigiIter i=range.first; i!=range.second; i++) {
14 
16  if (!firstInloop && i->strip() != lastStrip + 1) {
17  for (int j=0; j < i->strip()-(lastStrip+1); j++) {
18  amplitudes_.push_back( 0);
19  }
20  }
21  lastStrip = i->strip();
22  firstInloop = false;
23 
24  amplitudes_.push_back(i->adc());
25  }
26 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
std::vector< SiStripDigi >::const_iterator SiStripDigiIter
std::vector< uint8_t > amplitudes_
uint16_t firstStrip_
template<typename Iter >
SiStripCluster::SiStripCluster ( const uint16_t &  firstStrip,
Iter  begin,
Iter  end 
)
inline

Definition at line 23 of file SiStripCluster.h.

24  :
26  // ggiurgiu@fnal.gov, 01/05/12
27  // Initialize the split cluster errors to un-physical values.
28  // The CPE will check these errors and if they are not un-physical,
29  // it will recognize the clusters as split and assign these (increased)
30  // errors to the corresponding rechit.
31  error_x(-99999.9){}
uint16_t firstStrip() const
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
std::vector< uint8_t > amplitudes_
uint16_t firstStrip_

Member Function Documentation

const std::vector<uint8_t>& SiStripCluster::amplitudes ( ) const
inline

The amplitudes of the strips forming the cluster. The amplitudes are on consecutive strips; if a strip is missing the amplitude is set to zero. A strip may be missing in the middle of a cluster because of a clusterizer that accepts holes. A strip may also be missing anywhere in the cluster, including the edge, to record a dead/noisy channel.

You can find the special meanings of values { 0, 254, 255} in section 3.4.1 of http://www.te.rl.ac.uk/esdg/cms-fed/firmware/Documents/FE_FPGA_Technical_Description.pdf

Definition at line 48 of file SiStripCluster.h.

References amplitudes_.

Referenced by SiStripGainFromCalibTree::algoAnalyze(), TrackerHitAssociator::associateSimpleRecHitCluster(), SimpleCosmicBONSeeder::checkCharge(), ClusterShapeHitFilter::checkClusterCharge(), DeDxDiscriminatorProducer::ClusterSaturatingStrip(), ClusterVariables::clusterSize(), SiStripGainFromData::ComputeChargeOverPath(), DeDxEstimatorProducer::getCharge(), DeDxDiscriminatorProducer::GetProbability(), ClusterShapeHitFilter::getSizes(), SiStripRecHitConverterAlgorithm::isMasked(), StMeasurementConditionSet::isMasked(), CalibrationTrackSelector::isOkCharge(), DeDxDiscriminatorLearner::Learn(), StripCPEfromTrackAngle::localParameters(), StripCPEgeometric::localParameters(), StripCPEfromTemplate::localParameters(), PrintRecoObjects::print(), ClusterTPAssociationProducer::produce(), ShallowGainCalibration::produce(), TrackClusterSplitter::splitCluster(), ClusterVariables::stripCharges(), SiStripClusterInfo::stripCharges(), and SiStripClusterInfo::width().

48 {return amplitudes_;}
std::vector< uint8_t > amplitudes_
float SiStripCluster::barycenter ( ) const

The barycenter of the cluster, not corrected for Lorentz shift; should not be used as position estimate for tracking.

Definition at line 29 of file SiStripCluster.cc.

References amplitudes_, f, firstStrip_, and i.

Referenced by SiStripClusterInfo::baryStrip(), SiStripFineDelayHit::closestCluster(), SiStripRecHitConverterAlgorithm::isMasked(), StMeasurementConditionSet::isMasked(), StripCPEfromTrackAngle::localParameters(), StripCPEfromTemplate::localParameters(), StripCPE::localParameters(), PrintRecoObjects::print(), and TrackClusterSplitter::splitCluster().

29  {
30  int sumx = 0;
31  int suma = 0;
32  size_t asize = amplitudes_.size();
33  for (size_t i=0;i<asize;++i) {
34  sumx += (firstStrip_+i)*(amplitudes_[i]);
35  suma += amplitudes_[i];
36  }
37 
38  // strip centers are offcet by half pitch w.r.t. strip numbers,
39  // so one has to add 0.5 to get the correct barycenter position
40  return sumx / static_cast<float>(suma) + 0.5f;
41 }
int i
Definition: DBlmapReader.cc:9
double f[11][100]
std::vector< uint8_t > amplitudes_
uint16_t firstStrip_
uint16_t SiStripCluster::firstStrip ( ) const
inline
float SiStripCluster::getSplitClusterError ( ) const
inline

Definition at line 55 of file SiStripCluster.h.

References error_x.

Referenced by StripCPEfromTemplate::localParameters().

55 { return error_x; }
void SiStripCluster::setSplitClusterError ( float  errx)
inline

Definition at line 56 of file SiStripCluster.h.

References error_x.

Referenced by TrackClusterSplitter::splitCluster().

56 { error_x = errx; }

Member Data Documentation

std::vector<uint8_t> SiStripCluster::amplitudes_
private

Definition at line 61 of file SiStripCluster.h.

Referenced by amplitudes(), barycenter(), and SiStripCluster().

float SiStripCluster::error_x
private

Definition at line 73 of file SiStripCluster.h.

Referenced by getSplitClusterError(), and setSplitClusterError().

uint16_t SiStripCluster::firstStrip_
private

Definition at line 63 of file SiStripCluster.h.

Referenced by barycenter(), and firstStrip().