Linear Collider Forum



Home » Analysis and Reconstruction » Reconstruction » How to get calorimeter cell indices from a segmentation class?
How to get calorimeter cell indices from a segmentation class? [message #395] Mon, 05 December 2005 12:34 Go to previous message
lima
Messages: 47
Registered: May 2004
Location: DeKalb, IL, USA
Hi,

I am trying to develop the neighbour finding code in the non-projective endcaps (GridXYZ segmentation class). For testing, I am using sidaug05_tcmt geometry with some muons in the endcaps, and using the NearestNeighborClusterDriver. As expected, the GridXYZ.getNeighbourIDs() method gets called. So far so good.

Inside this method, I need to know what are the cell IDs, ilay,ix,iy, so I have this piece of code:

--------------------------
public long[] getNeighbourIDs(int layerRange, int xRange, int yRange)
{
System.out.println("Nonproj neighbs: "+ layerRange+" "+xRange+" "+yRange);

int klay = this.getValue("layer"); // <== NullPointerException
System.out.println("klay="+klay);
int kx = this.getValue("x");
int ky = this.getValue("y");
int kz = this.getValue("z");
System.out.println("NeighborID: ref="+klay+" "+kx+" "+ky+" "+kz
+" (hex "+Long.toHexString(saveID)+")");
----------------------------------

The line indicated produces a NullPointerException.
What's the right way of retrieving the cell indices from inside GridXYZ.getNeighbourIDs() method?

Thanks,
Guilherme
 
Read Message
Read Message
Previous Topic:How to get calorimeter cell indices from a segmentation class?
Next Topic:Problem with Marlin 0.9.4
Goto Forum:
  


Current Time: Wed Oct 17 06:27:39 Pacific Daylight Time 2018
.:: Contact :: Home ::.

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