Belle II Software development
NoiseMap Class Reference

Base Class to represent strip-dependent noise map. More...

#include <NoiseMap.h>

Public Member Functions

 NoiseMap ()
 Constructor

 
virtual ~NoiseMap ()
 Destructor.
 
void setADU (double eInADU)
 Set charge per ADC unit.
 
void setNoiseLevel (float noise)
 Override the noise level.
 
virtual void setSensorID (VxdID sensorID, bool side)
 Set the sensorID currently used.
 
float getSignificance (const Sample &sample) const
 Return the sigma-significance of a signal, that is, signal divided by noise level.
 
virtual float getNoise (short) const
 Return the noise level for a given strip.
 
virtual float getNoise (const Sample &sample) const
 Return the noise value for a given strip.
 
bool operator() (const Sample &sample, float significance) const
 Check whether a signal exceeds a given significance.
 
bool operator() (float signal, float significance) const
 Check whether a signal exceeds a given significance using the average noise level.
 

Protected Attributes

double m_eInADU
 Charge corresponding to 1 ADU.
 
VxdID m_sensorID
 VxdID of the current sensor.
 
bool m_isU
 Side of current sensor.
 
float m_noiseLevel
 Noise level in strips.
 

Detailed Description

Base Class to represent strip-dependent noise map.

Currently there is only sensor and side dependence implemented.

Definition at line 29 of file NoiseMap.h.

Constructor & Destructor Documentation

◆ NoiseMap()

NoiseMap ( )
inline

Constructor

Definition at line 32 of file NoiseMap.h.

32: m_eInADU(1.0), m_sensorID(0), m_isU(false), m_noiseLevel(0) {}
bool m_isU
Side of current sensor.
Definition: NoiseMap.h:95
float m_noiseLevel
Noise level in strips.
Definition: NoiseMap.h:97
VxdID m_sensorID
VxdID of the current sensor.
Definition: NoiseMap.h:93
double m_eInADU
Charge corresponding to 1 ADU.
Definition: NoiseMap.h:91

◆ ~NoiseMap()

virtual ~NoiseMap ( )
inlinevirtual

Destructor.

Definition at line 35 of file NoiseMap.h.

35{}

Member Function Documentation

◆ getNoise() [1/2]

virtual float getNoise ( const Sample &  sample) const
inlinevirtual

Return the noise value for a given strip.

Parameters
sampleSample at whose position we want noise level (Sample not used)
Returns
noise level for the Sample's strip

Definition at line 73 of file NoiseMap.h.

73{ return m_noiseLevel; }

◆ getNoise() [2/2]

virtual float getNoise ( short  ) const
inlinevirtual

Return the noise level for a given strip.

Returns
noise level

Definition at line 67 of file NoiseMap.h.

67{ return m_noiseLevel; }

◆ getSignificance()

float getSignificance ( const Sample &  sample) const
inline

Return the sigma-significance of a signal, that is, signal divided by noise level.

Parameters
sampleSample of a strip.
Returns
The ratio of maximum strip signal and noise level.

Definition at line 63 of file NoiseMap.h.

63{ return sample.getCharge() / getNoise(sample); }
virtual float getNoise(short) const
Return the noise level for a given strip.
Definition: NoiseMap.h:67

◆ operator()() [1/2]

bool operator() ( const Sample &  sample,
float  significance 
) const
inline

Check whether a signal exceeds a given significance.

Parameters
samplestrip to check
significanceminimum significance
Returns
true if the maximum signal of the strip exceeds the given significance.

Definition at line 80 of file NoiseMap.h.

81 { return getSignificance(sample) >= significance; }
float getSignificance(const Sample &sample) const
Return the sigma-significance of a signal, that is, signal divided by noise level.
Definition: NoiseMap.h:63

◆ operator()() [2/2]

bool operator() ( float  signal,
float  significance 
) const
inline

Check whether a signal exceeds a given significance using the average noise level.

Parameters
signalsignal to check
significanceminimum significance

Definition at line 87 of file NoiseMap.h.

87{ return signal / m_noiseLevel >= significance; }

◆ setADU()

void setADU ( double  eInADU)
inline

Set charge per ADC unit.

If signals are in ADC units, the default setting of 1 should be overriden.

Parameters
eInADUcharge in electrons corresponding to 1 ADU.

Definition at line 42 of file NoiseMap.h.

42{ m_eInADU = eInADU; }

◆ setNoiseLevel()

void setNoiseLevel ( float  noise)
inline

Override the noise level.

Definition at line 45 of file NoiseMap.h.

45{ m_noiseLevel = noise; }

◆ setSensorID()

virtual void setSensorID ( VxdID  sensorID,
bool  side 
)
inlinevirtual

Set the sensorID currently used.

Definition at line 48 of file NoiseMap.h.

49 {
50 const SensorInfo& info = dynamic_cast<const SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(sensorID));
51 m_sensorID = sensorID;
52 if (side)
53 m_noiseLevel = info.getElectronicNoiseU() / m_eInADU;
54 else
55 m_noiseLevel = info.getElectronicNoiseV() / m_eInADU;
56 m_isU = side;
57 }
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

Member Data Documentation

◆ m_eInADU

double m_eInADU
protected

Charge corresponding to 1 ADU.

Definition at line 91 of file NoiseMap.h.

◆ m_isU

bool m_isU
protected

Side of current sensor.

Definition at line 95 of file NoiseMap.h.

◆ m_noiseLevel

float m_noiseLevel
protected

Noise level in strips.

Definition at line 97 of file NoiseMap.h.

◆ m_sensorID

VxdID m_sensorID
protected

VxdID of the current sensor.

Definition at line 93 of file NoiseMap.h.


The documentation for this class was generated from the following file: