Hi Norman, See below. On Fri, Jun 5, 2015 at 1:31 PM, Graf, Norman A. <[log in to unmask]> wrote: > 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. > I didn't realize this was being done. We should change it ASAP. > > // 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. > When this driver was first written, it was decided that the energy would come from the Ecal and the momentum would come from the SVT. This is why the photon momentum was set to zero. That said .... > > 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. > I think this is fine and you should go ahead and make the necessary changes to the code. > > 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 > ######################################################################## 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