CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ClusterProducerFP420.h
Go to the documentation of this file.
1 #ifndef ClusterProducerFP420_h
2 #define ClusterProducerFP420_h
3 
5 
8 
9 #include <vector>
10 #include <algorithm>
11 #include <cmath>
12 
14 public:
15  typedef std::vector<HDigiFP420>::const_iterator HDigiFP420Iter;
16 
17  ClusterProducerFP420(float electrode_thr, float seed_thr, float clust_thr, int max_voids)
18  : theChannelThreshold(electrode_thr),
19  theSeedThreshold(seed_thr),
20  theClusterThreshold(clust_thr),
21  max_voids_(max_voids){};
22 
23  std::vector<ClusterFP420> clusterizeDetUnit(HDigiFP420Iter begin,
25  unsigned int detid,
26  const ElectrodNoiseVector& vnoise);
27  std::vector<ClusterFP420> clusterizeDetUnitPixels(HDigiFP420Iter begin,
29  unsigned int detid,
30  const ElectrodNoiseVector& vnoise,
31  unsigned int xytype,
32  int verb);
33 
34  int difNarr(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel);
35  int difWide(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel);
36 
38  float seedThresholdInNoiseSigma() const { return theSeedThreshold; }
40 
41 private:
46 
47  bool badChannel(int channel, const std::vector<short>& badChannels) const;
48 };
49 
50 class AboveSeed {
51 public:
52  AboveSeed(float aseed, const ElectrodNoiseVector& vnoise) : verb(0), seed(aseed), vnoise_(vnoise){};
53 
54  bool operator()(const HDigiFP420& digi) {
55  return (!vnoise_[digi.channel()].getDisable() && digi.adc() >= seed * vnoise_[digi.channel()].getNoise());
56  }
57 
58 private:
59  int verb;
60  float seed;
62 };
63 
64 #endif
float channelThresholdInNoiseSigma() const
int channel() const
Definition: HDigiFP420.h:19
ClusterProducerFP420(float electrode_thr, float seed_thr, float clust_thr, int max_voids)
std::vector< ClusterNoiseFP420::ElectrodData > ElectrodNoiseVector
AboveSeed(float aseed, const ElectrodNoiseVector &vnoise)
int adc() const
Definition: HDigiFP420.h:18
bool operator()(const HDigiFP420 &digi)
std::vector< HDigiFP420 >::const_iterator HDigiFP420Iter
std::vector< ClusterFP420 > clusterizeDetUnit(HDigiFP420Iter begin, HDigiFP420Iter end, unsigned int detid, const ElectrodNoiseVector &vnoise)
bool badChannel(int channel, const std::vector< short > &badChannels) const
int difNarr(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)
float clusterThresholdInNoiseSigma() const
const ElectrodNoiseVector & vnoise_
string end
Definition: dataset.py:937
std::vector< ClusterFP420 > clusterizeDetUnitPixels(HDigiFP420Iter begin, HDigiFP420Iter end, unsigned int detid, const ElectrodNoiseVector &vnoise, unsigned int xytype, int verb)
float seedThresholdInNoiseSigma() const
int difWide(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)