[Rivet] HepMC in human readable format

Hannes Jung hannes.jung at cern.ch
Wed Aug 8 09:40:33 BST 2012


Thanks a lot Holger.
This is fine, yes.

I was actually looking for something which is just the event listing,
in an output format similar to the PYTHIA event listing, or as is in
HepMC::IO_AsciiParticles
But the HepMC::IO_AsciiParticles I couldn't get working...

Thanks

Hannes



On 08.08.2012, at 10:28, Holger Schulz wrote:

On 07/08/12 22: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.

Hi Hannes,

I always use the HepMC print() functions, I never had problems
looking at particles, vertices or whole events.

Here is some example syntax I use to check vertices:
const GenEvent & hepmc = event.genEvent();
for (HepMC::GenEvent::vertex_const_iterator vtx = hepmc.vertices_begin() ;
             vtx != hepmc.vertices_end() ; ++vtx) {
    (*vtx)->print();
}
and similar for particles coming from a decay vertex:

const HepMC::GenParticle& genp = p.genParticle();
HepMC::GenVertex* decV  = genp.end_vertex();
for (HepMC::GenVertex::particles_out_const_iterator pp = decV->particles_out_const_begin() ;
             pp != decV->particles_out_const_end() ; ++pp) {
             (*pp)->print();
        }

Hope that helps,
Holger


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><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
***********************************************************************




_______________________________________________
Rivet mailing list
Rivet at projects.hepforge.org<mailto:Rivet at projects.hepforge.org>
http://www.hepforge.org/lists/listinfo/rivet


_______________________________________________
Rivet mailing list
Rivet at projects.hepforge.org<mailto:Rivet at projects.hepforge.org>
http://www.hepforge.org/lists/listinfo/rivet

***********************************************************************
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
***********************************************************************




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.hepforge.org/lists-archive/rivet/attachments/20120808/7286c8a0/attachment.html>


More information about the Rivet mailing list