Print

Print


Hello All,
  I've noticed that the photon ReconstructedParticle momentum is always (0,0,0) .

While looking at the code in org.hps.recon.particle.ReconParticleDriver I 
confirmed that this is what is being done, but also noted that the energy in the 
ReconstructedParticle is being set before the cluster correction is applied.

        // If any cluster remain unmatched after the tracks are finished,
        // they should be processed into additional reconstructed particles.
        if (!unmatchedClusters.isEmpty()) // Iterate over the remaining unmatched clusters.
        {
            for (Cluster unmatchedCluster : unmatchedClusters) {
                // Create a reconstructed particle to represent the
                // unmatched cluster.
                ReconstructedParticle particle = new BaseReconstructedParticle();
                HepLorentzVector fourVector = new BasicHepLorentzVector(0, 0, 0, 0);   //<===   zero momentum

                // Add the cluster to the particle.
                particle.addCluster(unmatchedCluster);

                // Set the reconstructed particle properties based on
                // the cluster properties.
                ((BasicHepLorentzVector) fourVector).setT(unmatchedCluster.getEnergy());   //<==== energy being set here
                ((BaseReconstructedParticle) particle).setCharge(0);
                ((BaseReconstructedParticle) particle).set4Vector(fourVector);              //<==== RP energy being set here

                // The particle is assumed to be a photon, since it
                // did not leave any track.
                ((BaseReconstructedParticle) particle).setParticleIdUsed(new SimpleParticleID(22, 0, 0, 0));

                if (unmatchedCluster.getType() == ClusterType.RECON.getType()) {
                    int pid = particle.getParticleIDUsed().getPDG();
                    // If not electron....
                    if (pid != 11) {
                        // Set PID and apply corrections.
                        ((BaseCluster) unmatchedCluster).setParticleId(pid);
                        ClusterUtilities.applyCorrections(unmatchedCluster);   //<==== cluster energy being corrected here
                    }
                }

                // Add the particle to the reconstructed particle list.
                particles.add(particle);
            }
        }

This was unexpected behavior to me, but I wanted to check with everyone that
no one was relying on this feature before changing anything.

I'd like to propose that we set the momentum based on the cluster position assuming the photon
originates from (0,0,0) and use the corrected cluster energy for the photon energy.

Norman

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