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 28 of file ThePEGLesHouchesInterface.cc.
LesHouchesInterface::LesHouchesInterface | ( | ) |
Definition at line 74 of file ThePEGLesHouchesInterface.cc.
00074 : 00075 initialized(false) 00076 { 00077 }
LesHouchesInterface::~LesHouchesInterface | ( | ) | [virtual] |
virtual IBPtr ThePEG::LesHouchesInterface::clone | ( | void | ) | const [inline, protected, virtual] |
bool LesHouchesInterface::doReadEvent | ( | ) | [private, virtual] |
Definition at line 146 of file ThePEGLesHouchesInterface.cc.
References lhef::HEPEUP::AQCDUP, lhef::HEPEUP::AQEDUP, edmNew::copy(), event(), 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().
00147 { 00148 reset(); 00149 00150 boost::shared_ptr<LHEEvent> event = 00151 LHEProxy::find(proxyID)->releaseEvent(); 00152 if (!event) 00153 throw Stop(); 00154 00155 hepeup.XPDWUP.first = hepeup.XPDWUP.second = 0; 00156 00157 const lhef::HEPEUP &orig = *event->getHEPEUP(); 00158 00159 hepeup.NUP = orig.NUP; 00160 hepeup.IDPRUP = orig.IDPRUP; 00161 hepeup.XWGTUP = orig.XWGTUP; 00162 hepeup.SCALUP = orig.SCALUP; 00163 hepeup.AQEDUP = orig.AQEDUP; 00164 hepeup.AQCDUP = orig.AQCDUP; 00165 hepeup.resize(); 00166 00167 std::copy(orig.IDUP.begin(), orig.IDUP.end(), hepeup.IDUP.begin()); 00168 hepeup.ISTUP = orig.ISTUP; 00169 hepeup.MOTHUP = orig.MOTHUP; 00170 hepeup.ICOLUP = orig.ICOLUP; 00171 hepeup.VTIMUP = orig.VTIMUP; 00172 hepeup.SPINUP = orig.SPINUP; 00173 00174 for(int i = 0; i < hepeup.NUP; i++) 00175 std::copy(&orig.PUP[i].x[0], &orig.PUP[i].x[5], 00176 hepeup.PUP[i].begin()); 00177 00178 fillEvent(); 00179 00180 return true; 00181 }
double LesHouchesInterface::eventWeight | ( | ) | [private, virtual] |
virtual IBPtr ThePEG::LesHouchesInterface::fullclone | ( | ) | const [inline, protected, virtual] |
double LesHouchesInterface::getEvent | ( | ) | [private, virtual] |
Definition at line 127 of file ThePEGLesHouchesInterface.cc.
References doReadEvent(), lat::endl(), Exception, initialized, and reset().
00128 { 00129 reset(); 00130 00131 if (!doReadEvent()) 00132 return 0.0; 00133 00134 if (!initialized && !checkPartonBin()) 00135 throw cms::Exception("ThePEGLesHouchesInterface") 00136 << "Found event which cannot be handled by " 00137 << "the assigned PartonExtractor." << std::endl; 00138 initialized = true; 00139 00140 fillEvent(); 00141 getSubProcess(); 00142 00143 return 1.0; 00144 }
Definition at line 187 of file ThePEGLesHouchesInterface.cc.
References proxyID.
00187 { 00188 typedef LHEProxy::ProxyID ProxyID; 00189 00190 static ClassDocumentation<LesHouchesInterface> documentation 00191 ("ThePEG::LesHouchesInterface interfaces with LHEInterface"); 00192 00193 static Parameter<LesHouchesInterface, ProxyID> interfaceProxyID 00194 ("ProxyID", "The ProxyID.", 00195 &LesHouchesInterface::proxyID, ProxyID(), 00196 ProxyID(), ProxyID(), false, false, false); 00197 00198 interfaceProxyID.rank(11); 00199 }
void LesHouchesInterface::open | ( | ) | [private, virtual] |
Definition at line 88 of file ThePEGLesHouchesInterface.cc.
References lhef::HEPRUP::EBMUP, find(), lhef::LHERunInfo::getHEPRUP(), lhef::HEPRUP::IDBMUP, lhef::HEPRUP::LPRUP, lhef::HEPRUP::NPRUP, lhef::HEPRUP::PDFGUP, lhef::HEPRUP::PDFSUP, proxyID, edm::runInfo, lhef::HEPRUP::XERRUP, lhef::HEPRUP::XMAXUP, and lhef::HEPRUP::XSECUP.
00089 { 00090 const LHERunInfo *runInfo = LHEProxy::find(proxyID)->getRunInfo().get(); 00091 const lhef::HEPRUP &orig = *runInfo->getHEPRUP(); 00092 00093 heprup.IDBMUP = orig.IDBMUP; 00094 heprup.EBMUP = orig.EBMUP; 00095 heprup.PDFGUP = orig.PDFGUP; 00096 heprup.PDFSUP = orig.PDFSUP; 00097 heprup.NPRUP = orig.NPRUP; 00098 heprup.LPRUP = orig.LPRUP; 00099 heprup.XSECUP = orig.XSECUP; 00100 heprup.XERRUP = orig.XERRUP; 00101 heprup.XMAXUP = orig.XMAXUP; 00102 00103 // We are cheating here, ThePEG does not need to know the real 00104 // weighting method, as it complains about anything but 3 anyway. 00105 // We just need to trick ThePEG into just processing each event 00106 // passed without doing anything fancy with it (and shut up). 00107 heprup.IDWTUP = 1; 00108 }
double LesHouchesInterface::reweight | ( | ) | [private, virtual] |
long LesHouchesInterface::scan | ( | ) | [private, virtual] |
bool ThePEG::LesHouchesInterface::initialized [private] |
ClassDescription< LesHouchesInterface > LesHouchesInterface::initLesHouchesInterface [static, private] |
Definition at line 52 of file ThePEGLesHouchesInterface.cc.
LHEProxy::ProxyID ThePEG::LesHouchesInterface::proxyID [private] |
Definition at line 49 of file ThePEGLesHouchesInterface.cc.
Referenced by doReadEvent(), Init(), and open().