lcsim/src/org/lcsim/contrib/uiowa/MuonFinder
diff -u -r1.12 -r1.13
--- MuonFinder.java 20 Oct 2008 19:02:40 -0000 1.12
+++ MuonFinder.java 21 Oct 2008 22:44:34 -0000 1.13
@@ -44,7 +44,7 @@
EventHeader m_event;
protected HelixExtrapolator m_findCluster = new org.lcsim.recon.pfa.identifier.LocalHelixExtrapolator();
- protected boolean useMuonhits = true;
+ protected boolean useMuonHitsForDebug = false;
public MuonFinder(String tracklist, String inCal, String inMu, String outMap, String outMapTrackToClusters){
_inCal = inCal;
@@ -71,7 +71,7 @@
Set<CalorimeterHit> mudethits = new HashSet<CalorimeterHit>();
- if(useMuonhits){
+ if(useMuonHitsForDebug){
List<CalorimeterHit> allHitsEcalBarrel = event.get(CalorimeterHit.class, "EcalBarrDigiHits");
List<CalorimeterHit> allHitsEcalEndcap = event.get(CalorimeterHit.class, "EcalEndcapDigiHits");
List<CalorimeterHit> allHitsHcalBarrel = event.get(CalorimeterHit.class, "HcalBarrDigiHits");
@@ -263,6 +263,10 @@
//This helps remove pion which is showering in CAL and also take the MIP which is contaminated by
//other shower so it stopped in the middle of CAL.
if(!(muon || (isolated > 6) )) continue;
+ if (!muon) {
+ // Skip these cases to avoid pion contamination.
+ continue;
+ }
Hep3Vector link = VecOp.sub(muonpos0, lastpoint);
Hep3Vector linkUnit = VecOp.unit(link);
double cos0 = VecOp.dot(lastUnit, MuonUnit);