CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
ScalingExponential Class Reference

#include <ScalingExponential.h>

Public Member Functions

bool operator!= (const ScalingExponential &r) const
 
double operator() (const double x) const
 
bool operator== (const ScalingExponential &r) const
 
 ScalingExponential ()
 
 ScalingExponential (const double p0, const double p1, const bool isLinear=false)
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

uint8_t linear_
 
double p0_
 
double p1_
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 10 of file ScalingExponential.h.

Constructor & Destructor Documentation

◆ ScalingExponential() [1/2]

ScalingExponential::ScalingExponential ( )
inline

Definition at line 12 of file ScalingExponential.h.

12 : p0_(0.0), p1_(0.0), linear_(0) {}

◆ ScalingExponential() [2/2]

ScalingExponential::ScalingExponential ( const double  p0,
const double  p1,
const bool  isLinear = false 
)
inline

Definition at line 14 of file ScalingExponential.h.

15  : p0_(p0), p1_(p1), linear_(isLinear) {}

Member Function Documentation

◆ operator!=()

bool ScalingExponential::operator!= ( const ScalingExponential r) const
inline

Definition at line 26 of file ScalingExponential.h.

26 { return !(*this == r); }

References alignCSCRings::r.

◆ operator()()

double ScalingExponential::operator() ( const double  x) const
inline

Definition at line 17 of file ScalingExponential.h.

17  {
18  const double scale = linear_ ? p0_ * x + p1_ : p0_ * (1.0 - exp(-x / p1_));
19  return scale * x;
20  }

References JetChargeProducer_cfi::exp, linear_, p0_, p1_, Scenarios_cff::scale, and x.

◆ operator==()

bool ScalingExponential::operator== ( const ScalingExponential r) const
inline

Definition at line 22 of file ScalingExponential.h.

22  {
23  return p0_ == r.p0_ && p1_ == r.p1_ && linear_ == r.linear_;
24  }

References linear_, p0_, p1_, and alignCSCRings::r.

◆ serialize()

template<class Archive >
void ScalingExponential::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 36 of file ScalingExponential.h.

36  {
37  ar& p0_& p1_& linear_;
38  }

References linear_, p0_, and p1_.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 33 of file ScalingExponential.h.

Member Data Documentation

◆ linear_

uint8_t ScalingExponential::linear_
private

Definition at line 31 of file ScalingExponential.h.

Referenced by operator()(), operator==(), and serialize().

◆ p0_

double ScalingExponential::p0_
private

Definition at line 29 of file ScalingExponential.h.

Referenced by operator()(), operator==(), and serialize().

◆ p1_

double ScalingExponential::p1_
private

Definition at line 30 of file ScalingExponential.h.

Referenced by operator()(), operator==(), and serialize().

DDAxes::x
ScalingExponential::p0_
double p0_
Definition: ScalingExponential.h:29
ScalingExponential::linear_
uint8_t linear_
Definition: ScalingExponential.h:31
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
ScalingExponential::p1_
double p1_
Definition: ScalingExponential.h:30
p1
double p1[4]
Definition: TauolaWrapper.h:89
alignCSCRings.r
r
Definition: alignCSCRings.py:93
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6