CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OldThreeThresholdAlgorithm.h
Go to the documentation of this file.
1 #ifndef RECOLOCALTRACKER_SISTRIPCLUSTERIZER_THREETHRESHOLDSTRIPCLUSTERIZER_H
2 #define RECOLOCALTRACKER_SISTRIPCLUSTERIZER_THREETHRESHOLDSTRIPCLUSTERIZER_H
3 
4 //Data Formats
10 
19 
20 #include <vector>
21 #include <algorithm>
22 #include <cmath>
23 #include <string>
24 
27 
29 
31 
32  public:
33 
34  // void setSiStripNoiseService( SiStripNoiseService* in ){ SiStripNoiseService_=in;}
37 
38  void initialize(const edm::EventSetup&);
39 
40  bool stripByStripBegin(uint32_t id) override {return false;}
41 
45 
46  private:
47 
48  OldThreeThresholdAlgorithm(float strip_thr, float seed_thr,float clust_thr, int max_holes,std::string qualityLabel,bool setDetId) :
49  theChannelThreshold(strip_thr),
50  theSeedThreshold(seed_thr),
51  theClusterThreshold(clust_thr),
52  max_holes_(max_holes),
53  qualityLabel_(qualityLabel){
55 
56  // SiStripNoiseService* SiStripNoiseService_;
57  template<typename InputDetSet>
59 
65 
69 
70  std::vector<SiStripDigi> cluster_digis_; // so it's not recreated for each det for each event!
71 };
72 
73 class AboveSeed {
74  public:
75 
76 
77  // AboveSeed(float aseed,SiStripNoiseService* noise,const uint32_t& detID) : seed(aseed), noise_(noise),detID_(detID) {};
78 
79  AboveSeed(float aseed, const edm::ESHandle<SiStripNoises> & noiseHandle, const SiStripNoises::Range & noiseRange, const edm::ESHandle<SiStripQuality> & qualityHandle, const SiStripQuality::Range & qualityRange)
80  : seed(aseed), noise_(noiseHandle), noiseRange_(noiseRange),quality_(qualityHandle), qualityRange_(qualityRange)
81  {};
82  //,detID_(detID) {};
83 
84  inline bool operator()(const SiStripDigi& digi) {
85  return (
86  !quality_->IsStripBad(qualityRange_,digi.strip())
87  &&
88  digi.adc() >= seed * noise_->getNoise(digi.strip(), noiseRange_)
89  );
90  }
91  private:
92  float seed;
97 };
98 
99 #endif
void initialize(const edm::EventSetup &)
void clusterizeDetUnit_(const InputDetSet &digis, edmNew::DetSetVector< SiStripCluster >::FastFiller &output)
edm::ESHandle< SiStripGain > gainHandle_
OldThreeThresholdAlgorithm(float strip_thr, float seed_thr, float clust_thr, int max_holes, std::string qualityLabel, bool setDetId)
std::vector< SiStripDigi > cluster_digis_
edm::ESHandle< SiStripNoises > noiseHandle_
const SiStripQuality::Range & qualityRange_
bool operator()(const SiStripDigi &digi)
const uint16_t & strip() const
Definition: SiStripDigi.h:40
const edm::ESHandle< SiStripNoises > & noise_
bool stripByStripBegin(uint32_t id) override
AboveSeed(float aseed, const edm::ESHandle< SiStripNoises > &noiseHandle, const SiStripNoises::Range &noiseRange, const edm::ESHandle< SiStripQuality > &qualityHandle, const SiStripQuality::Range &qualityRange)
A Digi for the silicon strip detector, containing both strip and adc information, and suitable for st...
Definition: SiStripDigi.h:12
edm::ESHandle< SiStripQuality > qualityHandle_
const edm::ESHandle< SiStripQuality > & quality_
void clusterizeDetUnit(const edm::DetSet< SiStripDigi > &digis, edmNew::DetSetVector< SiStripCluster >::FastFiller &output)
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:48
const uint16_t & adc() const
Definition: SiStripDigi.h:41
const SiStripNoises::Range & noiseRange_