LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  December 2015

HPS-SVN December 2015

Subject:

r4001 - /java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Wed, 2 Dec 2015 22:14:03 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (107 lines)

Author: [log in to unmask]
Date: Wed Dec  2 14:14:00 2015
New Revision: 4001

Log:
pass track info to ecal energy corrections

Modified:
    java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java

Modified: java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java
 =============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java	(original)
+++ java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java	Wed Dec  2 14:14:00 2015
@@ -7,13 +7,16 @@
 import hep.physics.vec.VecOp;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
 import org.hps.recon.ecal.cluster.ClusterUtilities;
 import org.hps.recon.tracking.CoordinateTransformations;
+import org.hps.recon.tracking.TrackUtils;
 import org.hps.recon.utils.TrackClusterMatcher;
+import org.lcsim.event.CalorimeterHit;
 import org.lcsim.event.Cluster;
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.ReconstructedParticle;
@@ -23,6 +26,8 @@
 import org.lcsim.event.base.BaseReconstructedParticle;
 import org.lcsim.geometry.Detector;
 import org.lcsim.util.Driver;
+import org.lcsim.geometry.subdetector.HPSEcal3;
+
 
 /**
  * Driver framework for generating reconstructed particles and matching clusters
@@ -44,6 +49,8 @@
     public static final int POSITRON = 1;
     public static final int MOLLER_TOP = 0;
     public static final int MOLLER_BOT = 1;
+    
+    HPSEcal3 ecal;
 
     /**
      * Sets the name of the LCIO collection for beam spot constrained V0
@@ -173,6 +180,8 @@
         this.trackCollectionNames = trackCollectionNames;
     }
 
+        
+    
     /**
      * Updates the magnetic field parameters to match the appropriate values for
      * the current detector settings.
@@ -188,6 +197,7 @@
             flipSign = -1;
         }
 
+        ecal = (HPSEcal3) detector.getSubdetector("Ecal");
         matcher.setBFieldMap(detector.getFieldMap());
 
     }
@@ -222,6 +232,9 @@
         // Create a list of unmatched clusters. A cluster should be
         // removed from the list if a matching track is found.
         Set<Cluster> unmatchedClusters = new HashSet<Cluster>(clusters);
+        
+        // Create a mapping of matched clusters to corresponding tracks.
+        HashMap<Cluster, Track> clusterToTrack = new HashMap<Cluster,Track>();
 
         // Loop through all of the track collections and try to match every
         // track to a cluster.  Allow a cluster to be matched to multiple 
@@ -263,6 +276,9 @@
                     // Check if the cluster and track are a valid match.
                     if (matcher.isMatch(cluster, track)) {
 
+                    	// Store the matched cluster to matched track.
+                    	clusterToTrack.put(cluster, track);
+                    	
                         // Store the matched cluster.
                         matchedCluster = cluster;
 
@@ -315,10 +331,17 @@
             }
         }
 
-        // Apply the corrections to the Ecal clusters
+        // Apply the corrections to the Ecal clusters using track information, if available
         for (Cluster cluster : clusters) {
             if (cluster.getParticleId() != 0) {
-                ClusterUtilities.applyCorrections(cluster);
+            	if (clusterToTrack.containsKey(cluster)){
+            		Track matchedT = clusterToTrack.get(cluster);
+            		double ypos = TrackUtils.getTrackStateAtECal(matchedT).getReferencePoint()[2];
+            		ClusterUtilities.applyCorrections(ecal, cluster, ypos);
+            	}
+            	else {
+            		ClusterUtilities.applyCorrections(ecal, cluster);          		
+            	}
             }
         }
 

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use