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

HPS-SVN September 2015

Subject:

r3661 - /java/trunk/users/src/main/java/org/hps/users/meeg/V0Filter.java

From:

[log in to unmask]

Reply-To:

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

Date:

Tue, 22 Sep 2015 00:19:55 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (184 lines)

Author: [log in to unmask]
Date: Mon Sep 21 17:19:52 2015
New Revision: 3661

Log:
update user dir

Added:
    java/trunk/users/src/main/java/org/hps/users/meeg/V0Filter.java
      - copied, changed from r3631, java/trunk/recon/src/main/java/org/hps/recon/filtering/MollerCandidateFilter.java

Copied: java/trunk/users/src/main/java/org/hps/users/meeg/V0Filter.java (from r3631, java/trunk/recon/src/main/java/org/hps/recon/filtering/MollerCandidateFilter.java)
 =============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/filtering/MollerCandidateFilter.java	(original)
+++ java/trunk/users/src/main/java/org/hps/users/meeg/V0Filter.java	Mon Sep 21 17:19:52 2015
@@ -1,149 +1,38 @@
-package org.hps.recon.filtering;
+package org.hps.users.meeg;
 
-import static java.lang.Math.abs;
 import java.util.List;
+import org.hps.recon.filtering.EventReconFilter;
 import org.lcsim.event.EventHeader;
 import org.lcsim.event.ReconstructedParticle;
 
-/**
- * Class to strip off Moller candidates. Currently defined as: e- e- events with
- * tracks matched to clusters. Neither electron can be a full-energy candidate
- * (momentum less than _fullEnergyCut [0.85GeV]) but the momentum sum must be
- * consistent with the beam energy (greater than _mollerMomentumSumMin and less
- * than _mollerMomentumSumMax). The Ecal cluster times must be within _timingCut
- * [2.5ns] of each other.
- *
- * @author Norman A Graf
- *
- * @version $Id:
- */
-public class MollerCandidateFilter extends EventReconFilter {
+public class V0Filter extends EventReconFilter {
 
-    private String _mollerCandidateCollectionName = "TargetConstrainedMollerCandidates";
-    private double _mollerMomentumSumMin = 0.85;
-    private double _mollerMomentumSumMax = 1.3;
-    private double _fullEnergyCut = 0.85;
-    private double _clusterTimingCut = 2.5;
-
-    private boolean _tight = false;
+    private String v0CollectionName = "UnconstrainedV0Candidates";
+    private double massMin = 0.025;
+    private double massMax = 0.030;
+    private double minPTot = 0.7 * 1.05;
 
     @Override
     protected void process(EventHeader event) {
         incrementEventProcessed();
-        if (!event.hasCollection(ReconstructedParticle.class, _mollerCandidateCollectionName)) {
+        if (!event.hasCollection(ReconstructedParticle.class, v0CollectionName)) {
             skipEvent();
         }
-        List<ReconstructedParticle> mollerCandidates = event.get(ReconstructedParticle.class, _mollerCandidateCollectionName);
-        if (mollerCandidates.size() == 0) {
+        List<ReconstructedParticle> v0List = event.get(ReconstructedParticle.class, v0CollectionName);
+        if (v0List.isEmpty()) {
             skipEvent();
         }
-
-        // tight requires ONLY ONE real vertex fit 
-        if (_tight) {
-            if (mollerCandidates.size() != 2) {
-                skipEvent();
+        boolean hasGoodVertex = false;
+        for (ReconstructedParticle rp : v0List) {
+            double mass = rp.getMass();
+            if (mass > massMin && mass < massMax && rp.getMomentum().magnitude() > minPTot) {
+                hasGoodVertex = true;
+                break;
             }
         }
-
-        for (ReconstructedParticle rp : mollerCandidates) {
-
-            ReconstructedParticle e1 = null;
-            ReconstructedParticle e2 = null;
-
-            List<ReconstructedParticle> electrons = rp.getParticles();
-            if (electrons.size() != 2) {
-                skipEvent();
-            }
-            // require both electrons to be associated with an ECal cluster
-            e1 = electrons.get(0);
-            if (e1.getClusters().size() == 0) {
-                skipEvent();
-            }
-            e2 = electrons.get(1);
-            if (e2.getClusters().size() == 0) {
-                skipEvent();
-            }
-            // remove full energy electrons
-            double p1 = e1.getMomentum().magnitude();
-            if (p1 > _fullEnergyCut) {
-                skipEvent();
-            }
-            double p2 = e2.getMomentum().magnitude();
-            if (p2 > _fullEnergyCut) {
-                skipEvent();
-            }
-
-            // require momentum sum to be approximately the beam energy
-            double pSum = p1 + p2;
-            if (pSum < _mollerMomentumSumMin || pSum > _mollerMomentumSumMax) {
-                skipEvent();
-            }
-
-            // calorimeter cluster timing cut
-            // first CalorimeterHit in the list is the seed crystal
-            double t1 = e1.getClusters().get(0).getCalorimeterHits().get(0).getTime();
-            double t2 = e2.getClusters().get(0).getCalorimeterHits().get(0).getTime();
-
-            if (abs(t1 - t2) > _clusterTimingCut) {
-                skipEvent();
-            }
+        if (!hasGoodVertex) {
+            skipEvent();
         }
         incrementEventPassed();
     }
-
-    /**
-     * Maximum difference in Calorimeter Cluster Seed Hit times [ns]
-     *
-     * @param d
-     */
-    public void setClusterTimingCut(double d) {
-        _clusterTimingCut = d;
-    }
-
-    /**
-     * Name of Moller Candidate ReconstructedParticle Collection Name
-     *
-     * @param s
-     */
-    public void setMollerCandidateCollectionName(String s) {
-        _mollerCandidateCollectionName = s;
-    }
-
-    /**
-     * Minimum value for the sum of the two electron momenta [GeV]
-     *
-     * @param d
-     */
-    public void setMollerMomentumSumMin(double d) {
-        _mollerMomentumSumMin = d;
-    }
-
-    /**
-     * Maximum value for the sum of the two electron momenta [GeV]
-     *
-     * @param d
-     */
-    public void setMollerMomentumSumMax(double d) {
-        _mollerMomentumSumMax = d;
-    }
-
-    /**
-     * Maximum value for each of two electron momenta (removes full energy
-     * electrons) [GeV]
-     *
-     * @param d
-     */
-    public void setMollerMomentumMax(double d) {
-        _fullEnergyCut = d;
-    }
-
-    /**
-     * Setting a tight constraint requires one and only one candidate in the
-     * event
-     *
-     * @param b
-     */
-    public void setTightConstraint(boolean b) {
-        _tight = b;
-    }
 }

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