CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ClusterNoiseFP420::ElectrodData Class Reference

#include <ClusterNoiseFP420.h>

Public Member Functions

ElectrodDisable getDisable () const
 
ElectrodNoise getNoise () const
 
void setData (float noise_, bool disable_)
 
void setData (short data)
 

Private Attributes

short Data
 

Detailed Description

Definition at line 18 of file ClusterNoiseFP420.h.

Member Function Documentation

◆ getDisable()

ElectrodDisable ClusterNoiseFP420::ElectrodData::getDisable ( ) const
inline

Definition at line 21 of file ClusterNoiseFP420.h.

21 { return ((Data > 0) ? false : true); } // if Data <=0 then electrode is disable

References Data.

◆ getNoise()

ElectrodNoise ClusterNoiseFP420::ElectrodData::getNoise ( ) const
inline

Definition at line 20 of file ClusterNoiseFP420.h.

20 { return static_cast<ElectrodNoise>(std::abs(Data) / 10.0); }

References funct::abs(), and Data.

◆ setData() [1/2]

void ClusterNoiseFP420::ElectrodData::setData ( float  noise_,
bool  disable_ 
)
inline

Definition at line 23 of file ClusterNoiseFP420.h.

23  {
24  short noise = static_cast<short>(noise_ * 10.0 + 0.5) & 0x01FF;
25  Data =
26  (disable_ ? -1 : 1) * noise; // Data = sign(+/-1) * Noise(Adc count). if Data <=0 then electrode is disable
27 
28 #ifdef mynsdebug0
29  std::cout << std::fixed << "ClusterNoiseFP420.h:: ElectrodData: noise= " << noise_ << " \t"
30  << ": disable= " << disable_ << " \t"
31  << "sign Data(=noise*10.0 + 0.5)= " << Data << " \t"
32  << "in getNoise we do: abs(Data)/10.0, so it is OK"
33  << " \t" << std::endl;
34 #endif
35  };

References gather_cfg::cout, Data, alignBH_cfg::fixed, hgcalDigitizer_cfi::noise, and sistrip::extrainfo::noise_.

◆ setData() [2/2]

void ClusterNoiseFP420::ElectrodData::setData ( short  data)
inline

Definition at line 22 of file ClusterNoiseFP420.h.

22 { Data = data; }

References Data, and data.

Referenced by FP420ClusterMain::run().

Member Data Documentation

◆ Data

short ClusterNoiseFP420::ElectrodData::Data
private

Definition at line 35 of file ClusterNoiseFP420.h.

Referenced by getDisable(), getNoise(), and setData().

alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
sistrip::extrainfo::noise_
static const char noise_[]
Definition: ConstantsForDqm.h:47
gather_cfg.cout
cout
Definition: gather_cfg.py:144
ClusterNoiseFP420::ElectrodData::Data
short Data
Definition: ClusterNoiseFP420.h:35
hgcalDigitizer_cfi.noise
noise
Definition: hgcalDigitizer_cfi.py:155
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22