lcsim/src/org/lcsim/recon/muon
diff -u -r1.14 -r1.15
--- MuonCalSegmentFinder.java 3 Oct 2006 05:26:39 -0000 1.14
+++ MuonCalSegmentFinder.java 11 Oct 2006 01:19:11 -0000 1.15
@@ -23,10 +23,10 @@
* elements as well and to replace the Inner Class Extrapolate
* of the Class MuonCalSegmentFinder- C. Milstene-January-02-04
*
- New modifications by Judith Odili and Caroline Milstene - 07/13/06 -
- Modified so the Stepper information get read
+ New modifications by Judith Odili and Caroline Milstene - 07/13/06 -
+ Modified so the Stepper information get read
directly from StepConditions class.
-
+
*/
final public class MuonCalSegmentFinder extends BarrelCalSegmentFinder
{
@@ -36,13 +36,13 @@
super(det, subdetectorName);
// Set the nearest neighbor cuts to default values
- setPhiNNCut(3);//2
- setThetaNNCut(3);//2
+ setPhiNNCut(2);//2
+ setThetaNNCut(2);//2
// getting info from the coil
coilSlices = new Vector<CoilSubLayer>();
coilSlices = stpr.getCoilSlices(det);
-
+
}
@@ -79,18 +79,16 @@
r = coilSlices.get(0).getRmin();
materialName = "Air";
pos = new double[]{rpVect[0], rpVect[1], rpVect[2]};
- field = det.getFieldMap().getField(pos); // C.M.-June-03
-
- BField = field[2];
+ double [] bField = det.getFieldMap().getField(pos); // C.M.-June-03
double dist= Math.abs(r-stpr.partR(rpVect));
- stpr.tkSteps(r,zmax,det, materialName); //goes up to the coil
+ stpr.tkSteps(r,zmax,"Barrel",bField[2], materialName); //goes up to the coil
rpVect =stpr.getNewRp(); // get coordinates
// From the COIL on
double muField =-0.6;
- //double muField=StepConditions
+
double zCoil;
- double zmxCoil = coilSlices.get(0).getZmax();
+ double zmxCoil = coilSlices.get(0).getZmax();
int atZMax = stpr.getAtZmax();
boolean hitsCoil;
if(rpVect[2]== zmxCoil||stpr.getAtZmax()==1||stpr.getStopTkELow())
@@ -99,7 +97,7 @@
System.out.println("*** Aborting at the coil");
return; // does not hit the coil
}
- System.out.println("TAKING CARE OF THE COIL");
+ System.out.println("TAKING CARE OF THE COIL");
// In the COIL
int islice = 0;
double dt_r;
@@ -118,24 +116,24 @@
// Go on to the next layer
r = r + dr;
xNSteps= dr;
- field = det.getFieldMap().getField( rpVect ); // C.M.-June-03
+ bField = det.getFieldMap().getField( rpVect ); // C.M.-June-03
double radius = Math.sqrt(rpVect[0]*rpVect[0]+rpVect[1]*rpVect[1]);
System.out.println("slice "+islice+", mat="+slice.getMaterial()
+", r="+r
+", zmax="+zmaxSlice+", rmin="+rminSlice
+", dr="+dr
+", totalDedx="+totalDedx
- +", field="+field[2]
- +", rad="+radius+", z="+rpVect[2] );
+ +", field="+bField[2]
+ +", rad="+radius+", z="+rpVect[2] );
stpr.tkSteps(r,zmaxSlice,det, ii);
rpVect = stpr.getNewRp();
++islice;
}
//--------------------------------------------------------------------------------------
-
-
+
+
rpVect = stpr.getNewRp();
-
+
if(rpVect[2]>=zmxCoil|| stpr.getAtZmax()==1||stpr.getStopTkELow())
hitsCoil = false;
@@ -150,12 +148,13 @@
}
rNow=Math.sqrt(rpVect[0]*rpVect[0]+rpVect[1]*rpVect[1]);
-
+
// Air after the COIL
xNSteps=rmin-stpr.partR(rpVect);
-
+
r= r + (rmin-stpr.partR(rpVect));
- stpr.tkSteps(r,zmax,det, materialName);
+
+ stpr.tkSteps(r,zmax,"Barrel",bField[2], materialName);
rpVect=stpr.getNewRp();
r = rLayer0Mid;
if(debug)
@@ -163,7 +162,7 @@
double muFieldNorm = 0.;
dist =r-stpr.partR(rpVect);
-
+
stpr.tkSteps(r, zmax,det, subdetName, nr);
rpVect = stpr.getNewRp();
// Get intersections with succesive layers as long as track is
@@ -173,10 +172,10 @@
{
Hep3Vector v = new BasicHep3Vector(rpVect[0],rpVect[1],rpVect[2]);
hitPos.add(v);
- long virtualID = segm.findCellContainingXYZ( rpVect );
+ long virtualID = segm.findCellContainingXYZ( rpVect );
cellList.add(virtualID);
if(stpr.getStopTkELow())break; // C.M.
-
+
if(stpr.getCurlBack())
{
if(debug &&(stpr.partR(rpVect)-dr)<(r-dr) )
@@ -207,6 +206,9 @@
cellList.add(virtualID);
}
// Now match the cells on this list to calorimeter hits
+
+
+
Map<Long,CalorimeterHit> muhits = dataMgr.getCollHitMap(muonName);
if(debug)System.out.println("# muon hits: "+muhits.size());
matchHitsFast( segm, dataMgr.getCollHitMap(muonName), true );
@@ -217,5 +219,4 @@
private static double materDedxMudet; // C.M. get the dEdx
private String muonName = "MuonBarrHits";
private Vector<CoilSubLayer> coilSlices;
-
}