Print

Print


Hi Jeremy,

I'm trying to write out from recon files what the pid is of the cluster. During recon, we assign this as a BaseCluster and setParticleId(). Additionally, when applying cluster corrections to energy and position, we use cluster.getParticleId(), and this returns something like +/-11, 22.

However, when I look at a fully reconstructed file and try to do cluster.getParticleId(), it is always set to 0. 

I tried casting this to BaseCluster, but it doesn't work. I've tried this on both collections "EcalClusters" and "EcalClustersCorr".  

   if (event.hasCollection(Cluster.class,"EcalClustersCorr")){

            List<Cluster> ecalClusters = event.get(Cluster.class,"EcalClustersCorr");

Cluster c1 = ecalClusters.get(0));

            System.out.println("Cluster pid:\t"+c1.getParticleId());


If I try to do: 

((BaseCluster)c1).getParticleId()

then I get 

org.lcsim.job.EventMarkerDriver process :: Event 10085820 with sequence 0

java.lang.ClassCastException: org.lcsim.lcio.SIOCluster cannot be cast to org.lcsim.event.base.BaseCluster


Is there a reason this is not persisted?

-Holly




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