Print

Print


Hi, Holly.

I overhauled the BaseCluster class in LCSim and checked in the changes, so it should be easier to use now.

In particular, you can now add a CalorimeterHit with an energy contribution different from its energy.

BaseCluster.addCalorimeterHit(hit, energy);

You should eventually remove the usage of HPSEcalClusterIC in your clustering algorithm, replacing it with BaseCluster instead.

The energy and position corrections I have pulled out into separate classes from the HPS Java cluster extension classes.

ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPropertyCalculator.java <= position and other property calculations from HPSEcalCluster

ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterPositionCorrection.java <= position correction from HPSEcalClusterIC

ecal-recon/src/main/java/org/hps/recon/ecal/cluster/ReconClusterEnergyCorrection.java <= energy correction from HPSEcalClusterIC

All of these can be applied in one go with this method.

ClusterUtilities.applyCorrections(clusterList);

There is a flag in ClusterDriver that allows you to do this automatically to your output collections, so it should not be necessary to do this from within your algorithm.

ClusterDriver.setApplyCorrections(true);

or from XML

<applyCorrections>true</applyCorrections>

That can also be made the default behavior of ReconClusterDriver once you have updated the algorithm to use BaseCluster.

As far as keeping track of corrected vs uncorrected energies and positions for the clusters, I believe what you will want to do is simply create a parallel collection of uncorrected clusters e.g.

List<Cluster> uncorrectedClusters = new ArrayList<Cluster>();
[...]
BaseCluster uncorrectedCluster = new BaseCluster();
uncorrectedCluster.setEnergy(uncorrectedEnergy);
uncorrectedCluster.setPosition(uncorrectedPosition);
uncorrectedCluster.setNeedsPropertyCalculation(false);
[...]
event.put("UncorrectedEcalClusters", uncorrectedClusters, Cluster.class, flags);

Then these can be accessed later with clusters matched up by their index in the list.

--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