Print

Print


Hi,

As was requested awhile back by several people in the ECAL group, I have fleshed out the geometry API for the classes that represent the calorimeter in our geometry framework, including the addition of a simple neighboring API for the crystals.

This resolves the JIRA items HPSJAVA-417 and LCSIM-243 related to this functionality.

There is an interface that can be accessed via...

HPSEcalAPI api = (HPSEcalAPI)detector.getSubdetector("Ecal").getDetectorElement();

For technical reasons, this interface is found in lcsim rather than HPS Java, under...

detector-framework/src/main/java/org/lcsim/detector/converter/compact/HPSEcalAPI.java

The added functionality includes access to...

1) maximum and minimum index values for X and Y

2) a list of valid X and Y indices that can be used for iteration

3) a method that will determine whether a pair of indices represents a "removed" crystal in the beam gap

4) several helper methods for getting crystal objects by their X and Y indices, packed ID, or global position

5) a list of all crystal objects

6) a list of all crystal objects by row or column

7) a list of cardinal neighbors of a given crystal, accounting for edge crystals and the beam gap

Some tests related to these new features can be found at 

detector-framework/src/test/java/org/lcsim/detector/converter/compact/HPSEcalAPITest.java

and 

detector-framework/src/test/java/org/lcsim/geometry/subdetector/HPSEcal3Test.java

If there are any additional utility methods that should be present for working with the ECAL geometry which we should have in the API, they can be put into the HPSEcalAPI interface and implemented in the HPSEcalDetectorElement class, which is the implementation of the interface.

It is planned that any future classes we might add which represent the overall ECAL geometry would implement this interface, so it should be more generic and portable than referring to the specific subdetector type.

If there are any questions about this new functionality, then let me know.

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1