Ticket #371: pdf_ratio.patch
File pdf_ratio.patch, 4.2 KB (added by , 7 years ago) |
---|
-
SHERPA/PerturbativePhysics/Perturbative_Interface.C
264 264 mcnloproc->SetVariationWeights(p_localkfactorvarweights); 265 265 double K(mcnloproc->LocalKFactor(*ampl)); 266 266 mcnloproc->SetVariationWeights(NULL); 267 if (K==0.0 || dabs(K)>m_maxkfac) continue; 267 //skip maximum treshold, hopefully covered by pdf ratio treatment 268 //if (K==0.0 || dabs(K)>m_maxkfac) continue; 269 if (K==0.0) continue; 268 270 m_weight*=K; 269 271 return true; 270 272 } -
PHASIC++/Process/Single_Process.C
103 103 <<x<<","<<sqrt(lmuf2)<<") = "<<fb<<" ). Skip.\n"; 104 104 return 0.0; 105 105 } 106 107 //change: skip if ratio condition not fullfilled 108 if (dabs(fb)<1.0e-4*log(1.0 - x)/log(1.0 - 1.0e-2)){ 109 msg_Debugging() << "Invalid pdf ratio, ct set to zero." << std::endl; 110 return 0.0; 111 } 112 106 113 msg_Debugging()<<"Beam "<<i<<": z = "<<z<<", f_{"<<fl 107 114 <<"}("<<x<<","<<sqrt(lmuf2)<<") = "<<fb<<" {\n"; 108 115 for (size_t j(0);j<jet.Size();++j) { … … 265 272 currentQ2, currentQ2, f1, f2, 266 273 0)); 267 274 275 268 276 // new scale (note: for the core scale we use Q2 instead of ampl->MuF2 269 277 // because we might be reweighting and Q2 could have been multiplied 270 278 // by a scaling factor, whereas ampl->MuF2 would not reflect this) 271 279 double lastQ2=currentQ2; 272 280 currentQ2 = (ampl->Next() == NULL) ? Q2 : ampl->KT2(); 273 281 282 // change: skip when a scale is below a (quark) mass threshold, new scale 283 if (currentQ2 < sqr(2.0 * f1.Mass(true)) || currentQ2 < sqr(2.0 * f2.Mass(true))) { 284 msg_Debugging()<<"Skip. Quarks below threshold: t="<<currentQ2 285 <<" vs. "<<sqr(2.0*f1.Mass(true)) 286 <<" / "<<sqr(2.0*f2.Mass(true))<<std::endl; 287 continue; 288 } 289 290 291 274 292 // numerators 275 293 double wn1(p_int->ISR()->PDFWeight(2, 276 294 -ampl->Leg(0)->Mom(), … … 283 301 currentQ2, currentQ2, f1, f2, 284 302 0)); 285 303 286 // add weights 287 if (!IsZero(wn1) && !IsZero(wd1)) csi.AddWeight(wn1 / wd1); 288 if (!IsZero(wn2) && !IsZero(wd2)) csi.AddWeight(wn2 / wd2); 304 double x1=p_int->ISR()->CalcX(-ampl->Leg(0)->Mom()); 305 double x2=p_int->ISR()->CalcX(-ampl->Leg(1)->Mom()); 289 306 307 // change: added pdf ratio condition 308 if (!IsZero(wn1) && !IsZero(wd1) && !(dabs(wd1)<1.0e-4*log(1.0 - x1)/log(1.0 - 1.0e-2)) ) { 309 csi.AddWeight(wn1 / wd1); 310 } else { 311 msg_Debugging() << "invalid pdf ratio in beam 0," << std::endl; 312 msg_Debugging() << "skip weight." << std::endl; 313 } 314 315 if (!IsZero(wn2) && !IsZero(wd2) && !(dabs(wd2)<1.0e-4*log(1.0 - x2)/log(1.0 - 1.0e-2)) ) { 316 csi.AddWeight(wn2 / wd2); 317 } else { 318 msg_Debugging() << "invalid pdf ratio in beam 1," << std::endl; 319 msg_Debugging() << "skip weight." << std::endl; 320 } 321 290 322 // book-keep PDF ratios excl. 291 323 // a) first one correcting outer PDF from muF to t 292 324 // b) last numerator taken at muF (this one is to be varied) … … 327 359 rn[0] = ran->Get(); 328 360 rn[1] = ran->Get(); 329 361 } 362 //change: ratio condition added below 330 363 for (int i(0); i < 2; ++i) { 331 if (i == 0 && (IsZero(wn1) || IsZero(wd1))) continue;332 if (i == 1 && (IsZero(wn2) || IsZero(wd2))) continue;364 if (i == 0 && (IsZero(wn1) || IsZero(wd1) || (dabs(wd1)<1.0e-4*log(1.0 - x1)/log(1.0 - 1.0e-2)) )) continue; 365 if (i == 1 && (IsZero(wn2) || IsZero(wd2) || (dabs(wd2)<1.0e-4*log(1.0 - x2)/log(1.0 - 1.0e-2)) )) continue; 333 366 Vec4D p(-ampl->Leg(i)->Mom()); 334 367 const double x(p_int->ISR()->CalcX(p)); 335 368 double z(-1.0);