CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetPartonNamespace::ParametrizationJetParton Class Reference

Public Member Functions

 ParametrizationJetParton (int thePartonMixture, const vector< double > &x, const vector< double > &y, const vector< double > &z)
 
double value (double arg1, double arg2) const
 

Private Attributes

std::vector< double > pg
 
std::vector< double > pq
 
std::vector< double > pqcd
 
int type
 

Detailed Description

Definition at line 25 of file JetPartonCorrector.cc.

Constructor & Destructor Documentation

◆ ParametrizationJetParton()

JetPartonNamespace::ParametrizationJetParton::ParametrizationJetParton ( int  thePartonMixture,
const vector< double > &  x,
const vector< double > &  y,
const vector< double > &  z 
)
inline

Definition at line 27 of file JetPartonCorrector.cc.

References x.

30  {
31  type = thePartonMixture;
32  pq = x;
33  pg = y;
34  pqcd = z;
35  }

Member Function Documentation

◆ value()

double JetPartonNamespace::ParametrizationJetParton::value ( double  arg1,
double  arg2 
) const

Definition at line 46 of file JetPartonCorrector.cc.

References funct::abs(), EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, MillePedeFileConverter_cfg::e, PVValHelper::eta, f, JetPartonNamespace::UserPartonMixture::mixt(), and x.

Referenced by average.Average::average().

46  {
47  double enew(e);
48  double x = e;
49  double y = eta;
50 
51  if (abs(x - pq[2]) < pq[1] / pq[0] || abs(x - pg[2]) < pg[1] / pg[0] || abs(x - pqcd[2]) < pqcd[1] / pqcd[0]) {
52  return enew;
53  }
54 
55  double kjetq = pq[0] - pq[1] / (x - pq[2]);
56  double kjetg = pg[0] - pg[1] / (x - pg[2]);
57  double kjetqcd = pqcd[0] - pqcd[1] / (x - pqcd[2]);
58 
59  switch (type) {
60  case 1: {
61  if (abs(kjetq) > 0.0001)
62  enew = e / kjetq;
63  break;
64  }
65  case 2: {
66  if (abs(kjetg) > 0.0001)
67  enew = e / kjetg;
68  break;
69  }
70  case 3: {
71  if (abs(kjetqcd) > 0.0001)
72  enew = e / kjetqcd;
73  break;
74  }
75  case 4: {
76  cout << "[Jets] JetPartonCorrector: Warning! Calibration to b-quark - does not implemented yet. Light quark "
77  "calibration is used instead "
78  << endl;
79  if (abs(kjetq) > 0.0001)
80  enew = e / kjetq;
81  break;
82  }
83  case 100: {
84  UserPartonMixture upm;
85  double f = upm.mixt(x, y);
86  double kjet = (f * kjetq + kjetg) / (f + 1);
87  if (abs(kjet) > 0.0001)
88  enew = e / kjet;
89  break;
90  }
91 
92  default:
93  cerr << "[Jets] JetPartonCorrector: Error! unknown parametrization type = " << type
94  << " No correction applied ..." << endl;
95  break;
96  }
97  return enew;
98  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]

Member Data Documentation

◆ pg

std::vector<double> JetPartonNamespace::ParametrizationJetParton::pg
private

Definition at line 42 of file JetPartonCorrector.cc.

◆ pq

std::vector<double> JetPartonNamespace::ParametrizationJetParton::pq
private

Definition at line 41 of file JetPartonCorrector.cc.

◆ pqcd

std::vector<double> JetPartonNamespace::ParametrizationJetParton::pqcd
private

Definition at line 43 of file JetPartonCorrector.cc.

◆ type

int JetPartonNamespace::ParametrizationJetParton::type
private