CMS 3D CMS Logo

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

#include <OOTPileupCorrDataFcn.h>

Public Member Functions

const PiecewiseScalingPolynomialgetA1 () const
 
const PiecewiseScalingPolynomialgetA2 () const
 
const PiecewiseScalingPolynomialgetA3 () const
 
const ScalingExponentialgetA_1 () const
 
 OOTPileupCorrDataFcn ()
 
 OOTPileupCorrDataFcn (const PiecewiseScalingPolynomial &a1, const PiecewiseScalingPolynomial &a2, const PiecewiseScalingPolynomial &a3, const ScalingExponential &a_1)
 
bool operator!= (const OOTPileupCorrDataFcn &r) const
 
bool operator== (const OOTPileupCorrDataFcn &r) const
 
void pucorrection (double *ts, const int tsTrig) const
 

Private Member Functions

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

Private Attributes

PiecewiseScalingPolynomial a1_
 
PiecewiseScalingPolynomial a2_
 
PiecewiseScalingPolynomial a3_
 
ScalingExponential a_1_
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 7 of file OOTPileupCorrDataFcn.h.

Constructor & Destructor Documentation

◆ OOTPileupCorrDataFcn() [1/2]

OOTPileupCorrDataFcn::OOTPileupCorrDataFcn ( )
inline

Definition at line 9 of file OOTPileupCorrDataFcn.h.

9 {}

◆ OOTPileupCorrDataFcn() [2/2]

OOTPileupCorrDataFcn::OOTPileupCorrDataFcn ( const PiecewiseScalingPolynomial a1,
const PiecewiseScalingPolynomial a2,
const PiecewiseScalingPolynomial a3,
const ScalingExponential a_1 
)
inline

Definition at line 11 of file OOTPileupCorrDataFcn.h.

15  : a1_(a1), a2_(a2), a3_(a3), a_1_(a_1) {}
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a3_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_

Member Function Documentation

◆ getA1()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA1 ( ) const
inline

Definition at line 37 of file OOTPileupCorrDataFcn.h.

References a1_.

37 { return a1_; }
PiecewiseScalingPolynomial a1_

◆ getA2()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA2 ( ) const
inline

Definition at line 38 of file OOTPileupCorrDataFcn.h.

References a2_.

38 { return a2_; }
PiecewiseScalingPolynomial a2_

◆ getA3()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA3 ( ) const
inline

Definition at line 39 of file OOTPileupCorrDataFcn.h.

References a3_.

39 { return a3_; }
PiecewiseScalingPolynomial a3_

◆ getA_1()

const ScalingExponential& OOTPileupCorrDataFcn::getA_1 ( ) const
inline

Definition at line 40 of file OOTPileupCorrDataFcn.h.

References a_1_.

40 { return a_1_; }
ScalingExponential a_1_

◆ operator!=()

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

Definition at line 21 of file OOTPileupCorrDataFcn.h.

References alignCSCRings::r.

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

◆ operator==()

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

Definition at line 17 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, a3_, a_1_, and alignCSCRings::r.

17  {
18  return a1_ == r.a1_ && a2_ == r.a2_ && a3_ == r.a3_ && a_1_ == r.a_1_;
19  }
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a3_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_

◆ pucorrection()

void OOTPileupCorrDataFcn::pucorrection ( double *  ts,
const int  tsTrig 
) const
inline

Definition at line 23 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, and a_1_.

23  {
24  // TS4 correction with functions a1(x) and a2(x)
25  double ts20 = ts[tsTrig - 2];
26  double ts30 = ts[tsTrig - 1] - a_1_(ts[tsTrig]); // ts[3] correction with a_1(x)
27  double ts21 = ts20 > 0 ? a2_(ts20) : 0;
28  double ts22 = ts20 > 0 ? a1_(ts20) : 0;
29  double ts321 = ts30 - ts22 > 0 ? a1_(ts30 - ts22) : 0;
30  ts[tsTrig] -= (ts321 + ts21); // ts[4] after pu correction
31 
32  // ts5 estimation from ts4
33  ts[tsTrig + 1] = a1_(ts[tsTrig]);
34  }
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_

◆ serialize()

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

Definition at line 49 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, a3_, and a_1_.

49  {
50  ar& a1_& a2_& a3_& a_1_;
51  }
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a3_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 46 of file OOTPileupCorrDataFcn.h.

Member Data Documentation

◆ a1_

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a1_
private

Definition at line 43 of file OOTPileupCorrDataFcn.h.

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

◆ a2_

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a2_
private

Definition at line 43 of file OOTPileupCorrDataFcn.h.

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

◆ a3_

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a3_
private

Definition at line 43 of file OOTPileupCorrDataFcn.h.

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

◆ a_1_

ScalingExponential OOTPileupCorrDataFcn::a_1_
private

Definition at line 44 of file OOTPileupCorrDataFcn.h.

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