ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8::PowhegV_EW Class Reference
Inheritance diagram for Pythia8::PowhegV_EW:
Collaboration diagram for Pythia8::PowhegV_EW:

Public Member Functions

 PowhegV_EW ()
 ~PowhegV_EW ()
bool initAfterBeams ()
double pTpythia (const Event &e, int RadAfterBranch, int EmtAfterBranch, int RecAfterBranch, bool FSR)
double pTpowheg (const Event &e, int i, int j, bool FSR)
double pTcalc (const Event &e, int i, int j, int k, int r, int xSRin)
bool canVetoMPIStep ()
int numberVetoMPIStep ()
bool doVetoMPIStep (int nMPI, const Event &e)
bool canVetoISREmission ()
bool doVetoISREmission (int, const Event &e, int iSys)
bool canVetoFSREmission ()
bool doVetoFSREmission (int, const Event &e, int iSys, bool inr)
bool canVetoMPIEmission ()
bool doVetoMPIEmission (int, const Event &e)
int getNISRveto ()
int getNFSRveto ()

Private Attributes

int m_nFinal {}
int m_vetoMode {}
int m_vetoCount {}
int m_pThardMode {}
int m_pTemtMode {}
int m_emittedMode {}
int m_pTdefMode {}
int m_MPIvetoMode {}
double m_pThard {}
double m_pTMPI {}
bool m_accepted {}
int m_nAcceptSeq {}
unsigned long int m_nISRveto {}
unsigned long int m_nFSRveto {}
si_data_type m_si_data_ {}
si_event_info_type m_si_event_info_ {}

Detailed Description

Definition at line 118 of file PowhegV_EW.cxx.

Constructor & Destructor Documentation

◆ PowhegV_EW()

Pythia8::PowhegV_EW::PowhegV_EW ( )
inline

Definition at line 123 of file PowhegV_EW.cxx.

123 {
124
125 std::cout<<"**********************************************************"<<std::endl;
126 std::cout<<"* *"<<std::endl;
127 std::cout<<"* SI: Defining modified PowhegHook to perform *"<<std::endl;
128 std::cout<<"* the matching (ptmaxmatch = 2) *"<<std::endl;
129 std::cout<<"* *"<<std::endl;
130 std::cout<<"**********************************************************"<<std::endl;
131
134 Pythia8_UserHooks::UserHooksFactory::userSettings<double>()["m_si_event_info_.vetoscale_fsr"]=10.0;
135 Pythia8_UserHooks::UserHooksFactory::userSettings<double>()["m_si_event_info_.vetoscale_isr"]=10.0;
136
137 };
static std::map< std::string, T > & userSettings()

◆ ~PowhegV_EW()

Pythia8::PowhegV_EW::~PowhegV_EW ( )
inline

Definition at line 139 of file PowhegV_EW.cxx.

139{}

Member Function Documentation

◆ canVetoFSREmission()

bool Pythia8::PowhegV_EW::canVetoFSREmission ( )
inline

Definition at line 538 of file PowhegV_EW.cxx.

538{ return (m_vetoMode == 0) ? false : true; }

◆ canVetoISREmission()

bool Pythia8::PowhegV_EW::canVetoISREmission ( )
inline

Definition at line 482 of file PowhegV_EW.cxx.

482{ return (m_vetoMode == 0) ? false : true; }

◆ canVetoMPIEmission()

bool Pythia8::PowhegV_EW::canVetoMPIEmission ( )
inline

Definition at line 642 of file PowhegV_EW.cxx.

642{ return (m_MPIvetoMode == 0) ? false : true; }

◆ canVetoMPIStep()

bool Pythia8::PowhegV_EW::canVetoMPIStep ( )
inline

Definition at line 406 of file PowhegV_EW.cxx.

406{ return true; }

◆ doVetoFSREmission()

bool Pythia8::PowhegV_EW::doVetoFSREmission ( int ,
const Event & e,
int iSys,
bool inr )
inline

Definition at line 539 of file PowhegV_EW.cxx.

