CMS 3D CMS Logo

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

#include <StripClusterizerAlgorithm.h>

Inheritance diagram for StripClusterizerAlgorithm:
OldThreeThresholdAlgorithm ThreeThresholdAlgorithm

Classes

struct  InvalidChargeException
 

Public Types

typedef edmNew::DetSetVector
< SiStripCluster
output_t
 

Public Member Functions

void clusterize (const edm::DetSetVector< SiStripDigi > &, output_t &)
 
void clusterize (const edmNew::DetSetVector< SiStripDigi > &, output_t &)
 
virtual void clusterizeDetUnit (const edm::DetSet< SiStripDigi > &, output_t::FastFiller &)=0
 
virtual void clusterizeDetUnit (const edmNew::DetSet< SiStripDigi > &, output_t::FastFiller &)=0
 
virtual void initialize (const edm::EventSetup &)
 
virtual void stripByStripAdd (uint16_t strip, uint16_t adc, std::vector< SiStripCluster > &out)=0
 
virtual bool stripByStripBegin (uint32_t id)=0
 
virtual void stripByStripEnd (std::vector< SiStripCluster > &out)=0
 
virtual ~StripClusterizerAlgorithm ()
 

Protected Member Functions

bool allBadBetween (uint16_t L, const uint16_t &R) const
 
bool bad (const uint16_t &strip) const
 
uint32_t currentId ()
 
float gain (const uint16_t &strip) const
 
bool isModuleUsable (const uint32_t &id) const
 
float noise (const uint16_t &strip) const
 
virtual void setDetId (const uint32_t)
 
 StripClusterizerAlgorithm ()
 

Protected Attributes

bool _setDetId
 
std::string qualityLabel
 

Private Member Functions

template<class T >
void clusterize_ (const T &input, output_t &output)
 

Private Attributes

uint32_t detId
 
uint32_t gain_cache_id
 
edm::ESHandle< SiStripGaingainHandle
 
SiStripApvGain::Range gainRange
 
uint32_t noise_cache_id
 
edm::ESHandle< SiStripNoisesnoiseHandle
 
SiStripNoises::Range noiseRange
 
uint32_t quality_cache_id
 
edm::ESHandle< SiStripQualityqualityHandle
 
SiStripQuality::Range qualityRange
 

Detailed Description

Definition at line 14 of file StripClusterizerAlgorithm.h.

Member Typedef Documentation

Definition at line 22 of file StripClusterizerAlgorithm.h.

Constructor & Destructor Documentation

virtual StripClusterizerAlgorithm::~StripClusterizerAlgorithm ( )
inlinevirtual

Definition at line 18 of file StripClusterizerAlgorithm.h.

18 {}
StripClusterizerAlgorithm::StripClusterizerAlgorithm ( )
inlineprotected

Member Function Documentation

bool StripClusterizerAlgorithm::allBadBetween ( uint16_t  L,
const uint16_t &  R 
) const
inlineprotected

Definition at line 45 of file StripClusterizerAlgorithm.h.

References bad(), and dttmaxenums::R.

Referenced by ThreeThresholdAlgorithm::candidateEnded().

45 { while( ++L < R && bad(L) ); return L == R; }
bool bad(const uint16_t &strip) const
bool StripClusterizerAlgorithm::bad ( const uint16_t &  strip) const
inlineprotected

Definition at line 43 of file StripClusterizerAlgorithm.h.

References qualityHandle, and qualityRange.

Referenced by ThreeThresholdAlgorithm::addToCandidate(), allBadBetween(), and ThreeThresholdAlgorithm::appendBadNeighbors().

43 { return qualityHandle->IsStripBad( qualityRange, strip ); }
edm::ESHandle< SiStripQuality > qualityHandle
SiStripQuality::Range qualityRange
void StripClusterizerAlgorithm::clusterize ( const edm::DetSetVector< SiStripDigi > &  input,
output_t output 
)

Definition at line 40 of file StripClusterizerAlgorithm.cc.

References clusterize_().

40 {clusterize_(input, output);}
void clusterize_(const T &input, output_t &output)
void StripClusterizerAlgorithm::clusterize ( const edmNew::DetSetVector< SiStripDigi > &  input,
output_t output 
)

Definition at line 41 of file StripClusterizerAlgorithm.cc.

References clusterize_().

41 {clusterize_(input, output);}
void clusterize_(const T &input, output_t &output)
template<class T >
void StripClusterizerAlgorithm::clusterize_ ( const T input,
output_t output 
)
inlineprivate

Definition at line 51 of file StripClusterizerAlgorithm.h.

References clusterizeDetUnit(), and alignCSCRings::ff.

Referenced by clusterize().

51  {
52  for(typename T::const_iterator it = input.begin(); it!=input.end(); it++) {
53  output_t::FastFiller ff(output, it->detId());
54  clusterizeDetUnit(*it, ff);
55  if(ff.empty()) ff.abort();
56  }
57  }
virtual void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::FastFiller &)=0
virtual void StripClusterizerAlgorithm::clusterizeDetUnit ( const edm::DetSet< SiStripDigi > &  ,
output_t::FastFiller  
)
pure virtual

Implemented in ThreeThresholdAlgorithm.

Referenced by clusterize_().

