Linear Collider Forum

Home » Analysis and Reconstruction » Analysis Tools » Simple analysis example of stdhep files ?
Re: Simple analysis example of stdhep files ? [message #1299 is a reply to message #1286] Thu, 15 November 2007 11:41 Go to previous messageGo to previous message
Messages: 5
Registered: June 2004
Location: univ. of kansas

Hi Tony, Norman, Frank, Akiya,

I used the LCIO command line tool and was able to
quickly get at what I wanted with code based off the lciohbook
example that I had at hand.

The lack of support for event weights in LCIO is an important issue. If we are going to make use of the process ID
(IDRUP) for SM samples like the SLAC ones then I guess this also needs to be retained ?? I don't think it is realistic to
have unweighted samples.

I was able to access this info from the freehep-stdhep implementation that ships with JAS3 0.8.3 for samples
that include it. It would be helpful if it was clearer which samples have non uniform event weights.
I include a code snippet here seeing as it is not in the standard examples.
Code below based on extending the example.
Note that StdhepExtendedEvent is a subclass of StdhepEvent so
if the record is a StdhepExtendedEvent record it is also a
StdHepEvent record.

StdhepRecord record = reader.nextRecord();

if (record instanceof StdhepExtendedEvent)
System.out.println(" Found a StdhepExtendedEvent ");
StdhepExtendedEvent extendedevent = (StdhepExtendedEvent) record;
System.out.println(" weight " +extendedevent.getEventWeight(1));
System.out.println(" IDRUP " +extendedevent.getIDRUP());

if (record instanceof StdhepEvent)
System.out.println(" Found a StdhepEvent ");
StdhepEvent event = (StdhepEvent) record;

for the SM sample it looks like the weights vary by a factor of 100.

Two questions/comments:
I) the freehep-stdhep API pointed to by Norman's reply
has the getEventWeight method as being
whereas I needed

II) Is there a better way of making sure that I'm reading the
documentation relevant to my code ?


Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Neural Nets and
Next Topic:JAS3 support of HBOOK and ROOT files
Goto Forum:

Current Time: Thu Nov 21 05:29:17 Pacific Standard Time 2019
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software