539 {
540 // radiation from the hard system: isys=0
541 // radiation from resonances: isys!=0 and inr=1
542 // MPI radiation: isys!=0 and inr=0
543
544 // we do not veto MPI radiation
545 // if we veto here gamma from resonance (inr==1),
546 // we do not have to use canSetResonanceScale
547 if (iSys != 0 && inr != 1) return false;
548
549 // In case of radiation from resonance we veto
550 // This is used for ptmaxmatch = 2.
551 // If py8veto = 1, this method is also used to veto photons, otherwise, use external function
552 // force the radiation scale, m_pThard, to be equal to the one set in the LHE file
553 if (inr == 1) {
554 if ((m_si_data_.vetoqed == false) || (m_si_data_.py8veto == false)) {
555 return false;
556 }
557 else {
558 // Set scale for FSR from the resonance
559 m_pThard = m_si_event_info_.vetoscale_fsr;
560 }
561 }
562
563
564 // If m_vetocount != 0 and we already have accepted 'vetoCount' emissions in a row,
565 // do nothing; if m_vetocount = 0 check all emissions
566 if (m_vetoCount != 0 && m_nAcceptSeq >= m_vetoCount) return false;
567
568 // Pythia radiator (before and after), emitted and recoiler (after)
569 int iRecAft = e.size() - 1;
570 int iEmt = e.size() - 2;
571 int iRadAft = e.size() - 3;
572 int iRadBef = e[iEmt].mother1();
573 if ( (e[iRecAft].status() != 52 && e[iRecAft].status() != -53) ||
574 e[iEmt].status() != 51 || e[iRadAft].status() != 51) {
575 e.list();
576 std::cout << "Error: couldn't find Pythia FSR emission" << std::endl;
577 exit(1);
578 }
579
580 // Behaviour based on m_pTemtMode:
581 // 0 - pT of emitted w.r.t. radiator before
582 // 1 - min(pT of emitted w.r.t. all incoming/outgoing)
583 // 2 - min(pT of all outgoing w.r.t. all incoming/outgoing)
584 int xSR = (m_pTemtMode == 0) ? 1 : -1;
585
586 int i = (m_pTemtMode == 0) ? iRadBef : -1;
587 i = (m_pTdefMode == 1) ? iRadAft : iRadBef;
588 // using POWHEG pT definition i should be iRadAft (daugther)
589 int k = (m_pTemtMode == 0) ? iRadAft : -1;
590 int r = (m_pTemtMode == 0) ? iRecAft : -1;
591
592 // When pTemtMode is 0 or 1, iEmt has been selected
593 double pTemt = 0.;
594 if (m_pTemtMode == 0 || m_pTemtMode == 1) {
595 // Which parton is emitted, based on m_emittedMode:
596 // 0 - Pythia definition of emitted
597 // 1 - Pythia definition of radiated after emission
598 // 2 - Random selection of emitted or radiated after emission
599 // 3 - Try both emitted and radiated after emission
600
601 // j = radiator after
602
603 int j = iRadAft;
604 //m_emittedMode = 0 -> j = iRadAft + 1 = iEmt
605 if (m_emittedMode == 0 || (m_emittedMode == 2 && rndmPtr->flat() < 0.5)) j++;
606
607 for (int jLoop = 0; jLoop < 2; jLoop++) {
608 if (jLoop == 0) pTemt = pTcalc(e, i, j, k, r, xSR);
609 else if (jLoop == 1) pTemt = min(pTemt, pTcalc(e, i, j, k, r, xSR));
610
611 // For m_emittedMode == 3, have tried iRadAft, now try iEmt
612 if (m_emittedMode != 3) break;
613 if (k != -1) swap(j, k); else j = iEmt;
614 }
615
616 // If m_pTemtMode is 2, then try all final-state partons as emitted
617 } else if (m_pTemtMode == 2) {
618 pTemt = pTcalc(e, i, -1, k, r, xSR);
619 }
620
621#ifdef DBGOUTPUT
622 std::cout << "doVetoFSREmission: pTemt = " << pTemt << std::endl;
623#endif
624
625 // Veto if pTemt > m_pThard
626 if (pTemt > m_pThard) {
627 m_nAcceptSeq = 0;
628 m_nFSRveto++;
629 return true;
630 }
631
632 // Else mark that an emission has been accepted and continue
633 m_nAcceptSeq++;
634 m_accepted = true;
635 return false;
636 }
#define min(a, b)
Definition cfImp.cxx:40
si_event_info_type m_si_event_info_
unsigned long int m_nFSRveto
double pTcalc(const Event &e, int i, int j, int k, int r, int xSRin)
si_data_type m_si_data_
int r
Definition globals.cxx:22
status
Definition merge.py:16
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)

