CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

StripClusterizerAlgorithm Class Reference

#include <StripClusterizerAlgorithm.h>

Inheritance diagram for StripClusterizerAlgorithm:
OldThreeThresholdAlgorithm ThreeThresholdAlgorithm

List of all members.

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 ( ) [inline, virtual]

Definition at line 18 of file StripClusterizerAlgorithm.h.

{}
StripClusterizerAlgorithm::StripClusterizerAlgorithm ( ) [inline, protected]

Definition at line 37 of file StripClusterizerAlgorithm.h.


Member Function Documentation

bool StripClusterizerAlgorithm::allBadBetween ( uint16_t  L,
const uint16_t &  R 
) const [inline, protected]

Definition at line 45 of file StripClusterizerAlgorithm.h.

References bad(), and dttmaxenums::R.

Referenced by ThreeThresholdAlgorithm::candidateEnded().

{ while( ++L < R  &&  bad(L) ); return L == R; }
bool StripClusterizerAlgorithm::bad ( const uint16_t &  strip) const [inline, protected]
void StripClusterizerAlgorithm::clusterize ( const edmNew::DetSetVector< SiStripDigi > &  input,
output_t output 
)

Definition at line 41 of file StripClusterizerAlgorithm.cc.

References clusterize_().

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

Definition at line 40 of file StripClusterizerAlgorithm.cc.

References clusterize_().

{clusterize_(input, output);}
template<class T >
void StripClusterizerAlgorithm::clusterize_ ( const T input,
output_t output 
) [inline, private]

Definition at line 51 of file StripClusterizerAlgorithm.h.

References clusterizeDetUnit(), and createTree::ff.

Referenced by clusterize().

                                                                       {
    for(typename T::const_iterator it = input.begin(); it!=input.end(); it++) {
      output_t::FastFiller ff(output, it->detId());     
      clusterizeDetUnit(*it, ff);       
      if(ff.empty()) ff.abort();        
    }   
  }
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 ( ) [inline, protected]

Definition at line 39 of file StripClusterizerAlgorithm.h.

References detId.

Referenced by ThreeThresholdAlgorithm::endCandidate().

{return detId;}
float StripClusterizerAlgorithm::gain ( const uint16_t &  strip) const [inline, protected]

Definition at line 42 of file StripClusterizerAlgorithm.h.

References gainHandle, and gainRange.

Referenced by ThreeThresholdAlgorithm::applyGains().

{ return gainHandle->getStripGain( strip, gainRange ); }
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.

                                    {
  uint32_t n_cache_id = es.get<SiStripNoisesRcd>().cacheIdentifier();
  uint32_t g_cache_id = es.get<SiStripGainRcd>().cacheIdentifier();
  uint32_t q_cache_id = es.get<SiStripQualityRcd>().cacheIdentifier();

  if(n_cache_id != noise_cache_id) {
    es.get<SiStripNoisesRcd>().get( noiseHandle );
    noise_cache_id = n_cache_id;
  }
  if(g_cache_id != gain_cache_id) {
    es.get<SiStripGainRcd>().get( gainHandle );
    gain_cache_id = g_cache_id;
  }
  if(q_cache_id != quality_cache_id) {
    es.get<SiStripQualityRcd>().get( qualityLabel, qualityHandle );
    quality_cache_id = q_cache_id;
  }
}
bool StripClusterizerAlgorithm::isModuleUsable ( const uint32_t &  id) const [inline, protected]

Definition at line 44 of file StripClusterizerAlgorithm.h.

References qualityHandle.

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

{ return qualityHandle->IsModuleUsable( id ); }
float StripClusterizerAlgorithm::noise ( const uint16_t &  strip) const [inline, protected]

Definition at line 41 of file StripClusterizerAlgorithm.h.

References noiseHandle, and noiseRange.

Referenced by ThreeThresholdAlgorithm::addToCandidate().

{ return noiseHandle->getNoise( strip, noiseRange ); }
void StripClusterizerAlgorithm::setDetId ( const uint32_t  id) [protected, virtual]
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

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by currentId(), and setDetId().

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

Definition at line 63 of file StripClusterizerAlgorithm.h.

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

Definition at line 60 of file StripClusterizerAlgorithm.h.

Referenced by gain(), and setDetId().

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

Definition at line 64 of file StripClusterizerAlgorithm.h.

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

Definition at line 61 of file StripClusterizerAlgorithm.h.

Referenced by noise(), and setDetId().

Definition at line 66 of file StripClusterizerAlgorithm.h.

Referenced by initialize().

Definition at line 65 of file StripClusterizerAlgorithm.h.

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

std::string StripClusterizerAlgorithm::qualityLabel [protected]

Definition at line 62 of file StripClusterizerAlgorithm.h.

Referenced by bad(), and setDetId().