44 double ptGev = feature->
pt();
45 double pt = ptGev*1000.;
47 if (pt == 0)
return 1.0e33;
49 double AbsPtInv = fabs(1./pt);
51 double AbsEta = fabs(feature->
eta());
52 double phi = feature->
phi();
55 if (AbsPtInv < 0.000186) {
56 return vec[0]*AbsPtInv +
vec[1]/1000.;
59 double AbsPtInv3 = AbsPtInv*AbsPtInv*AbsPtInv;
60 double AbsPtInv2 = AbsPtInv*AbsPtInv;
61 return vec[2]*AbsPtInv3/(1000.*1000.) +
62 vec[3]*AbsPtInv2/(1000.) +
69 const int N_PARAMS = 5;
70 const double vparEC1[N_PARAMS] = {0.291483, -6.11348, 65.1099, -285.664, 440.041};
71 const double vparEC2[N_PARAMS] = {0.286307, -4.6759, 43.2815, -163.185, 210.786};
72 const double vparEC3[N_PARAMS] = {0.330699, -6.70755, 70.4725, -291.85, 408.739};
73 const double vparEC4[N_PARAMS] = {0.261738, -4.69971, 47.4762, -183.98, 236.813};
74 const double vparEC5[N_PARAMS] = {0.196301, -3.57276, 38.3744, -159.808, 228.256};
75 const double vparEC6[N_PARAMS] = {0.172939, -3.10788, 33.3823, -142.996, 212.957};
76 const double vparEC7[N_PARAMS] = {0.233017, -4.377, 42.5691, -171.752, 245.702};
77 const double vparEC8[N_PARAMS] = {0.22389, -4.16259, 40.1369, -162.824, 236.39};
78 const double vparEC9[N_PARAMS] = {0.197992, -3.52117, 33.5997, -136.014, 197.474};
79 const double vparECA[N_PARAMS] = {0.417289, -0.852254,-31.9257, 308.873, -719.591};
80 const double vparECB[N_PARAMS] = {0.526612, -8.04087, 82.1906, -336.87, 462.973};
82 double AbsPtInvGeV = AbsPtInv * 1000;
84 const double AbsPtInvGeVMin = 5e-3;
85 const double AbsPtInvGeVMax = 0.25;
86 if( AbsPtInvGeV < AbsPtInvGeVMin ) AbsPtInvGeV = AbsPtInvGeVMin;
87 if( AbsPtInvGeV > AbsPtInvGeVMax ) AbsPtInvGeV = AbsPtInvGeVMax;
94 if ( spReg==1 ) { vpar = vparECA; }
95 else if( spReg==2 ) { vpar = vparECB; }
97 if ( AbsEta < 1.20) { vpar = vparEC1; }
98 else if( AbsEta < 1.35) { vpar = vparEC2; }
99 else if( AbsEta < 1.50) { vpar = vparEC3; }
100 else if( AbsEta < 1.65) { vpar = vparEC4; }
101 else if( AbsEta < 1.80) { vpar = vparEC5; }
102 else if( AbsEta < 1.95) { vpar = vparEC6; }
103 else if( AbsEta < 2.10) { vpar = vparEC7; }
104 else if( AbsEta < 2.35) { vpar = vparEC8; }
105 else { vpar = vparEC9; }
108 double fracRes = vpar[0] + vpar[1]*AbsPtInvGeV
109 + vpar[2]*AbsPtInvGeV*AbsPtInvGeV
110 + vpar[3]*AbsPtInvGeV*AbsPtInvGeV*AbsPtInvGeV
111 + vpar[4]*AbsPtInvGeV*AbsPtInvGeV*AbsPtInvGeV*AbsPtInvGeV;
113 return fabs(fracRes * AbsPtInv);
375 double eta1,
double seta1,
double phi1,
double sphi1,
double ipt1,
double sipt1,
376 double eta2,
double seta2,
double phi2,
double sphi2,
double ipt2,
double sipt2,
bool useAbsPt) {
379 double sdeta = seta1*seta1+seta2*seta2;
381 double sdphi = sphi1*sphi1+sphi2*sphi2;
382 double dipt_1 = ipt - ipt1;
383 if (useAbsPt) dipt_1 = fabs(ipt) - fabs(ipt1);
384 double sdipt_1 = sipt1*sipt1;
385 double dipt_2 = ipt - ipt2;
386 if (useAbsPt) dipt_2 = fabs(ipt) - fabs(ipt2);
387 double sdipt_2 = sipt2*sipt2;
391 if (sdeta != 0) {
chi2 += deta*deta/sdeta; ndof++; }
392 if (sdphi != 0) {
chi2 += dphi*dphi/sdphi; ndof++; }
393 if (sdipt_1 != 0) {
chi2 += dipt_1*dipt_1/sdipt_1; ndof++; }
394 if (sdipt_2 != 0) {
chi2 += dipt_2*dipt_2/sdipt_2; ndof++; }
396 if (ndof == 0)
return 1.0e30;