◆ doVetoISREmission()

bool Pythia8::PowhegV_EW::doVetoISREmission ( int ,
const Event & e,
int iSys )
inline

Definition at line 483 of file PowhegV_EW.cxx.

483 {
484
485 // Must be radiation from the hard system, otherwise return
486 if (iSys != 0) return false;
487
488 // If m_vetocount != 0 and we already have accepted 'vetoCount' emissions in a row,
489 // do nothing; if m_vetocount = 0 check all emissions
490 if (m_vetoCount != 0 && m_nAcceptSeq >= m_vetoCount) return false;
491
492 // Pythia radiator after, emitted and recoiler after.
493 int iRadAft = -1, iEmt = -1, iRecAft = -1;
494 for (int i = e.size() - 1; i > 0; i--) {
495 if (iRadAft == -1 && e[i].status() == -41) iRadAft = i;
496 else if (iEmt == -1 && e[i].status() == 43) iEmt = i;
497 else if (iRecAft == -1 && e[i].status() == -42) iRecAft = i;
498 if (iRadAft != -1 && iEmt != -1 && iRecAft != -1) break;
499 }
500 if (iRadAft == -1 || iEmt == -1 || iRecAft == -1) {
501 e.list();
502 std::cout << "Error: couldn't find Pythia ISR emission" << std::endl;
503 exit(1);
504 }
505
506 // m_pTemtMode == 0: pT of emitted w.r.t. radiator
507 // m_pTemtMode == 1: min(pT of emitted w.r.t. all incoming/outgoing)
508 // m_pTemtMode == 2: min(pT of all outgoing w.r.t. all incoming/outgoing)
509 int xSR = (m_pTemtMode == 0) ? 0 : -1;
510 int i = (m_pTemtMode == 0) ? iRadAft : -1;
511 int j = (m_pTemtMode != 2) ? iEmt : -1;
512 int k = -1;
513 int r = (m_pTemtMode == 0) ? iRecAft : -1;
514 double pTemt = pTcalc(e, i, j, k, r, xSR);
515
516#ifdef DBGOUTPUT
517 std::cout << "doVetoISREmission: pTemt = " << pTemt << std::endl;
518#endif
519
520 // Veto if pTemt > m_pThard
521 if (pTemt > m_pThard) {
522 m_nAcceptSeq = 0;
523 m_nISRveto++;
524 return true;
525 }
526
527 // Else mark that an emission has been accepted and continue
528 m_nAcceptSeq++;
529 m_accepted = true;
530
531 return false;
532 }
unsigned long int m_nISRveto

◆ doVetoMPIEmission()

bool Pythia8::PowhegV_EW::doVetoMPIEmission ( int ,
const Event & e )
inline

Definition at line 643 of file PowhegV_EW.cxx.

643 {
644
645 if (m_MPIvetoMode == 1) {
646 if (e[e.size() - 1].pT() > m_pTMPI) {
647#ifdef DBGOUTPUT
648 std::cout << "doVetoMPIEmission: pTnow = " << e[e.size() - 1].pT()
649 << ", pTMPI = " << m_pTMPI << std::endl;
650#endif
651 return true;
652 }
653 }
654 return false;
655 }

◆ doVetoMPIStep()

bool Pythia8::PowhegV_EW::doVetoMPIStep ( int nMPI,
const Event & e )
inline

Definition at line 408 of file PowhegV_EW.cxx.

