lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.4 -r1.5
--- SetUpPFA.java 28 Oct 2008 07:02:46 -0000 1.4
+++ SetUpPFA.java 7 Feb 2009 05:06:57 -0000 1.5
@@ -11,12 +11,33 @@
import org.lcsim.recon.cluster.util.UpperSubLayerDecision;
public class SetUpPFA extends Driver {
+
+ //default 250 GeV
+ UnphysicalTrackDecision dec = new UnphysicalTrackDecision();
+ //default input realistic tracks
+ ListFilterDriver fil = new ListFilterDriver(dec,"Tracks", "FilteredTrackList", Track.class);
+ HelixExtrapolator findCluster = new org.lcsim.recon.pfa.identifier.TrackHelixPlusHitExtrapolator();
+ ReclusterDTreeDriver reclusTree = new ReclusterDTreeDriver("DTreeClusters", "UnmatchedTracksAfterAmbigClusterMap", "ReconFSParticles", "MuonTrackClusterMap", findCluster);
+
+ public void setFilterInputTrack(String x){ fil.setInputList(x); }
+ public void setFilterOnputTrack(String x){ fil.setOutputList(x); }
+ public void setReclusJetScoreThreshold(double x){ reclusTree.setJetScoreThreshold(x); }
+ public void setReclusJetTolerance(double x){ reclusTree.setJetTolerance(x); }
+ public void setReclusMinScoreForReassignment(double x){ reclusTree.setMinScoreForReassignment(x); }
+ public void setReclusUseMucalBarrel(boolean x){ reclusTree.setUseMucalBarrel(x); }
+ public void setReclusUseMucalEndcap(boolean x){ reclusTree.setUseMucalEndcap(x); }
+ public void setReclusOutputParticleListName(String x){ reclusTree.setOutputParticleListName(x); }
+
+ public SetUpPFA(){
+ this("Tracks");
+ }
+
public SetUpPFA(String trackList) {
// Filter tracks, removing those with unphysical energy
{
- UnphysicalTrackDecision dec = new UnphysicalTrackDecision();
+ fil.setInputList(trackList);
add(dec);
- add(new ListFilterDriver(dec, trackList, "FilteredTrackList", Track.class));
+ add(fil);
}
// Filter muon system hits
@@ -32,7 +53,6 @@
}
// Set up track extrapolation
- HelixExtrapolator findCluster = new org.lcsim.recon.pfa.identifier.TrackHelixPlusHitExtrapolator();
add(findCluster);
// Set up input lists of calorimeter hits
@@ -52,7 +72,6 @@
}
// Set up and run PFA
- ReclusterDTreeDriver reclusTree = new ReclusterDTreeDriver("DTreeClusters", "UnmatchedTracksAfterAmbigClusterMap", "ReconFSParticles", "MuonTrackClusterMap", findCluster);
reclusTree.writeExtraEventOutput(false);
reclusTree.addInputMips("OldMipsInsideTreesECAL");
reclusTree.addInputMips("NewMipsInsideTreesECAL");
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.21 -r1.22
--- ReclusterDTreeDriver.java 29 Oct 2008 17:29:03 -0000 1.21
+++ ReclusterDTreeDriver.java 7 Feb 2009 05:06:57 -0000 1.22
@@ -1,6 +1,7 @@
package org.lcsim.recon.pfa.structural;
import java.util.*;
+import java.util.Arrays;
import java.io.IOException;
import hep.physics.vec.*;
import hep.physics.particle.properties.*;
@@ -35,7 +36,7 @@
* in this package, which uses the implementation in
* org.lcsim.recon.cluster.directedtree developed by NIU).
*
- * @version $Id: ReclusterDTreeDriver.java,v 1.21 2008/10/29 17:29:03 mcharles Exp $
+ * @version $Id: ReclusterDTreeDriver.java,v 1.22 2009/02/07 05:06:57 tjkim Exp $
* @author Mat Charles <[log in to unmask]>
*/
@@ -59,7 +60,6 @@
protected boolean m_oldMipFinderCrossesTrees = true;
protected boolean m_useNewMipFinder = true;
protected boolean m_useOldMipFinder = true;
- protected boolean m_removePoorQualityMips = false; // DANGER: STILL USED
protected boolean m_clusterAsJets = true;
protected boolean m_ignorePunchThroughTracksForJets = true;
protected boolean m_useTracksThatDontReachCalorimeter = true;
@@ -93,21 +93,36 @@
protected boolean m_debugSeedSplitting = false;
- protected boolean m_useMucalBarrel = false;
- protected boolean m_useMucalEndcap = true;
- protected boolean m_useFcal = false;
-
protected List<String> m_inputMips = new Vector<String>();
protected List<String> m_inputClumps = new Vector<String>();
protected List<String> m_inputBlocks = new Vector<String>();
protected List<String> m_inputLeftoverHits = new Vector<String>();
protected List<String> m_inputTrackClusterMaps = new Vector<String>();
+
public void addInputMips(String name) { m_inputMips.add(name); }
public void addInputClumps(String name) { m_inputClumps.add(name); }
public void addInputBlocks(String name) { m_inputBlocks.add(name); }
public void addInputLeftoverHits(String name) { m_inputLeftoverHits.add(name); }
public void addTrackToClusterMap(String name) { m_inputTrackClusterMaps.add(name); }
-
+
+ public void setAddInputMips(String [] inputMips) { m_inputMips.addAll(Arrays.asList(inputMips)); }
+ public void setAddInputClumps(String [] inputClumps) {m_inputClumps.addAll(Arrays.asList(inputClumps)); }
+ public void setAddInputBlocks(String [] inputBlocks) {m_inputBlocks.addAll(Arrays.asList(inputBlocks)); }
+ public void setAddInputLeftoverHits(String [] inputLeftoverHits) {m_inputLeftoverHits.addAll(Arrays.asList(inputLeftoverHits)); }
+ public void setAddTrackToClusterMap(String [] inputTrackClusterMaps) {m_inputTrackClusterMaps.addAll(Arrays.asList(inputTrackClusterMaps)); }
+
+ public void setJetScoreThreshold(double jetScoreThreshold){m_jetScoreThreshold = jetScoreThreshold;}
+ public void setJetTolerance(double jetTolerance){m_jetTolerance =jetTolerance;}
+ public void setMinScoreForReassignment(double minScoreForReassignment){m_minScoreForReassignment = minScoreForReassignment;}
+ public void setUseMucalBarrel(boolean useMucalBarrel){boolean m_useMucalBarrel = useMucalBarrel;}
+ public void setUseMucalEndcap(boolean useMucalEndcap){boolean m_useMucalEndcap = useMucalEndcap;}
+
+ public void setDTreeClusterList(String dTreeClusterList) { m_dTreeClusterListName = dTreeClusterList;}
+ public void setTrackList(String trackList) { m_inputTrackList = trackList;}
+ public void setMcList(String mcList) { m_mcList = mcList;}
+ public void setMuonTrackClusterMap(String muonTrackClusterMap) { m_muonTrackClusterMapName = muonTrackClusterMap;}
+ public void setOutputParticleListName(String outputParticleListName) { m_outputParticleListName = outputParticleListName;}
+
public void writeExtraEventOutput(boolean writeExtra) {
m_writeExtraEventOutput = writeExtra;
}
@@ -132,7 +147,6 @@
public void process(EventHeader event) {
super.debugProcess(event);
m_event = event;
-
// Some likelihood selectors need per-event info
supplyEventToLikelihoodSelectors();
@@ -1483,33 +1497,33 @@
Set<Cluster> clusters = newMapTrackToShowerComponents.get(tr);
Cluster sharedHitClus = makeClusterOfSharedHits(clusters, allSharedClusters);
if (sharedHitClus.getCalorimeterHits().size()>0) { clusters.add(sharedHitClus); }
- // Remember to handle case where >1 physical track is bundled into one logical track:
+ // Remember to handle case where >1 physical track is bundled into one logical track:
Set<Track> finalStateTracks = new HashSet<Track>();
- if (tr instanceof MultipleTrackTrack) {
- finalStateTracks.addAll(tr.getTracks());
- } else {
- finalStateTracks.add(tr);
- }
- // Loop over final-state track(s) and make particles.
- // Only the first one gets clusters (to avoid double-counting).
- boolean firstTrack = true;
- for (Track subTr : finalStateTracks) {
- // Assign clusters to first track.
- Set<Cluster> clustersForThisTrack = new HashSet<Cluster>();
- if (firstTrack) {
- clustersForThisTrack.addAll(clusters);
- firstTrack = false;
- }
- // Make particle (assume pion)
- ReconstructedParticle part = null;
- if (subTr.getCharge() > 0) {
- part = makeSingleChargedParticle(subTr, clustersForThisTrack, pdg_piplus);
- } else {
- part = makeSingleChargedParticle(subTr, clustersForThisTrack, pdg_piminus);
- }
- outputParticleList.add(part);
- }
- }
+ if (tr instanceof MultipleTrackTrack) {
+ finalStateTracks.addAll(tr.getTracks());
+ } else {
+ finalStateTracks.add(tr);
+ }
+ // Loop over final-state track(s) and make particles.
+ // Only the first one gets clusters (to avoid double-counting).
+ boolean firstTrack = true;
+ for (Track subTr : finalStateTracks) {
+ // Assign clusters to first track.
+ Set<Cluster> clustersForThisTrack = new HashSet<Cluster>();
+ if (firstTrack) {
+ clustersForThisTrack.addAll(clusters);
+ firstTrack = false;
+ }
+ // Make particle (assume pion)
+ ReconstructedParticle part = null;
+ if (subTr.getCharge() > 0) {
+ part = makeSingleChargedParticle(subTr, clustersForThisTrack, pdg_piplus);
+ } else {
+ part = makeSingleChargedParticle(subTr, clustersForThisTrack, pdg_piminus);
+ }
+ outputParticleList.add(part);
+ }
+ }
return outputParticleList;
}
@@ -1518,29 +1532,29 @@
int pdg_piminus = -211;
List<ReconstructedParticle> outputParticleList = new Vector<ReconstructedParticle>();
for (Set<Track> jet : newMapJetToShowerComponents.keySet()) {
- // Remember to handle case where >1 physical track is bundled into one logical track:
- Set<Track> finalStateTracks = new HashSet<Track>();
- for (Track tr : jet) {
- if (tr instanceof MultipleTrackTrack) {
- finalStateTracks.addAll(tr.getTracks());
- } else {
- finalStateTracks.add(tr);
- }
- }
- // Loop over final-state tracks and make particles:
+ // Remember to handle case where >1 physical track is bundled into one logical track:
+ Set<Track> finalStateTracks = new HashSet<Track>();
+ for (Track tr : jet) {
+ if (tr instanceof MultipleTrackTrack) {
+ finalStateTracks.addAll(tr.getTracks());
+ } else {
+ finalStateTracks.add(tr);
+ }
+ }
+ // Loop over final-state tracks and make particles:
boolean firstTrackInJet = true;
for (Track tr : finalStateTracks) {
- Set<Cluster> clusters = null;
+ Set<Cluster> clusters = null;
if (firstTrackInJet) {
- // Assign all clusters to first track in jet
- clusters = newMapJetToShowerComponents.get(jet);
- Cluster sharedHitClus = makeClusterOfSharedHits(clusters, allSharedClusters);
- if (sharedHitClus.getCalorimeterHits().size()>0) { clusters.add(sharedHitClus); }
- firstTrackInJet = false;
- } else {
- // Other tracks get none
- clusters = new HashSet<Cluster>();
- }
+ // Assign all clusters to first track in jet
+ clusters = newMapJetToShowerComponents.get(jet);
+ Cluster sharedHitClus = makeClusterOfSharedHits(clusters, allSharedClusters);
+ if (sharedHitClus.getCalorimeterHits().size()>0) { clusters.add(sharedHitClus); }
+ firstTrackInJet = false;
+ } else {
+ // Other tracks get none
+ clusters = new HashSet<Cluster>();
+ }
ReconstructedParticle part = null;
if (tr.getCharge() > 0) {
part = makeSingleChargedParticle(tr, clusters, pdg_piplus);
lcsim/src/org/lcsim/recon/pfa/structural
diff -u -r1.18 -r1.19
--- ReclusterDriver.java 12 Dec 2008 22:27:59 -0000 1.18
+++ ReclusterDriver.java 7 Feb 2009 05:06:57 -0000 1.19
@@ -41,7 +41,7 @@
* This version is superseded by ReclusterDTreeDriver,
* which derives from it.
*
- * @version $Id: ReclusterDriver.java,v 1.18 2008/12/12 22:27:59 jeremy Exp $
+ * @version $Id: ReclusterDriver.java,v 1.19 2009/02/07 05:06:57 tjkim Exp $
* @author Mat Charles <[log in to unmask]>
*/
@@ -88,7 +88,10 @@
protected int m_punchThroughLayers = 5;
protected int m_punchThroughHitMinimum = 4;
protected boolean m_checkSharedHitsForPunchThrough = true;
- protected boolean m_allowLateralPunchThrough = false; // Set to FALSE for mucal enabled
+ protected boolean m_useMucalBarrel = false;
+ protected boolean m_useMucalEndcap = true;
+ protected boolean m_useFcal = false;
+
protected HelixExtrapolator m_findCluster = null;
@@ -3343,7 +3346,7 @@
clusterToCheckForPunchThrough = makeCombinedCluster(showerComponents);
}
- if (!m_allowLateralPunchThrough) {
+ if (m_useMucalEndcap) {
// Ignore punch-through at the sides, since we can easily pick it up in the endcap muon system
// So we'll remove endcap hits from consideration.
BasicCluster newCluster = new BasicCluster();
@@ -3362,7 +3365,7 @@
// Optionally, also check for tracks that punch through the sides of the barrel
boolean lateralPunchThrough = false;
- if (m_allowLateralPunchThrough) {
+ if (!m_useMucalEndcap) {
int barrelEdgeHitCount = countHitsInSideEdgesOfHcal(clusterToCheckForPunchThrough, m_punchThroughLayers);
lateralPunchThrough = (barrelEdgeHitCount >= m_punchThroughHitMinimum);
}