CMS 3D CMS Logo

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
AboveSeed::vnoise_
const ElectrodNoiseVector & vnoise_
Definition: ClusterProducerFP420.h:61
AboveSeed::operator()
bool operator()(const HDigiFP420 &digi)
Definition: ClusterProducerFP420.h:54
ClusterProducerFP420::clusterizeDetUnit
std::vector< ClusterFP420 > clusterizeDetUnit(HDigiFP420Iter begin, HDigiFP420Iter end, unsigned int detid, const ElectrodNoiseVector &vnoise)
Definition: ClusterProducerFP420.cc:38
AboveSeed::verb
int verb
Definition: ClusterProducerFP420.h:59
AboveSeed
Definition: ClusterProducerFP420.h:50
ClusterProducerFP420::max_voids_
int max_voids_
Definition: ClusterProducerFP420.h:45
ClusterProducerFP420::theClusterThreshold
float theClusterThreshold
Definition: ClusterProducerFP420.h:44
ClusterProducerFP420::difWide
int difWide(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)
Definition: ClusterProducerFP420.cc:165
end
#define end
Definition: vmac.h:39
ClusterProducerFP420::seedThresholdInNoiseSigma
float seedThresholdInNoiseSigma() const
Definition: ClusterProducerFP420.h:38
ClusterProducerFP420::theChannelThreshold
float theChannelThreshold
Definition: ClusterProducerFP420.h:42
ElectrodNoiseVector
std::vector< ClusterNoiseFP420::ElectrodData > ElectrodNoiseVector
Definition: ClusterNoiseFP420.h:45
ClusterProducerFP420::badChannel
bool badChannel(int channel, const std::vector< short > &badChannels) const
Definition: ClusterProducerFP420.cc:12
HDigiFP420
Definition: HDigiFP420.h:4
ClusterProducerFP420::difNarr
int difNarr(unsigned int xytype, HDigiFP420Iter ichannel, HDigiFP420Iter jchannel)
Definition: ClusterProducerFP420.cc:152
ClusterProducerFP420::channelThresholdInNoiseSigma
float channelThresholdInNoiseSigma() const
Definition: ClusterProducerFP420.h:37
ClusterNoiseFP420.h
AboveSeed::seed
float seed
Definition: ClusterProducerFP420.h:60
HDigiFP420::adc
int adc() const
Definition: HDigiFP420.h:18
ClusterProducerFP420::clusterThresholdInNoiseSigma
float clusterThresholdInNoiseSigma() const
Definition: ClusterProducerFP420.h:39
ClusterFP420.h
ClusterProducerFP420::clusterizeDetUnitPixels
std::vector< ClusterFP420 > clusterizeDetUnitPixels(HDigiFP420Iter begin, HDigiFP420Iter end, unsigned int detid, const ElectrodNoiseVector &vnoise, unsigned int xytype, int verb)
Definition: ClusterProducerFP420.cc:179
ClusterProducerFP420::HDigiFP420Iter
std::vector< HDigiFP420 >::const_iterator HDigiFP420Iter
Definition: ClusterProducerFP420.h:15
ClusterProducerFP420::theSeedThreshold
float theSeedThreshold
Definition: ClusterProducerFP420.h:43
HDigiFP420.h
begin
#define begin
Definition: vmac.h:32
AboveSeed::AboveSeed
AboveSeed(float aseed, const ElectrodNoiseVector &vnoise)
Definition: ClusterProducerFP420.h:52
HDigiFP420::channel
int channel() const
Definition: HDigiFP420.h:19
ClusterProducerFP420
Definition: ClusterProducerFP420.h:13
ClusterProducerFP420::ClusterProducerFP420
ClusterProducerFP420(float electrode_thr, float seed_thr, float clust_thr, int max_voids)
Definition: ClusterProducerFP420.h:17