lcsim/src/org/lcsim/contrib/seedtracker
diff -u -r1.1 -r1.2
--- SeedTracker.java 7 Aug 2006 17:46:31 -0000 1.1
+++ SeedTracker.java 30 Jun 2007 00:26:57 -0000 1.2
@@ -130,16 +130,36 @@
}
private List<List<BaseTrackerHitMC>> FindSeeds(SeedStrategy strategy) {
+
SeedLayer inner = strategy.getSeedInner();
SeedLayer middle = strategy.getSeedMiddle();
SeedLayer outer = strategy.getSeedOuter();
+ double RMin = strategy.getMinPT() / (0.0003 * BField);
+ double dMax = strategy.getMaxDCA();
+
// Todo: add code to limit seeds to those that satisfy cuts
List<List<BaseTrackerHitMC>> seedlist = new ArrayList();
for (BaseTrackerHitMC si : inner.getHitList()) {
+ double[] pos1 = si.getPosition();
+ double r1 = Math.sqrt(pos1[0]*pos1[0] + pos1[1]*pos1[1]);
+ double phi1 = Math.atan2(pos1[1],pos1[0]);
+ double dphi1 = Math.asin((2*RMin*dMax - dMax*dMax-r1*r1)/(2*r1*(RMin-dMax)));
for (BaseTrackerHitMC sm : middle.getHitList()) {
+ double[] pos2 = sm.getPosition();
+ double r2 = Math.sqrt(pos2[0]*pos2[0] + pos2[1]*pos2[1]);
+ double phi2 = Math.atan2(pos2[1],pos2[0]);
+ double dphi2 = Math.asin((2*RMin*dMax - dMax*dMax-r2*r2)/(2*r2*(RMin-dMax)));
+ if (Math.abs(phi2-phi1) > Math.abs(dphi2-dphi1)) continue;
+
for (BaseTrackerHitMC so : outer.getHitList()) {
+ double[] pos3 = so.getPosition();
+ double r3 = Math.sqrt(pos3[0]*pos3[0] + pos3[1]*pos3[1]);
+ double phi3 = Math.atan2(pos3[1],pos3[0]);
+ double dphi3 = Math.asin((2*RMin*dMax - dMax*dMax-r3*r3)/(2*r3*(RMin-dMax)));
+ if (Math.abs(phi3-phi2) > Math.abs(dphi3-dphi2)) continue;
+
List<BaseTrackerHitMC> hitlist = new ArrayList();
hitlist.add(si);
hitlist.add(sm);
@@ -183,12 +203,12 @@
if (d0 < strategy.getMaxDCA()) {
double z0 = params[3];
if (z0 < strategy.getMaxZ0()) {
- System.out.println(" d0 "+params[0]);
- System.out.println(" phi0 "+params[1]);
- System.out.println(" curvatures "+params[2]);
- System.out.println(" z0 "+params[3]);
- System.out.println(" slope "+params[4]);
- System.out.println(" pT "+pT);
+ System.out.println(" d0 "+params[0]);
+ System.out.println(" phi0 "+params[1]);
+ System.out.println(" curvatures "+params[2]);
+ System.out.println(" z0 "+params[3]);
+ System.out.println(" slope "+params[4]);
+ System.out.println(" pT "+pT);
status = true;
}
}