CMS 3D CMS Logo

SiStripDummyAlgo Class Reference

Author:
M.Wingham, D.Giordano, R.Bainbridge
More...

#include <CommonTools/SiStripClusterization/interface/SiStripDummyAlgo.h>

Inheritance diagram for SiStripDummyAlgo:

SiStripClusterizerAlgo

List of all members.

Public Member Functions

virtual void clusterize (const edm::DetSet< SiStripDigi > &, edm::DetSetVector< SiStripCluster > &)
 SiStripDummyAlgo (const edm::ParameterSet &)
virtual ~SiStripDummyAlgo ()

Private Member Functions

virtual void add (edm::DetSet< SiStripCluster > &, const uint16_t &strip, const uint16_t &adc)
 Building of clusters on strip-by-strip basis.


Detailed Description

Author:
M.Wingham, D.Giordano, R.Bainbridge

Dummy clusterizer algorithm for testing only

Definition at line 11 of file SiStripDummyAlgo.h.


Constructor & Destructor Documentation

SiStripDummyAlgo::SiStripDummyAlgo ( const edm::ParameterSet pset  ) 

Definition at line 8 of file SiStripDummyAlgo.cc.

References LogTrace.

00009   : SiStripClusterizerAlgo(pset) {
00010   LogTrace("UNDEFINED_CATEGORY")
00011     << "[SiStripDummyAlgo::" << __func__ << "]";
00012 }

SiStripDummyAlgo::~SiStripDummyAlgo (  )  [virtual]

Definition at line 16 of file SiStripDummyAlgo.cc.

References LogTrace.

00016                                     {
00017   LogTrace("UNDEFINED_CATEGORY")
00018     << "[SiStripDummyAlgo::" << __func__ << "]";
00019 }


Member Function Documentation

void SiStripDummyAlgo::add ( edm::DetSet< SiStripCluster > &  clusters,
const uint16_t &  strip,
const uint16_t &  adc 
) [private, virtual]

Building of clusters on strip-by-strip basis.

Definition at line 57 of file SiStripDummyAlgo.cc.

References LogTrace.

00059                                                   {
00060   LogTrace("UNDEFINED_CATEGORY")
00061     << "[SiStripDummyAlgo::" << __func__ << "]";
00062 }

void SiStripDummyAlgo::clusterize ( const edm::DetSet< SiStripDigi > &  digis,
edm::DetSetVector< SiStripCluster > &  clusters 
) [virtual]

Implements SiStripClusterizerAlgo.

Definition at line 23 of file SiStripDummyAlgo.cc.

References edm::DetSet< T >::data, end, edm::DetSet< T >::id, edm::DetSetVector< T >::insert(), edm::DetSet< T >::push_back(), range, and strip().

00024                                                                                {
00025 
00026   // Some initialization
00027   edm::DetSet<SiStripCluster> clus( digis.id );
00028   SiStripCluster::SiStripDigiRange end( digis.data.end(), digis.data.end() );
00029   SiStripCluster::SiStripDigiRange range = end;
00030 
00031   // Iterates through digis and builds clusters from non-zero digis
00032   edm::DetSet<SiStripDigi>::const_iterator idigi = digis.data.begin();
00033   for ( ; idigi != digis.data.end(); idigi++ ) {
00034     if ( idigi == digis.data.begin() ) { // first digi
00035       range.first = idigi; 
00036       range.second = idigi+1; 
00037     } else if ( idigi+1 == digis.data.end() ) { // last digi
00038       range.second++;
00039       clus.push_back( SiStripCluster(digis.id,range) ); 
00040     } else { // all other digis
00041       if ( idigi->strip() - (idigi-1)->strip() == 1 ) { range.second++; } 
00042       else { 
00043         clus.push_back( SiStripCluster(digis.id,range) ); 
00044         range.first = idigi; 
00045         range.second = idigi+1; 
00046       }
00047     }
00048   }
00049 
00050   // Copy DetSet into DetSetVector if clusters found
00051   if ( !clus.data.empty() ) { clusters.insert(clus); }
00052   
00053 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:19 2009 for CMSSW by  doxygen 1.5.4