Belle II Software  release-05-02-19
NoiseMap.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef PXD_NOISEMAP_H
12 #define PXD_NOISEMAP_H
13 
14 #include <pxd/reconstruction/Pixel.h>
15 
16 namespace Belle2 {
22  namespace PXD {
23 
28  class NoiseMap {
29  public:
31  NoiseMap(): m_noiseLevel(0) {}
33  virtual ~NoiseMap() {}
34 
36  void setNoiseLevel(float noise) { m_noiseLevel = noise; }
37 
41  virtual void setSensorID(VxdID) {}
42 
44  float getSignificance(const Pixel& px) const { return px.getCharge() / getNoise(px); }
45 
47  virtual float getNoise(const Pixel&) const { return m_noiseLevel; }
48 
53  bool operator()(const Pixel& px, float significance) const { return getSignificance(px) >= significance; }
54 
59  bool operator()(float signal, float significance) const { return signal / m_noiseLevel >= significance; }
60 
61  protected:
63  float m_noiseLevel;
64  };
65 
66  }
67 
69 }
70 
71 #endif //PXD_NOISEMAP_H
Belle2::PXD::NoiseMap::m_noiseLevel
float m_noiseLevel
Noise level.
Definition: NoiseMap.h:71
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXD::NoiseMap::getNoise
virtual float getNoise(const Pixel &) const
Return the noise value for a given pixel.
Definition: NoiseMap.h:55
Belle2::PXD::Pixel::getCharge
float getCharge() const
Return the Charge of the Pixel.
Definition: Pixel.h:81
Belle2::PXD::NoiseMap::setSensorID
virtual void setSensorID(VxdID)
Set the sensorID currently used.
Definition: NoiseMap.h:49
Belle2::PXD::Pixel
Class to represent one pixel, used in clustering for fast access.
Definition: Pixel.h:47
Belle2::PXD::NoiseMap::getSignificance
float getSignificance(const Pixel &px) const
Return the significance of a signal, that is signal divided by noise level.
Definition: NoiseMap.h:52
Belle2::PXD::NoiseMap::setNoiseLevel
void setNoiseLevel(float noise)
Set the noise level.
Definition: NoiseMap.h:44
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXD::NoiseMap::~NoiseMap
virtual ~NoiseMap()
Destructor.
Definition: NoiseMap.h:41
Belle2::PXD::NoiseMap::operator()
bool operator()(const Pixel &px, float significance) const
Check wether a signal exceeds a given significance.
Definition: NoiseMap.h:61
Belle2::PXD::NoiseMap::NoiseMap
NoiseMap()
Constructor
Definition: NoiseMap.h:39