3 added + 12 modified, total 15 files
hps-java
diff -N nbactions.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ nbactions.xml 19 Apr 2011 17:14:25 -0000 1.1
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <action>
+ <actionName>build</actionName>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ </properties>
+ </action>
+ <action>
+ <actionName>rebuild</actionName>
+ <goals>
+ <goal>clean</goal>
+ <goal>install</goal>
+ </goals>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ </properties>
+ </action>
+ </actions>
hps-java
diff -u -r1.4 -r1.5
--- pom.xml 10 Jun 2010 18:24:39 -0000 1.4
+++ pom.xml 19 Apr 2011 17:14:25 -0000 1.5
@@ -60,6 +60,7 @@
<configuration>
<source>1.5</source>
<target>1.5</target>
+ <showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
hps-java/src/main/java/org/lcsim/HPSTestv1
diff -N RunGeantTest.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ RunGeantTest.java 19 Apr 2011 17:14:25 -0000 1.1
@@ -0,0 +1,25 @@
+/*
+ * DarkPhotonMainDriver class
+ */
+package org.lcsim.HPSTestv1;
+
+import org.lcsim.util.Driver;
+
+/**
+ * Driver for track reconstruction and analysis of sATLAS detector
+ *
+ * @author M. Graham and R. Partridge
+ */
+public final class RunGeantTest extends Driver {
+
+
+
+ public RunGeantTest() {
+
+ add(new MCDistributionChecks(1));
+
+ }
+
+
+}
+
hps-java/src/main/java/org/lcsim/HPSTestv1
diff -N MCDistributionChecks.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ MCDistributionChecks.java 19 Apr 2011 17:14:25 -0000 1.1
@@ -0,0 +1,203 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.lcsim.HPSTestv1;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import hep.physics.matrix.SymmetricMatrix;
+import hep.physics.vec.BasicHep3Vector;
+import hep.physics.vec.Hep3Vector;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import hep.aida.*;
+
+import hep.physics.vec.VecOp;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+
+
+import org.lcsim.event.EventHeader;
+import org.lcsim.event.LCRelation;
+import org.lcsim.event.RelationalTable;
+import org.lcsim.event.RawTrackerHit;
+import org.lcsim.event.SimTrackerHit;
+import org.lcsim.event.base.BaseRelationalTable;
+import org.lcsim.fit.helicaltrack.HelicalTrackHit;
+import org.lcsim.recon.tracking.digitization.sisim.SiTrackerHitStrip1D;
+import org.lcsim.util.Driver;
+import org.lcsim.util.aida.AIDA;
+
+/**
+ *
+ * @author partridge
+ */
+public class MCDistributionChecks extends Driver {
+
+ private AIDA aida = AIDA.defaultInstance();
+ private IAnalysisFactory af = aida.analysisFactory();
+ private IHistogram1D scatteringAngle;
+ private IHistogram1D scatteringAngleHighP;
+ private IHistogram1D scatteringAngleN;
+ private IHistogram1D scatteringAngleHighPN;
+
+ public String outputPlots = "myplots.aida";
+ Map<String, IProfile1D> clsizeMap = new HashMap<String, IProfile1D>();
+ String[] detNames = {"Tracker"};
+ Integer[] nlayers = {8};
+ int trk_count = 0;
+ int nevt = 0;
+ int _nmcTrk = 0;
+ double _nrecTrk = 0;
+ double phiTrkCut = 0.3;
+ double cosThTrkCutMax = 0.2;
+ double cosThTrkCutMin = 0.05;
+ double pTrkCut = 0.5; //GeV
+ double d0TrkCut = 2.0; //mm
+ double z0TrkCut = 2.0; //mm
+ double etaTrkCut = 2.5;
+ int totelectrons = 0;
+ double foundelectrons = 0;
+ int findableelectrons = 0;
+ int findableTracks = 0;
+ double foundTracks = 0;
+ double xref = 0.0; //mm
+ public String outputTextName = "myevents.txt";
+ FileWriter fw;
+ PrintWriter pw;
+ boolean isBeamConstrain = false;
+ int nele=0;
+
+ public MCDistributionChecks(int layers) {
+ // Define the efficiency histograms
+ IHistogramFactory hf = aida.histogramFactory();
+
+
+ scatteringAngle = hf.createHistogram1D("Scattering Angle (mrad)", "", 50, 0, 500);
+ scatteringAngleHighP = hf.createHistogram1D("P>250MeV Scattering Angle (mrad) ", "", 50, 0, 500);
+
+ scatteringAngleN = hf.createHistogram1D("Scattering Angle PDF (mrad)", "", 50, 0, 500);
+ scatteringAngleHighPN = hf.createHistogram1D("P>250MeV Scattering Angle PDF (mrad)", "", 50, 0, 500);
+
+
+ }
+
+
+ public void process(
+ EventHeader event) {
+ if (nevt == 0)
+ try {
+//open things up
+ fw = new FileWriter(outputTextName);
+ pw = new PrintWriter(fw);
+ } catch (IOException ex) {
+ Logger.getLogger(FastTrackAnalysisDriver.class.getName()).log(Level.SEVERE, null, ex);
+ }
+
+ // Get the collections of SimTrackerHits
+ String[] input_hit_collections = {"TrackerHits"};
+ for (String input : input_hit_collections) {
+ List<SimTrackerHit> sthits = event.getSimTrackerHits(input);
+ // Loop over the SimTrackerHits and fill in the relational table
+ for (SimTrackerHit simhit : sthits) {
+ nele++;
+ double[] hp = simhit.getPoint();
+ Hep3Vector hitPos = new BasicHep3Vector(hp[0], hp[1], hp[2]);
+ Hep3Vector beam = new BasicHep3Vector(1, 0, 0);
+ double cosalpha=getCosAlpha(hitPos,beam);
+ double angle=1000*Math.acos(cosalpha);
+ scatteringAngle.fill(angle);
+ double p=simhit.getMCParticle().getMomentum().magnitude();
+ if(p>0.25)
+ scatteringAngleHighP.fill(angle);
+
+ }
+ }
+ double wgt = 1. / nele;
+ for (int i = 0; i < 50; i++) {
+ for (int j = 0; j < scatteringAngle.binHeight(i); j++){
+ scatteringAngleN.fill(i, wgt);
+ }
+ for (int j = 0; j < scatteringAngleHighP.binHeight(i); j++){
+ scatteringAngleHighPN.fill(i, wgt);
+ }
+ }
+
+ return;
+ }
+
+
+ public void endOfData() {
+ try {
+ aida.saveAs(outputPlots);
+ } catch (IOException ex) {
+ Logger.getLogger(MCDistributionChecks.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ pw.close();
+ try {
+ fw.close();
+ } catch (IOException ex) {
+ Logger.getLogger(MCDistributionChecks.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+
+ public void setOutputPlots(String output) {
+ this.outputPlots = output;
+ }
+
+ public void setOutputText(String output) {
+ this.outputTextName = output;
+ }
+
+ private double getr(double x, double y) {
+ return Math.sqrt(x * x + y * y);
+ }
+
+ protected double drcalc(Hep3Vector pos, SymmetricMatrix cov) {
+ double x = pos.x();
+ double y = pos.y();
+ double r2 = x * x + y * y;
+ return Math.sqrt((x * x * cov.e(0, 0) + y * y * cov.e(1, 1) + 2. * x * y * cov.e(0, 1)) / r2);
+ }
+
+ protected double drphicalc(Hep3Vector pos, SymmetricMatrix cov) {
+ double x = pos.x();
+ double y = pos.y();
+ double r2 = x * x + y * y;
+ return Math.sqrt((y * y * cov.e(0, 0) + x * x * cov.e(1, 1) - 2. * x * y * cov.e(0, 1)) / r2);
+ }
+
+ private double getphi(double x, double y) {
+ double phi = Math.atan2(y, x);
+ if (phi < 0.) {
+ phi += 2. * Math.PI;
+ }
+ return phi;
+ }
+
+ private double getdxdy(Hep3Vector hitpos, Hep3Vector posonhelix) {
+ return Math.sqrt(Math.pow(hitpos.x() - posonhelix.x(), 2) + Math.pow(hitpos.y() - posonhelix.y(), 2));
+ }
+
+ private double getdxdyErr(Hep3Vector hitpos, Hep3Vector posonhelix, SymmetricMatrix cov) {
+ double dxdySq = Math.pow(hitpos.x() - posonhelix.x(), 2) + Math.pow(hitpos.y() - posonhelix.y(), 2);
+ double ErrSqDxDySq = 4 * (cov.e(0, 0) * Math.pow(hitpos.x() - posonhelix.x(), 2) + cov.e(1, 1) * Math.pow(hitpos.y() - posonhelix.y(), 2));
+ double error = Math.sqrt(ErrSqDxDySq / dxdySq) / 2;
+ return error;
+ }
+
+
+
+ private double getCosAlpha(Hep3Vector vertex, Hep3Vector pV0) {
+ return VecOp.dot(vertex, pV0) / (vertex.magnitude() * pV0.magnitude());
+ }
+
+ private double getMag(double[] vec) {
+ return Math.sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]);
+ }
+}
hps-java/src/main/java/org/lcsim/HPSTestv1
diff -u -r1.7 -r1.8
--- DarkPhotonLLDriver.java 18 Apr 2011 16:07:46 -0000 1.7
+++ DarkPhotonLLDriver.java 19 Apr 2011 17:14:25 -0000 1.8
@@ -43,10 +43,7 @@
// tad = new LongLivedAnalysis(nlayers);
// tad = new TestVertexing(nlayers);
// tad = new FastTrackAnalysisDriver(nlayers);
-// atd=new AnalysisTupleDriver(nlayers);
- add(new OccupancyDriver());
-// add(tad);
-// add(atd);
+
}
public void setOutputFile(String outputFile) {
hps-java/src/main/java/org/lcsim/HPSUsers/Example
diff -u -r1.2 -r1.3
--- JasAnalysisDriver.java 18 Apr 2011 16:07:45 -0000 1.2
+++ JasAnalysisDriver.java 19 Apr 2011 17:14:25 -0000 1.3
@@ -56,6 +56,7 @@
import org.lcsim.HPSVertexing.BFitter;
import org.lcsim.HPSVertexing.BilliorTrack;
import org.lcsim.HPSVertexing.BilliorVertex;
+import org.lcsim.detector.IDetectorElement;
import org.lcsim.util.Driver;
import org.lcsim.util.aida.AIDA;
@@ -150,13 +151,12 @@
VxEffFindable = hf.createProfile1D("Aprime Efficiency vs Vx: Findable", "", 25, 0., 50.);
VyEffFindable = hf.createProfile1D("Aprime Efficiency vs Vy: Findable", "", 40, -0.2, 0.2);
VzEffFindable = hf.createProfile1D("Aprime Efficiency vs Vz: Findable", "", 40, -0.2, 0.2);
-
+ nlayers[0] = layers;
}
-
public void process(
EventHeader event) {
- if (nevt == 0)
+ if (nevt == 0)
try {
//open things up
fw = new FileWriter(outputTextName);
@@ -173,7 +173,8 @@
Hep3Vector IP = new BasicHep3Vector(0., 0., 0.);
// Get the magnetic field
- double bfield = event.getDetector().getFieldMap().getField(IP).z();
+// double bfield = event.getDetector().getFieldMap().getField(IP).z();
+ double bfield = 0.5;
// List<HelicalTrackHit> hthits = event.get(HelicalTrackHit.class, "MatchedHTHits");
// String sfile = StrategyXMLUtils.getDefaultStrategiesPrefix() + "DarkPhoton-Final.xml";
@@ -207,7 +208,7 @@
// Create a map between tracks and the associated MCParticle
// List<Track> tracklist = event.getTracks();
List<Track> tracklist = event.get(Track.class, "MatchedTracks");
- // List<Track> lltracklist = event.get(Track.class, "LLTracks");
+ // List<Track> lltracklist = event.get(Track.class, "LLTracks");
RelationalTable trktomcAxial = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
@@ -217,7 +218,7 @@
RelationalTable trktomc = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
// RelationalTable trktomcLL = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
- // tracklist.addAll(lltracklist);
+ // tracklist.addAll(lltracklist);
RelationalTable mcHittomcP = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
@@ -233,6 +234,26 @@
}
}
+
+ String occDir = "occupancyPlots/";
+
+ for (SiTrackerHitStrip1D stripCluster : stripHits) {
+
+
+ Set<MCParticle> mcparts = stripCluster.getMCParticles();
+
+ List<RawTrackerHit> rthList = stripCluster.getRawHits();
+ int nhits = rthList.size();
+
+ aida.cloud1D(occDir + "associated MC Particles").fill(mcparts.size());
+ aida.cloud1D(occDir + " cluster size").fill(nhits);
+
+ if (mcparts.size() == 1)
+ aida.cloud1D(occDir + " cluster size MC Particles = 1").fill(nhits);
+ if (mcparts.size() == 2)
+ aida.cloud1D(occDir + " cluster size MC Particles = 2").fill(nhits);
+ }
+
Map<Track, TrackAnalysis> tkanalMap = new HashMap<Track, TrackAnalysis>();
Map<Track, StraightLineTrack> sltMap = new HashMap<Track, StraightLineTrack>();
Map<Track, BilliorTrack> btMap = new HashMap<Track, BilliorTrack>();
@@ -532,35 +553,38 @@
// Now loop over all MC Particles
List<MCParticle> mclist = event.getMCParticles();
- pw.format("%d ",nevt );
+ pw.format("%d ", nevt);
for (MCParticle mcp : mclist) {
- if(mcp.getParents().size()>0){
- if (mcp.getParents().get(0).getPDGID() == 622) {
- boolean find= findable.InnerTrackerIsFindable(mcp, nlayers[0]);
- int ifind=0;
- if(find)ifind=1;
- double ch=mcp.getCharge();
- pw.format("%d %2.0f ",ifind,ch);
- Set<SimTrackerHit> mchitlist = mcHittomcP.allTo(mcp);
-
- for(int i=0;i<10;i++){
- if(mchitlist.size()>i+1){
- SimTrackerHit sth=(SimTrackerHit) mchitlist.toArray()[i];
-
- if(sth!=null)
- pw.format("%d %5.5f %5.5f %5.5f ",sth.getLayer(),sth.getPoint()[1],sth.getPoint()[2],sth.getPoint()[0]);
- else
- pw.format("%d %5.5f %5.5f %5.5f ",99,-666,-666,-666);
- } else {
- pw.format("%d %5.5f %5.5f %5.5f ",99,-666.6,-666.6,-666.6);
- }
- }
- }
+ if (mcp.getParents().size() > 0) {
+ if (mcp.getParents().get(0).getPDGID() == 622) {
+// boolean find= findable.InnerTrackerIsFindable(mcp, nlayers[0],true);
+// System.out.println("A' Track Findable? "+find+"; nlayers = "+nlayers[0]);
+ boolean find = findable.InnerTrackerIsFindable(mcp, nlayers[0]);
+ int ifind = 0;
+ if (find)
+ ifind = 1;
+ double ch = mcp.getCharge();
+ pw.format("%d %2.0f ", ifind, ch);
+ Set<SimTrackerHit> mchitlist = mcHittomcP.allTo(mcp);
+
+ for (int i = 0; i < 10; i++) {
+ if (mchitlist.size() > i + 1) {
+ SimTrackerHit sth = (SimTrackerHit) mchitlist.toArray()[i];
+
+ if (sth != null)
+ pw.format("%d %5.5f %5.5f %5.5f ", sth.getLayer(), sth.getPoint()[1], sth.getPoint()[2], sth.getPoint()[0]);
+ else
+ pw.format("%d %5.5f %5.5f %5.5f ", 99, -666, -666, -666);
+ } else {
+ pw.format("%d %5.5f %5.5f %5.5f ", 99, -666.6, -666.6, -666.6);
+ }
+ }
+ }
}
}
- pw.println();
+ pw.println();
int _nchMCP = 0;
int _nchMCPBar = 0;
for (MCParticle mcp : mclist) {
@@ -581,7 +605,7 @@
int nhits = findable.LayersHit(mcp);
Set<SimTrackerHit> mchitlist = mcHittomcP.allTo(mcp);
boolean isFindable = findable.InnerTrackerIsFindable(mcp, nlayers[0] - 2);
-
+// boolean isFindable = findable.InnerTrackerIsFindable(mcp, nlayers[0]);
Set<HelicalTrackCross> hitlist = hittomc.allTo(mcp);
// Calculate the helix parameters for this MC particle
@@ -608,6 +632,7 @@
bothreco = false;
}
if (!findable.InnerTrackerIsFindable(d, nlayers[0] - 2)) {
+// if (!findable.InnerTrackerIsFindable(d, nlayers[0])) {
bothfindable = false;
}
}
@@ -713,7 +738,6 @@
return;
}
-
public void endOfData() {
try {
aida.saveAs(outputPlots);
hps-java/src/main/java/org/lcsim/HPSUsers/Example
diff -u -r1.3 -r1.4
--- HeavyPhotonLLDriver.java 18 Apr 2011 16:07:45 -0000 1.3
+++ HeavyPhotonLLDriver.java 19 Apr 2011 17:14:25 -0000 1.4
@@ -26,8 +26,8 @@
List<int[]> pairs = new ArrayList();
List<Integer> passLayers = new ArrayList();
//// Change the prefix for your site
- String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
-
+// String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
+ String strategyPrefix = "/Users/mgraham/NetBeansProjects/hps-java/src/main/resources/";
////////////////////////////////////////
// everything below will
// get overwritten by setPName
@@ -36,6 +36,7 @@
// seme to deal with fields in the negative
// z-direction well (need to fix this)
double bfield = 0.5;
+ String detType = "Full";
String axialStrategy = "HPS-Test-1pt8.xml";
String finalStrategy = "HPS-Test-1pt8.xml";
String llStrategy = "HPS-Test-1pt8.xml";
@@ -43,12 +44,13 @@
public String plotsFile = "myplots.aida";
public String outputTextName = "myevents.txt";
///////////////
+
public HeavyPhotonLLDriver() {
add(new MakeSensorsDriver());
setPName(pName);
- MultiTrackReco trd = new MultiTrackReco(strategyPrefix, bfield, axialStrategy, finalStrategy, llStrategy, pairs, passLayers);
+ MultiTrackReco trd = new MultiTrackReco(strategyPrefix, detType, bfield, axialStrategy, finalStrategy, llStrategy, pairs, passLayers);
add(trd);
jad = new JasAnalysisDriver(nlayers);
@@ -78,6 +80,7 @@
System.out.println("Setting parameter set to " + pName);
pairs.clear();
if (pName.contentEquals("HPS3pt2")) {
+ detType = "Full";
bfield = 1.0;
nlayers = 12;
axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
@@ -99,12 +102,12 @@
passLayers.add(11);
}
if (pName.contentEquals("HPS3pt4")) {
+ detType = "Full";
bfield = 0.5;
nlayers = 12;
axialStrategy = "DarkPhoton-Axial-HPS3pt2.xml";
finalStrategy = "DarkPhoton-HPS3pt2.xml";
-// llStrategy = "DarkPhoton-HPS3pt2-LongLived.xml";
- llStrategy = "none";
+ llStrategy = "none";
int[] p1 = {1, 2};
int[] p2 = {3, 4};
@@ -122,6 +125,7 @@
}
if (pName.contentEquals("HPS1pt8")) {
+ detType = "Test";
nlayers = 10;
bfield = 0.5;
@@ -143,7 +147,8 @@
// passLayers.add(11);
}
- if (pName.contentEquals("HPS1pt9")) {
+ if (pName.contentEquals("HPS1pt9")) {
+ detType = "Test";
nlayers = 10;
bfield = 0.25;
hps-java/src/main/resources
diff -u -r1.5 -r1.6
--- HPS-Test-1pt3.xml 11 Mar 2011 17:52:59 -0000 1.5
+++ HPS-Test-1pt3.xml 19 Apr 2011 17:14:25 -0000 1.6
@@ -6,22 +6,17 @@
<MinPT>0.200</MinPT>
<MinHits>5</MinHits>
<MinConfirm>1</MinConfirm>
-<!--
- <MaxDCA>100.0</MaxDCA>
- <MaxZ0>1000.0</MaxZ0>
- <MaxChisq>2500.0</MaxChisq>
- <BadHitChisq>1000.0</BadHitChisq>
--->
- <MaxDCA>100.0</MaxDCA>
- <MaxZ0>50.0</MaxZ0>
- <MaxChisq>50.0</MaxChisq>
- <BadHitChisq>25.0</BadHitChisq>
+
+ <MaxDCA>4.0</MaxDCA>
+ <MaxZ0>4.0</MaxZ0>
+ <MaxChisq>25.0</MaxChisq>
+ <BadHitChisq>10.0</BadHitChisq>
<!--Layers-->
<Layers>
- <Layer type="Seed" layer_number="1" detector_name="Tracker" be_flag="BARREL" />
- <Layer type="Seed" layer_number="3" detector_name="Tracker" be_flag="BARREL" />
<Layer type="Seed" layer_number="5" detector_name="Tracker" be_flag="BARREL" />
+ <Layer type="Seed" layer_number="3" detector_name="Tracker" be_flag="BARREL" />
+ <Layer type="Seed" layer_number="1" detector_name="Tracker" be_flag="BARREL" />
<Layer type="Confirm" layer_number="7" detector_name="Tracker" be_flag="BARREL" />
<Layer type="Extend" layer_number="9" detector_name="Tracker" be_flag="BARREL" />
</Layers>
hps-java/src/main/java/org/lcsim/HPSBase
diff -u -r1.2 -r1.3
--- MultiTrackReco.java 10 Mar 2011 23:17:49 -0000 1.2
+++ MultiTrackReco.java 19 Apr 2011 17:14:26 -0000 1.3
@@ -19,7 +19,7 @@
*/
public class MultiTrackReco extends Driver {
- public MultiTrackReco(String strategyPrefix,double bField, String sAxialfile, String sFinalfile, String sLongLived, List<int[]> stereoPairs, List<Integer> passLayers) {
+ public MultiTrackReco(String strategyPrefix, String detType, double bField, String sAxialfile, String sFinalfile, String sLongLived, List<int[]> stereoPairs, List<Integer> passLayers) {
// Digitization and hit making driver for planar sensors
HPSTrackerHitDriver thd = new HPSTrackerHitDriver();
@@ -48,6 +48,7 @@
SeedTracker st = new SeedTracker(slist);
st.setInputCollectionName("AxialTrackHits");
st.setTrkCollectionName("AxialTracks");
+ st.setBField(bField);
st.setTimingPlots(true);
// st.setDiagnostics(new SeedTrackerDiagnostics());
st.setSectorParams(false);
@@ -65,9 +66,14 @@
for (int[] pair : stereoPairs)
hthdriver.setStereoPair("Tracker", pair[0], pair[1]);
- hthdriver.setMaxSeperation(10.01);
- hthdriver.setTolerance(0.01);
+ if (detType.contains("Test")) {
+ hthdriver.setMaxSeperation(10.01);
+ hthdriver.setTolerance(0.01);
+ } else {
+ hthdriver.setMaxSeperation(50.);
+ hthdriver.setTolerance(0.4);
+ }
add(hthdriver);
@@ -89,8 +95,9 @@
stFinal.setInputCollectionName("HelicalTrackHits");
stFinal.setTrkCollectionName("MatchedTracks");
}
-// stFinal.setDiagnostics(new SeedTrackerDiagnostics());
+// stFinal.setDiagnostics(new SeedTrackerDiagnostics());
stFinal.setBField(bField);
+ stFinal.setSectorParams(false);
stFinal.setTimingPlots(true);
add(stFinal);
hps-java/src/main/java/org/lcsim/HPSBase
diff -u -r1.1 -r1.2
--- HPSTrackerHitDriver.java 10 Mar 2011 23:17:50 -0000 1.1
+++ HPSTrackerHitDriver.java 19 Apr 2011 17:14:26 -0000 1.2
@@ -30,6 +30,7 @@
import org.lcsim.recon.tracking.digitization.sisim.StripHitMaker;
import org.lcsim.recon.tracking.digitization.sisim.config.SimTrackerHitReadoutDriver;
import org.lcsim.util.Driver;
+import org.lcsim.util.aida.AIDA;
import org.lcsim.util.lcio.LCIOConstants;
/**
@@ -50,6 +51,8 @@
String _digitizer_name;
int _nev = 0;
int _ngc = 0;
+ boolean _timing = true;
+ protected AIDA aida = AIDA.defaultInstance();
/**
* Creates a new instance of TrackerHitDriver
@@ -72,13 +75,22 @@
strip_readout.setDynamicRange(10);
*/
// APV25 -- Pristine
-
+/*
strip_readout.setNoiseIntercept(270.);
strip_readout.setNoiseSlope(36.);
strip_readout.setNoiseThreshold(4.);
strip_readout.setNeighborThreshold(4.);
strip_readout.setNbits(10);
strip_readout.setDynamicRange(40);
+ */
+
+ strip_readout.setNoiseIntercept(0.001);
+ strip_readout.setNoiseSlope(0.001);
+ strip_readout.setNoiseThreshold(0.001);
+ strip_readout.setNeighborThreshold(0.001);
+ strip_readout.setNbits(10);
+ strip_readout.setDynamicRange(40);
+
//set trapping to 0.2 to simulate radiation damage.
// strip_simulation.setTrapping(0.2);
@@ -95,9 +107,15 @@
// strip_clustering.setNeighborThreshold(4.);
NearestNeighborRMS strip_clustering = new NearestNeighborRMS();
+/*
strip_clustering.setSeedThreshold(4.);
strip_clustering.setNeighborThreshold(3.);
strip_clustering.setClusterThreshold(4.);
+ */
+ strip_clustering.setSeedThreshold(0.001);
+ strip_clustering.setNeighborThreshold(0.001);
+ strip_clustering.setClusterThreshold(0.001);
+
// Instantiate the clusterers and set hit-making parameters
_strip_clusterer = new StripHitMaker(strip_simulation, strip_readout, strip_clustering);
@@ -136,11 +154,13 @@
// Process detectors specified by path, otherwise process entire detector
IDetectorElement detector_de = detector.getDetectorElement();
System.out.println("detector_de Name =" + detector_de.getName());
- for (String de_path : _process_paths)
+ for (String de_path : _process_paths) {
_process_de.add(detector_de.findDetectorElement(de_path));
+ }
- if (_process_de.size() == 0)
+ if (_process_de.size() == 0) {
_process_de.add(detector_de);
+ }
for (IDetectorElement detector_element : _process_de) {
_process_sensors.addAll(detector_element.findDescendants(SiSensor.class));
@@ -175,39 +195,62 @@
super.process(event);
// Print out the event number
-
+
_nev++;
_ngc++;
if (_ngc == 100) {
- System.out.println("TrackerHitDriver processing event " + _nev);
+ System.out.println("TrackerHitDriver processing event " + _nev);
System.gc();
_ngc = 0;
}
+ long last_time = System.currentTimeMillis();
+
// Lists of hits
List<RawTrackerHit> raw_hits = new ArrayList<RawTrackerHit>();
List<SiTrackerHit> hits_strip1D = new ArrayList<SiTrackerHit>();
List<SiTrackerHit> hits_pixel = new ArrayList<SiTrackerHit>();
+ /*
for (SiSensor sensor : _process_sensors) {
- if (sensor.hasStrips()) {
- raw_hits.addAll(_strip_digitizer.makeHits(sensor));
- hits_strip1D.addAll(_strip_clusterer.makeHits(sensor));
+ if (sensor.hasStrips()) {
+ raw_hits.addAll(_strip_digitizer.makeHits(sensor));
+ hits_strip1D.addAll(_strip_clusterer.makeHits(sensor));
- }
+ }
+
+
+ if (sensor.hasPixels()) {
+ raw_hits.addAll(_pixel_digitizer.makeHits(sensor));
+ hits_pixel.addAll(_pixel_clusterer.makeHits(sensor));
+ }
+ }
- if (sensor.hasPixels()) {
- raw_hits.addAll(_pixel_digitizer.makeHits(sensor));
- hits_pixel.addAll(_pixel_clusterer.makeHits(sensor));
- }
+ */
+ for (SiSensor sensor : _process_sensors) {
+ raw_hits.addAll(_strip_digitizer.makeHits(sensor));
}
+ long raw_time = System.currentTimeMillis();
+ double rtime = ((double) (raw_time - last_time)) / 1000.;
+ if (_timing) {
+ aida.cloud1D("Digitization Time").fill(rtime);
+ }
+
-// int flag = (1 << LCIOConstants.RTHBIT_HITS | 1 << LCIOConstants.TRAWBIT_ID1); //correct flag for persistence
- int flag=0;
+ for (SiSensor sensor : _process_sensors) {
+ hits_strip1D.addAll(_strip_clusterer.makeHits(sensor));
+ }
+ long start_time = System.currentTimeMillis();
+ double dtime = ((double) (start_time - raw_time)) / 1000.;
+ if (_timing) {
+ aida.cloud1D("Clustering Time").fill(dtime);
+ }
+ // int flag = (1 << LCIOConstants.RTHBIT_HITS | 1 << LCIOConstants.TRAWBIT_ID1); //correct flag for persistence
+ int flag = 0;
event.put(getRawHitsName(), raw_hits, RawTrackerHit.class, flag, toString());
event.put(getStripHits1DName(), hits_strip1D, SiTrackerHitStrip1D.class, 0, toString());
// event.put(getPixelHitsName(), hits_pixel, SiTrackerHitPixel.class, 0, toString());
@@ -240,4 +283,4 @@
public String getPixelHitsName() {
return _pixel_clusterer.getName() + "_SiTrackerHitPixel";
}
-}
\ No newline at end of file
+}
hps-java/src/main/java/org/lcsim/HPSDedicatedv3
diff -u -r1.2 -r1.3
--- TrackerHitDriver_DarkPhoton.java 10 Mar 2011 19:02:47 -0000 1.2
+++ TrackerHitDriver_DarkPhoton.java 19 Apr 2011 17:14:26 -0000 1.3
@@ -73,12 +73,26 @@
*/
// APV25 -- Pristine
+/*
+ // nominal settings
strip_readout.setNoiseIntercept(270.);
strip_readout.setNoiseSlope(36.);
strip_readout.setNoiseThreshold(4.);
strip_readout.setNeighborThreshold(4.);
strip_readout.setNbits(10);
strip_readout.setDynamicRange(40);
+*/
+
+ // lower the noise for very thin Si layers (for a x-check)
+
+ strip_readout.setNoiseIntercept(0.001);
+ strip_readout.setNoiseSlope(0.001);
+ strip_readout.setNoiseThreshold(0.001);
+ strip_readout.setNeighborThreshold(0.001);
+ strip_readout.setNbits(10);
+ strip_readout.setDynamicRange(40);
+
+
//set trapping to 0.2 to simulate radiation damage.
// strip_simulation.setTrapping(0.2);
@@ -95,10 +109,18 @@
// strip_clustering.setNeighborThreshold(4.);
NearestNeighborRMS strip_clustering = new NearestNeighborRMS();
+/*
strip_clustering.setSeedThreshold(4.);
strip_clustering.setNeighborThreshold(3.);
strip_clustering.setClusterThreshold(4.);
+*/
+
+ strip_clustering.setSeedThreshold(0.001);
+ strip_clustering.setNeighborThreshold(0.001);
+ strip_clustering.setClusterThreshold(0.001);
+
+
// Instantiate the clusterers and set hit-making parameters
_strip_clusterer = new StripHitMaker(strip_simulation, strip_readout, strip_clustering);
_strip_clusterer.setMaxClusterSize(10);
hps-java/src/main/java/org/lcsim/HPSDedicatedv3
diff -u -r1.8 -r1.9
--- MultiTrackReco.java 18 Apr 2011 16:07:46 -0000 1.8
+++ MultiTrackReco.java 19 Apr 2011 17:14:26 -0000 1.9
@@ -25,8 +25,8 @@
private AIDA aida = AIDA.defaultInstance();
public MultiTrackReco(double referenceX, double referenceY, double BField, String sAxialfile, String sFinalfile, String sLongLived, List<int[]> stereoPairs, List<Integer> passLayers) {
- String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
-// String strategyPrefix = "/Users/mgraham/NetBeansProjects/hps-java/src/main/resources/";
+// String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
+ String strategyPrefix = "/Users/mgraham/NetBeansProjects/hps-java/src/main/resources/";
// Digitization and hit making driver for planar sensors
TrackerHitDriver_DarkPhoton thd = new TrackerHitDriver_DarkPhoton();
hps-java/src/main/java/org/lcsim/HPSDedicatedv3
diff -u -r1.1 -r1.2
--- TrackAnalysisDriver.java 18 Apr 2011 16:07:46 -0000 1.1
+++ TrackAnalysisDriver.java 19 Apr 2011 17:14:26 -0000 1.2
@@ -203,7 +203,7 @@
}
}
-
+
public void process(
EventHeader event) {
if (nevt == 0)
@@ -274,8 +274,8 @@
aida.cloud1D(simDir + "fractional dEdX Cloud").fill((measdedx - totdedx) / totdedx);
// if (Math.abs((measdedx - dedx) / dedx) < 1)
frdEdXY.fill(hp[1], (measdedx - totdedx) / totdedx);
- // if (dedx == 0)
- // System.out.println("***************** dedx==0 ********");
+ // if (dedx == 0)
+ // System.out.println("***************** dedx==0 ********");
}
}
}
@@ -307,9 +307,9 @@
// List<HelicalTrackHit> hthits = event.get(HelicalTrackHit.class, "MatchedHTHits");
- String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
- String sfile = "DarkPhoton-Final.xml";
- List<SeedStrategy> slist = StrategyXMLUtils.getStrategyListFromFile(new File(strategyPrefix + sfile));
+// String strategyPrefix = "/nfs/sulky21/g.ec.u12/users/mgraham/AtlasUpgrade/hps-java/src/main/resources/";
+// String sfile = "DarkPhoton-Final.xml";
+// List<SeedStrategy> slist = StrategyXMLUtils.getStrategyListFromFile(new File(strategyPrefix + sfile));
List<HelicalTrackHit> toththits = event.get(HelicalTrackHit.class, "HelicalTrackHits");
List<HelicalTrackHit> axialhits = event.get(HelicalTrackHit.class, "AxialTrackHits");
@@ -361,11 +361,6 @@
aida.cloud1D(occDir + detlayer + " cluster size").fill(nhits);
}
- // Find the minimum pT among the strategies
- double ptCut = 9999.;
- for (SeedStrategy s : slist)
- if (s.getMinPT() < ptCut)
- ptCut = s.getMinPT();
// Create a relational table that maps TrackerHits to MCParticles
RelationalTable hittomc = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
@@ -403,9 +398,9 @@
int _neleFake = 0;
int _nposFake = 0;
-
-
+
+
RelationalTable mcHittomcP = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
// Get the collections of SimTrackerHits
@@ -446,29 +441,29 @@
double chisq=track.getChi2();
_nchRec++;
if (charge < 0){
- aida.cloud1D(trackdir + "Chi2 Electrons").fill(chisq);
+ aida.cloud1D(trackdir + "Chi2 Electrons").fill(chisq);
_neleRec++;
}
if (charge > 0){
- aida.cloud1D(trackdir + "Chi2 Positrons").fill(chisq);
- _nposRec++;
+ aida.cloud1D(trackdir + "Chi2 Positrons").fill(chisq);
+ _nposRec++;
}
-
-
-
+
+
+
SeedTrack stEle = (SeedTrack) track;
SeedCandidate seedEle = stEle.getSeedCandidate();
HelicalTrackFit ht = seedEle.getHelix();
Map<HelicalTrackHit,MultipleScatter> scatMap=ht.ScatterMap();
-
+
TrackAnalysis tkanal = new TrackAnalysis(track, hittomc);
tkanalMap.put(track, tkanal);
-
+
double truedoca=d0;
double xoca=0;
double[] poca={0,0,0};
@@ -593,9 +588,9 @@
double truey0 = mcp.getOriginY() + truedydx * xref;
double truez0 = mcp.getOriginZ() + truedzdx * xref;
-
-
-
+
+
+
BasicHep3Vector axial = new BasicHep3Vector();
axial.setV(0, 1, 0);
@@ -607,11 +602,11 @@
int ndaug = 0;
if (bestmcp != null) ndaug = bestmcp.getDaughters().size();
-
+
double mcmom = 0;
double prevmom = 0;
double mytotchi2 = 0;
-
+ boolean bigMSErr = false;
for (TrackerHit hit : hitsOnTrack) {
int iplane = 0;
@@ -632,24 +627,45 @@
double z = cross.z();
double yerr = Math.sqrt(cross.getCorrectedCovMatrix().e(1, 1));
double zerr = Math.sqrt(cross.getCorrectedCovMatrix().e(2, 2));
- double htcMSdrphi=scatMap.get(htc).drphi();
- double htcMSdz=scatMap.get(htc).dz();
-
+
+ double htcMSdrphi = scatMap.get(htc).drphi();
+ double htcMSdz = scatMap.get(htc).dz();
+
mytotchi2 += Math.pow((y - yTr) / yerr, 2);
mytotchi2 += Math.pow((z - zTr) / zerr, 2);
-
+
int htlayer = htc.Layer();
- if (htlayer == 1) l1DeltaZ.put(track, z - zTr);
+ if (htlayer == 1)
+ l1DeltaZ.put(track, z - zTr);
- if(charge<0){
- aida.cloud1D(hitdir + tkresid + " MS Error drphi-- Electrons " + htlayer).fill(htcMSdrphi);
- aida.cloud1D(hitdir + tkresid + " MS Error dz-- Electrons " + htlayer).fill(htcMSdz);
+ if (charge < 0) {
+ aida.cloud1D(hitdir + tkresid + " MS Error drphi-- Electrons " + htlayer).fill(htcMSdrphi);
+ aida.cloud1D(hitdir + tkresid + " MS Error dz-- Electrons " + htlayer).fill(htcMSdz);
+ aida.cloud1D(hitdir + tkresid + " MS Error p -- Electrons " + htlayer).fill(pmc);
+ }
+ if (charge > 0) {
+ aida.cloud1D(hitdir + tkresid + " MS Error drphi-- Positrons " + htlayer).fill(htcMSdrphi);
+ aida.cloud1D(hitdir + tkresid + " MS Error dz-- Positrons " + htlayer).fill(htcMSdz);
+ aida.cloud1D(hitdir + tkresid + " MS Error p -- Positrons " + htlayer).fill(pmc);
+ }
+ if (htlayer == 1 && htcMSdrphi > 1)
+ bigMSErr = true;
+ if (bigMSErr) {
+ if (charge < 0) {
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error drphi-- Electrons " + htlayer).fill(htcMSdrphi);
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error dz-- Electrons " + htlayer).fill(htcMSdz);
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error p -- Electrons " + htlayer).fill(pmc);
}
- if(charge>0){
- aida.cloud1D(hitdir + tkresid + " MS Error drphi-- Positrons " + htlayer).fill(htcMSdrphi);
- aida.cloud1D(hitdir + tkresid + " MS Error dz-- Positrons " + htlayer).fill(htcMSdz);
+ if (charge > 0) {
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error drphi-- Positrons " + htlayer).fill(htcMSdrphi);
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error dz-- Positrons " + htlayer).fill(htcMSdz);
+ aida.cloud1D(hitdir + tkresid + " MS BIG Error p -- Positrons " + htlayer).fill(pmc);
}
+ }
+
+ if(nbad>0)
+ aida.cloud1D(hitdir + tkresid + " BAD Hit MS ERROR drphi " + htlayer).fill(htcMSdrphi);
if (purity == 1 && track.getCharge() > 0 && nhits == 12) {
@@ -681,7 +697,7 @@
aida.histogram1D(hitdir + tkresid + " Track pull z: Layer " + htlayer, 200, -8, 8).fill((z - zTr) / zerr);
aida.histogram2D(hitdir + tkresid + " Track pull y vs p: Layer " + htlayer, 200, -8, 8, 200, 0, 5).fill((y - yTr) / yerr, pmc);
aida.histogram2D(hitdir + tkresid + " Track pull z vs p: Layer " + htlayer, 200, -8, 8, 200, 0, 5).fill((z - zTr) / zerr, pmc);
-
+
}
for (HelicalTrackStrip cl : clusterlist) {
@@ -754,7 +770,7 @@
}
Set<MCParticle> mclist = hittomc.allFrom(hit);
aida.cloud1D(hitdir + layer + " Associated MC particles").fill(mclist.size());
-
+
}
}
@@ -802,7 +818,7 @@
List<HelicalTrackStrip> clusterlist = cross.getStrips();
double du_stereo = 0;
double du_axial = 0;
-
+
for (HelicalTrackStrip cluster : clusterlist) {
int nstrips = cluster.rawhits().size();
@@ -867,7 +883,7 @@
aida.cloud2D(debugDir + hit.Detector() + " delta(u) stereo v axial").fill(du_stereo, du_axial);
}
}
-/*
+ /*
//analyze the event
int ApCand = 0;
String apdir = "Aprime/";
@@ -877,39 +893,39 @@
MCParticle posMC = null;
for (Track track : tracklist) {
- TrackAnalysis tkanal = tkanalMap.get(track);
- StraightLineTrack slt = sltMap.get(track);
- // Calculate purity and make appropriate plots
- MCParticle mcp = tkanal.getMCParticle();
- if (mcp == null)
- continue;
- if (mcp.getParents().size() == 1 && mcp.getParents().get(0).getPDGID() == 622) {
- int nhits = tkanal.getNHitsNew();
- double px = track.getPX();
- double py = track.getPY();
- double pz = track.getPZ();
- double pt = Math.sqrt(px * px + py * py);
- double pperp = Math.sqrt(py * py + pz * pz);
- double p = Math.sqrt(pt * pt + pz * pz);
- double phi = Math.atan2(py, px);
- double cth = pz / Math.sqrt(pt * pt + pz * pz);
-
-
-
- if (mcp.getCharge() > 0) {
- posID = track;
- posMC = mcp;
- fillTrackInfo(apdir, "positron", track.getChi2(), nhits, p, pperp, px, py, pz, phi, cth, doca, poca[0], poca[1], poca[2]);
-
- } else {
- eleID = track;
- eleMC = mcp;
- fillTrackInfo(apdir, "electron", track.getChi2(), nhits, p, pperp, px, py, pz, phi, cth, doca, poca[0], poca[1], poca[2]);
- }
- }
+ TrackAnalysis tkanal = tkanalMap.get(track);
+ StraightLineTrack slt = sltMap.get(track);
+ // Calculate purity and make appropriate plots
+ MCParticle mcp = tkanal.getMCParticle();
+ if (mcp == null)
+ continue;
+ if (mcp.getParents().size() == 1 && mcp.getParents().get(0).getPDGID() == 622) {
+ int nhits = tkanal.getNHitsNew();
+ double px = track.getPX();
+ double py = track.getPY();
+ double pz = track.getPZ();
+ double pt = Math.sqrt(px * px + py * py);
+ double pperp = Math.sqrt(py * py + pz * pz);
+ double p = Math.sqrt(pt * pt + pz * pz);
+ double phi = Math.atan2(py, px);
+ double cth = pz / Math.sqrt(pt * pt + pz * pz);
+
+
+ if (mcp.getCharge() > 0) {
+ posID = track;
+ posMC = mcp;
+ fillTrackInfo(apdir, "positron", track.getChi2(), nhits, p, pperp, px, py, pz, phi, cth, doca, poca[0], poca[1], poca[2]);
+
+ } else {
+ eleID = track;
+ eleMC = mcp;
+ fillTrackInfo(apdir, "electron", track.getChi2(), nhits, p, pperp, px, py, pz, phi, cth, doca, poca[0], poca[1], poca[2]);
+ }
}
-
+
+ }
+
aida.cloud1D(apdir + "Number of Aprime candidates found").fill(ApCand);
aida.cloud1D(apdir + "Number of negative candidates found").fill(_neleRec);
@@ -918,7 +934,7 @@
aida.cloud1D(apdir + "Number of positive candidates found").fill(_nposRec);
aida.cloud1D(apdir + "Number of true positrons").fill(_nposTru);
aida.cloud1D(apdir + "Number of fake positrons").fill(_nposFake);
-*/
+ */
// Now loop over all MC Particles
List<MCParticle> mclist = event.getMCParticles();
int _nchMCP = 0;
@@ -938,7 +954,7 @@
// Find the number of layers hit by this mc particle
// System.out.println("MC pt=" + pt);
int nhits = findable.LayersHit(mcp);
- boolean isFindable=findable.InnerTrackerIsFindable(mcp, nlayers[0]-2);
+ boolean isFindable = findable.InnerTrackerIsFindable(mcp, nlayers[0] - 2);
Set<SimTrackerHit> mchitlist = mcHittomcP.allTo(mcp);
Set<HelicalTrackCross> hitlist = hittomc.allTo(mcp);
@@ -963,13 +979,15 @@
//it's the A'...let's see if we found both tracks.
List<MCParticle> daughters = mcp.getDaughters();
for (MCParticle d : daughters) {
- if (trktomc.allTo(d).size() == 0) bothreco = false;
+ if (trktomc.allTo(d).size() == 0)
+ bothreco = false;
// if (findable.LayersHit(d) != nlayers[0])
- if (!findable.InnerTrackerIsFindable(d, nlayers[0]-2))
+ if (!findable.InnerTrackerIsFindable(d, nlayers[0] - 2))
bothfindable = false;
}
double vtxWgt = 0;
- if (bothreco) vtxWgt = 1.0;
+ if (bothreco)
+ vtxWgt = 1.0;
VxEff.fill(mcp.getOriginX(), vtxWgt);
VyEff.fill(mcp.getOriginY(), vtxWgt);
VzEff.fill(mcp.getOriginZ(), vtxWgt);
@@ -994,7 +1012,7 @@
}
// if (nhits == nlayers[0]) {
- if(isFindable){
+ if (isFindable) {
_nchMCP++;
findableTracks++;
double wgt = 0.;
@@ -1111,7 +1129,7 @@
return;
}
-
+
public void endOfData() {
try {
aida.saveAs(outputPlots);
@@ -1274,7 +1292,8 @@
double dzdx1 = slt1.dzdx();
double s1sq = 1 + 1 / (dydx1 * dydx1) + (dzdx1 * dzdx1) / (dydx1 * dydx1);
double truep1y = Math.sqrt(p1mag2 / s1sq);
- if (dydx1 < 0) truep1y = -truep1y;
+ if (dydx1 < 0)
+ truep1y = -truep1y;
double truep1x = truep1y / dydx1;
double truep1z = dzdx1 * truep1x;
@@ -1288,7 +1307,8 @@
double dzdx2 = slt2.dzdx();
double s2sq = 1 + 1 / (dydx2 * dydx2) + (dzdx2 * dzdx2) / (dydx2 * dydx2);
double truep2y = Math.sqrt(p2mag2 / s2sq);
- if (dydx2 < 0) truep2y = -truep2y;
+ if (dydx2 < 0)
+ truep2y = -truep2y;
double truep2x = truep2y / dydx2;
double truep2z = dzdx2 * truep2x;
@@ -1323,7 +1343,6 @@
return doca;
}
-
//find the XOCA to the beamline extrpolating linearly from the reference point
private double findXoca(double y, double z, double px, double py, double pz) {
double xoca = 0;
@@ -1376,7 +1395,8 @@
double dzdx1 = slt1.dzdx();
double s1sq = 1 + 1 / (dydx1 * dydx1) + (dzdx1 * dzdx1) / (dydx1 * dydx1);
truep[1] = Math.sqrt(p1mag2 / s1sq);
- if (dydx1 < 0) truep[1] = -truep[1];
+ if (dydx1 < 0)
+ truep[1] = -truep[1];
truep[0] = truep[1] / dydx1;
truep[2] = dzdx1 * truep[0];
return new BasicHep3Vector(truep[0], truep[1], truep[2]);
@@ -1456,5 +1476,3 @@
return badHitsEncoded;
}
}
-
-
hps-java/src/main/java/org/lcsim/HPSDedicatedv3
diff -u -r1.5 -r1.6
--- DarkPhotonLLDriver.java 18 Apr 2011 16:07:45 -0000 1.5
+++ DarkPhotonLLDriver.java 19 Apr 2011 17:14:26 -0000 1.6
@@ -18,8 +18,8 @@
public String outputFile = "foobar.slcio";
public String plotsFile = "myplots.aida";
public String outputTextName = "myevents.txt";
-// TestVertexing tad;
- TrackAnalysisDriver tad;
+ TestVertexing tad;
+// TrackAnalysisDriver tad;
// FastTrackAnalysisDriver tad;
List<int[]> pairs = new ArrayList();
List<Integer> passLayers = new ArrayList();
@@ -42,8 +42,8 @@
add(trd);
// tad = new LongLivedAnalysis(nlayers);
- // tad = new TestVertexing(nlayers);
- tad = new TrackAnalysisDriver(nlayers);
+ tad = new TestVertexing(nlayers);
+// tad = new TrackAnalysisDriver(nlayers);
// tad = new FastTrackAnalysisDriver(nlayers);
// atd=new AnalysisTupleDriver(nlayers);
// add(new OccupancyDriver());
hps-java/src/main/java/Utilities
diff -u -r1.3 -r1.4
--- FindableTrack.java 11 Aug 2010 23:08:12 -0000 1.3
+++ FindableTrack.java 19 Apr 2011 17:14:26 -0000 1.4
@@ -166,7 +166,20 @@
return idset.size();
}
- public boolean InnerTrackerIsFindable(MCParticle mcp, int nlayers) {
+ public boolean InnerTrackerIsFindable(MCParticle mcp, int nlayers, boolean printout) {
+ Set<SimTrackerHit> hitlist = _hittomc.allTo(mcp);
+ boolean[] layerHit={false,false,false,false,false,false,false,false,false,false,false,false};
+ for (SimTrackerHit simhit : hitlist) {
+ layerHit[simhit.getLayer()-1]=true;
+ }
+ for(int i=0;i<nlayers;i++){
+ System.out.println(layerHit[i]);
+ if(layerHit[i]==false)return false;
+ }
+ return true;
+ }
+
+ public boolean InnerTrackerIsFindable(MCParticle mcp, int nlayers) {
Set<SimTrackerHit> hitlist = _hittomc.allTo(mcp);
boolean[] layerHit={false,false,false,false,false,false,false,false,false,false,false,false};
for (SimTrackerHit simhit : hitlist) {
CVSspam 0.2.8