1 / 25

Experience in migrating the code to a modern framework

This experience highlights the motivation and process of migrating the HERWIG project to a modern framework, including the early years, mid-life crisis, and current status. Lessons learned and conclusions drawn from the migration are also discussed.

Télécharger la présentation

Experience in migrating the code to a modern framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Experience in migrating the code to a modern framework Changing HERWIG g Herwig++ Peter Richardson IPPP, Durham University SuperB 2nd June

  2. Summary • Motivation • Early Years • Mid-Life Crisis • Current • Lessons • Conclusions SuperB 2nd June

  3. Motivation • The HERWIG project began 25 years ago and was intended to provide a good description of perturbative QCD. • Improvements and developments over the years. • Mainly made by generations of PhD students/postdocs modifying (hacking) the code. SuperB 2nd June

  4. Motivation • In 2000 it became clear that: • The structure was difficult to maintain; • Making certain changes could led to unstable results; • Necessary improvements to the physics modelling were impossible to implement with the current code structure. • Decided to write a new program based on the same physics ideas but with improvements wherever possible to the modelling. SuperB 2nd June

  5. Early Years • Having made that decision the logical choice was an object-oriented program in C++. • This was in an environment where: • other generator projects, e.g. PYTHIA, were also being rewritten in C++; • and new projects, e.g. SHERPA, were being developed in C++. • When we started the PYTHIA rewrite had already made significant progress on the infrastructure code. SuperB 2nd June

  6. Early Years • Decided to join forces and separate the infrastructure from the physics of the event generator. • Split the infrastructure from PYTHIA7 into ThePEG. • Intended that the physics modules of both programs would then be built on this infrastructure. • Seemed like a good idea at the time, would have allowed pick and mix for physics models. SuperB 2nd June

  7. Early Years • As there was nobody who understood both the physics and C++ applied for funding to PPARC/STFC for 4 years of postdoc funding to write the new program. • Employed people who were particle physicists with C++ expertise, but not event generator authors. • Hoped to increase the number of experts in the field in this way, again it seemed like a good idea at the time. SuperB 2nd June

  8. Early Years • One postdoc started October 2000 for two years, the second a year later eventually for three years. • After 4 man years of effort we had a basic version for e+e- collisions: • Basic cluster hadronization model with minor improvements for baryon and bottom/charm hadron production; • Improved parton shower for final-state radiation; • Simple model of hadron decays as in the FORTRAN program. SuperB 2nd June

  9. LEP Event Shapes Herwig++ compared to SLD Phys.Rev.D65:092006,2002 Herwig++ compared to ALEPH Phys.Lett.B512:30-48,2001 SuperB 2nd June

  10. Mid-Life Crisis • After this version we were more reliant on the authors of the original FORTRAN program for further developments, no dedicated manpower although more recently dedicated C++ expert • Took a further two years for a basic version for hadron-hadron collisions. • Two years after that for the inclusion of multiple parton-parton interactions, improved hadron decays and BSM physics. • So about 8 years to produce a program suitable for simulating LHC collisions! SuperB 2nd June

  11. Underlying Event Herwig++ compared to CDF data SuperB 2nd June

  12. POWHEG method for Drell-Yan Herwig++ POWHEG MC@NLO CDF Run I Z pT D0 Run II Z pT JHEP 0810:015,2008 Hamilton, PR, Tully SuperB 2nd June

  13. pT of jets in W+jets at the Tevatron All Jets 3rd Hardest Jet Herwig++ compared to data from CDF Phys.Rev.D77:011108,2008 SuperB 2nd June

  14. QED Radiation SuperB 2nd June

  15. UED e- near e- far Look at the decay q e- near q*L Z* e+ far e+ near e+ far e*R g* Herwig++ compared to hep-ph/0507170 Smillie and Webber SuperB 2nd June

  16. Hadron Decays • The current simulation of hadron decays • includes spin correlations; • detailed simulation of tau decays; • good simulation of light meson and baryon decays; • QED radiation using the YFS approach ; • Sophisticated treatment of off-shell effects; • Reasonable description of inclusive B decays. • Not focussed on B mixing or rare B decays, but can be interfaced to EvtGen. SuperB 2nd June

  17. Hadron Decays Tau Decays, tgrnt Bgpen SuperB 2nd June

  18. Current • The current version Herwig++ 2.4 is a better simulation of lepton-lepton, lepton-hadron and hadron-hadron collisions than its FORTRAN predecessor HERWIG6.5. • However its taken a long time to get there and if the LHC had been finished on time we would have been too late. • So what have we learnt? SuperB 2nd June

  19. Lessons: Structure • Using ThePEG as our structure has a number of pros • Memory handling • Parameter setting and cons • Steep learning curve • Some things weren’t the way we’d have done them • With hindsight I still think this was the right decision and some of the advantages were lost when PYTHIA withdrew. SuperB 2nd June

  20. Lessons: Structure • In C++ getting the structure right is the key. • Many features we intended to add, which were impossible in the FORTRAN, we very easy in the C++. • Conversely changes we hadn’t intended proved painful. • Equally for some things like the parton shower it took a number of iterations to get the structure right. SuperB 2nd June

  21. Lessons: Structure • In the B-physics community tend to rely on EvtGen for all decays, with PHOTOS for QED radiation. • However both Herwig and SHERPA now have good internal modelling for hadron decays. • In any new event simulation code need to think how bits of this can be used. • Equally need to avoid the problems which led to different experiments using different versions of EvtGen. SuperB 2nd June

  22. Lessons: People • In hindsight it would have been easier to teach the people who knew the physics C++ than teach the people who knew C++ the physics: • Learning event generator physics 5-10 years; • Learning C++ 5-10 weeks. • Many things would have been faster if we’d realised what the bugs were earlier. • The money spent on postdocs would have been better used to buy out the teaching of the generator experts. SuperB 2nd June

  23. Lessons: People • In practice a lot of the recent code has been written by physicists with input/review by a C++ expert. • Or even with two people in the same room doing the key pieces together which has worked very well in practice. SuperB 2nd June

  24. Lessons: Collaboration • As a group of theorists we weren’t really ready for the level of management that was probably needed. • In the early stages this was a major problem with too little oversight of the C++ experts and too little involvement of the event generator experts. • In the later stages most of the work has been done by a small number of people in close collaboration of those with physics and C++ expertise. SuperB 2nd June

  25. Summary • Herwig++ is now provides a sophisticated simulation of hadron collisions. • However it’s been a long slow and often painful process. • Any rewrite will certainly take longer than you expect. • Good luck! SuperB 2nd June

More Related