408 {
409
410 if (nMPI > 1) return false;
411
412 // Find if there is a POWHEG emission. Go backwards through the
413 // event record until there is a non-final particle. Also sum pT and
414 // find pT_1 for possible MPI vetoing
415 int count = 0;
416 double pT1 = 0., pTsum = 0.;
417 for (int i = e.size() - 1; i > 0; i--) {
418 if (e[i].isFinal()) {
419 count++;
420 pT1 = e[i].pT();
421 pTsum += e[i].pT();
422 } else break;
423 }
424 // Extra check that we have the correct final state
425 if (count != m_nFinal && count != m_nFinal + 1) {
426 std::cout << "Error: wrong number of final state particles in event" << std::endl;
427 exit(1);
428 }
429 // Flag if POWHEG radiation present and index
430 bool isEmt = (count == m_nFinal) ? false : true;
431 int iEmt = (isEmt) ? e.size() - 1 : -1;
432
433 // If there is no radiation or if m_pThardMode is 0 then set m_pThard = SCALUP.
434 m_pThard = -1;
435 // m_pThardMode is 0
436 if (!isEmt || m_pThardMode == 0) {
437 // This sets the scale to veto emissions in the QCD shower by Pythia
438 // This scale is used for all emissions, except if they come from the resonance
439 m_pThard = m_si_event_info_.vetoscale_isr;
440 // Not using directly scalup, because the special file LHE (two scales)
441
442 // If m_pThardMode is 1 then the pT of the POWHEG emission is checked against
443 // all other incoming and outgoing partons, with the minimal value taken
444 } else if (m_pThardMode == 1) {
445 m_pThard = pTcalc(e, -1, iEmt, -1, -1, -1);
446
447 // If m_pThardMode is 2, then the pT of all final-state partons is checked
448 // against all other incoming and outgoing partons, with the minimal value
449 // taken
450 } else if (m_pThardMode == 2) {
451 m_pThard = pTcalc(e, -1, -1, -1, -1, -1);
452 }
453
454 // Find MPI veto pT if necessary
455 if (m_MPIvetoMode == 1) {
456 m_pTMPI = (isEmt) ? pTsum / 2. : pT1;
457 }
458
459#ifdef DBGOUTPUT
460 std::cout << "doVetoMPIStep: Qfac = " << infoPtr->scalup()
461 << ", pThard = " << m_pThard << std::endl;
462#endif
463
464 // Initialise other variables
465 m_accepted = false;
467
468 if(m_pThard < 0)
469 {
470 std::cout << "something wrong with pThard = " << m_pThard << std::endl;
471 exit(1);
472 }
473
474 // Do not veto the event
475 return false;
476 }
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ getNFSRveto()

int Pythia8::PowhegV_EW::getNFSRveto ( )
inline

Definition at line 662 of file PowhegV_EW.cxx.

662{ return m_nFSRveto; }

◆ getNISRveto()

int Pythia8::PowhegV_EW::getNISRveto ( )
inline

Definition at line 661 of file PowhegV_EW.cxx.

661{ return m_nISRveto; }

◆ initAfterBeams()

bool Pythia8::PowhegV_EW::initAfterBeams ( )
inline

Definition at line 142 of file PowhegV_EW.cxx.

142 {
143 m_nFinal = settingsPtr->mode("POWHEG:nFinal");
144 m_vetoMode = settingsPtr->mode("POWHEG:veto");
145 m_vetoCount = settingsPtr->mode("POWHEG:vetoCount");
146 m_pThardMode = settingsPtr->mode("POWHEG:pThard");
147 m_pTemtMode = settingsPtr->mode("POWHEG:pTemt");
148 m_emittedMode = settingsPtr->mode("POWHEG:emitted");
149 m_pTdefMode = settingsPtr->mode("POWHEG:pTdef");
150 m_MPIvetoMode = settingsPtr->mode("POWHEG:MPIveto");
151
152 m_si_data_.vetoqed = settingsPtr->mode("si_data_.vetoqed");
153 m_si_data_.py8veto = settingsPtr->mode("si_data_.py8veto");
154 m_si_event_info_.vetoscale_fsr = settingsPtr->mode("m_si_event_info_.vetoscale_fsr");
155 m_si_event_info_.vetoscale_isr = settingsPtr->mode("m_si_event_info_.vetoscale_isr");
156 return true;
157 }

◆ numberVetoMPIStep()

int Pythia8::PowhegV_EW::numberVetoMPIStep ( )
inline

Definition at line 407 of file PowhegV_EW.cxx.

407{ return 1; }

◆ pTcalc()

double Pythia8::PowhegV_EW::pTcalc ( const Event & e,
int i,
int j,
int k,
int r,
int xSRin )
inline

Definition at line 276 of file PowhegV_EW.cxx.

