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 (short data)
 
void setData (float noise_, bool disable_)
 

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.

References Data.

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

◆ getNoise()

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

Definition at line 20 of file ClusterNoiseFP420.h.

References funct::abs(), and Data.

20 { return static_cast<ElectrodNoise>(std::abs(Data) / 10.0); }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float ElectrodNoise

◆ setData() [1/2]

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

Definition at line 22 of file ClusterNoiseFP420.h.

References Data, and data.

Referenced by FP420ClusterMain::run().

22 { Data = data; }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ setData() [2/2]

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

Definition at line 23 of file ClusterNoiseFP420.h.

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

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  };
static const char noise_[]

Member Data Documentation

◆ Data

short ClusterNoiseFP420::ElectrodData::Data
private

Definition at line 35 of file ClusterNoiseFP420.h.

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