virtual void StripClusterizerAlgorithm::clusterizeDetUnit ( const edmNew::DetSet< SiStripDigi > &  ,
output_t::FastFiller  
)
pure virtual

Implemented in ThreeThresholdAlgorithm.

uint32_t StripClusterizerAlgorithm::currentId ( )
inlineprotected

Definition at line 39 of file StripClusterizerAlgorithm.h.

References detId.

Referenced by ThreeThresholdAlgorithm::endCandidate().

float StripClusterizerAlgorithm::gain ( const uint16_t &  strip) const
inlineprotected

Definition at line 42 of file StripClusterizerAlgorithm.h.

References gainHandle, and gainRange.

Referenced by ThreeThresholdAlgorithm::applyGains().

42 { return gainHandle->getStripGain( strip, gainRange ); }
edm::ESHandle< SiStripGain > gainHandle
void StripClusterizerAlgorithm::initialize ( const edm::EventSetup es)
virtual

Reimplemented in OldThreeThresholdAlgorithm.

Definition at line 12 of file StripClusterizerAlgorithm.cc.

References gain_cache_id, gainHandle, edm::EventSetup::get(), noise_cache_id, noiseHandle, quality_cache_id, qualityHandle, and qualityLabel.

12  {
13  uint32_t n_cache_id = es.get<SiStripNoisesRcd>().cacheIdentifier();
14  uint32_t g_cache_id = es.get<SiStripGainRcd>().cacheIdentifier();
15  uint32_t q_cache_id = es.get<SiStripQualityRcd>().cacheIdentifier();
16 
17  if(n_cache_id != noise_cache_id) {
18  es.get<SiStripNoisesRcd>().get( noiseHandle );
19  noise_cache_id = n_cache_id;
20  }
21  if(g_cache_id != gain_cache_id) {
22  es.get<SiStripGainRcd>().get( gainHandle );
23  gain_cache_id = g_cache_id;
24  }
25  if(q_cache_id != quality_cache_id) {
27  quality_cache_id = q_cache_id;
28  }
29 }
edm::ESHandle< SiStripQuality > qualityHandle
edm::ESHandle< SiStripGain > gainHandle
edm::ESHandle< SiStripNoises > noiseHandle
const T & get() const
Definition: EventSetup.h:55
bool StripClusterizerAlgorithm::isModuleUsable ( const uint32_t &  id) const
inlineprotected

Definition at line 44 of file StripClusterizerAlgorithm.h.

References qualityHandle.

Referenced by ThreeThresholdAlgorithm::clusterizeDetUnit_(), and ThreeThresholdAlgorithm::stripByStripBegin().

44 { return qualityHandle->IsModuleUsable( id ); }
edm::ESHandle< SiStripQuality > qualityHandle
float StripClusterizerAlgorithm::noise ( const uint16_t &  strip) const
inlineprotected

Definition at line 41 of file StripClusterizerAlgorithm.h.

References noiseHandle, and noiseRange.

Referenced by ThreeThresholdAlgorithm::addToCandidate().

41 { return noiseHandle->getNoise( strip, noiseRange ); }
edm::ESHandle< SiStripNoises > noiseHandle
void StripClusterizerAlgorithm::setDetId ( const uint32_t  id)
protectedvirtual
virtual void StripClusterizerAlgorithm::stripByStripAdd ( uint16_t  strip,
uint16_t  adc,
std::vector< SiStripCluster > &  out 
)
pure virtual
virtual bool StripClusterizerAlgorithm::stripByStripBegin ( uint32_t  id)
pure virtual
virtual void StripClusterizerAlgorithm::stripByStripEnd ( std::vector< SiStripCluster > &  out)
pure virtual

Member Data Documentation

bool StripClusterizerAlgorithm::_setDetId
protected
uint32_t StripClusterizerAlgorithm::detId
private

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by currentId(), and setDetId().

uint32_t StripClusterizerAlgorithm::gain_cache_id
private

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

edm::ESHandle<SiStripGain> StripClusterizerAlgorithm::gainHandle
private

Definition at line 63 of file StripClusterizerAlgorithm.h.

Referenced by gain(), initialize(), and setDetId().

SiStripApvGain::Range StripClusterizerAlgorithm::gainRange
private

Definition at line 60 of file StripClusterizerAlgorithm.h.

Referenced by gain(), and setDetId().

uint32_t StripClusterizerAlgorithm::noise_cache_id
private

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

edm::ESHandle<SiStripNoises> StripClusterizerAlgorithm::noiseHandle
private

Definition at line 64 of file StripClusterizerAlgorithm.h.

Referenced by initialize(), noise(), and setDetId().

SiStripNoises::Range StripClusterizerAlgorithm::noiseRange
private

Definition at line 61 of file StripClusterizerAlgorithm.h.

Referenced by noise(), and setDetId().

uint32_t StripClusterizerAlgorithm::quality_cache_id
private

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

edm::ESHandle<SiStripQuality> StripClusterizerAlgorithm::qualityHandle
private

Definition at line 65 of file StripClusterizerAlgorithm.h.

Referenced by bad(), initialize(), isModuleUsable(), and setDetId().

std::string StripClusterizerAlgorithm::qualityLabel
protected
SiStripQuality::Range StripClusterizerAlgorithm::qualityRange
private

Definition at line 62 of file StripClusterizerAlgorithm.h.

Referenced by bad(), and setDetId().