lcsim/src/org/lcsim/contrib/uiowa/MuonFinder
diff -u -r1.8 -r1.9
--- MipTrackMap.java 17 Oct 2008 00:32:04 -0000 1.8
+++ MipTrackMap.java 20 Oct 2008 19:03:13 -0000 1.9
@@ -104,11 +104,11 @@
long[] nearbyHitArray = id.getNeighbourIDs(countIterationsSinceLastHit, 3, 3);
for (long lastnearID : nearbyHitArray ) { nearIDs.add(lastnearID); }
- Hep3Vector last0 = hitPosition(hit);
+ Hep3Vector last0 = new BasicHep3Vector(hit.getPosition());
Hep3Vector last1 = new BasicHep3Vector();
if( mipclus.getCalorimeterHits().size() > 1){
CalorimeterHit hit1 = mipclus.getCalorimeterHits().get( mipclus.getCalorimeterHits().size()-2);
- last1 = hitPosition(hit1);
+ last1 = new BasicHep3Vector(hit1.getPosition());
}
//Searh cur hit in cur layer and arrange in angular order
@@ -217,7 +217,7 @@
else k = 2;
for(int i =0; i < k ;i++){
CalorimeterHit hit = mipclus.getCalorimeterHits().get( mipclus.getCalorimeterHits().size()-1-i);
- Hep3Vector v = hitPosition(hit);
+ Hep3Vector v = new BasicHep3Vector(hit.getPosition());
System.out.println("Debug: last "+i+" pos= "+v.magnitude()+" (" +v.x() + " " + v.y() + " " + v.z()+ ")" );
}
System.out.println("cal MIP size= " + mipclus.getCalorimeterHits().size());
@@ -242,7 +242,7 @@
SortedMap<Double, Set<CalorimeterHit>> sortedHitbyPos= new TreeMap();
IDDecoder id = hit.getIDDecoder();
double layer = id.getLayer();
- Hep3Vector hitPos = hitPosition(hit);
+ Hep3Vector hitPos = new BasicHep3Vector(hit.getPosition());
Hep3Vector hitPosUnit = VecOp.unit(hitPos);
Set<CalorimeterHit> hits = sortedHitbyPos.get(hitPos.magnitude());
@@ -258,7 +258,7 @@
if(removedhits.contains(subhit)) continue;
IDDecoder subid = subhit.getIDDecoder();
double sublayer = subid.getLayer();
- Hep3Vector subhitPos = hitPosition(subhit);
+ Hep3Vector subhitPos = new BasicHep3Vector(subhit.getPosition());
Hep3Vector subhitPosUnit = VecOp.unit(subhitPos);
double cos = VecOp.dot(hitPosUnit, subhitPosUnit);
sortedHitbyAng.put(cos,subhit);
@@ -459,7 +459,7 @@
else exam = 0; // if number of neighbour is none, set to zero and start again from 0
if(debug){
- Hep3Vector cellv = hitPosition(hit);
+ Hep3Vector cellv = hitCellPosition(hit);
Hep3Vector v = new BasicHep3Vector(hit.getPosition());
int p = (int) (v.magnitude());
int r = (int) Math.sqrt(v.x()*v.x() + v.y()*v.y());
@@ -477,7 +477,7 @@
Set<CalorimeterHit> upperhits = new HashSet<CalorimeterHit>();
for(CalorimeterHit hit : muhits){
String subdetName = hit.getSubdetector().getName();
- Hep3Vector cellv = hitPosition(hit);
+ Hep3Vector cellv = hitCellPosition(hit);
Hep3Vector v = new BasicHep3Vector(hit.getPosition());
int p = (int) (v.magnitude());
int r = (int) Math.sqrt(v.x()*v.x() + v.y()*v.y());
@@ -494,7 +494,7 @@
}
//give the vector of hit
- protected Hep3Vector hitPosition(CalorimeterHit hit){
+ protected Hep3Vector hitCellPosition(CalorimeterHit hit){
IDDecoder id = hit.getIDDecoder();
id.setID(hit.getCellID());
double x = id.getPosition()[0];