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 26 of file JetPartonCorrector.cc.

Constructor & Destructor Documentation

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

Definition at line 30 of file JetPartonCorrector.cc.

References relativeConstraints::value.

31  {
32  type = thePartonMixture;
33  pq = x;
34  pg = y;
35  pqcd = z;
36  }
type
Definition: HCALResponse.h:21

Member Function Documentation

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

Definition at line 49 of file JetPartonCorrector.cc.

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

Referenced by average.Average::average().

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

Member Data Documentation

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

Definition at line 44 of file JetPartonCorrector.cc.

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

Definition at line 43 of file JetPartonCorrector.cc.

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

Definition at line 45 of file JetPartonCorrector.cc.

int JetPartonNamespace::ParametrizationJetParton::type
private