Print

Print


HI Brandon, the geometry uses cm for the length units, which is what you are getting from the detector. 

Stdhep files use mm as length units, which is probably why MCParticle is returning mm. This should probably be considered a bug for the current hep.lcd code, but the next release of the LCD software will be based on LCIO and will use mm everywhere, so we will probably wait for that change to make sure everything is consistent.

Tony 

> -----Original Message-----
> From: Drummond, Brandon William 
> Sent: Tuesday, July 13, 2004 3:52 PM
> To: lcd-sim
> Subject: distance units
> 
> Hello,
> 	I was wondering what the units for coordinate calls are 
> I noticed that if I do a:
> 
> EM_Barrel emb = ((EM_Barrel) detect.getComponent("EM_Barrel"));
> System.out.println( emb.getInnerRadius() + " " + emb.getZOuter() );
> 
> I get the following output:
> 
> 127.07 184.0
> 
> While if I do a:
> 
> MCParticle part = (MCParticle) penum.nextElement(); part = 
> (MCParticle) penum.nextElement(); endpoint = 
> part.getCalorimeterEntry(); radius = Math.round( 
> (float)Math.sqrt( endpoint[0]*endpoint[0] + 
> endpoint[1]*endpoint[1] )); zdist = endpoint[2]; 
> System.out.println( radius + " " + zdist );
> 
> I get:
> 
> 1270.0 1541.9126851377366
> 
> which I assume is a difference in metric units. Which one 
> should I follow? Specifically when using these to find a 
> calorimeter cell ID.
> 
> Thanks,
> Brandon Drummond
>