8 modified files
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.1 -r1.2
--- ConeReassignmentAlgorithm.java 13 Jul 2008 23:33:48 -0000 1.1
+++ ConeReassignmentAlgorithm.java 6 Sep 2008 23:47:26 -0000 1.2
@@ -5,26 +5,29 @@
import org.lcsim.event.util.*;
import org.lcsim.event.*;
import hep.physics.vec.*;
-import org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator;
+import org.lcsim.recon.pfa.identifier.*;
public class ConeReassignmentAlgorithm implements ReassignClustersAlgorithm {
protected double m_limit;
- protected LocalHelixExtrapolator m_findCluster;
- public ConeReassignmentAlgorithm(double limit, LocalHelixExtrapolator findCluster) {
+ protected HelixExtrapolator m_findCluster;
+ public ConeReassignmentAlgorithm(double limit, HelixExtrapolator findCluster) {
m_limit = limit;
m_findCluster = findCluster;
}
public Double computeFigureOfMerit(Track tr, Cluster clus) {
- Hep3Vector interceptPoint = m_findCluster.performExtrapolation(tr);
- if (interceptPoint != null) {
- Hep3Vector tangent = m_findCluster.getTangent();
- Hep3Vector tangentUnit = VecOp.unit(tangent);
- Hep3Vector clusterPosition = new BasicHep3Vector(clus.getPosition());
- Hep3Vector displacement = VecOp.sub(clusterPosition, interceptPoint);
- Hep3Vector displacementUnit = VecOp.unit(displacement);
- double angle=Math.acos(VecOp.dot(tangentUnit, displacementUnit));
- if (angle < m_limit) {
- return new Double(angle);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ if (result != null) {
+ Hep3Vector interceptPoint = result.getInterceptPoint();
+ if (interceptPoint != null) {
+ Hep3Vector tangent = result.getTangent();
+ Hep3Vector tangentUnit = VecOp.unit(tangent);
+ Hep3Vector clusterPosition = new BasicHep3Vector(clus.getPosition());
+ Hep3Vector displacement = VecOp.sub(clusterPosition, interceptPoint);
+ Hep3Vector displacementUnit = VecOp.unit(displacement);
+ double angle=Math.acos(VecOp.dot(tangentUnit, displacementUnit));
+ if (angle < m_limit) {
+ return new Double(angle);
+ }
}
}
return null;
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.1 -r1.2
--- HelixTangentMIPGeometryHandler.java 19 Aug 2008 06:33:39 -0000 1.1
+++ HelixTangentMIPGeometryHandler.java 6 Sep 2008 23:47:26 -0000 1.2
@@ -5,7 +5,7 @@
import org.lcsim.event.util.*;
import org.lcsim.event.*;
import hep.physics.vec.*;
-import org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator;
+import org.lcsim.recon.pfa.identifier.*;
import org.lcsim.recon.cluster.util.BasicCluster;
import org.lcsim.geometry.*;
@@ -20,30 +20,30 @@
* The calculation is based on identifying the outermost hit
* and then checking the track helix near that point.
*
- * @version $Id: HelixTangentMIPGeometryHandler.java,v 1.1 2008/08/19 06:33:39 mcharles Exp $
+ * @version $Id: HelixTangentMIPGeometryHandler.java,v 1.2 2008/09/06 23:47:26 mcharles Exp $
*/
public class HelixTangentMIPGeometryHandler extends MIPGeometryHandler {
private Map<Track, BasicCluster> m_newMapMIP;
- private LocalHelixExtrapolator m_extrap;
+ private HelixExtrapolator m_extrap;
- public HelixTangentMIPGeometryHandler(Map<Track, BasicCluster> trkmipmap, LocalHelixExtrapolator extrap) {
+ public HelixTangentMIPGeometryHandler(Map<Track, BasicCluster> trkmipmap, HelixExtrapolator extrap) {
super();
m_extrap = extrap;
m_newMapMIP = trkmipmap;
}
protected void findPointAndTangentNoCache(Track tr, BasicHep3Vector outputPoint, BasicHep3Vector outputTangentUnit) throws ExtrapolationFailureException {
- m_extrap.performExtrapolation(tr); // Make sure that the extrapolation is valid.
+ HelixExtrapolationResult result = m_extrap.performExtrapolation(tr); // Make sure that the extrapolation is valid.
BasicCluster newmip = m_newMapMIP.get(tr);
List<Hep3Vector> lastTwoPositions = new ArrayList<Hep3Vector>();
Hep3Vector last0pos = null;
Hep3Vector tangent = null;
if(newmip.getCalorimeterHits().size() < 3){ //These is no mip close to track. There should at least two hits.
- last0pos = m_extrap.getLastInterceptPoint();
+ last0pos = result.getInterceptPoint();
if (last0pos != null) {
- tangent = m_extrap.getTangent(last0pos,tr); //tangent obtained using extrapolated track.
+ tangent = result.getTangent(last0pos); //tangent obtained using extrapolated track.
} else {
// Track didn't reach calorimeter
if (newmip.getCalorimeterHits().size()>=2) {
@@ -51,12 +51,12 @@
Hep3Vector last1pos = new BasicHep3Vector(newmip.getCalorimeterHits().get(newmip.getCalorimeterHits().size()-2).getPosition());
last0pos = new BasicHep3Vector(newmip.getCalorimeterHits().get(newmip.getCalorimeterHits().size()-1).getPosition());
//tangent = VecOp.sub(last0pos, last1pos);
- tangent = m_extrap.getTangent(last0pos,tr); //tangent obtained using extrapolated track.
+ tangent = result.getTangent(last0pos); //tangent obtained using extrapolated track.
} else if (newmip.getCalorimeterHits().size()==1) {
Hep3Vector last1pos = new BasicHep3Vector(0,0,0);
last0pos = new BasicHep3Vector(newmip.getCalorimeterHits().get(newmip.getCalorimeterHits().size()-1).getPosition());
//tangent = VecOp.sub(last0pos, last1pos);
- tangent = m_extrap.getTangent(last0pos,tr); //tangent obtained using extrapolated track.
+ tangent = result.getTangent(last0pos); //tangent obtained using extrapolated track.
} else {
// We don't have any information on the track position or intercept at all
throw new ExtrapolationFailureException("No extrapolation");
@@ -77,7 +77,7 @@
Hep3Vector last1pos = lastTwoPositions.get(1);
//Chose one
boolean usingExtrap = true;
- if(usingExtrap) tangent = m_extrap.getTangent(last0pos, tr); //tangent obtained using extrapoltated track
+ if(usingExtrap) tangent = result.getTangent(last0pos); //tangent obtained using extrapoltated track
else tangent = VecOp.sub(last0pos, last1pos);
}
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.2 -r1.3
--- LayerBasedMIPGeometryHandler.java 21 Aug 2008 18:36:54 -0000 1.2
+++ LayerBasedMIPGeometryHandler.java 6 Sep 2008 23:47:26 -0000 1.3
@@ -5,7 +5,7 @@
import org.lcsim.event.util.*;
import org.lcsim.event.*;
import hep.physics.vec.*;
-import org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator;
+import org.lcsim.recon.pfa.identifier.*;
import org.lcsim.recon.cluster.util.BasicCluster;
import org.lcsim.geometry.*;
@@ -23,16 +23,17 @@
* from the IP, then finding the hits in the outermost layer
* of that subdetector.
*
- * @version $Id: LayerBasedMIPGeometryHandler.java,v 1.2 2008/08/21 18:36:54 mcharles Exp $
+ * @version $Id: LayerBasedMIPGeometryHandler.java,v 1.3 2008/09/06 23:47:26 mcharles Exp $
*/
public class LayerBasedMIPGeometryHandler extends MIPGeometryHandler {
private Map<Track, BasicCluster> m_newMapMIP;
- private LocalHelixExtrapolator m_extrap;
+ private HelixExtrapolator m_extrap;
+ private HelixExtrapolationResult m_result;
protected boolean m_debug = false;
- public LayerBasedMIPGeometryHandler(Map<Track, BasicCluster> mapTrackToMIP, LocalHelixExtrapolator extrap) {
+ public LayerBasedMIPGeometryHandler(Map<Track, BasicCluster> mapTrackToMIP, HelixExtrapolator extrap) {
super();
m_extrap = extrap;
m_newMapMIP = mapTrackToMIP;
@@ -40,20 +41,21 @@
protected void findPointAndTangentNoCache(Track tr, BasicHep3Vector outputPoint, BasicHep3Vector outputTangentUnit) throws ExtrapolationFailureException {
// Make sure the extrapolation is done
- m_extrap.performExtrapolation(tr);
+ m_result = m_extrap.performExtrapolation(tr);
// Find the MIP trace for the track
BasicCluster mip = m_newMapMIP.get(tr);
if (mip == null) {
throw new AssertionError("Track of class "+tr.getClass().getName()+" with p="+(new BasicHep3Vector(tr.getMomentum())).magnitude()+" has null mip!");
} else if (mip.getCalorimeterHits().size()==0) {
- Hep3Vector interceptPoint = m_extrap.getLastInterceptPoint();
+ Hep3Vector interceptPoint = null;
+ if (m_result != null) { interceptPoint = m_result.getInterceptPoint(); }
if (interceptPoint == null) {
throw new ExtrapolationFailureException("Failure to extrapolate");
} else {
outputPoint.setV(interceptPoint.x(), interceptPoint.y(), interceptPoint.z());
}
- Hep3Vector tangent = m_extrap.getTangent();
+ Hep3Vector tangent = m_result.getTangent();
outputTangentUnit.setV(tangent.x(), tangent.y(), tangent.z());
return;
}
@@ -83,7 +85,8 @@
outputTangentUnit.setV(tangentUnit.x(), tangentUnit.y(), tangentUnit.z());
} catch (ExtrapolationFailureException x) {
// Failure...
- Hep3Vector tangentUnit = m_extrap.getTangent();
+ Hep3Vector tangentUnit = null;
+ if (m_result != null) { tangentUnit = m_result.getTangent(); }
if (tangentUnit != null) {
// Use tangent at ECAL front surface instead (iffy...)
outputTangentUnit.setV(tangentUnit.x(), tangentUnit.y(), tangentUnit.z());
@@ -110,23 +113,25 @@
// To do the extrapolation, we need to know if we're looking at a barrel or an endcap subdetector.
String calName = outermostSubdet.getName();
- if (calName.compareTo("HADBarrel")==0) {
- trackPointInLayer_N = m_extrap.extendToHCALBarrelLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToHCALBarrelLayer(layerN-1);
- } else if (calName.compareTo("HADEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToHCALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToHCALEndcapLayer(layerN-1);
- } else if (calName.compareTo("EMBarrel")==0) {
- trackPointInLayer_N = m_extrap.extendToECALBarrelLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToECALBarrelLayer(layerN-1);
- } else if (calName.compareTo("EMEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToECALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToECALEndcapLayer(layerN-1);
- } else if (calName.compareTo("MuonEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToMCALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToMCALEndcapLayer(layerN-1);
- } else {
- throw new AssertionError("Calorimeter component "+calName+" not recognized!");
+ if (m_result != null) {
+ if (calName.compareTo("HADBarrel")==0) {
+ trackPointInLayer_N = m_result.extendToHCALBarrelLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToHCALBarrelLayer(layerN-1);
+ } else if (calName.compareTo("HADEndcap")==0) {
+ trackPointInLayer_N = m_result.extendToHCALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToHCALEndcapLayer(layerN-1);
+ } else if (calName.compareTo("EMBarrel")==0) {
+ trackPointInLayer_N = m_result.extendToECALBarrelLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToECALBarrelLayer(layerN-1);
+ } else if (calName.compareTo("EMEndcap")==0) {
+ trackPointInLayer_N = m_result.extendToECALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToECALEndcapLayer(layerN-1);
+ } else if (calName.compareTo("MuonEndcap")==0) {
+ trackPointInLayer_N = m_result.extendToMCALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToMCALEndcapLayer(layerN-1);
+ } else {
+ throw new AssertionError("Calorimeter component "+calName+" not recognized!");
+ }
}
if (trackPointInLayer_N == null || trackPointInLayer_NminusOne==null) {
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.2 -r1.3
--- NonTrivialPFA.java 3 Apr 2008 00:46:23 -0000 1.2
+++ NonTrivialPFA.java 6 Sep 2008 23:47:26 -0000 1.3
@@ -29,7 +29,7 @@
* a List<ReconstructedParticle>, written to the event as
* PFAReconstructedParticles.
*
- * @version $Id: NonTrivialPFA.java,v 1.2 2008/04/03 00:46:23 mcharles Exp $
+ * @version $Id: NonTrivialPFA.java,v 1.3 2008/09/06 23:47:26 mcharles Exp $
* @author Mat Charles <[log in to unmask]>
*/
@@ -330,7 +330,7 @@
// tracks to the same skeleton.
String eventSplitSkeletonClusters = "splitSkeletons";
{
- LocalHelixExtrapolationTrackClusterMatcher extrapolate = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackClusterMatcher extrapolate = new LocalHelixExtrapolationTrackClusterMatcher(new LocalHelixExtrapolator());
extrapolate.setCutSeparation(14.0); // about two cells
org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher simpleExtrapolate = new org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher(14.0);
org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher simpleCheatExtrapolate = new org.lcsim.recon.pfa.identifier.CheatHelixTrackClusterMatcher(14.0);
@@ -562,7 +562,7 @@
// Check if they match a track (ugly... don't need to make the particles!)
{
MIPChargedParticleMaker mipHadID = new MIPChargedParticleMaker();
- LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher();
+ LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher(new LocalHelixExtrapolator());
add(mipMatch);
mipHadID.setTrackMatcher(mipMatch);
mipHadID.setInputTrackList(inputTrackList);
@@ -625,7 +625,7 @@
{
// Check if any "photons" have a track match:
SimpleChargedParticleMaker hadID = new SimpleChargedParticleMaker();
- LocalHelixExtrapolationTrackClusterMatcher clusMatch = new LocalHelixExtrapolationTrackClusterMatcher(); // New track matching
+ LocalHelixExtrapolationTrackClusterMatcher clusMatch = new LocalHelixExtrapolationTrackClusterMatcher(new LocalHelixExtrapolator()); // New track matching
add(clusMatch);
hadID.setTrackMatcher(clusMatch);
hadID.setInputTrackList(inputTrackList);
@@ -840,7 +840,7 @@
{
// First try the MIPs...
MIPChargedParticleMaker hadIDmip = new MIPChargedParticleMaker();
- LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher();
+ LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher(new LocalHelixExtrapolator());
mipMatch.setDebug(debug);
//org.lcsim.recon.pfa.identifier.SimpleTrackMIPClusterMatcher mipMatch = new org.lcsim.recon.pfa.identifier.SimpleTrackMIPClusterMatcher();
//org.lcsim.recon.pfa.identifier.SimpleTrackMIPClusterMatcher mipMatch = new org.lcsim.recon.pfa.identifier.CheatHelixTrackMIPClusterMatcher();
@@ -862,7 +862,7 @@
// Then try the clusters generically:
SimpleChargedParticleMaker hadID = new SimpleChargedParticleMaker();
- LocalHelixExtrapolationTrackClusterMatcher clusMatch = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackClusterMatcher clusMatch = new LocalHelixExtrapolationTrackClusterMatcher(new LocalHelixExtrapolator());
//org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher clusMatch = new org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher();
//org.lcsim.recon.pfa.identifier.SimpleTrackClusterMatcher clusMatch = new org.lcsim.recon.pfa.identifier.CheatHelixTrackClusterMatcher();
add(clusMatch);
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.3 -r1.4
--- PreShowerMIPReassignmentAlgorithm.java 21 Aug 2008 18:36:54 -0000 1.3
+++ PreShowerMIPReassignmentAlgorithm.java 6 Sep 2008 23:47:26 -0000 1.4
@@ -6,12 +6,13 @@
import org.lcsim.event.*;
import hep.physics.vec.*;
import org.lcsim.geometry.Subdetector;
-import org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator;
+import org.lcsim.recon.pfa.identifier.*;
import org.lcsim.recon.cluster.util.BasicCluster;
public class PreShowerMIPReassignmentAlgorithm implements ReassignClustersAlgorithm {
- protected LocalHelixExtrapolator m_extrap;
+ protected HelixExtrapolator m_extrap;
+ protected HelixExtrapolationResult m_result;
protected EventHeader m_event;
protected double m_limit;
protected String m_mapTrackToMipName;
@@ -20,7 +21,7 @@
public PreShowerMIPReassignmentAlgorithm(EventHeader event, double limit, String mapTrackToMip) {
m_event = event;
- m_extrap = new LocalHelixExtrapolator();
+ m_extrap = new LocalHelixExtrapolator(); System.out.println("WARNING: HARD-CODED USE OF LOCALHELIXEXTRAPOLATOR");
m_extrap.process(event); // pick up geometry info
m_limit = limit;
m_cachePoint = new HashMap<Track, Hep3Vector>();
@@ -58,7 +59,7 @@
}
} else {
// Only one track -- find track helix parameters
- m_extrap.performExtrapolation(tr);
+ m_result = m_extrap.performExtrapolation(tr);
}
BasicHep3Vector endOfMipPoint = new BasicHep3Vector();
@@ -119,13 +120,13 @@
if (mip == null) {
throw new AssertionError("Track of class "+tr.getClass().getName()+" with p="+(new BasicHep3Vector(tr.getMomentum())).magnitude()+" has null mip!");
} else if (mip.getCalorimeterHits().size()==0) {
- Hep3Vector interceptPoint = m_extrap.getLastInterceptPoint();
+ Hep3Vector interceptPoint = m_result.getInterceptPoint();
if (interceptPoint == null) {
throw new ExtrapolationFailureException("Failure to extrapolate");
} else {
outputPoint.setV(interceptPoint.x(), interceptPoint.y(), interceptPoint.z());
}
- Hep3Vector tangent = m_extrap.getTangent();
+ Hep3Vector tangent = m_result.getTangent();
outputTangentUnit.setV(tangent.x(), tangent.y(), tangent.z());
return;
}
@@ -155,7 +156,7 @@
outputTangentUnit.setV(tangentUnit.x(), tangentUnit.y(), tangentUnit.z());
} catch (ExtrapolationFailureException x) {
// Failure...
- Hep3Vector tangentUnit = m_extrap.getTangent();
+ Hep3Vector tangentUnit = m_result.getTangent();
if (tangentUnit != null) {
// Use tangent at ECAL front surface instead (iffy...)
outputTangentUnit.setV(tangentUnit.x(), tangentUnit.y(), tangentUnit.z());
@@ -183,20 +184,20 @@
// To do the extrapolation, we need to know if we're looking at a barrel or an endcap subdetector.
String calName = outermostSubdet.getName();
if (calName.compareTo("HADBarrel")==0) {
- trackPointInLayer_N = m_extrap.extendToHCALBarrelLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToHCALBarrelLayer(layerN-1);
+ trackPointInLayer_N = m_result.extendToHCALBarrelLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToHCALBarrelLayer(layerN-1);
} else if (calName.compareTo("HADEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToHCALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToHCALEndcapLayer(layerN-1);
+ trackPointInLayer_N = m_result.extendToHCALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToHCALEndcapLayer(layerN-1);
} else if (calName.compareTo("EMBarrel")==0) {
- trackPointInLayer_N = m_extrap.extendToECALBarrelLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToECALBarrelLayer(layerN-1);
+ trackPointInLayer_N = m_result.extendToECALBarrelLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToECALBarrelLayer(layerN-1);
} else if (calName.compareTo("EMEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToECALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToECALEndcapLayer(layerN-1);
+ trackPointInLayer_N = m_result.extendToECALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToECALEndcapLayer(layerN-1);
} else if (calName.compareTo("MuonEndcap")==0) {
- trackPointInLayer_N = m_extrap.extendToMCALEndcapLayer(layerN);
- trackPointInLayer_NminusOne = m_extrap.extendToMCALEndcapLayer(layerN-1);
+ trackPointInLayer_N = m_result.extendToMCALEndcapLayer(layerN);
+ trackPointInLayer_NminusOne = m_result.extendToMCALEndcapLayer(layerN-1);
} else {
throw new AssertionError("Calorimeter component "+calName+" not recognized!");
}
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.12 -r1.13
--- ReclusterDTreeDriver.java 31 Aug 2008 18:49:50 -0000 1.12
+++ ReclusterDTreeDriver.java 6 Sep 2008 23:47:26 -0000 1.13
@@ -35,7 +35,7 @@
* in this package, which uses the implementation in
* org.lcsim.recon.cluster.directedtree developed by NIU).
*
- * @version $Id: ReclusterDTreeDriver.java,v 1.12 2008/08/31 18:49:50 mcharles Exp $
+ * @version $Id: ReclusterDTreeDriver.java,v 1.13 2008/09/06 23:47:26 mcharles Exp $
* @author Mat Charles <[log in to unmask]>
*/
@@ -86,6 +86,7 @@
protected boolean m_fixSingleTracksWithCone = true;
protected boolean m_fixJetsWithCone = true;
protected boolean m_useSimpleConeForReassignment = false;
+ protected double m_minScoreForReassignment = 0.1;
protected boolean m_debugSeedSplitting = false;
@@ -102,7 +103,7 @@
}
public ReclusterDTreeDriver(String dTreeClusterList, String trackList, String mcList) {
- System.out.println("ReclusterDTreeDriver version 0.42");
+ System.out.println("ReclusterDTreeDriver version 0.43");
initTrackMatch();
initCalibration();
initPlots();
@@ -313,8 +314,7 @@
Map<Cluster, Cluster> treeOfLeftoverHits = new HashMap<Cluster,Cluster>();
// Identify the start point of showers
- org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator findCluster = new org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator();
- findCluster.process(m_event); // picks up geometry
+ m_findCluster.process(m_event); // picks up geometry
// Match tracks
// ------------
@@ -350,7 +350,11 @@
if (leftoverHitClusters.contains(matchedCluster)) {
if (m_debugSeedSplitting) {
// Debug printout
- Hep3Vector interceptPoint = findCluster.performExtrapolation(tr);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPoint = null;
+ if (result != null) {
+ interceptPoint = result.getInterceptPoint();
+ }
if (interceptPoint != null) {
double primaryDist = proximity(matchedCluster, interceptPoint);
int innermostLayerOfMatchedCluster = 99;
@@ -409,7 +413,11 @@
if (m_debugSeedSplitting) {
// Debug printout
System.out.println("DEBUG: -> Rematch failed (no targets passed track-matching)");
- Hep3Vector interceptPoint = findCluster.performExtrapolation(tr);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPoint = null;
+ if (result != null) {
+ interceptPoint = result.getInterceptPoint();
+ }
if (interceptPoint != null) {
for (Cluster target : targets) {
double dist = proximity(target, interceptPoint);
@@ -451,7 +459,7 @@
unmatchedTracks.removeAll(tracksMatchedToClusters.keySet());
List<Track> unmatchedTracksThatDontReachCalorimeter = new Vector<Track>();
for (Track tr : unmatchedTracks) {
- LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher(m_findCluster);
debugTrackMatch.process(m_event);
Cluster debugMatchedCluster = debugTrackMatch.matchTrackToCluster(tr, allMatchableClusters);
if (debugMatchedCluster != null) {
@@ -459,7 +467,11 @@
// In any case, it clearly pointed to the calorimeter so we shouldn't
// add on the track momentum (that would be double-counting)
} else {
- Hep3Vector interceptPoint = debugTrackMatch.getExtrapolator().extendToECALLayer(0);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPoint = null;
+ if (result != null) {
+ interceptPoint = result.getInterceptPoint();
+ }
if (interceptPoint == null) {
// No valid extrap to calorimeter
unmatchedTracksThatDontReachCalorimeter.add(tr);
@@ -476,7 +488,7 @@
}
}
- ShowerPointFinder showerFinder = new ShowerPointFinder(findCluster, allHits, tracksMatchedToClusters);
+ ShowerPointFinder showerFinder = new ShowerPointFinder(m_findCluster, allHits, tracksMatchedToClusters);
Map<Track,BasicCluster> MapTrkToMIP = showerFinder.findMips();
event.put("ShowerFinderMapTrackToMip", MapTrkToMIP);
List<Cluster> preShowerMips = new Vector<Cluster>();
@@ -484,7 +496,6 @@
event.put("ShowerFinderMips", preShowerMips);
event.getMetaData(preShowerMips).setTransient(true);
-
// Figure out whether tracks were uniquely matched or not:
Set<Track> uniquelyMatchedTracks = new HashSet<Track>();
Set<Track> ambiguouslyMatchedTracks = new HashSet<Track>();
@@ -984,7 +995,7 @@
ReassignClustersAlgorithm algorithm = null;
if (m_useSimpleConeForReassignment) {
- algorithm = new ConeReassignmentAlgorithm(1.00, findCluster);
+ algorithm = new ConeReassignmentAlgorithm(1.00, m_findCluster);
} else {
String mapName;
if (m_useSteveMipsForConeScoring) {
@@ -993,8 +1004,8 @@
mapName = "ShowerFinderMapTrackToMip";
}
Map<Track, BasicCluster> mapTrackToMIP = (Map<Track, BasicCluster>) (m_event.get(mapName));
- MIPGeometryHandler geomHandler = new LayerBasedMIPGeometryHandler(mapTrackToMIP, findCluster);
- //MIPGeometryHandler geomHandler = new HelixTangentMIPGeometryHandler(mapTrackToMIP, findCluster);
+ MIPGeometryHandler geomHandler = new LayerBasedMIPGeometryHandler(mapTrackToMIP, m_findCluster);
+ //MIPGeometryHandler geomHandler = new HelixTangentMIPGeometryHandler(mapTrackToMIP, m_findCluster);
algorithm = new ConeMIPReassignmentAlgorithm(geomHandler, 800.0, Math.PI*0.5);
}
if (m_fixSingleTracksWithCone) {
@@ -1132,7 +1143,7 @@
for (Track tr : jet) {
Double angle = reassignAlgorithm.computeFigureOfMerit(tr, clus);
Double score = getBestScore(tr, clus, newMapTrackToShowerComponents);
- if (angle != null && score > 0.1) {
+ if (angle != null && score > m_minScoreForReassignment) {
if (minTrack==null || angle < minAngle) {
minTrack = tr;
minAngle = angle;
@@ -1270,34 +1281,36 @@
}
private int countHitsInClusterInFirstLayers(Track tr, Cluster clus, int nLayers) {
- LocalHelixExtrapolator extrap = new LocalHelixExtrapolator();
- extrap.process(m_event);
Set<Long> allClusterHits = new HashSet<Long>();
for (CalorimeterHit hit : clus.getCalorimeterHits()) {
allClusterHits.add(hit.getCellID());
}
int countMatches = 0;
- for (int iLayer=0; iLayer<nLayers; iLayer++) {
- Long cellID = extrap.extendToECALLayerAndFindCell(iLayer);
- if (allClusterHits.contains(cellID)) {
- countMatches++;
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ if (result != null) {
+ for (int iLayer=0; iLayer<nLayers; iLayer++) {
+ Long cellID = result.extendToECALLayerAndFindCell(iLayer);
+ if (allClusterHits.contains(cellID)) {
+ countMatches++;
+ }
}
}
return countMatches;
}
private int countHitsInCoreInFirstLayers(Track tr, Cluster clus, int nLayers) {
- LocalHelixExtrapolator extrap = new LocalHelixExtrapolator();
- extrap.process(m_event);
Set<Long> coreClusterHits = new HashSet<Long>();
for (CalorimeterHit hit : clus.getClusters().get(0).getCalorimeterHits()) {
coreClusterHits.add(hit.getCellID());
}
int countMatches = 0;
- for (int iLayer=0; iLayer<nLayers; iLayer++) {
- Long cellID = extrap.extendToECALLayerAndFindCell(iLayer);
- if (coreClusterHits.contains(cellID)) {
- countMatches++;
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ if (result != null) {
+ for (int iLayer=0; iLayer<nLayers; iLayer++) {
+ Long cellID = result.extendToECALLayerAndFindCell(iLayer);
+ if (coreClusterHits.contains(cellID)) {
+ countMatches++;
+ }
}
}
return countMatches;
@@ -1322,9 +1335,11 @@
}
private double distanceFromTrackToPhotonCore(Track tr, Cluster clus) {
- LocalHelixExtrapolator extrap = new LocalHelixExtrapolator();
- extrap.process(m_event);
- Hep3Vector interceptPoint = extrap.performExtrapolation(tr);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPoint = null;
+ if (result != null) {
+ interceptPoint = result.getInterceptPoint();
+ }
if (interceptPoint != null) {
Cluster coreSubCluster = clus.getClusters().get(0);
BasicCluster copyOfCoreSubCluster = new BasicCluster();
@@ -1545,7 +1560,7 @@
}
private void findTrackSeedInFirstLayersOnly(Track tr, Map<Integer, Set<CalorimeterHit>> unusedHitsByLayer, List<CalorimeterHit> trackSeedHits, Map<CalorimeterHit, Hep3Vector> mapTrackSeedToTangent, Map<Track, CalorimeterHit> mapTrackToTrackSeed, double cutTrackSeedDist) {
- LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher(m_findCluster);
debugTrackMatch.process(m_event);
List<Cluster> tmpListLayer0 = new Vector<Cluster>();
List<Cluster> tmpListLayer1 = new Vector<Cluster>();
@@ -1568,10 +1583,15 @@
}
}
Cluster seedClusToUse = null;
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPointLayer0 = null;
+ Hep3Vector interceptPointLayer1 = null;
+ if (result != null) {
+ interceptPointLayer0 = result.extendToECALLayer(0);
+ interceptPointLayer1 = result.extendToECALLayer(1);
+ }
Cluster tmpMatchedClusterLayer0 = debugTrackMatch.matchTrackToCluster(tr, tmpListLayer0);
- Hep3Vector interceptPointLayer0 = debugTrackMatch.getExtrapolator().extendToECALLayer(0);
Cluster tmpMatchedClusterLayer1 = debugTrackMatch.matchTrackToCluster(tr, tmpListLayer1);
- Hep3Vector interceptPointLayer1 = debugTrackMatch.getExtrapolator().extendToECALLayer(1);
if (tmpMatchedClusterLayer0 == null && tmpMatchedClusterLayer1 == null) {
// No seed found for this track -- maybe extrapolation is too imprecise.
// Handle it the usual way.
@@ -1584,6 +1604,12 @@
// Look at distance from track intercept point IN LAYER 0 to hit.
// This favours the hits in the innermost layer... which is what we
// want in general.
+ if (tmpMatchedClusterLayer0.getCalorimeterHits().size()==0) { throw new AssertionError("Empty cluster!"); }
+ if (tmpMatchedClusterLayer1.getCalorimeterHits().size()==0) { throw new AssertionError("Empty cluster!"); }
+ if (tmpMatchedClusterLayer0 != null && interceptPointLayer0 == null) {
+ throw new AssertionError("Inconsistency: intercept point null but matched cluster non-null");
+ }
+ if (interceptPointLayer0 == null) { throw new AssertionError("No intercept point in layer 0!"); }
Hep3Vector positionOfMatchedClusterLayer0 = new BasicHep3Vector(tmpMatchedClusterLayer0.getCalorimeterHits().iterator().next().getPosition());
Hep3Vector positionOfMatchedClusterLayer1 = new BasicHep3Vector(tmpMatchedClusterLayer1.getCalorimeterHits().iterator().next().getPosition());
double distFromFaceToHit0 = VecOp.sub(positionOfMatchedClusterLayer0, interceptPointLayer0).magnitude();
@@ -1599,7 +1625,7 @@
seedHitToUse = seedClusToUse.getCalorimeterHits().iterator().next();
// Require within a certain distance (sanity check)
Hep3Vector positionOfSeedHit = new BasicHep3Vector(seedHitToUse.getPosition());
- Hep3Vector trackExtrapPointInLayer = debugTrackMatch.getExtrapolator().extendToECALLayer(getLayer(seedHitToUse));
+ Hep3Vector trackExtrapPointInLayer = result.extendToECALLayer(getLayer(seedHitToUse));
// It's possible (but rare) for trackExtrapPointInLayer to be null -- e.g. if track just clipped the calorimeter
// and never entered layer 2. Watch for that case.
if (trackExtrapPointInLayer != null) {
@@ -1648,7 +1674,7 @@
if (trackSeedsInFirstLayersOnly) {
findTrackSeedInFirstLayersOnly(tr, unusedHitsByLayer, trackSeedHits, mapTrackSeedToTangent, mapTrackToTrackSeed, cutTrackSeedDist);
} else {
- LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackClusterMatcher debugTrackMatch = new LocalHelixExtrapolationTrackClusterMatcher(m_findCluster);
debugTrackMatch.process(m_event);
for (int iLayer=minLayer; iLayer<maxLayer; iLayer++) {
Set<CalorimeterHit> unusedHitsInLayer = unusedHitsByLayer.get(iLayer);
@@ -1662,7 +1688,11 @@
}
}
Cluster bestClusterMatchInLayer = debugTrackMatch.matchTrackToCluster(tr, tmpClusterList);
- Hep3Vector interceptPointInLayer = debugTrackMatch.getExtrapolator().extendToECALLayer(iLayer);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector interceptPointInLayer = null;
+ if (result != null) {
+ interceptPointInLayer = result.extendToECALLayer(iLayer);
+ }
if (bestClusterMatchInLayer != null && interceptPointInLayer != null) {
CalorimeterHit seedHit = bestClusterMatchInLayer.getCalorimeterHits().get(0);
Hep3Vector positionOfMatchedHit = new BasicHep3Vector(seedHit.getPosition());
@@ -1670,7 +1700,7 @@
if (transverseDistance < cutTrackSeedDist) {
// Within 1cm => OK
trackSeedHits.add(seedHit);
- Hep3Vector tangent = debugTrackMatch.getExtrapolator().getTangent(interceptPointInLayer, tr);
+ Hep3Vector tangent = result.getTangent(interceptPointInLayer);
mapTrackSeedToTangent.put(seedHit, tangent);
mapTrackToTrackSeed.put(tr, seedHit);
break; // stop looping over layers
@@ -2734,14 +2764,24 @@
double trackEnergySq = trackMomentumMag*trackMomentumMag + currentParticleMass*currentParticleMass;
HepLorentzVector fourMomentum = new BasicHepLorentzVector(Math.sqrt(trackEnergySq), trackMomentum);
part.set4Vector(fourMomentum);
- part.setMass(mass_piplus);
+ part.setMass(currentParticleMass);
part.setReferencePoint(new BasicHep3Vector(trackOfThisParticle.getReferencePoint()));
if (isElectron) {
- part.addParticleID(pid_electron);
- part.setParticleIdUsed(pid_electron);
+ if (part.getCharge()>0) {
+ part.addParticleID(pid_positron);
+ part.setParticleIdUsed(pid_positron);
+ } else {
+ part.addParticleID(pid_electron);
+ part.setParticleIdUsed(pid_electron);
+ }
} else {
- part.addParticleID(pid_piplus);
- part.setParticleIdUsed(pid_piplus);
+ if (part.getCharge()>0) {
+ part.addParticleID(pid_piplus);
+ part.setParticleIdUsed(pid_piplus);
+ } else {
+ part.addParticleID(pid_piminus);
+ part.setParticleIdUsed(pid_piminus);
+ }
}
}
// Write out as charged track
@@ -3091,8 +3131,13 @@
part.set4Vector(fourMomentum);
part.setMass(mass_piplus);
part.setReferencePoint(new BasicHep3Vector(tr.getReferencePoint()));
- part.addParticleID(pid_piplus);
- part.setParticleIdUsed(pid_piplus);
+ if (part.getCharge()>0) {
+ part.addParticleID(pid_piplus);
+ part.setParticleIdUsed(pid_piplus);
+ } else {
+ part.addParticleID(pid_piminus);
+ part.setParticleIdUsed(pid_piminus);
+ }
chargedParticlesThatDontReachCalorimeter.add(part);
}
if (m_useTracksThatDontReachCalorimeter) {
@@ -3653,38 +3698,44 @@
newMapJetToShowerComponents.put(jet, newShower);
newMapShowerComponentToJet.put(clus, jet);
}
- if (treatAsSingleTrack) {
- boolean truthMatch = false;
- if (trackOfMatchedClusterOfBestLink instanceof BaseTrackMC) {
- MCParticle trackTruth = ((BaseTrackMC)(trackOfMatchedClusterOfBestLink)).getMCParticle();
- truthMatch = (domPartOfClus == trackTruth);
- } else {
- List<Track> tracks = trackOfMatchedClusterOfBestLink.getTracks();
- for (Track tr : tracks) {
- MCParticle trackTruth = ((BaseTrackMC)(tr)).getMCParticle();
- if (domPartOfClus == trackTruth) {
- truthMatch = true;
+ if (m_debug) {
+ if (treatAsSingleTrack) {
+ boolean truthMatch = false;
+ if (trackOfMatchedClusterOfBestLink instanceof BaseTrackMC) {
+ MCParticle trackTruth = ((BaseTrackMC)(trackOfMatchedClusterOfBestLink)).getMCParticle();
+ truthMatch = (domPartOfClus == trackTruth);
+ } else {
+ List<Track> tracks = trackOfMatchedClusterOfBestLink.getTracks();
+ for (Track tr : tracks) {
+ if (tr instanceof BaseTrackMC) {
+ MCParticle trackTruth = ((BaseTrackMC)(tr)).getMCParticle();
+ if (domPartOfClus == trackTruth) {
+ truthMatch = true;
+ }
+ }
}
}
- }
- String mistake = new String(""); // Default: not a mistake
- if (!truthMatch) {
- mistake += " -- MISTAKE";
- boolean clusterComesFromReconstructedTrack = false;
- for (Track eachTrack : tracksMatchedToClusters.keySet()) {
- MCParticle truthForEachTrack = ((BaseTrackMC)(eachTrack)).getMCParticle();
- if (domPartOfClus == truthForEachTrack) {
- clusterComesFromReconstructedTrack = true;
- break;
+ String mistake = new String(""); // Default: not a mistake
+ if (!truthMatch) {
+ mistake += " -- MISTAKE";
+ boolean clusterComesFromReconstructedTrack = false;
+ for (Track eachTrack : tracksMatchedToClusters.keySet()) {
+ if (eachTrack instanceof BaseTrackMC) {
+ MCParticle truthForEachTrack = ((BaseTrackMC)(eachTrack)).getMCParticle();
+ if (domPartOfClus == truthForEachTrack) {
+ clusterComesFromReconstructedTrack = true;
+ break;
+ }
+ }
+ }
+ if (clusterComesFromReconstructedTrack) {
+ mistake += " [but no cost]";
}
}
- if (clusterComesFromReconstructedTrack) {
- mistake += " [but no cost]";
- }
+ System.out.println("DEBUG: Over-rode scoring to make a link: Track with p="+trackMomentum+" to clus with "+clus.getCalorimeterHits().size()+" hits from "+domPDG+" with p="+domMom+mistake);
+ } else {
+ System.out.println("DEBUG: Over-rode scoring to make a link: Jet with p="+jetScalarMomentum(jet)+" to clus with "+clus.getCalorimeterHits().size()+" hits");
}
- if (m_debug) { System.out.println("DEBUG: Over-rode scoring to make a link: Track with p="+trackMomentum+" to clus with "+clus.getCalorimeterHits().size()+" hits from "+domPDG+" with p="+domMom+mistake); }
- } else {
- if (m_debug) { System.out.println("DEBUG: Over-rode scoring to make a link: Jet with p="+jetScalarMomentum(jet)+" to clus with "+clus.getCalorimeterHits().size()+" hits"); }
}
}
}
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.10 -r1.11
--- ReclusterDriver.java 31 Aug 2008 18:49:50 -0000 1.10
+++ ReclusterDriver.java 6 Sep 2008 23:47:26 -0000 1.11
@@ -40,7 +40,7 @@
* This version is superseded by ReclusterDTreeDriver,
* which derives from it.
*
- * @version $Id: ReclusterDriver.java,v 1.10 2008/08/31 18:49:50 mcharles Exp $
+ * @version $Id: ReclusterDriver.java,v 1.11 2008/09/06 23:47:26 mcharles Exp $
* @author Mat Charles <[log in to unmask]>
*/
@@ -88,6 +88,8 @@
protected boolean m_checkSharedHitsForPunchThrough = true;
protected boolean m_allowLateralPunchThrough = false; // Set to FALSE for mucal enabled
+ protected HelixExtrapolator m_findCluster = new org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator();
+
protected ReclusterDriver() {
// Gah, debug only!
}
@@ -120,8 +122,8 @@
protected void initTrackMatch() {
// Track-matching is complex. Use several matchers...
// Try matching with local helix extrap to MIP or generic cluster:
- LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher();
- LocalHelixExtrapolationTrackClusterMatcher genMatch = new LocalHelixExtrapolationTrackClusterMatcher();
+ LocalHelixExtrapolationTrackMIPClusterMatcher mipMatch = new LocalHelixExtrapolationTrackMIPClusterMatcher(m_findCluster);
+ LocalHelixExtrapolationTrackClusterMatcher genMatch = new LocalHelixExtrapolationTrackClusterMatcher(m_findCluster);
DualActionTrackClusterMatcher localHelixMatchers = new DualActionTrackClusterMatcher(mipMatch, genMatch);
add(mipMatch);
add(genMatch);
@@ -1042,10 +1044,8 @@
mipAlg = new PreShowerMIPReassignmentAlgorithm(m_event, 1.0, mapName);
} else {
Map<Track, BasicCluster> mapTrackToMIP = (Map<Track, BasicCluster>) (m_event.get(mapName));
- LocalHelixExtrapolator findCluster = new LocalHelixExtrapolator();
- findCluster.process(m_event); // picks up geometry
- MIPGeometryHandler geomHandler = new LayerBasedMIPGeometryHandler(mapTrackToMIP, findCluster);
- //MIPGeometryHandler geomHandler = new HelixTangentMIPGeometryHandler(mapTrackToMIP, findCluster);
+ MIPGeometryHandler geomHandler = new LayerBasedMIPGeometryHandler(mapTrackToMIP, m_findCluster);
+ //MIPGeometryHandler geomHandler = new HelixTangentMIPGeometryHandler(mapTrackToMIP, m_findCluster);
mipAlg = new ConeMIPReassignmentAlgorithm(geomHandler, 800.0, Math.PI*0.5);
}
@@ -1904,6 +1904,16 @@
return outputHits;
}
+ protected List<MCParticle> getMCParticle(Set<Track> jet) {
+ Set<MCParticle> outputSet = new HashSet<MCParticle>();
+ for (Track tr : jet) {
+ outputSet.addAll(getMCParticle(tr));
+ }
+ List<MCParticle> outputList = new Vector<MCParticle>();
+ outputList.addAll(outputSet);
+ return outputList;
+ }
+
protected List<MCParticle> getMCParticle(Track tr) {
List<MCParticle> output = new Vector<MCParticle>();
if (tr instanceof ReconTrack) {
@@ -2079,6 +2089,10 @@
protected double getBestScore(Track tr, Cluster clus, Map<Track, Set<Cluster>> newMapTrackToShowerComponents) {
Set<Cluster> shower = newMapTrackToShowerComponents.get(tr);
+ return getBestScore(shower, clus);
+ }
+
+ protected double getBestScore(Collection<Cluster> shower, Cluster clus) {
double score = -1.0;
for(Cluster trclus : shower){
List<ScoredLink> links = m_potentialLinks.get(trclus);
@@ -2897,9 +2911,11 @@
double pt = Math.sqrt(px*px + py*py);
double cosTheta = pz/pmag;
String printme = new String("Track with p="+p.magnitude()+" (cosTheta="+cosTheta+")");
- LocalHelixExtrapolator extrap = new LocalHelixExtrapolator();
- extrap.process(m_event);
- Hep3Vector point = extrap.performExtrapolation(tr);
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector point = null;
+ if (result != null) {
+ point = result.getInterceptPoint();
+ }
if (point == null) {
printme += " -- extrapolation point is null";
} else {
@@ -2946,7 +2962,7 @@
}
}
}
- }
+ }
}
protected void debugPrintMatchedTrackInfo(Map<Track,Cluster> tracksMatchedToClusters, Collection<Cluster> mips, Collection<Cluster> clumps, Collection<Cluster> photonClusters, Collection<Cluster> largeClustersWithoutSkeletons, Collection<Cluster> smallClustersWithoutSkeletons, List<Cluster> wrappedUnusedHitsIgnoringLargeClustersWithoutSkeletons) {
@@ -2994,10 +3010,12 @@
}
}
printme += " (dominant particle: "+maxParticle.getType().getPDGID()+" with "+clusterTruth.get(maxParticle).size()+" hits)";
-
- LocalHelixExtrapolator extrap = new LocalHelixExtrapolator();
- extrap.process(m_event);
- Hep3Vector point = extrap.performExtrapolation(tr);
+
+ HelixExtrapolationResult result = m_findCluster.performExtrapolation(tr);
+ Hep3Vector point = null;
+ if (result != null) {
+ point = result.getInterceptPoint();
+ }
printme += " -- extrap point is ";
if (point == null) {
printme += "null";
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.4 -r1.5
--- RunAndWriteOutPFA.java 19 Aug 2008 06:30:43 -0000 1.4
+++ RunAndWriteOutPFA.java 6 Sep 2008 23:47:26 -0000 1.5
@@ -47,7 +47,7 @@
add(new MassPlots("FlushedDTreeReclusteredParticles", "output-write-reclustered-dtree.aida")); // Make some histograms and write them to a file
// Test & validate performance
- validate("FlushedDTreeReclusteredParticles_forConfusionMatrix");
+ //validate("FlushedDTreeReclusteredParticles_forConfusionMatrix");
}
protected void validate(String particleList) {
CVSspam 0.2.8