CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StripClusterizerAlgorithm.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_StripClusterizerAlgorithm_h
2 #define RecoLocalTracker_StripClusterizerAlgorithm_h
3 
4 namespace edm{class EventSetup;}
5 class SiStripDigi;
13 
15 
16  public:
17 
19  virtual void initialize(const edm::EventSetup&);
20 
21  //Offline DetSet interface
27 
28  //HLT stripByStrip interface
29  virtual bool stripByStripBegin(uint32_t id) = 0;
30  virtual void stripByStripAdd(uint16_t strip, uint16_t adc, std::vector<SiStripCluster>& out) = 0;
31  virtual void stripByStripEnd(std::vector<SiStripCluster>& out) = 0;
32 
34 
35  protected:
36 
38 
39  uint32_t currentId() {return detId;}
40  virtual void setDetId(const uint32_t);
41  float noise(const uint16_t& strip) const { return noiseHandle->getNoise( strip, noiseRange ); }
42  float gain(const uint16_t& strip) const { return gainHandle->getStripGain( strip, gainRange ); }
43  bool bad(const uint16_t& strip) const { return qualityHandle->IsStripBad( qualityRange, strip ); }
44  bool isModuleUsable(const uint32_t& id) const { return qualityHandle->IsModuleUsable( id ); }
45  bool allBadBetween(uint16_t L, const uint16_t& R) const { while( ++L < R && bad(L) ); return L == R; }
47  bool _setDetId;
48 
49  private:
50 
51  template<class T> void clusterize_(const T& input, output_t& output) {
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  }
58 
59 
67 
68 
69 };
70 #endif
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::ESHandle< SiStripQuality > qualityHandle
void clusterize_(const T &input, output_t &output)
bool bad(const uint16_t &strip) const
edm::ESHandle< SiStripGain > gainHandle
SiStripQuality::Range qualityRange
float noise(const uint16_t &strip) const
virtual void stripByStripEnd(std::vector< SiStripCluster > &out)=0
edm::ESHandle< SiStripNoises > noiseHandle
virtual bool stripByStripBegin(uint32_t id)=0
std::pair< ContainerIterator, ContainerIterator > Range
edmNew::DetSetVector< SiStripCluster > output_t
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
tuple out
Definition: dbtoconf.py:99
virtual void setDetId(const uint32_t)
bool isModuleUsable(const uint32_t &id) const
virtual void initialize(const edm::EventSetup &)
bool allBadBetween(uint16_t L, const uint16_t &R) const
void clusterize(const edm::DetSetVector< SiStripDigi > &, output_t &)
virtual void stripByStripAdd(uint16_t strip, uint16_t adc, std::vector< SiStripCluster > &out)=0
std::pair< ContainerIterator, ContainerIterator > Range
float gain(const uint16_t &strip) const
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
long double T
virtual void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &, output_t::FastFiller &)=0