#include <EmissionVetoHook.h>
Public Member Functions | |
bool | canVetoFSREmission () |
bool | canVetoISREmission () |
bool | canVetoMPIStep () |
bool | doVetoFSREmission (int, const Pythia8::Event &e, int iSys, bool) |
bool | doVetoISREmission (int, const Pythia8::Event &e, int iSys) |
bool | doVetoMPIStep (int, const Pythia8::Event &e) |
EmissionVetoHook (int argVerbosity) | |
void | fatalEmissionVeto (string message) |
int | getNFSRveto () |
int | getNISRveto () |
bool | getNoRad () |
double | getPTpowheg () |
double | getPTshower () |
int | numberVetoMPIStep () |
~EmissionVetoHook () | |
Private Attributes | |
bool | firstNoRad |
int | last |
int | nFSRveto |
int | nISRveto |
bool | noRad |
double | pTpowheg |
double | pTshower |
double | pTveto |
int | Verbosity |
Definition at line 3 of file EmissionVetoHook.h.
EmissionVetoHook::EmissionVetoHook | ( | int | argVerbosity | ) | [inline] |
Definition at line 8 of file EmissionVetoHook.h.
: last(-1), nISRveto(0), nFSRveto(0), Verbosity(argVerbosity), firstNoRad(true) { }
EmissionVetoHook::~EmissionVetoHook | ( | ) | [inline] |
Definition at line 10 of file EmissionVetoHook.h.
References gather_cfg::cout, nFSRveto, and nISRveto.
bool EmissionVetoHook::canVetoFSREmission | ( | ) | [inline] |
Definition at line 26 of file EmissionVetoHook.h.
{ return true; }
bool EmissionVetoHook::canVetoISREmission | ( | ) | [inline] |
Definition at line 23 of file EmissionVetoHook.h.
{ return true; }
bool EmissionVetoHook::canVetoMPIStep | ( | ) | [inline] |
Definition at line 17 of file EmissionVetoHook.h.
{ return true; }
bool EmissionVetoHook::doVetoFSREmission | ( | int | , |
const Pythia8::Event & | e, | ||
int | iSys, | ||
bool | |||
) |
Definition at line 100 of file EmissionVetoHook.cc.
References gather_cfg::cout, fatalEmissionVeto(), i, last, nFSRveto, pTshower, pTveto, and Verbosity.
{ // Must be radiation from the hard system if (iSys != 0) return false; // FSR - shower emission will have status 51 and not be t/tbar int i; for (i = e.size() - 1; i > last; i--) if (e[i].isFinal() && e[i].status() == 51 && e[i].idAbs() != 6) break; if (i == last) { cout << endl << "Emergency dump of the intermediate event: " << endl; e.list(); fatalEmissionVeto(string("Error: couldn't find FSR emission")); } // Veto if above the POWHEG scale if (e[i].pT() > pTveto) { nFSRveto++; if(Verbosity) cout << "FSR vetoed" << endl; return true; } // Store the first shower emission pT if (pTshower < 0.) pTshower = e[i].pT(); return false; }
bool EmissionVetoHook::doVetoISREmission | ( | int | , |
const Pythia8::Event & | e, | ||
int | iSys | ||
) |
Definition at line 72 of file EmissionVetoHook.cc.
References gather_cfg::cout, fatalEmissionVeto(), i, last, nISRveto, pTshower, pTveto, and Verbosity.
{ // Must be radiation from the hard system if (iSys != 0) return false; if(last < 0) fatalEmissionVeto(string("Variable last is not filled")); // ISR - next shower emission is given status 43 int i; for (i = e.size() - 1; i > last; i--) if (e[i].isFinal() && e[i].status() == 43) break; if (i == last) { cout << endl << "Emergency dump of the intermediate event: " << endl; e.list(); fatalEmissionVeto(string("Error: couldn't find ISR emission")); } // Veto if above the POWHEG scale if (e[i].pT() > pTveto) { nISRveto++; if(Verbosity) cout << "ISR vetoed" << endl; return true; } // Store the first shower emission pT if (pTshower < 0.) pTshower = e[i].pT(); return false; }
bool EmissionVetoHook::doVetoMPIStep | ( | int | , |
const Pythia8::Event & | e | ||
) |
Definition at line 11 of file EmissionVetoHook.cc.
References abs, gather_cfg::cout, fatalEmissionVeto(), first, firstNoRad, last, noRad, pTpowheg, pTshower, pTveto, and Verbosity.
{ int first=-1, myid; last = -1; for(int ip = 2; ip < e.size(); ip++) { myid = e[ip].id(); if(abs(myid) < 6 || abs(myid) == 21) continue; first = ip; break; } if(first < 0) fatalEmissionVeto(string("signal particles not found")); for(int ip = first; ip < e.size(); ip++) { myid = e[ip].id(); if(abs(myid) < 6 || abs(myid) == 21) continue; last = ip; } if(Verbosity) cout << "last before powheg emission = " << last << " , id = " << e[last].id() << " emission size = " << e.size() - 1 - last << endl; // Some events may not have radiation from POWHEG switch (e.size() - 1 - last) { case 0: // No radiation - veto scale is given by the factorisation scale pTpowheg = -1.; pTveto = infoPtr->QFac(); noRad = true; // If this is the first no radiation event, then print scale if (firstNoRad) { if(Verbosity) cout << "Info: no POWHEG radiation, Q = " << pTveto << " GeV" << endl; firstNoRad = false; } break; case 1: // Radiation is parton last+1 - first check that it is as expected if (e[last+1].id() != 21 && e[last+1].idAbs() > 5) { cout << endl << "Emergency dump of the intermediate event: " << endl; e.list(); fatalEmissionVeto(string("Error: jet is not quark/gluon")); } // Veto scale is given by jet pT pTpowheg = e[last+1].pT(); pTveto = e[last+1].pT(); noRad = false; break; } if(Verbosity) cout << "veto pT = " << pTveto << " QFac = " << infoPtr->QFac() << endl; // Initialise other variables pTshower = -1.; // Do not veto the event return false; }
void EmissionVetoHook::fatalEmissionVeto | ( | string | message | ) |
Definition at line 4 of file EmissionVetoHook.cc.
References edm::errors::Configuration, and Exception.
Referenced by doVetoFSREmission(), doVetoISREmission(), and doVetoMPIStep().
{ throw edm::Exception(edm::errors::Configuration,"Pythia8Interface") << "EmissionVeto: " << message << endl; }
int EmissionVetoHook::getNFSRveto | ( | ) | [inline] |
int EmissionVetoHook::getNISRveto | ( | ) | [inline] |
bool EmissionVetoHook::getNoRad | ( | ) | [inline] |
double EmissionVetoHook::getPTpowheg | ( | ) | [inline] |
double EmissionVetoHook::getPTshower | ( | ) | [inline] |
int EmissionVetoHook::numberVetoMPIStep | ( | ) | [inline] |
Definition at line 18 of file EmissionVetoHook.h.
{ return 1; }
bool EmissionVetoHook::firstNoRad [private] |
Definition at line 42 of file EmissionVetoHook.h.
Referenced by doVetoMPIStep().
int EmissionVetoHook::last [private] |
Definition at line 41 of file EmissionVetoHook.h.
Referenced by doVetoFSREmission(), doVetoISREmission(), and doVetoMPIStep().
int EmissionVetoHook::nFSRveto [private] |
Definition at line 41 of file EmissionVetoHook.h.
Referenced by doVetoFSREmission(), getNFSRveto(), and ~EmissionVetoHook().
int EmissionVetoHook::nISRveto [private] |
Definition at line 41 of file EmissionVetoHook.h.
Referenced by doVetoISREmission(), getNISRveto(), and ~EmissionVetoHook().
bool EmissionVetoHook::noRad [private] |
Definition at line 42 of file EmissionVetoHook.h.
Referenced by doVetoMPIStep(), and getNoRad().
double EmissionVetoHook::pTpowheg [private] |
Definition at line 40 of file EmissionVetoHook.h.
Referenced by doVetoMPIStep(), and getPTpowheg().
double EmissionVetoHook::pTshower [private] |
Definition at line 40 of file EmissionVetoHook.h.
Referenced by doVetoFSREmission(), doVetoISREmission(), doVetoMPIStep(), and getPTshower().
double EmissionVetoHook::pTveto [private] |
Definition at line 40 of file EmissionVetoHook.h.
Referenced by doVetoFSREmission(), doVetoISREmission(), and doVetoMPIStep().
int EmissionVetoHook::Verbosity [private] |
Definition at line 41 of file EmissionVetoHook.h.
Referenced by doVetoFSREmission(), doVetoISREmission(), and doVetoMPIStep().