Public Member Functions | Private Member Functions | Private Attributes | List of all members
mix::RawDigitAdder_35t Class Reference

#include <RawDigitAdder_35t.h>

Inheritance diagram for mix::RawDigitAdder_35t:
mix::RawDigitAdder

Public Member Functions

 RawDigitAdder_35t (bool t=true)
 
void SetScaleFirstInput (float f1)
 
void SetScaleSecondInput (float f2)
 
void SetStuckBitRetentionMethod (bool s)
 
void SetScaleInputs (float f1, float f2)
 
std::string Name ()
 
- Public Member Functions inherited from mix::RawDigitAdder
 RawDigitAdder (bool t=true)
 Default constructor. More...
 
void AddRawDigits (std::vector< short > const &, std::vector< short > const &, std::vector< short > &)
 
void AddRawDigits (std::vector< short > const &, std::vector< short > &)
 
void AddRawDigits (std::vector< std::vector< short > > const &, std::vector< short > &)
 
void SetPedestalFirstInput (float f1)
 
void SetPedestalSecondInput (float f2)
 
void SetPedestalInputs (float f1, float f2)
 
virtual ~RawDigitAdder ()
 Default destructor. More...
 

Private Member Functions

void SetScaleInput (float f, float &_scale)
 
void AddRawDigit (short const &, short const &, short &)
 

Private Attributes

bool _forceStuckBitRetention
 
float _scale1
 
float _scale2
 

Additional Inherited Members

- Protected Member Functions inherited from mix::RawDigitAdder
void FixOverflow (short &)
 
- Protected Attributes inherited from mix::RawDigitAdder
bool _throw
 

Detailed Description

Definition at line 35 of file RawDigitAdder_35t.h.

Constructor & Destructor Documentation

RawDigitAdder_35t::RawDigitAdder_35t ( bool  t = true)

Definition at line 10 of file RawDigitAdder_35t.cxx.

10  :
13  _scale1(1),
14  _scale2(1)
15 {}
RawDigitAdder(bool t=true)
Default constructor.
Definition: RawDigitAdder.h:38

Member Function Documentation

void RawDigitAdder_35t::AddRawDigit ( short const &  d1,
short const &  d2,
short &  d_out 
)
privatevirtual

Reimplemented from mix::RawDigitAdder.

Definition at line 27 of file RawDigitAdder_35t.cxx.

28 {
29  // d1 ==> MC
30  // d2 ==> Real Data
31  AdcCodeHelper ach;
32  if (ach.hasStickyBits(d2) && _forceStuckBitRetention) d_out = (short)(std::round((float)d2 * _scale2));
33  else d_out = (short)(std::round((float)d1 * _scale1)) + (short)(std::round((float)d2 * _scale2));
34  FixOverflow(d_out);
35 }
bool hasStickyBits(AdcCount sig)
void FixOverflow(short &)
std::string mix::RawDigitAdder_35t::Name ( )
inlinevirtual

Reimplemented from mix::RawDigitAdder.

Definition at line 50 of file RawDigitAdder_35t.h.

50 { return "RawDigitAdder_35t"; }
void mix::RawDigitAdder_35t::SetScaleFirstInput ( float  f1)
inline

Definition at line 42 of file RawDigitAdder_35t.h.

void SetScaleInput(float f, float &_scale)
EmPhysicsFactory f1
void RawDigitAdder_35t::SetScaleInput ( float  f,
float &  _scale 
)
private

Definition at line 17 of file RawDigitAdder_35t.cxx.

18 {
19  if(f<0){
20  if(_throw)
21  throw std::runtime_error("Error in RawDigitAdder_35t::SetScaleInput : scale < 0");
22  return;
23  }
24  _scale = f;
25 }
void mix::RawDigitAdder_35t::SetScaleInputs ( float  f1,
float  f2 
)
inline

Definition at line 47 of file RawDigitAdder_35t.h.

void SetScaleSecondInput(float f2)
SynchrotronAndGN f2
EmPhysicsFactory f1
void SetScaleFirstInput(float f1)
void mix::RawDigitAdder_35t::SetScaleSecondInput ( float  f2)
inline

Definition at line 43 of file RawDigitAdder_35t.h.

SynchrotronAndGN f2
void SetScaleInput(float f, float &_scale)
void mix::RawDigitAdder_35t::SetStuckBitRetentionMethod ( bool  s)
inline

Definition at line 45 of file RawDigitAdder_35t.h.

static QCString * s
Definition: config.cpp:1042

Member Data Documentation

bool mix::RawDigitAdder_35t::_forceStuckBitRetention
private

Definition at line 54 of file RawDigitAdder_35t.h.

float mix::RawDigitAdder_35t::_scale1
private

Definition at line 55 of file RawDigitAdder_35t.h.

float mix::RawDigitAdder_35t::_scale2
private

Definition at line 55 of file RawDigitAdder_35t.h.


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