Author: [log in to unmask]
Date: Wed Dec 9 17:30:36 2015
New Revision: 4039
Log:
kink skim update
Added:
java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/TridentMCSkim.lcsim
- copied, changed from r3937, java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/PairsSkimmer.lcsim
Modified:
java/trunk/users/src/main/java/org/hps/users/meeg/TridentMCFilter.java
Copied: java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/TridentMCSkim.lcsim (from r3937, java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/PairsSkimmer.lcsim)
=============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/PairsSkimmer.lcsim (original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/users/meeg/TridentMCSkim.lcsim Wed Dec 9 17:30:36 2015
@@ -1,5 +1,4 @@
<!--
- Discard events with SVT readout noise.
@author Sho Uemura <[log in to unmask]>
-->
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
@@ -7,13 +6,7 @@
<execute>
<driver name="EventMarkerDriver"/>
- <driver name="RawTrackerHitSensorSetup"/>
-
- <driver name="ReconParticleCleanupDriver"/>
-
- <driver name="EventFlagFilter"/>
- <!--<driver name="EcalPairsFilter"/>-->
- <driver name="CollectionSizeFilter"/>
+ <driver name="TridentMCFilter"/>
<driver name="LCIOWriter"/>
</execute>
@@ -22,21 +15,11 @@
<driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver">
<eventInterval>1000</eventInterval>
</driver>
- <driver name="RawTrackerHitSensorSetup" type="org.lcsim.recon.tracking.digitization.sisim.config.RawTrackerHitSensorSetup">
- <readoutCollections>SVTRawTrackerHits</readoutCollections>
- </driver>
- <driver name="ReconParticleCleanupDriver" type="org.hps.users.meeg.ReconParticleCleanupDriver">
- <maxTrackDt>5.0</maxTrackDt>
- </driver>
-
- <driver name="EventFlagFilter" type="org.hps.recon.filtering.EventFlagFilter">
- <flagNames>svt_bias_good svt_position_good svt_burstmode_noise_good</flagNames>
- </driver>
- <driver name="EcalPairsFilter" type="org.hps.recon.filtering.EcalPairsFilter"/>
- <driver name="CollectionSizeFilter" type="org.hps.recon.filtering.CollectionSizeFilter">
- <collectionName>UnconstrainedV0Candidates</collectionName>
- <minSize>1</minSize>
+ <driver name="TridentMCFilter" type="org.hps.users.meeg.TridentMCFilter">
+ <requireFrontHits>true</requireFrontHits>
+ <maxL1Kink>0.002</maxL1Kink>
+ <minL2Kink>0.005</minL2Kink>
</driver>
<driver name="LCIOWriter" type="org.lcsim.util.loop.LCIODriver">
Modified: java/trunk/users/src/main/java/org/hps/users/meeg/TridentMCFilter.java
=============================================================================
--- java/trunk/users/src/main/java/org/hps/users/meeg/TridentMCFilter.java (original)
+++ java/trunk/users/src/main/java/org/hps/users/meeg/TridentMCFilter.java Wed Dec 9 17:30:36 2015
@@ -16,8 +16,45 @@
*/
public class TridentMCFilter extends EventReconFilter {
+ private boolean requireFrontHits = false;
+ private double minL12Kink = -1;
+ private double maxL12Kink = -1;
+ private double minL1Kink = -1;
+ private double maxL1Kink = -1;
+ private double minL2Kink = -1;
+ private double maxL2Kink = -1;
+
+ public void setMinL12Kink(double minL12Kink) {
+ this.minL12Kink = minL12Kink;
+ }
+
+ public void setMaxL12Kink(double maxL12Kink) {
+ this.maxL12Kink = maxL12Kink;
+ }
+
+ public void setMinL1Kink(double minL1Kink) {
+ this.minL1Kink = minL1Kink;
+ }
+
+ public void setMaxL1Kink(double maxL1Kink) {
+ this.maxL1Kink = maxL1Kink;
+ }
+
+ public void setMinL2Kink(double minL2Kink) {
+ this.minL2Kink = minL2Kink;
+ }
+
+ public void setMaxL2Kink(double maxL2Kink) {
+ this.maxL2Kink = maxL2Kink;
+ }
+
+ public void setRequireFrontHits(boolean requireFrontHits) {
+ this.requireFrontHits = requireFrontHits;
+ }
+
@Override
public void process(EventHeader event) {
+ incrementEventProcessed();
List<MCParticle> MCParticles = event.getMCParticles();
List<MCParticle> tridentParticles = null;
@@ -39,7 +76,11 @@
int nElectronsWithTracks = 0, nPositronsWithTracks = 0;
MCParticle electron = null, positron = null;
+ particleLoop:
for (MCParticle particle : tridentParticles) {
+ if (!trackHitMap.containsKey(particle)) {
+ continue;
+ }
Set<Integer> layers = trackHitMap.get(particle).keySet();
int pairCount = 0;
for (Integer layer : layers) {
@@ -47,31 +88,74 @@
pairCount++;
}
}
- boolean hasTrack = (pairCount >= 5);
+ if (pairCount < 5) {
+ continue;
+ }
+ if (requireFrontHits) {
+ for (int i = 1; i < 5; i++) {
+ if (!layers.contains(i)) {
+ continue particleLoop;
+ }
+ }
+ }
- if (hasTrack && particle.getCharge() < 0) {
+ if (particle.getCharge() < 0) {
nElectronsWithTracks++;
electron = particle;
}
- if (hasTrack && particle.getCharge() > 0) {
+ if (particle.getCharge() > 0) {
nPositronsWithTracks++;
positron = particle;
}
}
if (electron == null || positron == null) {
- System.out.println("not enough trident daughters with tracks");
+// System.out.println("not enough trident daughters with tracks");
skipEvent();
}
if (nElectronsWithTracks > 1 || nPositronsWithTracks > 1) {
- System.out.println("too many trident daughters with tracks");
+// System.out.println("too many trident daughters with tracks");
skipEvent();
}
-// double deflection12_ele = KinkAnalysisDriver.deflection(trackHitMap.get(electron), 0, 4);
-// double deflection12_pos = KinkAnalysisDriver.deflection(trackHitMap.get(positron), 0, 4);
+ double deflection12_ele = KinkAnalysisDriver.deflection(trackHitMap.get(electron), 0, 4);
+ double deflection12_pos = KinkAnalysisDriver.deflection(trackHitMap.get(positron), 0, 4);
+ double deflection1_ele = KinkAnalysisDriver.deflection(trackHitMap.get(electron), 0, 2);
+ double deflection1_pos = KinkAnalysisDriver.deflection(trackHitMap.get(positron), 0, 2);
+ double deflection2_ele = KinkAnalysisDriver.deflection(trackHitMap.get(electron), 2, 4);
+ double deflection2_pos = KinkAnalysisDriver.deflection(trackHitMap.get(positron), 2, 4);
+ if (minL12Kink > 0) {
+ if (Math.abs(deflection12_ele) < minL12Kink && Math.abs(deflection12_pos) < minL12Kink) {
+ skipEvent();
+ }
+ }
+ if (maxL12Kink > 0) {
+ if (Math.abs(deflection12_ele) > maxL12Kink || Math.abs(deflection12_pos) > maxL12Kink) {
+ skipEvent();
+ }
+ }
+ if (minL1Kink > 0) {
+ if (Math.abs(deflection1_ele) < minL1Kink && Math.abs(deflection1_pos) < minL1Kink) {
+ skipEvent();
+ }
+ }
+ if (maxL1Kink > 0) {
+ if (Math.abs(deflection1_ele) > maxL1Kink || Math.abs(deflection1_pos) > maxL1Kink) {
+ skipEvent();
+ }
+ }
+ if (minL2Kink > 0) {
+ if (Math.abs(deflection2_ele) < minL2Kink && Math.abs(deflection2_pos) < minL2Kink) {
+ skipEvent();
+ }
+ }
+ if (maxL2Kink > 0) {
+ if (Math.abs(deflection2_ele) > maxL2Kink || Math.abs(deflection2_pos) > maxL2Kink) {
+ skipEvent();
+ }
+ }
+
incrementEventPassed();
-
}
}
|