9 #include "Pythia8/DireSplittingsQED.h"
10 #include "Pythia8/DireSpace.h"
11 #include "Pythia8/DireTimes.h"
17 double chgprefac = 0.0;
23 void DireSplittingQED::init() {
25 int nGammaToQuark = settingsPtr->mode(
"TimeShower:nGammaToQuark");
26 int nGammaToLepton = settingsPtr->mode(
"TimeShower:nGammaToLepton");
28 sumCharge2L = max(0, min(3, nGammaToLepton));
30 if (nGammaToQuark > 4) sumCharge2Q = 11. / 9.;
31 else if (nGammaToQuark > 3) sumCharge2Q = 10. / 9.;
32 else if (nGammaToQuark > 2) sumCharge2Q = 6. / 9.;
33 else if (nGammaToQuark > 1) sumCharge2Q = 5. / 9.;
34 else if (nGammaToQuark > 0) sumCharge2Q = 1. / 9.;
35 sumCharge2Tot = sumCharge2L + 3. * sumCharge2Q;
38 int alphaEMorder = settingsPtr->mode(
"SpaceShower:alphaEMorder");
40 alphaEM.init( alphaEMorder, settingsPtr);
42 aem0 = settingsPtr->parm(
"StandardModel:alphaEM0");
44 enhance = settingsPtr->parm(
"Enhance:"+
id);
46 doQEDshowerByQ = (is_fsr) ? settingsPtr->flag(
"TimeShower:QEDshowerByQ")
47 : settingsPtr->flag(
"SpaceShower:QEDshowerByQ");
48 doQEDshowerByL = (is_fsr) ? settingsPtr->flag(
"TimeShower:QEDshowerByL")
49 : settingsPtr->flag(
"SpaceShower:QEDshowerByL");
50 doForcePos = settingsPtr->flag(
"Dire:QED:doForcePosChgCorrelators");
51 pT2minForcePos = pow2(settingsPtr->parm(
"Dire:QED:pTminForcePos"));
53 pT2min = pow2(settingsPtr->parm(
"TimeShower:pTmin"));
54 pT2minL = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"));
55 pT2minQ = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"));
64 double DireSplittingQED::aem2Pi(
double pT2,
int ) {
66 double scale = pT2*renormMultFac;
69 double aemPT2pi = alphaEM.alphaEM(scale) / (2.*M_PI);
78 bool DireSplittingQED::aboveCutoff(
double t,
const Particle& radBef,
79 const Particle&,
int iSys, PartonSystems* partonSystemsPtr) {
81 if (particleDataPtr->isLepton(radBef.id()) && t < pT2minL )
83 if (particleDataPtr->isQuark(radBef.id()) && t < pT2minQ )
85 if ((iSys == 0 || partonSystemsPtr->hasInAB(iSys)) && t < pT2min)
98 bool Dire_fsr_qed_Q2QA::canRadiate (
const Event& state, pair<int,int> ints,
99 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
100 return ( state[ints.first].isFinal()
101 && state[ints.first].isQuark() && state[ints.second].isCharged()
102 && bools[
"doQEDshowerByQ"]);
105 bool Dire_fsr_qed_Q2QA::canRadiate (
const Event& state,
int iRadBef,
106 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
107 return ( state[iRadBef].isFinal()
108 && state[iRadBef].isQuark() && state[iRecBef].isCharged()
112 int Dire_fsr_qed_Q2QA::kinMap() {
return 1;}
113 int Dire_fsr_qed_Q2QA::motherID(
int idDaughter) {
return idDaughter;}
114 int Dire_fsr_qed_Q2QA::sisterID(
int) {
return 22;}
116 double Dire_fsr_qed_Q2QA::gaugeFactor (
int idRadBef,
int idRecBef) {
117 double chgRad = particleDataPtr->charge(idRadBef);
118 double chgRec = particleDataPtr->charge(idRecBef);
119 double charge = -1.*chgRad*chgRec;
120 if (!splitInfo.radBef()->isFinal) charge *= -1.;
121 if (!splitInfo.recBef()->isFinal) charge *= -1.;
122 if (idRadBef != 0 && idRecBef != 0)
return charge;
127 double Dire_fsr_qed_Q2QA::symmetryFactor (
int,
int ) {
return 1.;}
129 int Dire_fsr_qed_Q2QA::radBefID(
int idRad,
int idEmt) {
130 if (particleDataPtr->isQuark(idRad) && idEmt == 22 )
return idRad;
134 pair<int,int> Dire_fsr_qed_Q2QA::radBefCols(
135 int colRadAfter,
int acolRadAfter,
136 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
138 vector<int>Dire_fsr_qed_Q2QA::recPositions(
const Event& state,
int iRad,
142 if ( !state[iRad].isFinal()
143 || !state[iRad].isQuark()
144 || state[iEmt].
id() != 22)
return recs;
147 vector<int> iExc(createvector<int>(iRad)(iEmt));
149 for (
int i=0; i < state.size(); ++i) {
150 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
151 if ( state[i].isCharged() ) {
152 if (state[i].isFinal())
154 if (state[i].mother1() == 1 && state[i].mother2() == 0)
156 if (state[i].mother1() == 2 && state[i].mother2() == 0)
166 double Dire_fsr_qed_Q2QA::zSplit(
double zMinAbs,
double,
double m2dip) {
167 double Rz = rndmPtr->flat();
168 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
169 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
170 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
175 double Dire_fsr_qed_Q2QA::overestimateInt(
double zMinAbs,
double,
176 double,
double m2dip,
int) {
178 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
179 double preFac = symmetryFactor() * abs(charge);
181 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
182 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
187 double Dire_fsr_qed_Q2QA::overestimateDiff(
double z,
double m2dip,
int) {
189 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
190 double preFac = symmetryFactor() * abs(charge);
191 double kappaOld2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
192 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
197 bool Dire_fsr_qed_Q2QA::calc(
const Event& state,
int orderNow) {
200 if (
false) cout << state[0].e() << orderNow << endl;
203 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
204 m2dip(splitInfo.kinematics()->m2Dip),
205 m2RadBef(splitInfo.kinematics()->m2RadBef),
206 m2Rad(splitInfo.kinematics()->m2RadAft),
207 m2Rec(splitInfo.kinematics()->m2Rec),
208 m2Emt(splitInfo.kinematics()->m2EmtAft);
209 int splitType(splitInfo.type);
217 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
218 splitInfo.recBef()->id);
219 vector <int> in, out;
220 for (
int i=0; i < state.size(); ++i) {
221 if (state[i].isFinal()) out.push_back(state[i].id());
222 if (state[i].mother1() == 1 && state[i].mother2() == 0)
223 in.push_back(state[i].id());
224 if (state[i].mother1() == 2 && state[i].mother2() == 0)
225 in.push_back(state[i].id());
228 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
229 && doMECs && fsr->weights->hasME(in,out);
230 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
233 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
234 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
236 double preFac = symmetryFactor() * chargeFac;
237 double kappa2 = pT2/m2dip;
238 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
241 bool doMassive = (abs(splitType) == 2);
244 if (!doMassive && orderNow >= 0) wt += preFac * ( 1.-z );
247 if (doMassive && orderNow >= 0) {
249 double pipj = 0., vijkt = 1., vijk = 1.;
252 if (splitType == 2) {
255 double yCS = kappa2 / (1.-z);
256 double nu2RadBef = m2RadBef/m2dip;
257 double nu2Rad = m2Rad/m2dip;
258 double nu2Emt = m2Emt/m2dip;
259 double nu2Rec = m2Rec/m2dip;
260 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
261 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
262 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
263 - 4.*nu2RadBef*nu2Rec;
264 vijk = sqrt(vijk) / (1-yCS);
265 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
266 pipj = m2dip * yCS/2.;
268 }
else if (splitType ==-2) {
271 double xCS = 1 - kappa2/(1.-z);
274 pipj = m2dip/2. * (1-xCS)/xCS;
278 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
279 wt += preFac*massCorr;
283 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
290 unordered_map<string,double> wts;
291 wts.insert( make_pair(
"base", wt ));
294 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
295 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
296 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
297 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
302 for ( unordered_map<string,double>::iterator it = wts.begin();
303 it != wts.end(); ++it )
304 kernelVals.insert(make_pair( it->first, it->second ));
319 bool Dire_fsr_qed_Q2AQ::canRadiate (
const Event& state, pair<int,int> ints,
320 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
321 return ( state[ints.first].isFinal()
322 && state[ints.first].isQuark() && state[ints.second].isCharged()
323 && bools[
"doQEDshowerByQ"]);
326 bool Dire_fsr_qed_Q2AQ::canRadiate (
const Event& state,
int iRadBef,
327 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
328 return ( state[iRadBef].isFinal()
329 && state[iRadBef].isQuark() && state[iRecBef].isCharged()
333 int Dire_fsr_qed_Q2AQ::kinMap() {
return 1;}
334 int Dire_fsr_qed_Q2AQ::motherID(
int idDaughter) {
return idDaughter;}
335 int Dire_fsr_qed_Q2AQ::sisterID(
int) {
return 22;}
337 double Dire_fsr_qed_Q2AQ::gaugeFactor (
int idRadBef,
int idRecBef) {
338 double chgRad = particleDataPtr->charge(idRadBef);
339 double chgRec = particleDataPtr->charge(idRecBef);
340 double charge = -1.*chgRad*chgRec;
341 if (!splitInfo.radBef()->isFinal) charge *= -1.;
342 if (!splitInfo.recBef()->isFinal) charge *= -1.;
343 if (idRadBef != 0 && idRecBef != 0)
return charge;
348 double Dire_fsr_qed_Q2AQ::symmetryFactor (
int,
int ) {
return 1.;}
350 int Dire_fsr_qed_Q2AQ::radBefID(
int idRad,
int idEmt) {
351 if (idRad == 22 && particleDataPtr->isQuark(idEmt))
return idEmt;
352 if (idEmt == 22 && particleDataPtr->isQuark(idRad))
return idRad;
356 pair<int,int> Dire_fsr_qed_Q2AQ::radBefCols(
357 int colRadAfter,
int acolRadAfter,
358 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
360 vector<int>Dire_fsr_qed_Q2AQ::recPositions(
const Event& state,
int iRad,
364 if ( !state[iRad].isFinal()
365 || !state[iRad].isQuark()
366 || state[iEmt].
id() != 22)
return recs;
369 vector<int> iExc(createvector<int>(iRad)(iEmt));
371 for (
int i=0; i < state.size(); ++i) {
372 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
373 if ( state[i].isCharged() ) {
374 if (state[i].isFinal())
376 if (state[i].mother1() == 1 && state[i].mother2() == 0)
378 if (state[i].mother1() == 2 && state[i].mother2() == 0)
388 double Dire_fsr_qed_Q2AQ::zSplit(
double zMinAbs,
double,
double m2dip) {
389 double Rz = rndmPtr->flat();
390 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
391 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
392 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
397 double Dire_fsr_qed_Q2AQ::overestimateInt(
double zMinAbs,
double,
398 double,
double m2dip,
int) {
400 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
401 double preFac = symmetryFactor() * abs(charge);
403 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
404 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
409 double Dire_fsr_qed_Q2AQ::overestimateDiff(
double z,
double m2dip,
int) {
411 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
412 double preFac = symmetryFactor() * abs(charge);
413 double kappaOld2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/m2dip;
414 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
419 bool Dire_fsr_qed_Q2AQ::calc(
const Event& state,
int orderNow) {
422 if (
false) cout << state[0].e() << orderNow << endl;
425 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
426 m2dip(splitInfo.kinematics()->m2Dip),
427 m2RadBef(splitInfo.kinematics()->m2RadBef),
428 m2Rad(splitInfo.kinematics()->m2RadAft),
429 m2Rec(splitInfo.kinematics()->m2Rec),
430 m2Emt(splitInfo.kinematics()->m2EmtAft);
431 int splitType(splitInfo.type);
439 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
440 splitInfo.recBef()->id);
441 vector <int> in, out;
442 for (
int i=0; i < state.size(); ++i) {
443 if (state[i].isFinal()) out.push_back(state[i].id());
444 if (state[i].mother1() == 1 && state[i].mother2() == 0)
445 in.push_back(state[i].id());
446 if (state[i].mother1() == 2 && state[i].mother2() == 0)
447 in.push_back(state[i].id());
450 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
451 && doMECs && fsr->weights->hasME(in,out);
452 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
455 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
456 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
458 double preFac = symmetryFactor() * chargeFac;
459 double kappa2 = pT2/m2dip;
460 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
463 bool doMassive = (abs(splitType) == 2);
466 if (!doMassive && orderNow >= 0) wt += preFac * ( 1.-z );
469 if (doMassive && orderNow >= 0) {
471 double pipj = 0., vijkt = 1., vijk = 1.;
474 if (splitType == 2) {
477 double yCS = kappa2 / (1.-z);
478 double nu2RadBef = m2RadBef/m2dip;
479 double nu2Rad = m2Rad/m2dip;
480 double nu2Emt = m2Emt/m2dip;
481 double nu2Rec = m2Rec/m2dip;
482 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
483 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
484 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
485 - 4.*nu2RadBef*nu2Rec;
486 vijk = sqrt(vijk) / (1-yCS);
487 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
488 pipj = m2dip * yCS/2.;
490 }
else if (splitType ==-2) {
493 double xCS = 1 - kappa2/(1.-z);
496 pipj = m2dip/2. * (1-xCS)/xCS;
500 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
501 wt += preFac*massCorr;
505 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
512 unordered_map<string,double> wts;
513 wts.insert( make_pair(
"base", wt ));
516 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
517 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
518 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
519 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
524 for ( unordered_map<string,double>::iterator it = wts.begin();
525 it != wts.end(); ++it )
526 kernelVals.insert(make_pair( it->first, it->second ));
539 bool Dire_fsr_qed_L2LA::canRadiate (
const Event& state, pair<int,int> ints,
540 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
541 return ( state[ints.first].isFinal()
542 && state[ints.first].isLepton() && state[ints.first].isCharged()
543 && state[ints.second].isCharged()
544 && bools[
"doQEDshowerByL"]);
547 bool Dire_fsr_qed_L2LA::canRadiate (
const Event& state,
int iRadBef,
548 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
549 return ( state[iRadBef].isFinal()
550 && state[iRadBef].isLepton() && state[iRadBef].isCharged()
551 && state[iRecBef].isCharged()
555 int Dire_fsr_qed_L2LA::kinMap() {
return 1;}
556 int Dire_fsr_qed_L2LA::motherID(
int idDaughter) {
return idDaughter;}
557 int Dire_fsr_qed_L2LA::sisterID(
int) {
return 22;}
559 double Dire_fsr_qed_L2LA::gaugeFactor (
int idRadBef,
int idRecBef) {
560 double chgRad = particleDataPtr->charge(idRadBef);
561 double chgRec = particleDataPtr->charge(idRecBef);
562 double charge = -1.*chgRad*chgRec;
563 if (!splitInfo.radBef()->isFinal) charge *= -1.;
564 if (!splitInfo.recBef()->isFinal) charge *= -1.;
565 if (idRadBef != 0 && idRecBef != 0)
return charge;
570 double Dire_fsr_qed_L2LA::symmetryFactor (
int,
int ) {
return 1.;}
572 int Dire_fsr_qed_L2LA::radBefID(
int idRad,
int idEmt) {
573 if (idEmt == 22 && particleDataPtr->isLepton(idRad)
574 && particleDataPtr->charge(idRad) != 0)
return idRad;
578 pair<int,int> Dire_fsr_qed_L2LA::radBefCols(
579 int colRadAfter,
int acolRadAfter,
580 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
582 vector<int>Dire_fsr_qed_L2LA::recPositions(
const Event& state,
int iRad,
586 if ( !state[iRad].isFinal()
587 || !(state[iRad].isLepton() && state[iRad].isCharged())
588 || state[iEmt].
id() != 22)
return recs;
591 vector<int> iExc(createvector<int>(iRad)(iEmt));
593 for (
int i=0; i < state.size(); ++i) {
594 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
595 if ( state[i].isCharged() ) {
596 if (state[i].isFinal())
598 if (state[i].mother1() == 1 && state[i].mother2() == 0)
600 if (state[i].mother1() == 2 && state[i].mother2() == 0)
610 double Dire_fsr_qed_L2LA::zSplit(
double zMinAbs,
double,
double m2dip) {
611 double Rz = rndmPtr->flat();
612 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
613 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
614 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
619 double Dire_fsr_qed_L2LA::overestimateInt(
double zMinAbs,
double,
620 double,
double m2dip,
int) {
622 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
623 double preFac = symmetryFactor() * abs(charge);
625 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
626 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
631 double Dire_fsr_qed_L2LA::overestimateDiff(
double z,
double m2dip,
int) {
633 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
634 double preFac = symmetryFactor() * abs(charge);
635 double kappaOld2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
636 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
641 bool Dire_fsr_qed_L2LA::calc(
const Event& state,
int orderNow) {
644 if (
false) cout << state[0].e() << orderNow << endl;
647 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
648 m2dip(splitInfo.kinematics()->m2Dip),
649 m2RadBef(splitInfo.kinematics()->m2RadBef),
650 m2Rad(splitInfo.kinematics()->m2RadAft),
651 m2Rec(splitInfo.kinematics()->m2Rec),
652 m2Emt(splitInfo.kinematics()->m2EmtAft);
653 int splitType(splitInfo.type);
661 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
662 splitInfo.recBef()->id);
663 vector <int> in, out;
664 for (
int i=0; i < state.size(); ++i) {
665 if (state[i].isFinal()) out.push_back(state[i].id());
666 if (state[i].mother1() == 1 && state[i].mother2() == 0)
667 in.push_back(state[i].id());
668 if (state[i].mother1() == 2 && state[i].mother2() == 0)
669 in.push_back(state[i].id());
672 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
673 && doMECs && fsr->weights->hasME(in,out);
674 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
677 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
678 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
680 double preFac = symmetryFactor() * chargeFac;
681 double kappa2 = pT2/m2dip;
682 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
685 bool doMassive = (abs(splitType) == 2);
688 if (!doMassive && orderNow >= 0) wt += preFac * ( 1.-z );
691 if (doMassive && orderNow >= 0) {
693 double pipj = 0., vijkt = 1., vijk = 1.;
696 if (splitType == 2) {
699 double yCS = kappa2 / (1.-z);
700 double nu2RadBef = m2RadBef/m2dip;
701 double nu2Rad = m2Rad/m2dip;
702 double nu2Emt = m2Emt/m2dip;
703 double nu2Rec = m2Rec/m2dip;
704 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
705 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
706 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
707 - 4.*nu2RadBef*nu2Rec;
708 vijk = sqrt(vijk) / (1-yCS);
709 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
710 pipj = m2dip * yCS/2.;
712 }
else if (splitType ==-2) {
715 double xCS = 1 - kappa2/(1.-z);
718 pipj = m2dip/2. * (1-xCS)/xCS;
722 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
723 wt += preFac*massCorr;
727 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
734 unordered_map<string,double> wts;
735 wts.insert( make_pair(
"base", wt ));
738 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
739 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
740 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
741 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
746 for ( unordered_map<string,double>::iterator it = wts.begin();
747 it != wts.end(); ++it )
748 kernelVals.insert(make_pair( it->first, it->second ));
763 bool Dire_fsr_qed_L2AL::canRadiate (
const Event& state, pair<int,int> ints,
764 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
765 return ( state[ints.first].isFinal()
766 && state[ints.first].isLepton() && state[ints.first].isCharged()
768 && state[ints.second].isCharged()
769 && bools[
"doQEDshowerByL"]);
772 bool Dire_fsr_qed_L2AL::canRadiate (
const Event& state,
int iRadBef,
773 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
774 return ( state[iRadBef].isFinal()
775 && state[iRadBef].isLepton() && state[iRadBef].isCharged()
776 && state[iRecBef].isCharged()
780 int Dire_fsr_qed_L2AL::kinMap() {
return 1;}
781 int Dire_fsr_qed_L2AL::motherID(
int idDaughter) {
return idDaughter;}
782 int Dire_fsr_qed_L2AL::sisterID(
int) {
return 22;}
784 double Dire_fsr_qed_L2AL::gaugeFactor (
int idRadBef,
int idRecBef) {
785 double chgRad = particleDataPtr->charge(idRadBef);
786 double chgRec = particleDataPtr->charge(idRecBef);
787 double charge = -1.*chgRad*chgRec;
788 if (!splitInfo.radBef()->isFinal) charge *= -1.;
789 if (!splitInfo.recBef()->isFinal) charge *= -1.;
790 if (idRadBef != 0 && idRecBef != 0)
return charge;
795 double Dire_fsr_qed_L2AL::symmetryFactor (
int,
int ) {
return 1.;}
797 int Dire_fsr_qed_L2AL::radBefID(
int idRad,
int idEmt) {
798 if (idRad == 22 && particleDataPtr->isLepton(idEmt)
799 && particleDataPtr->charge(idEmt) != 0)
return idEmt;
800 if (idEmt == 22 && particleDataPtr->isLepton(idRad)
801 && particleDataPtr->charge(idRad) != 0)
return idRad;
805 pair<int,int> Dire_fsr_qed_L2AL::radBefCols(
806 int colRadAfter,
int acolRadAfter,
807 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
809 vector<int>Dire_fsr_qed_L2AL::recPositions(
const Event& state,
int iRad,
813 if ( !state[iRad].isFinal()
814 || !(state[iRad].isLepton() && state[iRad].isCharged())
815 || state[iEmt].
id() != 22)
return recs;
818 vector<int> iExc(createvector<int>(iRad)(iEmt));
820 for (
int i=0; i < state.size(); ++i) {
821 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
822 if ( state[i].isCharged() ) {
823 if (state[i].isFinal())
825 if (state[i].mother1() == 1 && state[i].mother2() == 0)
827 if (state[i].mother1() == 2 && state[i].mother2() == 0)
837 double Dire_fsr_qed_L2AL::zSplit(
double zMinAbs,
double,
double m2dip) {
838 double Rz = rndmPtr->flat();
839 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
840 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
841 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
846 double Dire_fsr_qed_L2AL::overestimateInt(
double zMinAbs,
double,
847 double,
double m2dip,
int) {
849 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
850 double preFac = symmetryFactor() * abs(charge);
852 double kappa2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
853 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
858 double Dire_fsr_qed_L2AL::overestimateDiff(
double z,
double m2dip,
int) {
860 double charge = gaugeFactor(splitInfo.radBef()->id, splitInfo.recBef()->id);
861 double preFac = symmetryFactor() * abs(charge);
862 double kappaOld2 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/m2dip;
863 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
868 bool Dire_fsr_qed_L2AL::calc(
const Event& state,
int orderNow) {
871 if (
false) cout << state[0].e() << orderNow << endl;
874 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
875 m2dip(splitInfo.kinematics()->m2Dip),
876 m2RadBef(splitInfo.kinematics()->m2RadBef),
877 m2Rad(splitInfo.kinematics()->m2RadAft),
878 m2Rec(splitInfo.kinematics()->m2Rec),
879 m2Emt(splitInfo.kinematics()->m2EmtAft);
880 int splitType(splitInfo.type);
888 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
889 splitInfo.recBef()->id);
890 vector <int> in, out;
891 for (
int i=0; i < state.size(); ++i) {
892 if (state[i].isFinal()) out.push_back(state[i].id());
893 if (state[i].mother1() == 1 && state[i].mother2() == 0)
894 in.push_back(state[i].id());
895 if (state[i].mother1() == 2 && state[i].mother2() == 0)
896 in.push_back(state[i].id());
899 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
900 && doMECs && fsr->weights->hasME(in,out);
901 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
904 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
905 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
907 double preFac = symmetryFactor() * chargeFac;
908 double kappa2 = pT2/m2dip;
909 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
912 bool doMassive = (abs(splitType) == 2);
915 if (!doMassive && orderNow >= 0) wt += preFac * ( 1. - z );
918 if (doMassive && orderNow >= 0) {
920 double pipj = 0., vijkt = 1., vijk = 1.;
923 if (splitType == 2) {
926 double yCS = kappa2 / (1.-z);
927 double nu2RadBef = m2RadBef/m2dip;
928 double nu2Rad = m2Rad/m2dip;
929 double nu2Emt = m2Emt/m2dip;
930 double nu2Rec = m2Rec/m2dip;
931 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
932 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
933 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
934 - 4.*nu2RadBef*nu2Rec;
935 vijk = sqrt(vijk) / (1-yCS);
936 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
937 pipj = m2dip * yCS/2.;
939 }
else if (splitType ==-2) {
942 double xCS = 1 - kappa2/(1.-z);
945 pipj = m2dip/2. * (1-xCS)/xCS;
949 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
950 wt += preFac*massCorr;
954 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
961 unordered_map<string,double> wts;
962 wts.insert( make_pair(
"base", wt ));
965 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
966 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
967 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
968 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
973 for ( unordered_map<string,double>::iterator it = wts.begin();
974 it != wts.end(); ++it )
975 kernelVals.insert(make_pair( it->first, it->second ));
988 bool Dire_isr_qed_Q2QA::canRadiate (
const Event& state, pair<int,int> ints,
989 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
990 return (!state[ints.first].isFinal()
991 && state[ints.first].isQuark()
992 && state[ints.second].isCharged()
993 && bools[
"doQEDshowerByQ"] );
996 bool Dire_isr_qed_Q2QA::canRadiate (
const Event& state,
int iRadBef,
997 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
998 return (!state[iRadBef].isFinal()
999 && state[iRadBef].isQuark()
1000 && state[iRecBef].isCharged()
1004 int Dire_isr_qed_Q2QA::kinMap() {
return 1;}
1005 int Dire_isr_qed_Q2QA::motherID(
int idDaughter) {
return idDaughter;}
1006 int Dire_isr_qed_Q2QA::sisterID(
int) {
return 22;}
1008 double Dire_isr_qed_Q2QA::gaugeFactor (
int idRadBef,
int idRecBef) {
1009 double chgRad = particleDataPtr->charge(idRadBef);
1010 double chgRec = particleDataPtr->charge(idRecBef);
1011 double charge = -1.*chgRad*chgRec;
1012 if (!splitInfo.radBef()->isFinal) charge *= -1.;
1013 if (!splitInfo.recBef()->isFinal) charge *= -1.;
1014 if (idRadBef != 0 && idRecBef != 0)
return charge;
1019 double Dire_isr_qed_Q2QA::symmetryFactor (
int,
int ) {
return 1.;}
1021 int Dire_isr_qed_Q2QA::radBefID(
int idRad,
int idEmt) {
1022 if (particleDataPtr->isQuark(idRad) && idEmt == 22 )
return idRad;
1026 pair<int,int> Dire_isr_qed_Q2QA::radBefCols(
int colRadAfter,
int acolRadAfter,
1028 bool isQuark = (colRadAfter > 0);
1029 if (isQuark)
return make_pair(colRadAfter,0);
1030 return make_pair(0,acolRadAfter);
1033 vector<int>Dire_isr_qed_Q2QA::recPositions(
const Event& state,
int iRad,
1037 if ( state[iRad].isFinal() || !state[iRad].isQuark()
1038 || state[iEmt].
id() != 22)
return recs;
1041 vector<int> iExc(createvector<int>(iRad)(iEmt));
1043 for (
int i=0; i < state.size(); ++i) {
1044 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
1045 if ( state[i].isCharged() ) {
1046 if (state[i].isFinal())
1048 if (state[i].mother1() == 1 && state[i].mother2() == 0)
1050 if (state[i].mother1() == 2 && state[i].mother2() == 0)
1060 double Dire_isr_qed_Q2QA::zSplit(
double zMinAbs,
double,
double m2dip) {
1061 double Rz = rndmPtr->flat();
1062 double kappa2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgQ"))/m2dip;
1063 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
1064 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
1069 double Dire_isr_qed_Q2QA::overestimateInt(
double zMinAbs,
double,
1070 double,
double m2dip,
int) {
1072 double preFac = symmetryFactor() * abs(gaugeFactor(splitInfo.radBef()->id,
1073 splitInfo.recBef()->id));
1074 double kappa2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgQ"))/m2dip;
1075 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
1081 double Dire_isr_qed_Q2QA::overestimateDiff(
double z,
double m2dip,
int) {
1083 double preFac = symmetryFactor() * abs(gaugeFactor(splitInfo.radBef()->id,
1084 splitInfo.recBef()->id));
1085 double kappaOld2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgQ"))/m2dip;
1086 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
1091 bool Dire_isr_qed_Q2QA::calc(
const Event& state,
int orderNow) {
1094 if (
false) cout << state[0].e() << orderNow << endl;
1097 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
1098 m2dip(splitInfo.kinematics()->m2Dip);
1102 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
1103 splitInfo.recBef()->id);
1104 vector <int> in, out;
1105 for (
int i=0; i < state.size(); ++i) {
1106 if (state[i].isFinal()) out.push_back(state[i].id());
1107 if (state[i].mother1() == 1 && state[i].mother2() == 0)
1108 in.push_back(state[i].id());
1109 if (state[i].mother1() == 2 && state[i].mother2() == 0)
1110 in.push_back(state[i].id());
1113 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
1114 && doMECs && isr->weights->hasME(in,out);
1115 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
1118 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
1119 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
1121 double preFac = symmetryFactor() * chargeFac;
1122 double kappa2 = pT2/m2dip;
1123 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
1124 if (orderNow >= 0) wt += preFac * (1.-z);
1125 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
1128 unordered_map<string,double> wts;
1129 wts.insert( make_pair(
"base", wt ));
1132 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1133 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1134 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1135 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1140 for ( unordered_map<string,double>::iterator it = wts.begin();
1141 it != wts.end(); ++it )
1142 kernelVals.insert(make_pair( it->first, it->second ));
1155 bool Dire_isr_qed_A2QQ::canRadiate (
const Event& state, pair<int,int> ints,
1156 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1157 return (!state[ints.first].isFinal()
1158 && state[ints.first].isQuark()
1159 && bools[
"doQEDshowerByQ"] );
1162 bool Dire_isr_qed_A2QQ::canRadiate (
const Event& state,
int iRadBef,
1163 int, Settings*, PartonSystems*, BeamParticle*){
1164 return (!state[iRadBef].isFinal()
1165 && state[iRadBef].isQuark()
1169 int Dire_isr_qed_A2QQ::kinMap() {
return 1;}
1170 int Dire_isr_qed_A2QQ::motherID(
int) {
return 22;}
1171 int Dire_isr_qed_A2QQ::sisterID(
int idDaughter) {
return -idDaughter;}
1172 double Dire_isr_qed_A2QQ::gaugeFactor (
int,
int ) {
return 1.;}
1173 double Dire_isr_qed_A2QQ::symmetryFactor (
int,
int ) {
return 1.;}
1175 int Dire_isr_qed_A2QQ::radBefID(
int,
int idEA){
return -idEA;}
1176 pair<int,int> Dire_isr_qed_A2QQ::radBefCols(
int,
int,
int colEmtAfter,
1178 if ( acolEmtAfter > 0 )
return make_pair(acolEmtAfter,0);
1179 return make_pair(0, colEmtAfter);
1183 double Dire_isr_qed_A2QQ::zSplit(
double zMinAbs,
double zMaxAbs,
double) {
1186 double res = zMinAbs + rndmPtr->flat() * (zMaxAbs - zMinAbs);
1191 double Dire_isr_qed_A2QQ::overestimateInt(
double zMinAbs,
double zMaxAbs,
1192 double,
double,
int) {
1194 double preFac = symmetryFactor() * gaugeFactor();
1197 wt = enhance * preFac
1198 * 2. * ( zMaxAbs - zMinAbs);
1203 double Dire_isr_qed_A2QQ::overestimateDiff(
double,
double,
int) {
1205 double preFac = symmetryFactor() * gaugeFactor();
1208 wt = enhance * preFac
1214 bool Dire_isr_qed_A2QQ::calc(
const Event& state,
int orderNow) {
1217 if (
false) cout << state[0].e() << orderNow << endl;
1220 double z(splitInfo.kinematics()->z);
1223 double preFac = symmetryFactor() * gaugeFactor();
1224 wt = preFac * (pow(1.-z,2.) + pow(z,2.));
1226 if (orderNow >= 0) wt = 0.;
1229 unordered_map<string,double> wts;
1230 wts.insert( make_pair(
"base", wt ));
1233 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1234 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1235 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1236 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1241 for ( unordered_map<string,double>::iterator it = wts.begin();
1242 it != wts.end(); ++it )
1243 kernelVals.insert(make_pair( it->first, it->second ));
1256 bool Dire_isr_qed_Q2AQ::canRadiate (
const Event& state, pair<int,int> ints,
1257 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1258 return (!state[ints.first].isFinal()
1259 && state[ints.first].id() == 22
1260 && bools[
"doQEDshowerByQ"] );
1263 bool Dire_isr_qed_Q2AQ::canRadiate (
const Event& state,
int iRadBef,
1264 int, Settings*, PartonSystems*, BeamParticle*){
1265 return (!state[iRadBef].isFinal()
1266 && state[iRadBef].
id() == 22
1270 int Dire_isr_qed_Q2AQ::kinMap() {
return 1;}
1271 int Dire_isr_qed_Q2AQ::motherID(
int) {
return 1;}
1272 int Dire_isr_qed_Q2AQ::sisterID(
int) {
return 1;}
1273 double Dire_isr_qed_Q2AQ::gaugeFactor (
int,
int ) {
return 1.;}
1274 double Dire_isr_qed_Q2AQ::symmetryFactor (
int,
int ) {
return 0.5;}
1276 int Dire_isr_qed_Q2AQ::radBefID(
int,
int){
return 22;}
1277 pair<int,int> Dire_isr_qed_Q2AQ::radBefCols(
int,
int,
int,
int) {
1278 return make_pair(0,0); }
1281 double Dire_isr_qed_Q2AQ::zSplit(
double zMinAbs,
double,
double) {
1282 double R = rndmPtr->flat();
1283 double res = pow(zMinAbs,3./4.)
1284 / ( pow(1. + R*(-1. + pow(zMinAbs,-3./8.)),2./3.)
1285 *pow(R - (-1. + R)*pow(zMinAbs,3./8.),2.));
1290 double Dire_isr_qed_Q2AQ::overestimateInt(
double zMinAbs,
double,
1291 double,
double,
int) {
1293 double preFac = symmetryFactor() * gaugeFactor();
1294 wt = enhance * preFac * 2./3. * (8.*(-1. + pow(zMinAbs,-3./8.)));
1299 double Dire_isr_qed_Q2AQ::overestimateDiff(
double z,
double,
int) {
1301 double preFac = symmetryFactor() * gaugeFactor();
1302 wt = enhance * preFac * 2. / pow(z,11./8.);
1307 bool Dire_isr_qed_Q2AQ::calc(
const Event& state,
int orderNow) {
1310 if (
false) cout << state[0].e() << orderNow << endl;
1313 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
1314 m2dip(splitInfo.kinematics()->m2Dip),
1315 m2Rec(splitInfo.kinematics()->m2Rec);
1316 int splitType(splitInfo.type);
1319 double preFac = symmetryFactor() * gaugeFactor();
1320 double kappa2 = pT2 / m2dip;
1321 wt = preFac * 2.*z*(1.-z) / (pow2(z)+kappa2);
1322 if (orderNow >= 0) wt += preFac*z;
1325 bool doMassive = ( m2Rec > 0. && splitType == 2);
1327 if (doMassive && orderNow >= 0) {
1329 double uCS = kappa2 / (1-z);
1331 double massCorr = -2. * m2Rec / m2dip * uCS / (1.-uCS);
1333 wt += preFac * massCorr;
1338 unordered_map<string,double> wts;
1339 wts.insert( make_pair(
"base", wt ));
1342 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1343 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1344 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1345 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1350 for ( unordered_map<string,double>::iterator it = wts.begin();
1351 it != wts.end(); ++it )
1352 kernelVals.insert(make_pair( it->first, it->second ));
1365 bool Dire_isr_qed_L2LA::canRadiate (
const Event& state, pair<int,int> ints,
1366 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1367 return (!state[ints.first].isFinal()
1368 && state[ints.first].isLepton() && state[ints.first].isCharged()
1369 && state[ints.second].isCharged()
1370 && bools[
"doQEDshowerByL"]);
1373 bool Dire_isr_qed_L2LA::canRadiate (
const Event& state,
int iRadBef,
1374 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
1375 return (!state[iRadBef].isFinal()
1376 && state[iRadBef].isLepton()
1377 && state[iRadBef].isCharged()
1378 && state[iRecBef].isCharged()
1382 int Dire_isr_qed_L2LA::kinMap() {
return 1;}
1383 int Dire_isr_qed_L2LA::motherID(
int idDaughter) {
return idDaughter;}
1384 int Dire_isr_qed_L2LA::sisterID(
int) {
return 22;}
1386 double Dire_isr_qed_L2LA::gaugeFactor (
int idRadBef,
int idRecBef) {
1387 double chgRad = particleDataPtr->charge(idRadBef);
1388 double chgRec = particleDataPtr->charge(idRecBef);
1389 double charge = -1.*chgRad*chgRec;
1390 if (!splitInfo.radBef()->isFinal) charge *= -1.;
1391 if (!splitInfo.recBef()->isFinal) charge *= -1.;
1392 if (idRadBef != 0 && idRecBef != 0)
return charge;
1397 double Dire_isr_qed_L2LA::symmetryFactor (
int,
int ) {
return 1.;}
1399 int Dire_isr_qed_L2LA::radBefID(
int idRad,
int idEmt) {
1400 if (particleDataPtr->isLepton(idRad) && particleDataPtr->charge(idRad) != 0
1401 && idEmt == 22 )
return idRad;
1406 pair<int,int> Dire_isr_qed_L2LA::radBefCols(
int colRadAfter,
int acolRadAfter,
1408 bool isQuark = (colRadAfter > 0);
1409 if (isQuark)
return make_pair(colRadAfter,0);
1410 return make_pair(0,acolRadAfter);
1413 vector<int>Dire_isr_qed_L2LA::recPositions(
const Event& state,
int iRad,
1417 if ( state[iRad].isFinal()
1418 || !(state[iRad].isLepton() && state[iRad].isCharged())
1419 || state[iEmt].
id() != 22)
return recs;
1422 vector<int> iExc(createvector<int>(iRad)(iEmt));
1424 for (
int i=0; i < state.size(); ++i) {
1425 if ( find(iExc.begin(), iExc.end(), i) != iExc.end() )
continue;
1426 if ( state[i].isCharged() ) {
1427 if (state[i].isFinal())
1429 if (state[i].mother1() == 1 && state[i].mother2() == 0)
1431 if (state[i].mother1() == 2 && state[i].mother2() == 0)
1441 double Dire_isr_qed_L2LA::zSplit(
double zMinAbs,
double,
double m2dip) {
1442 double Rz = rndmPtr->flat();
1443 double kappa2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgL"))/m2dip;
1444 double p = pow( 1. + pow2(1-zMinAbs)/kappa2, Rz );
1445 double res = 1. - sqrt( p - 1. )*sqrt(kappa2);
1450 double Dire_isr_qed_L2LA::overestimateInt(
double zMinAbs,
double,
1451 double,
double m2dip,
int) {
1453 double preFac = symmetryFactor() * abs(gaugeFactor(splitInfo.radBef()->id,
1454 splitInfo.recBef()->id));
1455 double kappa2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgL"))/m2dip;
1456 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa2);
1461 double Dire_isr_qed_L2LA::overestimateDiff(
double z,
double m2dip,
int) {
1463 double preFac = symmetryFactor() * abs(gaugeFactor(splitInfo.radBef()->id,
1464 splitInfo.recBef()->id));
1465 double kappaOld2 = pow2(settingsPtr->parm(
"SpaceShower:pTminChgL"))/m2dip;
1466 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappaOld2);
1471 bool Dire_isr_qed_L2LA::calc(
const Event& state,
int orderNow) {
1474 if (
false) cout << state[0].e() << orderNow << endl;
1477 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
1478 m2dip(splitInfo.kinematics()->m2Dip);
1482 double chargeFac = gaugeFactor(splitInfo.radBef()->id,
1483 splitInfo.recBef()->id);
1484 vector <int> in, out;
1485 for (
int i=0; i < state.size(); ++i) {
1486 if (state[i].isFinal()) out.push_back(state[i].id());
1487 if (state[i].mother1() == 1 && state[i].mother2() == 0)
1488 in.push_back(state[i].id());
1489 if (state[i].mother1() == 2 && state[i].mother2() == 0)
1490 in.push_back(state[i].id());
1493 bool hasME = pT2 > pow2(settingsPtr->parm(
"Dire:pTminMECs"))
1494 && doMECs && isr->weights->hasME(in,out);
1495 if (hasME && chargeFac < 0.0) chargeFac = abs(chargeFac);
1498 && (chargeFac < 0. || splitInfo.radBef()->id != splitInfo.recBef()->id)
1499 && (hasME || pT2 > pT2minForcePos)) chargeFac = chgprefac*abs(chargeFac);
1501 double preFac = symmetryFactor() * chargeFac;
1502 double kappa2 = pT2/m2dip;
1503 wt = preFac * ( 2. * z * (1.-z) / ( pow2(1.-z) + kappa2) );
1504 if (orderNow >= 0) wt += preFac * (1.-z);
1507 unordered_map<string,double> wts;
1508 wts.insert( make_pair(
"base", wt ));
1511 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1512 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1513 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1514 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1519 for ( unordered_map<string,double>::iterator it = wts.begin();
1520 it != wts.end(); ++it )
1521 kernelVals.insert(make_pair( it->first, it->second ));
1534 bool Dire_isr_qed_A2LL::canRadiate (
const Event& state, pair<int,int> ints,
1535 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1536 return (!state[ints.first].isFinal()
1537 && state[ints.first].isLepton() && state[ints.first].isCharged()
1538 && bools[
"doQEDshowerByL"]);
1541 bool Dire_isr_qed_A2LL::canRadiate (
const Event& state,
int iRadBef,
1542 int, Settings*, PartonSystems*, BeamParticle*){
1543 return (!state[iRadBef].isFinal()
1544 && state[iRadBef].isLepton()
1545 && state[iRadBef].isCharged()
1549 int Dire_isr_qed_A2LL::kinMap() {
return 1;}
1550 int Dire_isr_qed_A2LL::motherID(
int) {
return 22;}
1551 int Dire_isr_qed_A2LL::sisterID(
int idDaughter) {
return -idDaughter;}
1552 double Dire_isr_qed_A2LL::gaugeFactor (
int,
int ) {
return 1.;}
1553 double Dire_isr_qed_A2LL::symmetryFactor (
int,
int ) {
return 1.;}
1555 int Dire_isr_qed_A2LL::radBefID(
int,
int idEA){
return -idEA;}
1556 pair<int,int> Dire_isr_qed_A2LL::radBefCols(
int,
int,
int colEmtAfter,
1558 if ( acolEmtAfter > 0 )
return make_pair(acolEmtAfter,0);
1559 return make_pair(0, colEmtAfter);
1563 double Dire_isr_qed_A2LL::zSplit(
double zMinAbs,
double zMaxAbs,
double) {
1566 double res = zMinAbs + rndmPtr->flat() * (zMaxAbs - zMinAbs);
1571 double Dire_isr_qed_A2LL::overestimateInt(
double zMinAbs,
double zMaxAbs,
1572 double,
double,
int) {
1574 double preFac = symmetryFactor() * gaugeFactor();
1577 wt = enhance * preFac
1578 * 2. * ( zMaxAbs - zMinAbs);
1584 double Dire_isr_qed_A2LL::overestimateDiff(
double,
double,
int) {
1586 double preFac = symmetryFactor() * gaugeFactor();
1589 wt = enhance * preFac
1595 bool Dire_isr_qed_A2LL::calc(
const Event& state,
int orderNow) {
1598 if (
false) cout << state[0].e() << orderNow << endl;
1601 double z(splitInfo.kinematics()->z);
1604 double preFac = symmetryFactor() * gaugeFactor();
1605 wt = preFac * (pow(1.-z,2.) + pow(z,2.));
1607 if (orderNow == -1) wt = 0.0;
1610 unordered_map<string,double> wts;
1611 wts.insert( make_pair(
"base", wt ));
1614 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1615 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1616 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1617 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1622 for ( unordered_map<string,double>::iterator it = wts.begin();
1623 it != wts.end(); ++it )
1624 kernelVals.insert(make_pair( it->first, it->second ));
1637 bool Dire_isr_qed_L2AL::canRadiate (
const Event& state, pair<int,int> ints,
1638 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1639 return (!state[ints.first].isFinal()
1640 && state[ints.first].id() == 22
1641 && bools[
"doQEDshowerByL"]);
1644 bool Dire_isr_qed_L2AL::canRadiate (
const Event& state,
int iRadBef,
1645 int, Settings*, PartonSystems*, BeamParticle*){
1646 return (!state[iRadBef].isFinal()
1647 && state[iRadBef].
id() == 22
1651 int Dire_isr_qed_L2AL::kinMap() {
return 1;}
1652 int Dire_isr_qed_L2AL::motherID(
int) {
return 1;}
1653 int Dire_isr_qed_L2AL::sisterID(
int) {
return 1;}
1654 double Dire_isr_qed_L2AL::gaugeFactor (
int,
int ) {
return 1.;}
1655 double Dire_isr_qed_L2AL::symmetryFactor (
int,
int ) {
return 0.5;}
1657 int Dire_isr_qed_L2AL::radBefID(
int,
int){
return 22;}
1658 pair<int,int> Dire_isr_qed_L2AL::radBefCols(
int,
int,
int,
int) {
1659 return make_pair(0,0); }
1662 double Dire_isr_qed_L2AL::zSplit(
double zMinAbs,
double,
double) {
1663 double R = rndmPtr->flat();
1664 double res = pow(zMinAbs,3./4.)
1665 / ( pow(1. + R*(-1. + pow(zMinAbs,-3./8.)),2./3.)
1666 *pow(R - (-1. + R)*pow(zMinAbs,3./8.),2.));
1671 double Dire_isr_qed_L2AL::overestimateInt(
double zMinAbs,
double,
1672 double,
double,
int) {
1674 double preFac = symmetryFactor() * gaugeFactor();
1675 wt = enhance * preFac * 2./3. * (8.*(-1. + pow(zMinAbs,-3./8.)));
1680 double Dire_isr_qed_L2AL::overestimateDiff(
double z,
double,
int) {
1682 double preFac = symmetryFactor() * gaugeFactor();
1683 wt = enhance * preFac * 2. / pow(z,11./8.);
1688 bool Dire_isr_qed_L2AL::calc(
const Event& state,
int orderNow) {
1691 if (
false) cout << state[0].e() << orderNow << endl;
1694 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
1695 m2dip(splitInfo.kinematics()->m2Dip),
1696 m2Rec(splitInfo.kinematics()->m2Rec);
1697 int splitType(splitInfo.type);
1700 double preFac = symmetryFactor() * gaugeFactor();
1701 double kappa2 = pT2 / m2dip;
1703 wt = preFac * 2.*z*(1.-z) / (pow2(z)+kappa2);
1704 if (orderNow >= 0) wt += preFac*z;
1707 bool doMassive = ( m2Rec > 0. && splitType == 2);
1709 if (doMassive && orderNow >= 0) {
1711 double uCS = kappa2 / (1-z);
1713 double massCorr = -2. * m2Rec / m2dip * uCS / (1.-uCS);
1715 wt += preFac * massCorr;
1720 unordered_map<string,double> wts;
1721 wts.insert( make_pair(
"base", wt ));
1724 if (settingsPtr->parm(
"Variations:muRisrDown") != 1.)
1725 wts.insert( make_pair(
"Variations:muRisrDown", wt ));
1726 if (settingsPtr->parm(
"Variations:muRisrUp") != 1.)
1727 wts.insert( make_pair(
"Variations:muRisrUp", wt ));
1732 for ( unordered_map<string,double>::iterator it = wts.begin();
1733 it != wts.end(); ++it )
1734 kernelVals.insert(make_pair( it->first, it->second ));
1743 bool Dire_fsr_qed_Q2QA_notPartial::canRadiate (
const Event& state,
1745 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1746 return ( state[ints.first].isFinal()
1747 && state[ints.first].isQuark() && !state[ints.second].isCharged()
1748 && bools[
"doQEDshowerByQ"]);
1751 bool Dire_fsr_qed_Q2QA_notPartial::canRadiate (
const Event& state,
int iRadBef,
1752 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
1753 return ( state[iRadBef].isFinal()
1754 && state[iRadBef].isQuark() && !state[iRecBef].isCharged()
1758 int Dire_fsr_qed_Q2QA_notPartial::kinMap() {
return 1;}
1759 int Dire_fsr_qed_Q2QA_notPartial::motherID(
int idDaughter) {
return idDaughter;}
1760 int Dire_fsr_qed_Q2QA_notPartial::sisterID(
int) {
return 22;}
1762 double Dire_fsr_qed_Q2QA_notPartial::gaugeFactor (
int idRadBef,
int) {
1763 if (idRadBef != 0)
return pow2(particleDataPtr->charge(idRadBef));
1768 double Dire_fsr_qed_Q2QA_notPartial::symmetryFactor (
int,
int ) {
return 1.;}
1770 int Dire_fsr_qed_Q2QA_notPartial::radBefID(
int idRad,
int idEmt) {
1771 if (particleDataPtr->isQuark(idRad) && idEmt == 22 )
return idRad;
1775 pair<int,int> Dire_fsr_qed_Q2QA_notPartial::radBefCols(
1776 int colRadAfter,
int acolRadAfter,
1777 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
1779 vector<int>Dire_fsr_qed_Q2QA_notPartial::recPositions(
const Event&,
int,
int) {
1786 double Dire_fsr_qed_Q2QA_notPartial::zSplit(
double zMinAbs,
double,
1788 double Rz = rndmPtr->flat();
1789 double kappa4 = pow4(settingsPtr->parm(
"TimeShower:pTminChgQ"))/pow2(m2dip);
1790 double p = pow( 1. + pow2(1-zMinAbs)/kappa4, Rz );
1791 double res = 1. - sqrt( p - 1. )*sqrt(kappa4);
1796 double Dire_fsr_qed_Q2QA_notPartial::overestimateInt(
double zMinAbs,
double,
1797 double,
double m2dip,
int) {
1799 double charge = gaugeFactor(splitInfo.radBef()->id);
1800 double preFac = symmetryFactor() * abs(charge);
1802 double kappa4 = pow4(settingsPtr->parm(
"TimeShower:pTminChgQ"))/pow2(m2dip);
1803 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa4);
1808 double Dire_fsr_qed_Q2QA_notPartial::overestimateDiff(
double z,
double m2dip,
1811 double charge = gaugeFactor(splitInfo.radBef()->id);
1812 double preFac = symmetryFactor() * abs(charge);
1813 double kappa4 = pow2(settingsPtr->parm(
"TimeShower:pTminChgQ"))/pow2(m2dip);
1814 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappa4);
1819 bool Dire_fsr_qed_Q2QA_notPartial::calc(
const Event& state,
int orderNow) {
1822 if (
false) cout << state[0].e() << orderNow << endl;
1825 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
1826 m2dip(splitInfo.kinematics()->m2Dip),
1827 m2RadBef(splitInfo.kinematics()->m2RadBef),
1828 m2Rad(splitInfo.kinematics()->m2RadAft),
1829 m2Rec(splitInfo.kinematics()->m2Rec),
1830 m2Emt(splitInfo.kinematics()->m2EmtAft);
1831 int splitType(splitInfo.type);
1839 double chargeFac = gaugeFactor(splitInfo.radBef()->id);
1841 double preFac = symmetryFactor() * chargeFac;
1842 double kappa2 = pT2/m2dip;
1843 wt = preFac * 2. * z / (1.-z);
1846 bool doMassive = (abs(splitType) == 2);
1849 if (!doMassive && orderNow >= 0) wt += preFac * ( 1.-z );
1852 if (doMassive && orderNow >= 0) {
1854 double pipj = 0., vijkt = 1., vijk = 1.;
1857 if (splitType == 2) {
1860 double yCS = kappa2 / (1.-z);
1861 double nu2RadBef = m2RadBef/m2dip;
1862 double nu2Rad = m2Rad/m2dip;
1863 double nu2Emt = m2Emt/m2dip;
1864 double nu2Rec = m2Rec/m2dip;
1865 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
1866 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
1867 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
1868 - 4.*nu2RadBef*nu2Rec;
1869 vijk = sqrt(vijk) / (1-yCS);
1870 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
1871 pipj = m2dip * yCS/2.;
1873 }
else if (splitType ==-2) {
1876 double xCS = 1 - kappa2/(1.-z);
1879 pipj = m2dip/2. * (1-xCS)/xCS;
1883 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
1884 wt += preFac*massCorr;
1887 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
1890 unordered_map<string,double> wts;
1891 wts.insert( make_pair(
"base", wt ));
1894 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
1895 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
1896 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
1897 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
1902 for ( unordered_map<string,double>::iterator it = wts.begin();
1903 it != wts.end(); ++it )
1904 kernelVals.insert(make_pair( it->first, it->second ));
1917 bool Dire_fsr_qed_L2LA_notPartial::canRadiate (
const Event& state,
1919 unordered_map<string,bool> bools, Settings*, PartonSystems*, BeamParticle*){
1920 return ( state[ints.first].isFinal()
1921 && state[ints.first].isLepton() && state[ints.first].isCharged()
1922 && !state[ints.second].isCharged() && bools[
"doQEDshowerByL"]);
1925 bool Dire_fsr_qed_L2LA_notPartial::canRadiate (
const Event& state,
int iRadBef,
1926 int iRecBef, Settings*, PartonSystems*, BeamParticle*){
1927 return ( state[iRadBef].isFinal()
1928 && state[iRadBef].isLepton() && state[iRadBef].isCharged()
1929 && !state[iRecBef].isCharged() && doQEDshowerByL);
1932 int Dire_fsr_qed_L2LA_notPartial::kinMap() {
return 1;}
1933 int Dire_fsr_qed_L2LA_notPartial::motherID(
int idDaughter) {
return idDaughter;}
1934 int Dire_fsr_qed_L2LA_notPartial::sisterID(
int) {
return 22;}
1936 double Dire_fsr_qed_L2LA_notPartial::gaugeFactor (
int idRadBef,
int) {
1937 if (idRadBef != 0)
return pow2(particleDataPtr->charge(idRadBef));
1941 double Dire_fsr_qed_L2LA_notPartial::symmetryFactor (
int,
int ) {
return 1.;}
1943 int Dire_fsr_qed_L2LA_notPartial::radBefID(
int idRad,
int idEmt) {
1944 if (idEmt == 22 && particleDataPtr->isLepton(idRad)
1945 && particleDataPtr->charge(idRad) != 0)
return idRad;
1950 pair<int,int> Dire_fsr_qed_L2LA_notPartial::radBefCols(
1951 int colRadAfter,
int acolRadAfter,
1952 int,
int) {
return make_pair(colRadAfter,acolRadAfter); }
1954 vector<int>Dire_fsr_qed_L2LA_notPartial::recPositions(
const Event&,
int,
int) {
1961 double Dire_fsr_qed_L2LA_notPartial::zSplit(
double zMinAbs,
double,
1963 double Rz = rndmPtr->flat();
1964 double kappa4 = pow4(settingsPtr->parm(
"TimeShower:pTminChgL"))/pow2(m2dip);
1965 double p = pow( 1. + pow2(1-zMinAbs)/kappa4, Rz );
1966 double res = 1. - sqrt( p - 1. )*sqrt(kappa4);
1971 double Dire_fsr_qed_L2LA_notPartial::overestimateInt(
double zMinAbs,
double,
1972 double,
double m2dip,
int) {
1974 double charge = gaugeFactor(splitInfo.radBef()->id);
1975 double preFac = symmetryFactor() * abs(charge);
1977 double kappa4 = pow4(settingsPtr->parm(
"TimeShower:pTminChgL"))/pow2(m2dip);
1978 wt = enhance * preFac * 2. * 0.5 * log( 1. + pow2(1.-zMinAbs)/kappa4);
1983 double Dire_fsr_qed_L2LA_notPartial::overestimateDiff(
double z,
double m2dip,
1986 double charge = gaugeFactor(splitInfo.radBef()->id);
1987 double preFac = symmetryFactor() * abs(charge);
1988 double kappa4 = pow2(settingsPtr->parm(
"TimeShower:pTminChgL"))/pow2(m2dip);
1989 wt = enhance * preFac * 2.* (1.-z) / ( pow2(1.-z) + kappa4);
1994 bool Dire_fsr_qed_L2LA_notPartial::calc(
const Event& state,
int orderNow) {
1997 if (
false) cout << state[0].e() << orderNow << endl;
2000 double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
2001 m2dip(splitInfo.kinematics()->m2Dip),
2002 m2RadBef(splitInfo.kinematics()->m2RadBef),
2003 m2Rad(splitInfo.kinematics()->m2RadAft),
2004 m2Rec(splitInfo.kinematics()->m2Rec),
2005 m2Emt(splitInfo.kinematics()->m2EmtAft);
2006 int splitType(splitInfo.type);
2014 double chargeFac = gaugeFactor(splitInfo.radBef()->id);
2016 double preFac = symmetryFactor() * chargeFac;
2017 double kappa2 = pT2/m2dip;
2018 wt = preFac * 2. * z / (1.-z);
2021 bool doMassive = (abs(splitType) == 2);
2024 if (!doMassive && orderNow >= 0) wt += preFac * ( 1.-z );
2027 if (doMassive && orderNow >= 0) {
2029 double pipj = 0., vijkt = 1., vijk = 1.;
2032 if (splitType == 2) {
2035 double yCS = kappa2 / (1.-z);
2036 double nu2RadBef = m2RadBef/m2dip;
2037 double nu2Rad = m2Rad/m2dip;
2038 double nu2Emt = m2Emt/m2dip;
2039 double nu2Rec = m2Rec/m2dip;
2040 vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
2041 double Q2mass = m2dip + m2Rad + m2Rec + m2Emt;
2042 vijkt = pow2(Q2mass/m2dip - nu2RadBef - nu2Rec)
2043 - 4.*nu2RadBef*nu2Rec;
2044 vijk = sqrt(vijk) / (1-yCS);
2045 vijkt = sqrt(vijkt)/ (Q2mass/m2dip - nu2RadBef - nu2Rec);
2046 pipj = m2dip * yCS/2.;
2048 }
else if (splitType ==-2) {
2051 double xCS = 1 - kappa2/(1.-z);
2054 pipj = m2dip/2. * (1-xCS)/xCS;
2058 double massCorr = vijkt/vijk*( 1. - z - m2RadBef/pipj);
2059 wt += preFac*massCorr;
2062 if (orderNow < 0 && chargeFac < 0.) wt = 0.;
2065 unordered_map<string,double> wts;
2066 wts.insert( make_pair(
"base", wt ));
2069 if (settingsPtr->parm(
"Variations:muRfsrDown") != 1.)
2070 wts.insert( make_pair(
"Variations:muRfsrDown", wt ));
2071 if (settingsPtr->parm(
"Variations:muRfsrUp") != 1.)
2072 wts.insert( make_pair(
"Variations:muRfsrUp", wt ));
2077 for ( unordered_map<string,double>::iterator it = wts.begin();
2078 it != wts.end(); ++it )
2079 kernelVals.insert(make_pair( it->first, it->second ));