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) {}

Member Function Documentation

◆ getA1()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA1 ( ) const
inline

Definition at line 37 of file OOTPileupCorrDataFcn.h.

37 { return a1_; }

References a1_.

◆ getA2()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA2 ( ) const
inline

Definition at line 38 of file OOTPileupCorrDataFcn.h.

38 { return a2_; }

References a2_.

◆ getA3()

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA3 ( ) const
inline

Definition at line 39 of file OOTPileupCorrDataFcn.h.

39 { return a3_; }

References a3_.

◆ getA_1()

const ScalingExponential& OOTPileupCorrDataFcn::getA_1 ( ) const
inline

Definition at line 40 of file OOTPileupCorrDataFcn.h.

40 { return a_1_; }

References a_1_.

◆ operator!=()

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

Definition at line 21 of file OOTPileupCorrDataFcn.h.

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

References alignCSCRings::r.

◆ operator==()

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

Definition at line 17 of file OOTPileupCorrDataFcn.h.

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

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

◆ pucorrection()

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

Definition at line 23 of file OOTPileupCorrDataFcn.h.

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  }

References a1_, a2_, and a_1_.

◆ serialize()

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

Definition at line 49 of file OOTPileupCorrDataFcn.h.

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

References a1_, a2_, a3_, and 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().

OOTPileupCorrDataFcn::a1_
PiecewiseScalingPolynomial a1_
Definition: OOTPileupCorrDataFcn.h:43
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
alignCSCRings.r
r
Definition: alignCSCRings.py:93
OOTPileupCorrDataFcn::a3_
PiecewiseScalingPolynomial a3_
Definition: OOTPileupCorrDataFcn.h:43
OOTPileupCorrDataFcn::a_1_
ScalingExponential a_1_
Definition: OOTPileupCorrDataFcn.h:44
OOTPileupCorrDataFcn::a2_
PiecewiseScalingPolynomial a2_
Definition: OOTPileupCorrDataFcn.h:43