|
[Rivet] HepMC in human readable formatHannes Jung hannes.jung at cern.chFri Aug 10 06:08:17 BST 2012
Hi Andy thanks for your mail, yes would be nice to have something like this. Actually, I am pretty happy with what we got from the IO_AsciiiParticles, in the routine, which I had attached.... (I attach it again) Thanks aanyway for looking into it.. Cheers Hannes On 10.08.2012, at 00:11, Andy Buckley wrote: > Hi Hannes, > > I may have been incredulous about the *expectation* that Rivet would > contain such a function, but I do see the usefulness of one. It won't be > high priority, but I'll look into providing a one-liner way to do it in > a future release. ATLAS has some fairly nice pretty-printing code that I > can probably "borrow" :-) > > I did think that this would be as simple as > > inline void printEvent(const GenEvent& evt) { > HepMC::IO_AsciiParticles ascii_io(std::cout); > ascii_io.write_event(&evt); > } > > but unfortunately IO_AsciiParticles does not work the same way re. > stream constructors as does IO_GenEvent. If only HepMC were better... > but we're stuck with it now! > > Cheers, > Andy > > > On 09/08/12 08:50, Hannes Jung wrote: >> Hi Andy >> >> to print to HepMC in a readable format is very essential >> for people trying to learn what the MC is doing and to understand >> how to do a selection for the analysis, also using Rivet just for >> MC studies. >> >> We have now several summerstudents, who use Rivet as an interface >> to the MCs and to perform different studies. For this an understanding of >> the event record is important. >> >> Anyway, as I send yesterday in my mail, we have now managed to print >> the HepMC record in a readable format in Rivet, so this is fine now. >> Maybe it could be of help also for others to have this option available. >> >> Cheers >> >> Hannes >> >> >> >> >> On 09.08.2012, at 09:26, Andy Buckley wrote: >> >>> Hi Hannes, >>> >>> Why on earth would Rivet have a "print event like PYTHIA" function? The >>> access to the GenEvent object with all the structure is one function >>> call away from Rivet::Event -- is that really "complicated and >>> difficult"?! >>> >>> We've tried to provide nicer ways than HepMC itself to access event >>> details -- iterating over particles, for example, is far easier than in >>> native HepMC. But our emphasis is on the histogrammed output more than >>> what's printed out to the terminal... and far more on the final state >>> and hadron relationships than the internal HepMC structure. >>> >>> Other than the HepMC print and IO_AsciiParticles functions (and reading >>> the ASCII format), there are also a few graphical visualisation tools, >>> e.g. mcviz, that might be of interest. >>> >>> Cheers, >>> Andy >>> >>> >>> On 07/08/12 21:27, Hannes Jung wrote: >>>> Dear Andy et al >>>> >>>> thanks a lot for your reply. >>>> >>>> It's really fascinating, how complicated and difficult very trivial >>>> things are in Rivet. >>>> It must be a MUST, that one can print out the HEPMC record in a >>>> readable format... >>>> but it seems I can only get it via >>>> event.genEvent().print() >>>> but then the format is cryptic. >>>> >>>> How do you people check, if selections etc are correct, if there is >>>> no way to printout >>>> what comes from the MC ? >>>> >>>> It would be really very good if this could be provided.... I tried to >>>> do it, but failed >>>> due to my ignorance in the Rivet structure... so if anyone can help >>>> there, I would >>>> be really, really very happy.... >>>> >>>> I try to promote Rivet for our summer-students.... so......... >>>> >>>> Thanks a lot >>>> >>>> cheers >>>> Hannes >>>> >>>> On 07.08.2012, at 17:07, Andy Buckley wrote: >>>> >>>>> It's really a HepMC thing: Rivet doesn't include any special printout >>>>> formatting for GenEvents. The best I can think of offhand is, if you >>>>> have a Particle p, to use p.genParticle().print(). Any other HepMC >>>>> library function can also be used on the p.genEvent() reference. >>>>> >>>>> Hope that helps, >>>>> Andy >>>>> >>>>> >>>>> On 07/08/12 15:18, Hannes Jung wrote: >>>>>> Dear Rivet developers >>>>>> >>>>>> I was wondering, whether there is an easy way to print out the HepMC >>>>>> record in human readable format within Rivet, so that one can see >>>>>> directly the event one is analyzing ? >>>>>> >>>>>> Probably I have just not found the proper place, where this is >>>>>> described... any hint would be great... >>>>>> >>>>>> thanks a lot >>>>>> >>>>>> cheers >>>>>> Hannes >>>>>> >>>>>> >>>>>> *********************************************************************** >>>>>> Hannes Jung >>>>>> Email: Hannes.Jung at desy.de <mailto:Hannes.Jung at desy.de> >>>>>> <mailto:Hannes.Jung at desy.de> >>>>>> mobile :+49 40 8998 93741 >>>>>> http://www.desy.de/~jung >>>>>> Tel: +49 (0) 40 8998 3741 >>>>>> Fax: +49 (0) 40 8998 3093 >>>>>> DESY, CMS 01B/02.213 >>>>>> Notkestr.85, 22603 Hamburg, FRG >>>>>> *********************************************************************** >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rivet mailing list >>>>>> Rivet at projects.hepforge.org <mailto:Rivet at projects.hepforge.org> >>>>>> http://www.hepforge.org/lists/listinfo/rivet >>>>>> >>>>> >>>>> >>>>> -- >>>>> Dr Andy Buckley, SUPA Advanced Research Fellow >>>>> Particle Physics Expt Group, University of Edinburgh >>>>> >>>>> The University of Edinburgh is a charitable body, registered in >>>>> Scotland, with registration number SC005336. >>>>> >>>> >>>> *********************************************************************** >>>> Hannes Jung >>>> Email: Hannes.Jung at desy.de <mailto:Hannes.Jung at desy.de> >>>> mobile :+49 40 8998 93741 >>>> http://www.desy.de/~jung >>>> Tel: +49 (0) 40 8998 3741 >>>> Fax: +49 (0) 40 8998 3093 >>>> DESY, CMS 01B/02.213 >>>> Notkestr.85, 22603 Hamburg, FRG >>>> *********************************************************************** >>>> >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Dr Andy Buckley, SUPA Advanced Research Fellow >>> Particle Physics Expt Group, University of Edinburgh >>> >>> The University of Edinburgh is a charitable body, registered in >>> Scotland, with registration number SC005336. >>> >> >> *********************************************************************** >> Hannes Jung >> Email: Hannes.Jung at desy.de <mailto:Hannes.Jung at desy.de> >> mobile :+49 40 8998 93741 >> http://www.desy.de/~jung >> Tel: +49 (0) 40 8998 3741 >> Fax: +49 (0) 40 8998 3093 >> DESY, CMS 01B/02.213 >> Notkestr.85, 22603 Hamburg, FRG >> *********************************************************************** >> >> >> >> > > > -- > Dr Andy Buckley, SUPA Advanced Research Fellow > Particle Physics Expt Group, University of Edinburgh > > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > *********************************************************************** Hannes Jung Email: Hannes.Jung at desy.de mobile :+49 40 8998 93741 http://www.desy.de/~jung Tel: +49 (0) 40 8998 3741 Fax: +49 (0) 40 8998 3093 DESY, CMS 01B/02.213 Notkestr.85, 22603 Hamburg, FRG *********************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.hepforge.org/lists-archive/rivet/attachments/20120810/7a6c0f50/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: READ_HEPMC.cc Type: application/octet-stream Size: 1062 bytes Desc: READ_HEPMC.cc URL: <http://www.hepforge.org/lists-archive/rivet/attachments/20120810/7a6c0f50/attachment.obj>
More information about the Rivet mailing list |