276 {
277
278
279 // Loop over ISR and FSR if necessary
280 double pTemt = -1., pTnow;
281 int xSR1 = (xSRin == -1) ? 0 : xSRin;
282 int xSR2 = (xSRin == -1) ? 2 : xSRin + 1;
283 for (int xSR = xSR1; xSR < xSR2; xSR++) {
284 // FSR flag
285 bool FSR = (xSR == 0) ? false : true;
286
287 // If all necessary arguments have been given, then directly calculate.
288 // POWHEG ISR and FSR, need i and j.
289 if ((m_pTdefMode == 0 || m_pTdefMode == 1) && i > 0 && j > 0) {
290 pTemt = pTpowheg(e, i, j, (m_pTdefMode == 0) ? false : FSR);
291
292 // Pythia ISR, need i, j and r.
293 } else if (!FSR && m_pTdefMode == 2 && i > 0 && j > 0 && r > 0) {
294 pTemt = pTpythia(e, i, j, r, FSR);
295
296 // Pythia FSR, need k, j and r.
297 } else if (FSR && m_pTdefMode == 2 && j > 0 && k > 0 && r > 0) {
298 pTemt = pTpythia(e, k, j, r, FSR);
299
300 // Otherwise need to try all possible combintations.
301 } else {
302 // Start by finding incoming legs to the hard system after
303 // branching (radiator after branching, i for ISR).
304 // Use partonSystemsPtr to find incoming just prior to the
305 // branching and track mothers.
306 int iInA = partonSystemsPtr->getInA(0);
307 int iInB = partonSystemsPtr->getInB(0);
308 while (e[iInA].mother1() != 1) { iInA = e[iInA].mother1(); }
309 while (e[iInB].mother1() != 2) { iInB = e[iInB].mother1(); }
310
311 // If we do not have j, then try all final-state partons
312 int jNow = (j > 0) ? j : 0;
313 int jMax = (j > 0) ? j + 1 : e.size();
314 for (; jNow < jMax; jNow++) {
315
316 // Final-state jNow only
317 if ( !e[jNow].isFinal() ) continue;
318
319 // POWHEG
320 if (m_pTdefMode == 0 || m_pTdefMode == 1) {
321
322 // ISR - only done once as just kinematical pT
323 if (!FSR) {
324 pTnow = pTpowheg(e, iInA, jNow, (m_pTdefMode == 0) ? false : FSR);
325 if (pTnow > 0.) pTemt = (pTemt < 0) ? pTnow : min(pTemt, pTnow);
326
327 // FSR - try all outgoing partons from system before branching
328 // as i. Note that for the hard system, there is no
329 // "before branching" information.
330 } else {
331
332 int outSize = partonSystemsPtr->sizeOut(0);
333 for (int iMem = 0; iMem < outSize; iMem++) {
334 int iNow = partonSystemsPtr->getOut(0, iMem);
335
336 // Coloured only, i != jNow and no carbon copies
337 if (iNow == jNow) continue;
338 if (jNow == e[iNow].daughter1()
339 && jNow == e[iNow].daughter2()) continue;
340
341 pTnow = pTpowheg(e, iNow, jNow, (m_pTdefMode == 0)
342 ? false : FSR);
343 if (pTnow > 0.) pTemt = (pTemt < 0)
344 ? pTnow : min(pTemt, pTnow);
345 } // for (iMem)
346
347 } // if (!FSR)
348
349 // Pythia
350 } else if (m_pTdefMode == 2) {
351
352 // ISR - other incoming as recoiler
353 if (!FSR) {
354 pTnow = pTpythia(e, iInA, jNow, iInB, FSR);
355 if (pTnow > 0.) pTemt = (pTemt < 0) ? pTnow : min(pTemt, pTnow);
356 pTnow = pTpythia(e, iInB, jNow, iInA, FSR);
357 if (pTnow > 0.) pTemt = (pTemt < 0) ? pTnow : min(pTemt, pTnow);
358
359 // FSR - try all final-state coloured partons as radiator
360 // after emission (k).
361 } else {
362 for (int kNow = 0; kNow < e.size(); kNow++) {
363 if (kNow == jNow || !e[kNow].isFinal()) continue;
364
365 // For this kNow, need to have a recoiler.
366 // Try two incoming.
367 pTnow = pTpythia(e, kNow, jNow, iInA, FSR);
368 if (pTnow > 0.) pTemt = (pTemt < 0)
369 ? pTnow : min(pTemt, pTnow);
370 pTnow = pTpythia(e, kNow, jNow, iInB, FSR);
371 if (pTnow > 0.) pTemt = (pTemt < 0)
372 ? pTnow : min(pTemt, pTnow);
373
374 // Try all other outgoing.
375 for (int rNow = 0; rNow < e.size(); rNow++) {
376 if (rNow == kNow || rNow == jNow ||
377 !e[rNow].isFinal()) continue;
378 pTnow = pTpythia(e, kNow, jNow, rNow, FSR);
379 if (pTnow > 0.) pTemt = (pTemt < 0)
380 ? pTnow : min(pTemt, pTnow);
381 } // for (rNow)
382
383 } // for (kNow)
384 } // if (!FSR)
385 } // if (m_pTdefMode)
386 } // for (j)
387 }
388 } // for (xSR)
389
390#ifdef DBGOUTPUT
391 std::cout << "pTcalc: i = " << i << ", j = " << j << ", k = " << k
392 << ", r = " << r << ", xSR = " << xSRin
393 << ", pTemt = " << pTemt << std::endl;
394#endif
395
396 return pTemt;
397 }
double pTpythia(const Event &e, int RadAfterBranch, int EmtAfterBranch, int RecAfterBranch, bool FSR)
double pTpowheg(const Event &e, int i, int j, bool FSR)

