CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
13 
15 public:
16 
17  typedef std::vector<HDigiFP420>::const_iterator HDigiFP420Iter;
18 
19  ClusterProducerFP420(float electrode_thr, float seed_thr,float clust_thr, int max_voids) :
20  theChannelThreshold(electrode_thr),
21  theSeedThreshold(seed_thr),
22  theClusterThreshold(clust_thr),
23  max_voids_(max_voids){};
24 
25 
26  std::vector<ClusterFP420> clusterizeDetUnit(HDigiFP420Iter begin, HDigiFP420Iter end,
27  unsigned int detid, const ElectrodNoiseVector& vnoise);
29  unsigned int detid, const ElectrodNoiseVector& vnoise, unsigned int xytype, int verb);
30 
31  int difNarr(unsigned int xytype, HDigiFP420Iter ichannel,
32  HDigiFP420Iter jchannel);
33  int difWide(unsigned int xytype, HDigiFP420Iter ichannel,
34  HDigiFP420Iter jchannel);
35 
39 
40 private:
41 
46 
47  bool badChannel( int channel, const std::vector<short>& badChannels) const;
48 
49 };
50 
51 class AboveSeed {
52  public:
53  AboveSeed(float aseed,const ElectrodNoiseVector& vnoise) : verb(0), seed(aseed), vnoise_(vnoise) {};
54 
55  bool operator()(const HDigiFP420& digi) { return ( !vnoise_[digi.channel()].getDisable() &&
56  digi.adc() >= seed * vnoise_[digi.channel()].getNoise()) ;}
57 private:
58  int verb;
59  float seed;
61 };
62 
63 #endif
float channelThresholdInNoiseSigma() const
int channel() const
Definition: HDigiFP420.h:22
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:21
bool operator()(const HDigiFP420 &digi)
std::vector< HDigiFP420 >::const_iterator HDigiFP420Iter
#define end
Definition: vmac.h:38
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_
#define begin
Definition: vmac.h:31
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)