Author: [log in to unmask]
Date: Wed Sep 9 12:20:05 2015
New Revision: 3565
Log:
My own user stuff...
Added:
java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevReadout.lcsim
- copied, changed from r3537, java/trunk/steering-files/src/main/resources/org/hps/steering/readout/EngineeringRun2015TrigPairs1_Pass2.lcsim
java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevRecon.lcsim
- copied, changed from r3537, java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullReconMC_Pass2.lcsim
java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/TimingTests.lcsim
- copied, changed from r3341, java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullRecon.lcsim
java/trunk/users/src/main/java/org/hps/users/mgraham/TridentAnalysis.java
- copied, changed from r3537, java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TridentMonitoring.java
Modified:
java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/MattsScrewAround.lcsim
Copied: java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevReadout.lcsim (from r3537, java/trunk/steering-files/src/main/resources/org/hps/steering/readout/EngineeringRun2015TrigPairs1_Pass2.lcsim)
=============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/readout/EngineeringRun2015TrigPairs1_Pass2.lcsim (original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevReadout.lcsim Wed Sep 9 12:20:05 2015
@@ -3,6 +3,7 @@
<!--
Steering file for readout for the EngRun 2015 MC for pair1 triggers
corresponding to pass-2 reconstruction
+ MG...this is kludged for use with 2.2 GeV signal (A') MC so that it gives high trigger efficiency...
@author Matt Graham <[log in to unmask]>
-->
<control>
@@ -70,6 +71,7 @@
Coplanarity Maximum: 30 deg
Energy-Dist Slope: 5.5 MeV/mm
Energy-Dist Minimum: 600 MeV
+ MG....HACK THESE UP TO GET ACCEPTANCE FOR 2.2 GEV MC
-->
<clusterCollectionName>EcalClustersGTP</clusterCollectionName>
<deadTime>32</deadTime>
@@ -77,11 +79,11 @@
<minHitCount>1</minHitCount>
<pairCoincidence>3</pairCoincidence>
<clusterEnergyLow>0.054</clusterEnergyLow>
- <clusterEnergyHigh>0.630</clusterEnergyHigh>
- <energySumLow>0.180</energySumLow>
- <energySumHigh>0.860</energySumHigh>
- <energyDifferenceHigh>0.540</energyDifferenceHigh>
- <coplanarityHigh>30</coplanarityHigh>
+ <clusterEnergyHigh>2.0</clusterEnergyHigh>
+ <energySumLow>0.10</energySumLow>
+ <energySumHigh>2.5</energySumHigh>
+ <energyDifferenceHigh>1.5</energyDifferenceHigh>
+ <coplanarityHigh>50</coplanarityHigh>
<energySlopeParamF>0.0055</energySlopeParamF>
<energySlopeLow>0.600</energySlopeLow>
<prescale>1</prescale>
Copied: java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevRecon.lcsim (from r3537, java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullReconMC_Pass2.lcsim)
=============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullReconMC_Pass2.lcsim (original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/Kludged2pt2GevRecon.lcsim Wed Sep 9 12:20:05 2015
@@ -2,6 +2,7 @@
<!--
Offline reconstruction for 2015 (engineering run with SVT+ECal) MC
corresponding to the Pass-2 reconstruction
+ MG...this is kludged for use with 2.2 GeV signal (A') MC ... mainly I just added monitoring driver
@author Sho Uemura <[log in to unmask]>
@author Matt Graham <[log in to unmask]>
-->
@@ -9,6 +10,7 @@
xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
<execute>
+
<driver name="ConditionsDriver"/>
<driver name="EventMarkerDriver"/>
<!-- Ecal reconstruction drivers -->
@@ -49,14 +51,17 @@
-->
<driver name="TrackReconSeed123Conf5Extd46"/>
<!--
- TrackDataDriver needs to be run before ReconParticleDriver so the
- ReconstructedParticle types are properly set.
- -->
- <driver name="TrackDataDriver" />
- <driver name="ReconParticle" />
- <driver name="GBLOutputDriver"/>
+ TrackDataDriver needs to be run before ReconParticleDriver so the
+ ReconstructedParticle types are properly set.
+ -->
+ <driver name="MergeTrackCollections"/>
+ <driver name="GBLOutputDriver" />
<driver name="GBLRefitterDriver" />
- <driver name="LCIOWriter"/>
+ <driver name="TrackDataDriver" />
+ <driver name="ReconParticleDriver" />
+ <driver name="TridentAnalysis"/>
+ <!-- <driver name="LCIOWriter"/>-->
+ <driver name="AidaSaveDriver"/>
<driver name="CleanupDriver"/>
</execute>
<drivers>
@@ -67,7 +72,7 @@
</driver>
<driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver">
- <eventInterval>100</eventInterval>
+ <eventInterval>1000</eventInterval>
</driver>
<driver name="RawTrackerHitSensorSetup" type="org.lcsim.recon.tracking.digitization.sisim.config.RawTrackerHitSensorSetup">
<readoutCollections>SVTRawTrackerHits</readoutCollections>
@@ -92,9 +97,9 @@
<maxDt>16.0</maxDt>
<clusterAmplitudeCut>400.0</clusterAmplitudeCut>
</driver>
- <!-- SVT Track finding -->
+ <!-- SVT Track finding -->
<driver name="TrackReconSeed345Conf2Extd16" type="org.hps.recon.tracking.TrackerReconDriver">
- <trackCollectionName>MatchedTracks</trackCollectionName>
+ <trackCollectionName>Tracks_s345_c2_e16</trackCollectionName>
<strategyResource>HPS_s345_c2_e16.xml</strategyResource>
<debug>false</debug>
<rmsTimeCut>8.0</rmsTimeCut>
@@ -117,6 +122,7 @@
<debug>false</debug>
<rmsTimeCut>8.0</rmsTimeCut>
</driver>
+ <driver name="MergeTrackCollections" type="org.hps.recon.tracking.MergeTrackCollections" />
<driver name="GBLOutputDriver" type="org.hps.recon.tracking.gbl.GBLOutputDriver"/>
<driver name="GBLRefitterDriver" type="org.hps.recon.tracking.gbl.HpsGblRefitter"/>
<driver name="EcalRawConverter" type="org.hps.recon.ecal.EcalRawConverterDriver">
@@ -159,17 +165,23 @@
<inputCollectionName>EcalClusters</inputCollectionName>
<outputCollectionName>EcalClustersCorr</outputCollectionName>
<storeHits>true</storeHits>
- </driver>
- <driver name="ReconParticle" type="org.hps.recon.particle.HpsReconParticleDriver">
- <ecalClusterCollectionName>EcalClustersCorr</ecalClusterCollectionName>
- </driver>
+ </driver>
+ <driver name="ReconParticleDriver" type="org.hps.recon.particle.HpsReconParticleDriver">
+ <ecalClusterCollectionName>EcalClustersCorr</ecalClusterCollectionName>
+ <!-- <beamSigmaX>0.04</beamSigmaX>
+ <beamSigmaX>0.04</beamSigmaX>-->
+ <beamSigmaX>${sigX}</beamSigmaX>
+ <beamSigmaY>${sigY}</beamSigmaY>
+ </driver>
<driver name="TrackDataDriver" type="org.hps.recon.tracking.TrackDataDriver" />
<driver name="LCIOWriter" type="org.lcsim.util.loop.LCIODriver">
<outputFilePath>${outputFile}.slcio</outputFilePath>
</driver>
+ <driver name="TridentAnalysis" type="org.hps.users.mgraham.TridentAnalysis"/>
<driver name="CleanupDriver" type="org.lcsim.recon.tracking.digitization.sisim.config.ReadoutCleanupDriver"/>
<driver name="AidaSaveDriver" type="org.lcsim.job.AidaSaveDriver">
<outputFileName>${outputFile}.root</outputFileName>
</driver>
</drivers>
+
</lcsim>
Modified: java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/MattsScrewAround.lcsim
=============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/MattsScrewAround.lcsim (original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/MattsScrewAround.lcsim Wed Sep 9 12:20:05 2015
@@ -21,6 +21,7 @@
<driver name="TrackingResidualsDQM"/>
<driver name="FinalStateDQM"/>
<driver name="V0DQM"/>
+ <driver name="TridentMonitoring"/>
<driver name="AidaSaveDriver"/>
<driver name="CleanupDriver" />
</execute>
@@ -85,6 +86,9 @@
<outputPlots>v0recon</outputPlots>
</driver>
+ <driver name="TridentMonitoring" type="org.hps.analysis.dataquality.TridentMonitoring">
+ <triggerType>all</triggerType>
+ </driver>
<driver name="TrackingDQM" type="org.hps.analysis.dataquality.TrackingMonitoring">
<overwriteDB>false</overwriteDB>
Copied: java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/TimingTests.lcsim (from r3341, java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullRecon.lcsim)
=============================================================================
--- java/trunk/steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullRecon.lcsim (original)
+++ java/trunk/steering-files/src/main/resources/org/hps/steering/users/mgraham/TimingTests.lcsim Wed Sep 9 12:20:05 2015
@@ -2,6 +2,7 @@
<lcsim xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="http://www.lcsim.org/schemas/lcsim/1.0/lcsim.xsd">
<!--
Offline reconstruction for 2015 (engineering run with SVT+ECal) data.
+ mg...modified EngineeringRun2015FullRecon to study looser SVT hit time cuts
@author Sho Uemura <[log in to unmask]>
-->
<execute>
@@ -14,17 +15,25 @@
<driver name="EcalRunningPedestal"/>
<driver name="EcalRawConverter" />
<driver name="ReconClusterer" />
- <driver name="GTPOnlineClusterer" />
+<!-- <driver name="GTPOnlineClusterer" />-->
<driver name="CopyCluster" />
<driver name="ReconParticle" />
<driver name="TrackDataDriver" />
- <driver name="GBLOutputDriver"/>
+<!-- <driver name="GBLOutputDriver"/> -->
+ <driver name="EcalMonitoringPairs1"/>
+ <driver name="SVTMonitoringPairs1"/>
+ <driver name="TrackingMonitoringPairs1"/>
+ <driver name="TrackingResidualsPairs1"/>
+ <driver name="FinalStateMonitoringPairs1"/>
+ <driver name="V0MonitoringPairs1"/>
+ <driver name="TridentMonitoringPairs1"/>
+ <driver name="AidaSaveDriver"/>
<driver name="LCIOWriter"/>
<driver name="CleanupDriver"/>
</execute>
<drivers>
<driver name="EventMarkerDriver" type="org.lcsim.job.EventMarkerDriver">
- <eventInterval>1000</eventInterval>
+ <eventInterval>10</eventInterval>
</driver>
<driver name="RawTrackerHitSensorSetup" type="org.lcsim.recon.tracking.digitization.sisim.config.RawTrackerHitSensorSetup">
<readoutCollections>SVTRawTrackerHits</readoutCollections>
@@ -41,18 +50,22 @@
<debug>false</debug>
</driver>
<driver name="TrackerHitDriver" type="org.hps.recon.tracking.DataTrackerHitDriver">
- <neighborDeltaT>8.0</neighborDeltaT>
+<!-- <neighborDeltaT>16.0</neighborDeltaT>-->
+ <neighborDeltaT>8.0</neighborDeltaT>
</driver>
<driver name="HelicalTrackHitDriver" type="org.hps.recon.tracking.HelicalTrackHitDriver">
<debug>false</debug>
<clusterTimeCut>12.0</clusterTimeCut>
- <maxDt>16.0</maxDt>
+ <maxDt>16.0</maxDt>
+<!-- <clusterTimeCut>24.0</clusterTimeCut>
+ <maxDt>32.0</maxDt>-->
<clusterAmplitudeCut>400.0</clusterAmplitudeCut>
</driver>
<driver name="TrackerReconDriver" type="org.hps.recon.tracking.TrackerReconDriver">
<strategyResource>HPS-Full.xml</strategyResource>
<debug>false</debug>
- <rmsTimeCut>8.0</rmsTimeCut>
+ <rmsTimeCut>8.0</rmsTimeCut><!--
+ <rmsTimeCut>16.0</rmsTimeCut>-->
</driver>
<driver name="GBLOutputDriver" type="org.hps.recon.tracking.gbl.GBLOutputDriver">
<debug>0</debug>
@@ -111,6 +124,30 @@
<outputFilePath>${outputFile}.slcio</outputFilePath>
</driver>
<driver name="CleanupDriver" type="org.lcsim.recon.tracking.digitization.sisim.config.ReadoutCleanupDriver"/>
+
+<!-- pairs1 triggers -->
+ <driver name="EcalMonitoringPairs1" type="org.hps.analysis.dataquality.EcalMonitoring">
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="SVTMonitoringPairs1" type="org.hps.analysis.dataquality.SvtMonitoring">
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="TrackingMonitoringPairs1" type="org.hps.analysis.dataquality.TrackingMonitoring">
+ <overwriteDB>false</overwriteDB>
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="TrackingResidualsPairs1" type="org.hps.analysis.dataquality.TrackingResiduals">
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="FinalStateMonitoringPairs1" type="org.hps.analysis.dataquality.FinalStateMonitoring">
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="V0MonitoringPairs1" type="org.hps.analysis.dataquality.V0Monitoring">
+ <triggerType>pairs1</triggerType>
+ </driver>
+ <driver name="TridentMonitoringPairs1" type="org.hps.analysis.dataquality.TridentMonitoring">
+ <triggerType>pairs1</triggerType>
+ </driver>
<driver name="AidaSaveDriver" type="org.lcsim.job.AidaSaveDriver">
<outputFileName>${outputFile}.root</outputFileName>
</driver>
Copied: java/trunk/users/src/main/java/org/hps/users/mgraham/TridentAnalysis.java (from r3537, java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TridentMonitoring.java)
=============================================================================
--- java/trunk/analysis/src/main/java/org/hps/analysis/dataquality/TridentMonitoring.java (original)
+++ java/trunk/users/src/main/java/org/hps/users/mgraham/TridentAnalysis.java Wed Sep 9 12:20:05 2015
@@ -1,4 +1,4 @@
-package org.hps.analysis.dataquality;
+package org.hps.users.mgraham;
import hep.aida.IAnalysisFactory;
import hep.aida.IFitFactory;
@@ -11,6 +11,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
+import org.hps.analysis.dataquality.DataQualityMonitor;
import org.hps.recon.tracking.TrackUtils;
import org.lcsim.event.EventHeader;
import org.lcsim.event.ReconstructedParticle;
@@ -26,9 +27,9 @@
* @author mgraham on May 14, 2014
*
*/
-public class TridentMonitoring extends DataQualityMonitor {
-
- private double ebeam = 1.05;
+public class TridentAnalysis extends DataQualityMonitor {
+
+ private double ebeam = 2.2;
String finalStateParticlesColName = "FinalStateParticles";
String unconstrainedV0CandidatesColName = "UnconstrainedV0Candidates";
String beamConV0CandidatesColName = "BeamspotConstrainedV0Candidates";
@@ -36,7 +37,8 @@
String trackListName = "MatchedTracks";
String[] fpQuantNames = {"nV0_per_Event", "avg_BSCon_mass", "avg_BSCon_Vx", "avg_BSCon_Vy", "avg_BSCon_Vz", "sig_BSCon_Vx", "sig_BSCon_Vy", "sig_BSCon_Vz", "avg_BSCon_Chi2"};
- private final String plotDir = "TridentMonitoring/";
+ private final String plotDir = "TridentAnalysis/";
+
IHistogram2D trackTime2D;
IHistogram1D trackTimeDiff;
IHistogram2D vertexMassMomentum;
@@ -57,12 +59,19 @@
IHistogram2D vertexVZ;
IHistogram2D vertexZY;
+ IHistogram1D tarconMass;
+ IHistogram1D tarconVx;
+ IHistogram1D tarconVy;
+ IHistogram1D tarconVz;
+ IHistogram1D tarconChi2;
+
IHistogram1D deltaP;
IHistogram1D deltaPRad;
IHistogram1D sumP;
IHistogram2D vertexedTrackMomentum2DRad;
//clean up event first
+ int trackType = 33;
int nTrkMax = 3;
int nPosMax = 1;
//v0 cuts
@@ -106,7 +115,7 @@
protected void detectorChanged(Detector detector) {
System.out.println("TridentMonitoring::detectorChanged Setting up the plotter");
aida.tree().cd("/");
-
+ String triggerType = getTriggerType();
/* V0 Quantities */
/* Mass, vertex, chi^2 of fit */
/* beamspot constrained */
@@ -117,11 +126,13 @@
// IHistogram1D bsconVz = aida.histogram1D(plotDir + triggerType + "/"+"BS Constrained Vz (mm)", 50, -10, 10);
// IHistogram1D bsconChi2 = aida.histogram1D(plotDir + triggerType + "/"+"BS Constrained Chi2", 25, 0, 25);
// /* target constrained */
-// IHistogram1D tarconMass = aida.histogram1D(plotDir + triggerType + "/"+"Target Constrained Mass (GeV)", 100, 0, 0.200);
-// IHistogram1D tarconVx = aida.histogram1D(plotDir + triggerType + "/"+ triggerType + "/"+"Target Constrained Vx (mm)", 50, -1, 1);
-// IHistogram1D tarconVy = aida.histogram1D(plotDir + triggerType + "/"+ triggerType + "/"+"Target Constrained Vy (mm)", 50, -1, 1);
-// IHistogram1D tarconVz = aida.histogram1D(plotDir + triggerType + "/"+ triggerType + "/"+"Target Constrained Vz (mm)", 50, -10, 10);
-// IHistogram1D tarconChi2 = aida.histogram1D(plotDir + triggerType + "/"+ triggerType + "/"+"Target Constrained Chi2", 25, 0, 25);
+ double massMin = 0.125;
+ double massMax = 0.175;
+ tarconMass = aida.histogram1D(plotDir + triggerType + "/" + "Target Constrained Mass (GeV)", 100, massMin, massMax);
+ tarconVx = aida.histogram1D(plotDir + triggerType + "/" + "Target Constrained Vx (mm)", 50, -1, 1);
+ tarconVy = aida.histogram1D(plotDir + triggerType + "/" + "Target Constrained Vy (mm)", 50, -1, 1);
+ tarconVz = aida.histogram1D(plotDir + triggerType + "/" + "Target Constrained Vz (mm)", 50, -10, 10);
+ tarconChi2 = aida.histogram1D(plotDir + "/" + triggerType + "/" + "Target Constrained Chi2", 25, 0, 25);
pyEleVspyPos = aida.histogram2D(plotDir + triggerType + "/" + "Py(e) vs Py(p)", 50, -0.04, 0.04, 50, -0.04, 0.04);
pxEleVspxPos = aida.histogram2D(plotDir + triggerType + "/" + "Px(e) vs Px(p)", 50, -0.02, 0.06, 50, -0.02, 0.06);
trackTimeDiff = aida.histogram1D(plotDir + triggerType + "/" + "Track time difference", 100, -10, 10);
@@ -130,7 +141,7 @@
vertexedTrackMomentum2D = aida.histogram2D(plotDir + triggerType + "/" + "Positron vs. electron momentum", 100, 0, 1.1, 100, 0, 1.1);
vertexedTrackMomentum2DRad = aida.histogram2D(plotDir + triggerType + "/" + "Positron vs. electron momentum: Radiative", 100, 0, 1.1, 100, 0, 1.1);
vertexPxPy = aida.histogram2D(plotDir + triggerType + "/" + "Vertex Py vs. Px", 100, -0.02, 0.06, 100, -0.04, 0.04);
- goodVertexMass = aida.histogram1D(plotDir + triggerType + "/" + "Good vertex mass", 100, 0, 0.11);
+ goodVertexMass = aida.histogram1D(plotDir + triggerType + "/" + "Unconstrained Mass", 100, massMin, massMax);
deltaP = aida.histogram1D(plotDir + triggerType + "/" + "Positron - electron momentum", 100, -1., 1.0);
deltaPRad = aida.histogram1D(plotDir + triggerType + "/" + "Positron - electron momentum", 100, -1., 1.0);
sumP = aida.histogram1D(plotDir + triggerType + "/" + "Positron + electron momentum", 100, 0.2, 1.25);
@@ -150,106 +161,93 @@
@Override
public void process(EventHeader event) {
/* make sure everything is there */
- if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName)) {
- return;
- }
- if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName)) {
- return;
- }
- if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName)) {
- return;
- }
- if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName)) {
- return;
- }
- if (!event.hasCollection(Track.class, trackListName)) {
- return;
- }
+ if (!event.hasCollection(ReconstructedParticle.class, finalStateParticlesColName))
+ return;
+ if (!event.hasCollection(ReconstructedParticle.class, unconstrainedV0CandidatesColName))
+ return;
+ if (!event.hasCollection(ReconstructedParticle.class, beamConV0CandidatesColName))
+ return;
+ if (!event.hasCollection(ReconstructedParticle.class, targetV0ConCandidatesColName))
+ return;
+ if (!event.hasCollection(Track.class, trackListName))
+ return;
//check to see if this event is from the correct trigger (or "all");
- if (!matchTrigger(event)) {
- return;
- }
+ if (!matchTrigger(event))
+ return;
nRecoEvents++;
RelationalTable hitToStrips = TrackUtils.getHitToStripsTable(event);
RelationalTable hitToRotated = TrackUtils.getHitToRotatedTable(event);
-
- List<Track> trks = event.get(Track.class, trackListName);
- int ntracks = trks.size();
- if (ntracks > nTrkMax || ntracks < 2) {
- return;
- }
- List<ReconstructedParticle> fspList = event.get(ReconstructedParticle.class, finalStateParticlesColName);
- int npos = 0;
- for (ReconstructedParticle fsp : fspList) {
- if (fsp.getCharge() > 0) {
- npos++;
- }
- }
- if (npos < 1 || npos > nPosMax) {
- return;
- }
+//
+// List<Track> trks = event.get(Track.class, trackListName);
+// int ntracks = trks.size();
+// if (ntracks > nTrkMax || ntracks < 2)
+// return;
+// List<ReconstructedParticle> fspList = event.get(ReconstructedParticle.class, finalStateParticlesColName);
+// int npos = 0;
+// for (ReconstructedParticle fsp : fspList)
+// if (fsp.getCharge() > 0)
+// npos++;
+// if (npos < 1 || npos > nPosMax)
+// return;
nPassBasicCuts++;//passed some basic event-level cuts...
List<ReconstructedParticle> unConstrainedV0List = event.get(ReconstructedParticle.class, unconstrainedV0CandidatesColName);
for (ReconstructedParticle uncV0 : unConstrainedV0List) {
+// System.out.println("Vertex Track Type = " + uncV0.getType());
+ if (uncV0.getType() < trackType) {
+// System.out.println("Vertex Track Type = " + uncV0.getType() + "; cut = " + trackType);
+ continue;
+ }
Vertex uncVert = uncV0.getStartVertex();
// v0 & vertex-quality cuts
// Hep3Vector v0Mom = uncV0.getMomentum();
Hep3Vector v0Mom = VecOp.add(uncV0.getParticles().get(1).getMomentum(), uncV0.getParticles().get(0).getMomentum());
- if (v0Mom.z() > v0PzMax || v0Mom.z() < v0PzMin) {
- continue;
- }
- if (Math.abs(v0Mom.y()) > v0PyMax) {
- continue;
- }
- if (Math.abs(v0Mom.x()) > v0PxMax) {
- continue;
- }
+ // System.out.println(v0Mom.toString());
+ if (v0Mom.z() > v0PzMax || v0Mom.z() < v0PzMin)
+ continue;
+ if (Math.abs(v0Mom.y()) > v0PyMax)
+ continue;
+ if (Math.abs(v0Mom.x()) > v0PxMax)
+ continue;
Hep3Vector v0Vtx = uncVert.getPosition();
- if (Math.abs(v0Vtx.z()) > v0VzMax) {
- continue;
- }
- if (Math.abs(v0Vtx.y()) > v0VyMax) {
- continue;
- }
- if (Math.abs(v0Vtx.x()) > v0VxMax) {
- continue;
- }
-
+ // System.out.println(v0Vtx.toString());
+ if (Math.abs(v0Vtx.z()) > v0VzMax)
+ continue;
+ if (Math.abs(v0Vtx.y()) > v0VyMax)
+ continue;
+ if (Math.abs(v0Vtx.x()) > v0VxMax)
+ continue;
+// System.out.println("Passed V0 cuts");
List<Track> tracks = new ArrayList<Track>();
ReconstructedParticle electron = null, positron = null;
for (ReconstructedParticle particle : uncV0.getParticles()) // tracks.addAll(particle.getTracks()); //add add electron first, then positron...down below
- {
- if (particle.getCharge() > 0) {
+ if (particle.getCharge() > 0)
positron = particle;
- } else if (particle.getCharge() < 0) {
+ else if (particle.getCharge() < 0)
electron = particle;
- } else {
+ else
throw new RuntimeException("expected only electron and positron in vertex, got something with charge 0");
- }
- }
- if (electron == null || positron == null) {
+ if (electron == null || positron == null)
throw new RuntimeException("vertex needs e+ and e- but is missing one or both");
- }
+ // System.out.println("...");
tracks.add(electron.getTracks().get(0));
tracks.add(positron.getTracks().get(0));
- if (tracks.size() != 2) {
+ if (tracks.size() != 2)
throw new RuntimeException("expected two tracks in vertex, got " + tracks.size());
- }
List<Double> trackTimes = new ArrayList<Double>();
- for (Track track : tracks) {
+ for (Track track : tracks)
trackTimes.add(TrackUtils.getTrackTime(track, hitToStrips, hitToRotated));
- }
trackTime2D.fill(trackTimes.get(0), trackTimes.get(1));
trackTimeDiff.fill(trackTimes.get(0) - trackTimes.get(1));
boolean trackTimeDiffCut = Math.abs(trackTimes.get(0) - trackTimes.get(1)) < trkTimeDiff;
boolean pCut = electron.getMomentum().magnitude() > trkPzMin && positron.getMomentum().magnitude() > trkPzMin;
boolean pTotCut = uncV0.getMomentum().magnitude() > v0PzMin && uncV0.getMomentum().magnitude() < v0PzMax;
// if (electron.getMomentum().y()* positron.getMomentum().y()<0) continue;
+// System.out.println("Track Time Diff Cut = " + trackTimeDiffCut);
if (trackTimeDiffCut) {
vertexMassMomentum.fill(uncV0.getMomentum().magnitude(), uncV0.getMass());
vertexedTrackMomentum2D.fill(electron.getMomentum().magnitude(), positron.getMomentum().magnitude());
@@ -261,6 +259,8 @@
vertexedTrackMomentum2DRad.fill(electron.getMomentum().magnitude(), positron.getMomentum().magnitude());
deltaPRad.fill(positron.getMomentum().magnitude() - electron.getMomentum().magnitude());
}
+// System.out.println("pCut = " + pCut + "; pTotCut=" + pTotCut);
+
if (pCut && pTotCut) {
vertexPxPy.fill(uncV0.getMomentum().x(), uncV0.getMomentum().y());
goodVertexMass.fill(uncV0.getMass());
@@ -270,23 +270,51 @@
vertexPx.fill(uncV0.getMomentum().x());
vertexPy.fill(uncV0.getMomentum().y());
vertexPz.fill(uncV0.getMomentum().z());
- vertexU.fill(uncV0.getMomentum().x()/uncV0.getMomentum().magnitude());
- vertexV.fill(uncV0.getMomentum().y()/uncV0.getMomentum().magnitude());
+ vertexU.fill(uncV0.getMomentum().x() / uncV0.getMomentum().magnitude());
+ vertexV.fill(uncV0.getMomentum().y() / uncV0.getMomentum().magnitude());
// vertexW.fill(uncV0.getMomentum().z()/uncV0.getMomentum().magnitude());
- vertexVZ.fill(v0Vtx.z(), uncV0.getMomentum().y()/uncV0.getMomentum().magnitude());
+ vertexVZ.fill(v0Vtx.z(), uncV0.getMomentum().y() / uncV0.getMomentum().magnitude());
vertexZY.fill(v0Vtx.y(), v0Vtx.z());
}
}
// System.out.println(tarV0.getTracks())
}
+
+ List<ReconstructedParticle> targetConstrainedV0List = event.get(ReconstructedParticle.class, targetV0ConCandidatesColName);
+ for (ReconstructedParticle targetV0 : targetConstrainedV0List) {
+ if (targetV0.getType() < trackType)
+ continue;
+ Vertex targetVert = targetV0.getStartVertex();
+ // v0 & vertex-quality cuts
+
+ Hep3Vector v0Mom = VecOp.add(targetV0.getParticles().get(1).getMomentum(), targetV0.getParticles().get(0).getMomentum());
+ if (v0Mom.z() > v0PzMax || v0Mom.z() < v0PzMin)
+ continue;
+ if (Math.abs(v0Mom.y()) > v0PyMax)
+ continue;
+ if (Math.abs(v0Mom.x()) > v0PxMax)
+ continue;
+ Hep3Vector v0Vtx = targetVert.getPosition();
+ if (Math.abs(v0Vtx.z()) > v0VzMax)
+ continue;
+ if (Math.abs(v0Vtx.y()) > v0VyMax)
+ continue;
+ if (Math.abs(v0Vtx.x()) > v0VxMax)
+ continue;
+ tarconMass.fill(targetV0.getMass());
+ tarconVx.fill(v0Vtx.x());
+ tarconVy.fill(v0Vtx.y());
+ tarconVz.fill(v0Vtx.z());
+ tarconChi2.fill(targetVert.getChi2());
+
+ }
}
@Override
public void printDQMData() {
System.out.println("TridentMonitoring::printDQMData");
- for (Entry<String, Double> entry : monitoredQuantityMap.entrySet()) {
+ for (Entry<String, Double> entry : monitoredQuantityMap.entrySet())
System.out.println(entry.getKey() + " = " + entry.getValue());
- }
System.out.println("*******************************");
}
@@ -305,9 +333,8 @@
@Override
public void printDQMStrings() {
for (int i = 0; i < 9; i++)//TODO: do this in a smarter way...loop over the map
- {
+
System.out.println("ALTER TABLE dqm ADD " + fpQuantNames[i] + " double;");
- }
}
IFitResult fitVertexPosition(IHistogram1D h1d, IFitter fitter, double[] init, String range) {
|