◆ pTpowheg()

double Pythia8::PowhegV_EW::pTpowheg ( const Event & e,
int i,
int j,
bool FSR )
inline

Definition at line 227 of file PowhegV_EW.cxx.

227 {
228
229 // pT value for FSR and ISR
230 double pTnow = 0.;
231 if (FSR) {
232 // POWHEG d_ij (in CM frame). Note that the incoming beams have not
233 // been updated in the parton systems pointer yet (i.e. prior to any
234 // potential recoil).
235 int iInA = partonSystemsPtr->getInA(0);
236 int iInB = partonSystemsPtr->getInB(0);
237 double betaZ = - ( e[iInA].pz() + e[iInB].pz() ) /
238 ( e[iInA].e() + e[iInB].e() );
239 Vec4 iVecBst(e[i].p()), jVecBst(e[j].p());
240 iVecBst.bst(0., 0., betaZ);
241 jVecBst.bst(0., 0., betaZ);
242
243 if ( e[i].id() == 21 && e[j].id() == 21) {
244 pTnow = std::sqrt( (iVecBst + jVecBst).m2Calc() *
245 iVecBst.e() * jVecBst.e() /
246 pow2(iVecBst.e() + jVecBst.e()) );
247 } else {
248 pTnow = std::sqrt( (iVecBst + jVecBst).m2Calc() *
249 jVecBst.e() / iVecBst.e() );
250 }
251
252 } else {
253 // POWHEG pT_ISR is just kinematic pT
254 pTnow = e[j].pT();
255 }
256
257 // Check result
258 if (pTnow < 0.) {
259 std::cout << "Warning: pTpowheg was negative" << std::endl;
260 return -1.;
261 }
262
263#ifdef DBGOUTPUT
264 std::cout << "pTpowheg: i = " << i << ", j = " << j
265 << ", pTnow = " << pTnow << std::endl;
266#endif
267
268 return pTnow;
269 }
static const std::map< unsigned int, unsigned int > pow2

◆ pTpythia()

double Pythia8::PowhegV_EW::pTpythia ( const Event & e,
int RadAfterBranch,
int EmtAfterBranch,
int RecAfterBranch,
bool FSR )
inline

Definition at line 168 of file PowhegV_EW.cxx.

