ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
InputModifier Struct Referenceabstract

#include <egammaLayerRecalibTool.h>

Inheritance diagram for InputModifier:
Collaboration diagram for InputModifier:

Public Types

enum  NullPoint {
  ZEROBASED, ONEBASED, ZEROBASED_ALPHA, ONEBASED_ALPHA,
  SHIFT, SCALE, SUBTRACT
}
 

Public Member Functions

 InputModifier (NullPoint base)
 
CP::CorrectionCode operator() (StdCalibrationInputs &, float amount) const
 
virtual InputModifierclone () const =0
 
virtual ~InputModifier ()
 

Private Member Functions

 InputModifier ()
 
virtual void scale_inputs (StdCalibrationInputs &, float amount) const =0
 
virtual void shift_inputs (StdCalibrationInputs &, float amount) const =0
 

Private Attributes

NullPoint m_base
 

Detailed Description

Definition at line 229 of file egammaLayerRecalibTool.h.

Member Enumeration Documentation

◆ NullPoint

Enumerator
ZEROBASED 
ONEBASED 
ZEROBASED_ALPHA 
ONEBASED_ALPHA 
SHIFT 
SCALE 
SUBTRACT 

Definition at line 231 of file egammaLayerRecalibTool.h.

Constructor & Destructor Documentation

◆ InputModifier() [1/2]

InputModifier::InputModifier ( NullPoint  base)
inline

Definition at line 233 of file egammaLayerRecalibTool.h.

233 : m_base(base) { };

◆ ~InputModifier()

virtual InputModifier::~InputModifier ( )
inlinevirtual

Definition at line 236 of file egammaLayerRecalibTool.h.

236 { };

◆ InputModifier() [2/2]

InputModifier::InputModifier ( )
inlineprivate

Definition at line 238 of file egammaLayerRecalibTool.h.

238 { }; // privatize default constructor

Member Function Documentation

◆ clone()

virtual InputModifier* InputModifier::clone ( ) const
pure virtual

◆ operator()()

CP::CorrectionCode InputModifier::operator() ( StdCalibrationInputs inputs,
float  amount 
) const

Definition at line 130 of file egammaLayerRecalibTool.cxx.

131 {
132  if (amount == VALUE_OVERFLOW) return CP::CorrectionCode::OutOfValidityRange;
133  switch (m_base)
134  {
135  case SHIFT: shift_inputs(inputs, amount); return CP::CorrectionCode::Ok;
136  case SUBTRACT: shift_inputs(inputs, -amount); return CP::CorrectionCode::Ok;
137  case SCALE: scale_inputs(inputs, amount); return CP::CorrectionCode::Ok;
138  case ZEROBASED: scale_inputs(inputs, 1. + amount); return CP::CorrectionCode::Ok;
139  case ONEBASED: scale_inputs(inputs, amount); return CP::CorrectionCode::Ok;
140  case ONEBASED_ALPHA: scale_inputs(inputs, 1. / amount); return CP::CorrectionCode::Ok;
141  case ZEROBASED_ALPHA: scale_inputs(inputs, 1. / (1. + amount)); return CP::CorrectionCode::Ok;
142  default: return CP::CorrectionCode::Error;
143  };
144 }

◆ scale_inputs()

virtual void InputModifier::scale_inputs ( StdCalibrationInputs ,
float  amount 
) const
privatepure virtual

◆ shift_inputs()

virtual void InputModifier::shift_inputs ( StdCalibrationInputs ,
float  amount 
) const
privatepure virtual

Member Data Documentation

◆ m_base

NullPoint InputModifier::m_base
private

Definition at line 242 of file egammaLayerRecalibTool.h.


The documentation for this struct was generated from the following files:
InputModifier::SCALE
@ SCALE
Definition: egammaLayerRecalibTool.h:231
base
std::string base
Definition: hcg.cxx:78
InputModifier::ZEROBASED
@ ZEROBASED
Definition: egammaLayerRecalibTool.h:231
InputModifier::SHIFT
@ SHIFT
Definition: egammaLayerRecalibTool.h:231
InputModifier::shift_inputs
virtual void shift_inputs(StdCalibrationInputs &, float amount) const =0
InputModifier::SUBTRACT
@ SUBTRACT
Definition: egammaLayerRecalibTool.h:231
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
InputModifier::ONEBASED_ALPHA
@ ONEBASED_ALPHA
Definition: egammaLayerRecalibTool.h:231
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
InputModifier::ONEBASED
@ ONEBASED
Definition: egammaLayerRecalibTool.h:231
InputModifier::ZEROBASED_ALPHA
@ ZEROBASED_ALPHA
Definition: egammaLayerRecalibTool.h:231
InputModifier::scale_inputs
virtual void scale_inputs(StdCalibrationInputs &, float amount) const =0
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
InputModifier::m_base
NullPoint m_base
Definition: egammaLayerRecalibTool.h:242