CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::OOTPileupCorrDataFcn ( )
inline

Definition at line 10 of file OOTPileupCorrDataFcn.h.

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

Definition at line 12 of file OOTPileupCorrDataFcn.h.

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

Member Function Documentation

const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA1 ( ) const
inline

Definition at line 39 of file OOTPileupCorrDataFcn.h.

References a1_.

Referenced by HBHENegativeFlagSetter::setPulseShapeFlags().

39 {return a1_;}
PiecewiseScalingPolynomial a1_
const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA2 ( ) const
inline

Definition at line 40 of file OOTPileupCorrDataFcn.h.

References a2_.

Referenced by HBHENegativeFlagSetter::setPulseShapeFlags().

40 {return a2_;}
PiecewiseScalingPolynomial a2_
const PiecewiseScalingPolynomial& OOTPileupCorrDataFcn::getA3 ( ) const
inline

Definition at line 41 of file OOTPileupCorrDataFcn.h.

References a3_.

41 {return a3_;}
PiecewiseScalingPolynomial a3_
const ScalingExponential& OOTPileupCorrDataFcn::getA_1 ( ) const
inline

Definition at line 42 of file OOTPileupCorrDataFcn.h.

References a_1_.

42 {return a_1_;}
ScalingExponential a_1_
bool OOTPileupCorrDataFcn::operator!= ( const OOTPileupCorrDataFcn r) const
inline

Definition at line 21 of file OOTPileupCorrDataFcn.h.

References alignCSCRings::r.

22  {return !(*this == r);}
bool OOTPileupCorrDataFcn::operator== ( const OOTPileupCorrDataFcn r) const
inline

Definition at line 18 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, a3_, and a_1_.

19  {return a1_ == r.a1_ && a2_ == r.a2_ && a3_ == r.a3_ && a_1_ == r.a_1_;}
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a3_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_
void OOTPileupCorrDataFcn::pucorrection ( double *  ts,
const int  tsTrig 
) const
inline

Definition at line 24 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, and a_1_.

25  {
26  // TS4 correction with functions a1(x) and a2(x)
27  double ts20 = ts[tsTrig-2];
28  double ts30 = ts[tsTrig-1] - a_1_(ts[tsTrig]); // ts[3] correction with a_1(x)
29  double ts21 = ts20 > 0 ? a2_(ts20) : 0;
30  double ts22 = ts20 > 0 ? a1_(ts20) : 0;
31  double ts321 = ts30 - ts22 > 0 ? a1_(ts30 - ts22) : 0;
32  ts[tsTrig] -= (ts321 + ts21); // ts[4] after pu correction
33 
34  // ts5 estimation from ts4
35  ts[tsTrig+1] = a1_(ts[tsTrig]);
36  }
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_
template<class Archive >
void OOTPileupCorrDataFcn::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 51 of file OOTPileupCorrDataFcn.h.

References a1_, a2_, a3_, and a_1_.

52  {
53  ar & a1_ & a2_ & a3_ & a_1_;
54  }
PiecewiseScalingPolynomial a1_
PiecewiseScalingPolynomial a3_
PiecewiseScalingPolynomial a2_
ScalingExponential a_1_

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 48 of file OOTPileupCorrDataFcn.h.

Member Data Documentation

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a1_
private

Definition at line 45 of file OOTPileupCorrDataFcn.h.

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

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a2_
private

Definition at line 45 of file OOTPileupCorrDataFcn.h.

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

PiecewiseScalingPolynomial OOTPileupCorrDataFcn::a3_
private

Definition at line 45 of file OOTPileupCorrDataFcn.h.

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

ScalingExponential OOTPileupCorrDataFcn::a_1_
private

Definition at line 46 of file OOTPileupCorrDataFcn.h.

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