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

HPS-SVN June 2015

Subject:

r3158 - /java/trunk/tracking/src/main/java/org/hps/recon/tracking/HelicalTrackHitDriver.java

From:

[log in to unmask]

Reply-To:

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

Date:

Thu, 18 Jun 2015 19:44:17 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (100 lines)

Author: [log in to unmask]
Date: Thu Jun 18 12:44:07 2015
New Revision: 3158

Log:
add ghost hit cut

Modified:
    java/trunk/tracking/src/main/java/org/hps/recon/tracking/HelicalTrackHitDriver.java

Modified: java/trunk/tracking/src/main/java/org/hps/recon/tracking/HelicalTrackHitDriver.java
 =============================================================================
--- java/trunk/tracking/src/main/java/org/hps/recon/tracking/HelicalTrackHitDriver.java	(original)
+++ java/trunk/tracking/src/main/java/org/hps/recon/tracking/HelicalTrackHitDriver.java	Thu Jun 18 12:44:07 2015
@@ -5,10 +5,12 @@
 import hep.physics.vec.Hep3Vector;
 import hep.physics.vec.VecOp;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import org.hps.recon.tracking.axial.HelicalTrack2DHit;
 import org.lcsim.detector.IDetectorElement;
 import org.lcsim.detector.ITransform3D;
@@ -24,6 +26,7 @@
 import org.lcsim.event.RawTrackerHit;
 import org.lcsim.event.RelationalTable;
 import org.lcsim.event.SimTrackerHit;
+import org.lcsim.event.TrackerHit;
 import org.lcsim.event.base.BaseRelationalTable;
 import org.lcsim.event.base.MyLCRelation;
 import org.lcsim.fit.helicaltrack.HelicalTrackCross;
@@ -61,6 +64,7 @@
     private boolean _saveAxialHits = false;
     private String _axialname = "AxialTrackHits";
     private String _axialmcrelname = "AxialTrackHitsMCRelations";
+    private boolean rejectGhostHits = false;
 
     public enum LayerGeometryType {
 
@@ -101,6 +105,16 @@
 
     public void setClusterAmplitudeCut(double clusterAmplitudeCut) {
         this.clusterAmplitudeCut = clusterAmplitudeCut;
+    }
+
+    /**
+     * Drop any HelicalTrackHit containing a 1D hit that is also used in another
+     * HelicalTrackHit.
+     *
+     * @param rejectGhostHits
+     */
+    public void setRejectGhostHits(boolean rejectGhostHits) {
+        this.rejectGhostHits = rejectGhostHits;
     }
 
     /**
@@ -207,7 +221,7 @@
                     // Cast the hit as a 1D strip hit and find the
                     // identifier for the detector/layer combo
                     SiTrackerHitStrip1D h = (SiTrackerHitStrip1D) hit;
-                    if (clusterAmplitudeCut > 0 && h.getdEdx()/DopedSilicon.ENERGY_EHPAIR < clusterAmplitudeCut) {
+                    if (clusterAmplitudeCut > 0 && h.getdEdx() / DopedSilicon.ENERGY_EHPAIR < clusterAmplitudeCut) {
                         continue;
                     }
                     if (_clusterTimeCut > 0 && Math.abs(h.getTime()) > _clusterTimeCut) {
@@ -386,6 +400,29 @@
                 }
                 if (_debug) {
                     System.out.printf("%s: cross at %.2f,%.2f,%.2f \n", this.getClass().getSimpleName(), cross.getPosition()[0], cross.getPosition()[1], cross.getPosition()[2]);
+                }
+            }
+
+            if (rejectGhostHits) {
+                RelationalTable hittostrip = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
+                for (HelicalTrackCross cross : helicalTrackCrosses) {
+                    for (HelicalTrackStrip strip : cross.getStrips()) {
+                        hittostrip.add(cross, stripmap.get(strip));
+                    }
+                }
+                crossLoop:
+                for (Iterator<HelicalTrackCross> iter = helicalTrackCrosses.listIterator(); iter.hasNext();) {
+                    HelicalTrackCross cross = iter.next();
+                    Collection<TrackerHit> htsList = hittostrip.allFrom(cross);
+                    for (TrackerHit strip : htsList) {
+                        Set<HelicalTrackHit> sharedCrosses = hittostrip.allTo(strip);
+                        System.out.println(sharedCrosses.size());
+                        if (sharedCrosses.size() > 1) {
+//                    this.getLogger().warning(String.format("removing possible ghost hit"));
+                            iter.remove();
+                            continue crossLoop;
+                        }
+                    }
                 }
             }
 

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