CMS 3D CMS Logo

Public Member Functions | Private Attributes

JetPartonNamespace::ParametrizationJetParton Class Reference

List of all members.

Public Member Functions

 ParametrizationJetParton (int thePartonMixture, vector< double > x, vector< double > y, 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,
vector< double >  x,
vector< double >  y,
vector< double >  z 
) [inline]

Definition at line 30 of file JetPartonCorrector.cc.

References x, detailsBasic3DVector::y, and z.

  {
    type = thePartonMixture;
    pq = x;
    pg = y;
    pqcd = z;
  }

Member Function Documentation

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

Definition at line 49 of file JetPartonCorrector.cc.

References abs, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, alignCSCRings::e, eta(), f, JetPartonNamespace::UserPartonMixture::mixt(), x, and detailsBasic3DVector::y.

                                                               {
  double enew(e);
  double x = e;
  double y = eta;
  
  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] )
    {
      return enew;
    }
  
  double kjetq = pq[0]-pq[1]/(x-pq[2]);
  double kjetg = pg[0]-pg[1]/(x-pg[2]);
  double kjetqcd = pqcd[0]-pqcd[1]/(x-pqcd[2]);
  
  switch(type){
  case 1:
    {
      if( abs(kjetq) > 0.0001 ) enew=e/kjetq;
      break;
    }
  case 2:
    {
      if( abs(kjetg) > 0.0001 ) enew=e/kjetg;
      break;
    }
  case 3:
    {
      if( abs(kjetqcd) > 0.0001 ) enew=e/kjetqcd;
      break;
    }
  case 4:
    {
      cout<<"[Jets] JetPartonCorrector: Warning! Calibration to b-quark - does not implemented yet. Light quark calibration is used instead "<<endl;
      if( abs(kjetq) > 0.0001 ) enew=e/kjetq;
      break;
    }
  case 100:
    {
      UserPartonMixture upm;
      double f = upm.mixt(x,y);
      double kjet=(f*kjetq+kjetg)/(f+1);
      if( abs(kjet) > 0.0001 ) enew=e/kjet;
      break;
    }
    
  default:
    cerr<<"[Jets] JetPartonCorrector: Error! unknown parametrization type = "<<type<<" No correction applied ..."<<endl;
    break;
  }
  return enew;
}

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.

Definition at line 45 of file JetPartonCorrector.cc.

Definition at line 42 of file JetPartonCorrector.cc.