169 {
170
171 // Convenient shorthands for later
172 Vec4 radVec = e[RadAfterBranch].p();
173 Vec4 emtVec = e[EmtAfterBranch].p();
174 Vec4 recVec = e[RecAfterBranch].p();
175 int radID = e[RadAfterBranch].id();
176
177 // Calculate virtuality of splitting
178 double sign = (FSR) ? 1. : -1.;
179 Vec4 Q(radVec + sign * emtVec);
180 double Qsq = sign * Q.m2Calc();
181
182 // Mass term of radiator
183 double m2Rad = (std::abs(radID) >= 4 && std::abs(radID) < 7) ?
184 pow2(particleDataPtr->m0(radID)) : 0.;
185
186 // z values for FSR and ISR
187 double z, pTnow;
188 if (FSR) {
189 // Construct 2 -> 3 variables
190 Vec4 sum = radVec + recVec + emtVec;
191 double m2Dip = sum.m2Calc();
192 double x1 = 2. * (sum * radVec) / m2Dip;
193 double x3 = 2. * (sum * emtVec) / m2Dip;
194 z = x1 / (x1 + x3);
195 pTnow = z * (1. - z);
196
197 } else {
198 // Construct dipoles before/after splitting
199 Vec4 qBR(radVec - emtVec + recVec);
200 Vec4 qAR(radVec + recVec);
201 z = qBR.m2Calc() / qAR.m2Calc();
202 pTnow = (1. - z);
203 }
204
205 // Virtuality with correct sign
206 pTnow *= (Qsq - sign * m2Rad);
207
208 // Can get negative pT for massive splittings
209 if (pTnow < 0.) {
210 std::cout << "Warning: pTpythia was negative" << std::endl;
211 return -1.;
212 }
213
214#ifdef DBGOUTPUT
215 std::cout << "pTpythia: rad = " << RadAfterBranch << ", emt = "
216 << EmtAfterBranch << ", rec = " << RecAfterBranch
217 << ", pTnow = " << std::sqrt(pTnow) << std::endl;
218#endif
219
220 // Return pT
221 return std::sqrt(pTnow);
222 }
int sign(int a)
#define z

Member Data Documentation

◆ m_accepted

bool Pythia8::PowhegV_EW::m_accepted {}
private

Definition at line 668 of file PowhegV_EW.cxx.

668{};

◆ m_emittedMode

int Pythia8::PowhegV_EW::m_emittedMode {}
private

Definition at line 666 of file PowhegV_EW.cxx.

◆ m_MPIvetoMode

int Pythia8::PowhegV_EW::m_MPIvetoMode {}
private

Definition at line 666 of file PowhegV_EW.cxx.

◆ m_nAcceptSeq

int Pythia8::PowhegV_EW::m_nAcceptSeq {}
private

Definition at line 670 of file PowhegV_EW.cxx.

670{};

◆ m_nFinal

int Pythia8::PowhegV_EW::m_nFinal {}
private

Definition at line 665 of file PowhegV_EW.cxx.

◆ m_nFSRveto

unsigned long int Pythia8::PowhegV_EW::m_nFSRveto {}
private

Definition at line 672 of file PowhegV_EW.cxx.

672{}, m_nFSRveto{};

◆ m_nISRveto

unsigned long int Pythia8::PowhegV_EW::m_nISRveto {}
private

Definition at line 672 of file PowhegV_EW.cxx.

672{}, m_nFSRveto{};

◆ m_pTdefMode

int Pythia8::PowhegV_EW::m_pTdefMode {}
private

Definition at line 666 of file PowhegV_EW.cxx.

◆ m_pTemtMode

int Pythia8::PowhegV_EW::m_pTemtMode {}
private

Definition at line 665 of file PowhegV_EW.cxx.

◆ m_pThard

double Pythia8::PowhegV_EW::m_pThard {}
private

Definition at line 667 of file PowhegV_EW.cxx.

667{}, m_pTMPI{};

◆ m_pThardMode

int Pythia8::PowhegV_EW::m_pThardMode {}
private

Definition at line 665 of file PowhegV_EW.cxx.

◆ m_pTMPI

double Pythia8::PowhegV_EW::m_pTMPI {}
private

Definition at line 667 of file PowhegV_EW.cxx.

667{}, m_pTMPI{};

◆ m_si_data_

si_data_type Pythia8::PowhegV_EW::m_si_data_ {}
private

Definition at line 673 of file PowhegV_EW.cxx.

673{};

◆ m_si_event_info_

si_event_info_type Pythia8::PowhegV_EW::m_si_event_info_ {}
private

Definition at line 674 of file PowhegV_EW.cxx.

674{};

◆ m_vetoCount

int Pythia8::PowhegV_EW::m_vetoCount {}
private

Definition at line 665 of file PowhegV_EW.cxx.

◆ m_vetoMode

int Pythia8::PowhegV_EW::m_vetoMode {}
private

Definition at line 665 of file PowhegV_EW.cxx.


The documentation for this class was generated from the following file: