lcsim/src/org/lcsim/contrib/NickSinev/tracking/util
diff -u -r1.4 -r1.5
--- WMTrackPropagator.java 2 Dec 2006 02:42:59 -0000 1.4
+++ WMTrackPropagator.java 17 Jan 2007 00:22:31 -0000 1.5
@@ -29,7 +29,7 @@
/**
* @author Nick Sinev U of Oregon, [log in to unmask] SLAC x2970
- * @version $Id: WMTrackPropagator.java,v 1.4 2006/12/02 02:42:59 sinev Exp $
+ * @version $Id: WMTrackPropagator.java,v 1.5 2007/01/17 00:22:31 sinev Exp $
*/
public class WMTrackPropagator
@@ -237,7 +237,7 @@
}
if((air == null) && debug) System.out.println("can't find air radiation length");
String dnam = det.getName();
- if(debug) System.out.println("MultScatErrorMatrix is processing detecor: "+dnam);
+ System.out.println("WMTrackPropagator is processing detecor: "+dnam);
FieldMap fmap = det.getFieldMap();
double[] origin = new double[] {0.,0.,0.};
Bfield = fmap.getField(origin)[2];
@@ -258,6 +258,7 @@
for(Subdetector subDet : subDets)
{
String sdnam = subDet.getName();
+ if(debug) System.out.println("Processing subdetector "+sdnam);
if(incbeamp)
{
if(sdnam.equals("BeamPipe"))
@@ -270,23 +271,17 @@
nSubLrs++;
if(debug) System.out.println("adding beampipe liner, nSubLrs= "+nSubLrs);
}
- if((sdnam.equals("SteelConeZforward"))||(sdnam.equals("SteelConeZbackward")))
+ if(sdnam.indexOf("SteelCone")!=-1)
{
nSubLrs++;
if(debug) System.out.println("adding Steel Cone, nSubLrs= "+nSubLrs);
}
- if((sdnam.equals("VXDcableZbackwardOuter"))||(sdnam.equals("VXDcableZbackwardInner")))
- {
- nSubLrs++;
- if(debug) System.out.println("adding VXD cable backward, nSubLrs= "+nSubLrs);
- }
- if((sdnam.equals("VXDcableZforwardOuter"))||(sdnam.equals("VXDcableZforwardInner")))
+ if((sdnam.indexOf("VXDcableZ")!=-1))
{
nSubLrs++;
- if(debug) System.out.println("adding VXD cable forward, nSubLrs= "+nSubLrs);
+ if(debug) System.out.println("adding "+sdnam+", nSubLrs= "+nSubLrs);
}
}
- if(debug) System.out.println("Processing subdetector "+sdnam);
if((sdnam.indexOf("Tracker")!=-1)||(sdnam.indexOf("Vertex")!=-1))
{
Layering layers = subDet.getLayering();
@@ -353,16 +348,23 @@
}
if(incbeamp)
{
- if((sdnam.indexOf("BeamPipe")!=-1)||(sdnam.indexOf("SteelCone")!=-1)||(sdnam.indexOf("VXDcableZ")!=-1))
+ if(sdnam.equals("BeamPipe")||sdnam.equals("BeamPipeLiner")||(sdnam.indexOf("SteelCone")!=-1)||(sdnam.indexOf("VXDcableZ")!=-1))
{
- if(debug) System.out.println("Beam Pipe MS is included in weight matrix calculations !");
+ if(debug) System.out.println("Processing "+sdnam);
if(subDet instanceof PolyconeSupport)
{
PolyconeSupport bpl = (PolyconeSupport) subDet;
isCylinder[slind]=true;
Material mat = bpl.getMaterial();
- double x0 = 10. * mat.getRadiationLengthWithDensity();
- double mdens = mat.getDensity();
+ double x0=999999.;
+ double mdens = 0.;
+ if(mat != null)
+ {
+ x0 = 10. * mat.getRadiationLengthWithDensity();
+ mdens = mat.getDensity();
+ }
+ else
+ System.out.println("Can't find material for subdetector "+sdnam);
specX0[slind]=1./x0;
avDens[slind]=0.1*mdens; //avDens should give amount of material in g/cm**2 per unit of path
int nzp = bpl.getNumberOfZPlanes();
@@ -416,7 +418,12 @@
minR[slind]=rmicl;
maxR[slind]=rmacl;
}
- if(debug) System.out.println("Processing "+sdnam+" made of "+mat.getName()+" starting sub lr ind: "+slind);
+ if(debug)
+ {
+ String maname = "Unknown";
+ if(mat != null) maname = mat.getName();
+ System.out.println("Processing "+sdnam+" made of "+maname+" starting sub lr ind: "+slind);
+ }
if(debug) System.out.println("minZ is "+minZ[slind]+" maxZ: "+maxZ[slind]+" Rmin: "+minR[slind]+" Rmax: "+
maxR[slind]+" sepec.X0: "+specX0[slind]);
}
@@ -508,7 +515,7 @@
// Factor 10. because material returns radiation length in cm !!!
double x0 = 10. * mat.getRadiationLengthWithDensity();
double mdens = mat.getDensity();
- if(debug) System.out.println(mat.getName()+" X0 "+x0+" mm"+" density "+mdens);
+ if(debug) System.out.println(mat.getName()+" X0 "+x0+" mm"+" density "+mdens+" thikness "+thick);
isCylinder[slind]=iscyl;
if(iscyl)
{
@@ -1927,8 +1934,8 @@
}
if(debug)
{
- Matrix upem = projErrorMatrix.getMatrix(0,naclt-1,0, naclt-1);
- Matrix loem = projErrorMatrix.getMatrix(naclt,2*naclt-1,naclt, 2*naclt-1);
+ Matrix upem = projErrorMatrix.getMatrix(0,nlrs-1,0, nlrs-1);
+ Matrix loem = projErrorMatrix.getMatrix(nlrs,2*nlrs-1,nlrs, 2*nlrs-1);
System.out.println("RPhi MS displ. squared");
upem.print(8, 6);
System.out.println("ZorR MS displ. squared");
lcsim/src/org/lcsim/contrib/NickSinev/tracking/wmfitter
diff -u -r1.4 -r1.5
--- WeightMatrix.java 2 Dec 2006 02:43:02 -0000 1.4
+++ WeightMatrix.java 17 Jan 2007 00:22:31 -0000 1.5
@@ -41,6 +41,8 @@
private boolean doHist = true;
private boolean equal_wts = false;
private double costorlim = 0.2;
+ private double brlHtRadTol = 2.;
+ private double ecHtZTol = 2.;
protected boolean[] active = new boolean[MAXLRS];
protected boolean[] Cylinder = new boolean[MAXLRS];
protected TrackerHit[] closeHits = new TrackerHit[MAXLRS];
@@ -225,8 +227,8 @@
{
hpo = th.getPosition();
double rht = Math.sqrt(hpo[0]*hpo[0]+hpo[1]*hpo[1]);
-// System.out.println("See hit with radius "+df.format(rht));
- if((Math.abs(rtr-rht) < 0.3)&& mser.isActiveCylinder(i))
+ if(debug_level==2) System.out.println("See hit with radius "+df.format(rht));
+ if((Math.abs(rtr-rht) < brlHtRadTol)&& mser.isActiveCylinder(i))
{
if(debug_level==2)
{
@@ -238,7 +240,7 @@
}
if(!mser.isActiveCylinder(i))
{
- if(Math.abs(tz-hpo[2])<0.3) clsz=true;
+ if(Math.abs(tz-hpo[2])<ecHtZTol) clsz=true;
if(Math.abs(rtr-rht) < 200.) clrad = true;
}
double[] tcv=null;