Fork me on GitHub

Opened 12 years ago

Closed 12 years ago

Last modified 4 years ago

#175 closed Bug (fixed)

units in hepmc file

Reported by: Sebastian Schaetzel Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 2
Keywords: Cc:

Description

Hello,

hepmc files can use different units, like GEV CM or GEV MM or MEV MM, etc.

I was wondering whether Delphes handles these gracefully.

So I generated the same events (Pythia) two times, one time with
GenEvt( HepMC::Units::GEV, HepMC::Units::CM) and the second time with
GenEvt( HepMC::Units::GEV, HepMC::Units::MM), and sent them through Delphes.

The output ROOT files differed in Particle.T, .X, .Y, .Z, reflecting the mm<->cm difference.

So apparently the hepmc units matter. My guess is that the formulas tracking the particles through the magnetic field are sensitive to the energy unit, although I haven't tried it.

What are the correct hepmc units then? From the detector cards it seems that most of the units used internally in Delphes are GeV and cm. Should I use those?

Maybe Delphes could analyse the line in the hepmc file which specifies the units, for example "U GEV MM", and convert the numbers internally?

Thanks,
Sebastian

Change History (5)

comment:1 by Pavel Demin, 12 years ago

Dear Sebastian,

Thank you for the suggestions.

As most of the MC generators use GEV and MM by default, Delphes uses the same units.

Here is a version that read the momentum and position units from the HepMC file:

http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.0.8.pre2.tar.gz

Could you, please check if this version works for you?

Regards,

Pavel

Version 0, edited 12 years ago by Pavel Demin (next)

comment:2 by Sebastian Schaetzel, 12 years ago

Dear Pavel,

3.0.8.pre2 gives:

Reading pythia.hepmc
ERROR: Header block not found. File is probably corrupted.

The file starts with

HepMC::Version 2.06.09
HepMC::IO_GenEvent-START_EVENT_LISTING
E 0 -1 2.9156162529458029e+03 8.5945706606816857e-02 8.1371040408944259e-03 3001 0 1360 1 2 0 1 1.0000000000000000e+00
N 1 "0"
U GEV CM
C 2.8432991119982389e-03 2.8432991119982389e-03

A gzipped version of the hepmc file can be found here:
http://www.physi.uni-heidelberg.de/~sschaetz/pythia.hepmc.gz

Thanks,
Sebastian

comment:3 by Pavel Demin, 12 years ago

Dear Sebastian,

The error message is from the DelphesSTDHEP program. You should use DelphesHepMC to read HepMC files.

The following command works for me:

curl http://www.physi.uni-heidelberg.de/~sschaetz/pythia.hepmc.gz | gunzip | ./DelphesHepMC examples/delphes_card_CMS.tcl delphes_output.root

Regards,

Pavel

comment:4 by Sebastian Schaetzel, 12 years ago

Dear Pavel,

Sorry about that, everything works just fine with DelphesHepMC.

And I confirm that Particle.X, .Y, etc. don't depend on the input file units anymore.
I think that's very useful!

Thanks a lot,
Sebastian

comment:5 by Pavel Demin, 12 years ago

Resolution: fixed
Status: newclosed

The fixed HepMC file reader is in Delphes 3.0.8 now.

Note: See TracTickets for help on using tickets.