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 Attributes
TauJetCorrector::ParametrizationTauJet Class Reference

Public Member Functions

 ParametrizationTauJet (int ptype, std::vector< double > x, double u)
 
double value (double, double) const
 

Private Attributes

std::map< int, double > theEtabound
 
std::map< int, std::vector
< double > > 
theParam
 
int type
 

Detailed Description

Definition at line 28 of file TauJetCorrector.h.

Constructor & Destructor Documentation

TauJetCorrector::ParametrizationTauJet::ParametrizationTauJet ( int  ptype,
std::vector< double >  x,
double  u 
)
inline

Definition at line 30 of file TauJetCorrector.h.

References theEtabound, theParam, type, and vdt::x.

30  {
31  type=ptype;
32  theParam[type] = x;
33  theEtabound[type] = u;
34  //cout<<"ParametrizationTauJet "<<type<<" "<<u<<endl;
35  };
type
Definition: HCALResponse.h:22
std::map< int, std::vector< double > > theParam
x
Definition: VDTMath.h:216

Member Function Documentation

double TauJetCorrector::ParametrizationTauJet::value ( double  et,
double  eta 
) const

Definition at line 15 of file TauJetCorrector.cc.

References edm::second(), mathSSE::sqrt(), and vdt::x.

15  {
16 
17  double x=et;
18  double etnew(et);
19  double etabound = (*theEtabound.find(type)).second;
20  std::vector<double> taus = (*theParam.find(type)).second;
21 
22  if ( fabs(eta) > etabound) {
23  //cout << " ===> ETA outside of range - CORRECTION NOT DONE ***" << endl;
24  //cout << " eta = " << eta <<" pt = " << et << " etabound "<<etabound<<endl;
25  return et;
26  }
27  //cout << "correction parameters: " << taus[0] << " " << taus[1] << " " << taus[2] << endl;
28  switch(type){
29  case 1:
30  {
31  etnew = 2*(x-taus[0])/(taus[1]+sqrt(taus[1]*taus[1]-4*taus[0]*taus[2]+4*x*taus[2]));
32  break;
33  }
34  case 2:
35  {
36  etnew = 2*(x-taus[0])/(taus[1]+sqrt(taus[1]*taus[1]-4*taus[0]*taus[2]+4*x*taus[2]));
37  break;
38  }
39  case 3:
40  {
41  etnew = 2*(x-taus[0])/(taus[1]+sqrt(taus[1]*taus[1]-4*taus[0]*taus[2]+4*x*taus[2]));
42  break;
43  }
44 
45  default:
46  edm::LogError("TauJetCorrector: Error: unknown parametrization type ") << type << " in TauJetCorrector. No correction applied" << endl;
47  //cerr<<"TauJetCorrector: Error: unknown parametrization type '"<<type<<"' in TauJetCorrector. No correction applied"<<endl;
48  break;
49  }
50  return etnew;
51 }
type
Definition: HCALResponse.h:22
T eta() const
U second(std::pair< T, U > const &p)
T sqrt(T t)
Definition: SSEVec.h:46
std::map< int, std::vector< double > > theParam
x
Definition: VDTMath.h:216

Member Data Documentation

std::map<int,double> TauJetCorrector::ParametrizationTauJet::theEtabound
private

Definition at line 42 of file TauJetCorrector.h.

Referenced by ParametrizationTauJet().

std::map<int, std::vector<double> > TauJetCorrector::ParametrizationTauJet::theParam
private

Definition at line 41 of file TauJetCorrector.h.

Referenced by ParametrizationTauJet().

int TauJetCorrector::ParametrizationTauJet::type
private