lcsim/src/org/lcsim/recon/muon
diff -u -r1.13 -r1.14
--- BarrelCalSegmentFinder.java 18 Dec 2005 16:36:40 -0000 1.13
+++ BarrelCalSegmentFinder.java 27 Dec 2005 16:05:16 -0000 1.14
@@ -33,7 +33,7 @@
// Get the parameters that describe this detector component
det = aDet;
- CylindricalBarrelCalorimeter calsub = (CylindricalBarrelCalorimeter)det.getSubdetectors().get(subdetName);
+ calsub = (CylindricalBarrelCalorimeter)det.getSubdetectors().get(subdetName);
/**
* Get materials (of 1st layer only) from LayeredCalorimeter class.
@@ -62,6 +62,7 @@
rmax = calsub.getOuterRadius();
zmax = calsub.getZMax();
nLayers = calsub.getLayering().getLayerCount();
+ rLayer0Mid = calsub.getLayering().getDistanceToLayerSensorMid(0);
dataMgr = CalHitMapMgr.getInstance();
segm = (SegmentationBase)calsub.getReadout().getSegmentation();
@@ -75,12 +76,12 @@
// System.out.println("MY NAME IS "+subdetName+" rin="+rmin+" rout="+rmax+" zmax="+zmax+", phiBinSize="+phiBinSize+", thetaBinSize="+thetaBinSize);
// Set the nearest neighbor cuts to default values
if(subdetName.equals(ecalSubdetName)) {
- phiNNCut = 2; // 2;
- thetaNNCut = 2; // 2;
+ phiNNCut = 0; // 2;
+ thetaNNCut = 0; // 2;
}
else if(subdetName.equals(hcalSubdetName)) {
- phiNNCut = 3; // 3;
- thetaNNCut = 2; // 3;
+ phiNNCut = 0; // 3;
+ thetaNNCut = 0; // 2;
}
// }
@@ -136,15 +137,15 @@
System.out.println("BField: ("+field[0]+", "+field[1]+", "+field[2]+")");
BField = field[2];
xNumSteps=Math.abs(r-stpr.partR());
- stepConditions = steprConditions(xNumSteps,BField,0.);
+ stepConditions = steprConditions(xNumSteps,BField,0.);
System.out.println("Barrel Field before 1st stepper call "+BField);
- System.out.println("Barrel:stepcd="+stepConditions[0]+" "+stepConditions[1]+" "+stepConditions[2]);
- stpr.tkSteps( r, zmax,stepConditions);
+ System.out.println("Barrel:stepcd="+stepConditions[0]+" "+stepConditions[1]+" "+stepConditions[2]);
+ stpr.tkSteps( r, zmax,stepConditions);
System.out.println("Tracker r=" +r+" zmax="+zmax);
System.out.println("Barrel:out of Tracker");
rpVect = stpr.getNewRp();
System.out.println("debug pos: ("+rpVect[0]+"; "+rpVect[1]+"; "+rpVect[2]+"), r="+stpr.partR());
- }
+ }
if(subdetName.equals(hcalSubdetName))
@@ -153,22 +154,23 @@
// Then air to r=rmin
double[] field = det.getFieldMap().getField(rpVect); // C.M.-June-03
BField = field[2];
- rpVect = stpr.getNewRp();
+ rpVect = stpr.getNewRp();
double d_EMHD = Math.abs(r-stpr.partR());
System.out.println(" distance between calorimeters EM-HD "+d_EMHD);
- stepConditions = steprConditions((10*d_EMHD),BField,0.0);
- stpr.tkSteps(r,zmax,stepConditions);
- rpVect = stpr.getNewRp();
+ stepConditions = steprConditions((10*d_EMHD),BField,0.0);
+ stpr.tkSteps(r,zmax,stepConditions);
+ rpVect = stpr.getNewRp();
}
xNumSteps = 10.;
stepConditions = steprConditions(xNumSteps,BField,meanDEdxPerLay(subdetName));
- System.out.println("Barrel:MeanDEdxPerLay="+meanDEdxPerLay(subdetName));
+ System.out.println("Barrel:MeanDEdxPerLay="+meanDEdxPerLay(subdetName));
// Forms a muon segment by looking for calorimeter hits that match
// cells which the track passes through
// Begin by finding intersection of track with innermost layer
- r = rmin+0.5*dr;
+ System.out.println("subdet="+subdetName+", sensormid="+rLayer0Mid);
+ r = rLayer0Mid;
stpr.tkSteps(r, zmax,stepConditions);
rpVect = stpr.getNewRp();
@@ -205,7 +207,9 @@
if(stpr.getStopTkELow()) break;
if(nr!=(nLayers-1)) r = r + dr;
else {
- r=r+0.5*dr;
+// r=r+0.5*dr;
+ r = rmin + nLayers * dr;
+ System.out.println("Exit of "+subdetName+", r="+r);
} // Go on to the next layer
stpr.tkSteps(r, zmax,stepConditions);
rpVect = stpr.getNewRp();
@@ -442,6 +446,7 @@
protected Detector det;
+ protected CylindricalBarrelCalorimeter calsub;
protected SegmentationBase segm;
protected IDEncoder encoder;
protected CalHitMapMgr dataMgr;
@@ -457,6 +462,7 @@
protected double []rpVect = new double[8] ; // C.M.-4-Vector
protected String subdetName; // C.M.-Jan03
protected double rmin;
+ protected double rLayer0Mid;
protected double rmax;
protected double zmax;
protected int nLayers;