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
 
uint32_t geographicalId () const
 
float getSplitClusterError () const
 
void setId (uint32_t id)
 
void setSplitClusterError (float errx)
 
 SiStripCluster ()
 
 SiStripCluster (uint32_t detid, const SiStripDigiRange &range)
 
 SiStripCluster (const uint32_t &detid, const uint16_t &firstStrip, std::vector< uint16_t >::const_iterator begin, std::vector< uint16_t >::const_iterator end)
 

Private Attributes

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

Detailed Description

Definition at line 9 of file SiStripCluster.h.

Member Typedef Documentation

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

Definition at line 12 of file SiStripCluster.h.

Definition at line 13 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 19 of file SiStripCluster.h.

19 : detId_(0), error_x( -99999.9 ) {}
SiStripCluster::SiStripCluster ( uint32_t  detid,
const SiStripDigiRange range 
)

check if digis consecutive

Definition at line 4 of file SiStripCluster.cc.

References amplitudes_, i, and j.

4  :
5  //detId_(detid),
6  detId_(0),
7  firstStrip_(range.first->strip()),
8  error_x(-99999.9)
9 {
10 
11  amplitudes_.reserve( range.second - range.first);
12 
13  uint16_t lastStrip=0;
14  bool firstInloop = true;
15  for (SiStripDigiIter i=range.first; i!=range.second; i++) {
16 
18  if (!firstInloop && i->strip() != lastStrip + 1) {
19  for (int j=0; j < i->strip()-(lastStrip+1); j++) {
20  amplitudes_.push_back( 0);
21  }
22  }
23  lastStrip = i->strip();
24  firstInloop = false;
25 
26  amplitudes_.push_back(i->adc());
27  }
28 }
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_
SiStripCluster::SiStripCluster ( const uint32_t &  detid,
const uint16_t &  firstStrip,
std::vector< uint16_t >::const_iterator  begin,
std::vector< uint16_t >::const_iterator  end 
)

Definition at line 30 of file SiStripCluster.cc.

33  :
34 
35  // detId_(detid),
36  detId_(0),
39 
40  // ggiurgiu@fnal.gov, 01/05/12
41  // Initialize the split cluster errors to un-physical values.
42  // The CPE will check these errors and if they are not un-physical,
43  // it will recognize the clusters as split and assign these (increased)
44  // errors to the corresponding rechit.
45  error_x(-99999.9)
46 {}
uint16_t firstStrip() const
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
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 53 of file SiStripCluster.h.

References amplitudes_.

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

53 {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 48 of file SiStripCluster.cc.

References amplitudes_, firstStrip_, and i.

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

48  {
49  int sumx = 0;
50  int suma = 0;
51  size_t asize = amplitudes_.size();
52  for (size_t i=0;i<asize;++i) {
53  sumx += (firstStrip_+i)*(amplitudes_[i]);
54  suma += amplitudes_[i];
55  }
56 
57  // strip centers are offcet by half pitch w.r.t. strip numbers,
58  // so one has to add 0.5 to get the correct barycenter position
59  return sumx / static_cast<float>(suma) + 0.5;
60 }
int i
Definition: DBlmapReader.cc:9
std::vector< uint8_t > amplitudes_
uint16_t firstStrip_
uint16_t SiStripCluster::firstStrip ( ) const
inline
uint32_t SiStripCluster::geographicalId ( ) const
inline

The geographical ID of the corresponding DetUnit, to be used for transformations to local and to global reference frames etc.

Definition at line 36 of file SiStripCluster.h.

References detId_.

Referenced by TrackerHitAssociator::associateSimpleRecHit(), TrackerHitAssociator::associateSiStripRecHit1D(), SiStripGainFromData::ComputeChargeOverPath(), DeDxDiscriminatorLearner::Learn(), FastStripCPE::localParameters(), operator<(), DeDxDiscriminatorProducer::produce(), and ShallowGainCalibration::produce().

36  {
37  if (detId_==0) edm::LogError("Deprecation")<<"this method will give zero offline";
38  return detId_;
39  }
float SiStripCluster::getSplitClusterError ( ) const
inline

Definition at line 60 of file SiStripCluster.h.

References error_x.

Referenced by StripCPEfromTemplate::localParameters().

60 { return error_x; }
void SiStripCluster::setId ( uint32_t  id)
inline

Definition at line 40 of file SiStripCluster.h.

References detId_.

40 { detId_=id; }
void SiStripCluster::setSplitClusterError ( float  errx)
inline

Definition at line 61 of file SiStripCluster.h.

References error_x.

Referenced by TrackClusterSplitter::splitCluster().

61 { error_x = errx; }

Member Data Documentation

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

Definition at line 69 of file SiStripCluster.h.

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

uint32_t SiStripCluster::detId_
private

Definition at line 66 of file SiStripCluster.h.

Referenced by geographicalId(), and setId().

float SiStripCluster::error_x
private

Definition at line 79 of file SiStripCluster.h.

Referenced by getSplitClusterError(), and setSplitClusterError().

uint16_t SiStripCluster::firstStrip_
private

Definition at line 67 of file SiStripCluster.h.

Referenced by barycenter(), and firstStrip().