Print

Print


> HI Tony,
> 	I have  a few questains to ask you :		
> 	I tried using one of the files from the STDHEP EvT 
> files that you
> put in the upenn server and i could not run the files. IT throws an
> Exception ie vector enumeration. I donot know how to run those files.

There is currently a problem with using the StdHEP files on the UPenn
server. We are looking into it. It does not effect reading .lcd files
(Gismo output). Meanwhile use the sldnt0.slac.stanford.edu server for
reading the StdHEP files.
 
> 	I am trying to get the out put on the screen and used the
> System.out.println() command , the code compiled with out 
> problems but the
> output did not appear on the screen.

System.out sends output to the console, which if you are running your
job on a remote server will be the console of the remote server. Instead
the EventAnalyzer method has an variable out which you can use to send
output back to the client. E.g.

      class MyDriver extends Driver
      {
         out.println("Using hep.lcd version
"+hep.lcd.Version.getVersion());
      }

If you are writing a class that extends AbstractProcessor you cannot
directly use the out variable (since AbstractProcessor does not extend
EventAnalyzer) but you can instead use the getDebugStream() method, e.g.

         java.io.PrintWriter out = getDebugStream();
         out.println("Hello World");

> CAn i use the command DumpParticleHierarchy() to get 
> the hierarchy of a particle ? i tried using it but it gave me an error
when 
> i was trying to compile the code.

Yes, use it as follows (note the use of the out variable to redirect the
output back to the client, see previous answer):

import hep.lcd.event.*;
import hep.lcd.util.driver.*;
import hep.physics.*;

public class MyDriver extends Driver
{
   public void process(LCDEvent event)
   {
	ParticleVector pv = event.getMCParticles();
      Particle mc = pv.particles().nextParticle();
      HEPUtilities.dumpParticleHierarchy(mc,out);
   }
}   


> When i use the command getDaughters() it returns an output for
> some particles and for others it throws out an exception ie java
analysis
> exception, i tried try and catch to get aroud it but failed. 
> Is there a way to get around it ?	

The problem is that getDaughters is returning null, even though you
might not expect it to. This is caused by a problem with gismo
truncating the MC truth information at a depth of 10 particles.
Unfortunately in the top events you are analyzing the MC particle
hierarchy goes way beyond 10 particles. Since this is a problem only
with Gismo, you will not be effected if you are reading StdHEP files
directly. 

To prevent the exception check the output from getDaughters is not null
nefore using it.
 
> When i delete a histogram form the code and put in a new one it
> still shows the old histogram and the new one is no were to be seen, i
> have to start a new job to see the new histogram, is there a 
> way around this problem?

Deleted histograms do not disappear from the tree unless you explicitly
right click on them and choose delete. New histograms should appear as
soon as they are filled, so possibly your code is not filling the
histogram for some reason?

> 	If i change the code and compile a couple of times then 
> after some time it throws an error Java-Lang. Exception. i have to
close 
> it and start all over again . IS there a reson why this happens.

I have not been able to reproduce this problem. Can you send me a dump
of the exception next tmie it occurs so I can take a look, thanks.

Tony