Public Member Functions | |
LesHouchesInterface () | |
virtual | ~LesHouchesInterface () |
Static Public Member Functions | |
static void | Init () |
Protected Member Functions | |
virtual IBPtr | clone () const |
virtual IBPtr | fullclone () const |
Private Member Functions | |
virtual void | close () |
virtual bool | doReadEvent () |
virtual double | eventWeight () |
virtual double | getEvent () |
virtual void | open () |
virtual double | reweight () |
virtual long | scan () |
Private Attributes | |
bool | initialized |
LHEProxy::ProxyID | proxyID |
Static Private Attributes | |
static ClassDescription < LesHouchesInterface > | initLesHouchesInterface |
Definition at line 30 of file ThePEGLesHouchesInterface.cc.
LesHouchesInterface::LesHouchesInterface | ( | ) |
Definition at line 76 of file ThePEGLesHouchesInterface.cc.
: initialized(false) { }
LesHouchesInterface::~LesHouchesInterface | ( | ) | [virtual] |
Definition at line 81 of file ThePEGLesHouchesInterface.cc.
{ }
virtual IBPtr ThePEG::LesHouchesInterface::clone | ( | void | ) | const [inline, protected, virtual] |
Definition at line 38 of file ThePEGLesHouchesInterface.cc.
{ return new_ptr(*this); }
void LesHouchesInterface::close | ( | void | ) | [private, virtual] |
Definition at line 112 of file ThePEGLesHouchesInterface.cc.
{ }
bool LesHouchesInterface::doReadEvent | ( | ) | [private, virtual] |
Definition at line 148 of file ThePEGLesHouchesInterface.cc.
References lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, filterCSVwithJSON::copy, event(), spr::find(), i, lhef::HEPEUP::ICOLUP, lhef::HEPEUP::IDPRUP, lhef::HEPEUP::IDUP, lhef::HEPEUP::ISTUP, lhef::HEPEUP::MOTHUP, lhef::HEPEUP::NUP, proxyID, lhef::HEPEUP::PUP, reset(), lhef::HEPEUP::SCALUP, lhef::HEPEUP::SPINUP, lhef::HEPEUP::VTIMUP, and lhef::HEPEUP::XWGTUP.
Referenced by getEvent().
{ reset(); boost::shared_ptr<LHEEvent> event = LHEProxy::find(proxyID)->releaseEvent(); if (!event) throw Stop(); hepeup.XPDWUP.first = hepeup.XPDWUP.second = 0; const lhef::HEPEUP &orig = *event->getHEPEUP(); hepeup.NUP = orig.NUP; hepeup.IDPRUP = orig.IDPRUP; hepeup.XWGTUP = orig.XWGTUP; hepeup.SCALUP = orig.SCALUP; hepeup.AQEDUP = orig.AQEDUP; hepeup.AQCDUP = orig.AQCDUP; hepeup.resize(); std::copy(orig.IDUP.begin(), orig.IDUP.end(), hepeup.IDUP.begin()); hepeup.ISTUP = orig.ISTUP; hepeup.MOTHUP = orig.MOTHUP; hepeup.ICOLUP = orig.ICOLUP; hepeup.VTIMUP = orig.VTIMUP; hepeup.SPINUP = orig.SPINUP; for(int i = 0; i < hepeup.NUP; i++) std::copy(&orig.PUP[i].x[0], &orig.PUP[i].x[5], hepeup.PUP[i].begin()); fillEvent(); return true; }
double LesHouchesInterface::eventWeight | ( | ) | [private, virtual] |
Definition at line 116 of file ThePEGLesHouchesInterface.cc.
{
return 1.0;
}
virtual IBPtr ThePEG::LesHouchesInterface::fullclone | ( | ) | const [inline, protected, virtual] |
Definition at line 39 of file ThePEGLesHouchesInterface.cc.
{ return new_ptr(*this); }
double LesHouchesInterface::getEvent | ( | ) | [private, virtual] |
Definition at line 129 of file ThePEGLesHouchesInterface.cc.
References doReadEvent(), Exception, initialized, and reset().
{ reset(); if (!doReadEvent()) return 0.0; if (!initialized && !checkPartonBin()) throw cms::Exception("ThePEGLesHouchesInterface") << "Found event which cannot be handled by " << "the assigned PartonExtractor." << std::endl; initialized = true; fillEvent(); getSubProcess(); return 1.0; }
void LesHouchesInterface::Init | ( | void | ) | [static] |
Definition at line 189 of file ThePEGLesHouchesInterface.cc.
References proxyID.
{ typedef LHEProxy::ProxyID ProxyID; static ClassDocumentation<LesHouchesInterface> documentation ("ThePEG::LesHouchesInterface interfaces with LHEInterface"); static Parameter<LesHouchesInterface, ProxyID> interfaceProxyID ("ProxyID", "The ProxyID.", &LesHouchesInterface::proxyID, ProxyID(), ProxyID(), ProxyID(), false, false, false); interfaceProxyID.rank(11); }
void LesHouchesInterface::open | ( | ) | [private, virtual] |
Definition at line 90 of file ThePEGLesHouchesInterface.cc.
References lhef::HEPRUP::EBMUP, spr::find(), lhef::LHERunInfo::getHEPRUP(), lhef::HEPRUP::IDBMUP, lhef::HEPRUP::LPRUP, lhef::HEPRUP::NPRUP, lhef::HEPRUP::PDFGUP, lhef::HEPRUP::PDFSUP, proxyID, lhef::HEPRUP::XERRUP, lhef::HEPRUP::XMAXUP, and lhef::HEPRUP::XSECUP.
{ const LHERunInfo *runInfo = LHEProxy::find(proxyID)->getRunInfo().get(); const lhef::HEPRUP &orig = *runInfo->getHEPRUP(); heprup.IDBMUP = orig.IDBMUP; heprup.EBMUP = orig.EBMUP; heprup.PDFGUP = orig.PDFGUP; heprup.PDFSUP = orig.PDFSUP; heprup.NPRUP = orig.NPRUP; heprup.LPRUP = orig.LPRUP; heprup.XSECUP = orig.XSECUP; heprup.XERRUP = orig.XERRUP; heprup.XMAXUP = orig.XMAXUP; // We are cheating here, ThePEG does not need to know the real // weighting method, as it complains about anything but 3 anyway. // We just need to trick ThePEG into just processing each event // passed without doing anything fancy with it (and shut up). heprup.IDWTUP = 1; }
double LesHouchesInterface::reweight | ( | ) | [private, virtual] |
Definition at line 122 of file ThePEGLesHouchesInterface.cc.
{
preweight = 1.0;
return 1.0;
}
long LesHouchesInterface::scan | ( | ) | [private, virtual] |
Definition at line 85 of file ThePEGLesHouchesInterface.cc.
{
return 1000000000;
}
bool ThePEG::LesHouchesInterface::initialized [private] |
Definition at line 52 of file ThePEGLesHouchesInterface.cc.
Referenced by getEvent().
ClassDescription< LesHouchesInterface > LesHouchesInterface::initLesHouchesInterface [static, private] |
Definition at line 54 of file ThePEGLesHouchesInterface.cc.
Definition at line 51 of file ThePEGLesHouchesInterface.cc.
Referenced by doReadEvent(), Init(), and open().