lcsim/src/org/lcsim/recon/muon
diff -u -r1.11 -r1.12
--- BarrelCalSegmentFinder.java 12 Dec 2005 05:45:28 -0000 1.11
+++ BarrelCalSegmentFinder.java 12 Dec 2005 22:33:53 -0000 1.12
@@ -385,17 +385,19 @@
if(hit!=null) {
// found real hit at virtual cell
if(debug) System.out.println("matchHits: Adding hit: "+Long.toHexString(cellid));
- if(debug)
- {
+ // if(debug)
+ // {
double dall=0.;
for(int j=0;j<nLayers;j=j+4)
{
+ if(ilay==j)
+ {
aida.cloud1D(subdetName+" dphi layer "+ilay).fill(dall);
aida.cloud1D(subdetName+" dtheta layer "+ilay).fill(dall);
+ }
}
-
-
- }
+
+ //}
hitList.add(hit);
nhitsTotal++;
}
@@ -403,7 +405,13 @@
// now check for the neighbors
segm.setID(cellid);
int iphi = segm.getValue("phi");
- int ithe = segm.getValue("theta");
+ int ithe = -99999;
+ try {
+ ithe = segm.getValue("theta");
+ }
+ catch(NullPointerException x) {
+ ithe = segm.getValue("z");
+ }
ilay = segm.getLayer();
long[] neighs = segm.getNeighbourIDs(0, thetaNNCut, phiNNCut );
// System.out.println("VirtualID="+MyTools.printID(cellid)
@@ -415,21 +423,26 @@
if(debug) System.out.println("matchHits: Adding hit: "+Long.toHexString(neighs[i]));
segm.setID( neighs[i] );
int jphi = segm.getValue("phi");
- int jthe = segm.getValue("theta");
+ int jthe = 0;
+ try {
+ jthe = segm.getValue("theta");
+ }
+ catch(NullPointerException x) {
+ jthe = segm.getValue("z");
+ }
int jlay = segm.getLayer();
- if(debug)
- {
-
+ // if(debug)
+ //{
for(int j=0;j<nLayers;j=j+4)
{
if(ilay==j)
{
- aida.cloud1D(subdetName+" dphi layer "+jlay).fill(jphi-iphi);
- aida.cloud1D(subdetName+" dtheta layer "+jlay).fill(jthe-ithe);
+ aida.cloud1D(subdetName+" dphi layer "+ilay).fill(jphi-iphi);
+ aida.cloud1D(subdetName+" dtheta layer "+ilay).fill(jthe-ithe);
}
}
- }
+ // }
hitList.add(hit);
nhitsTotal++;
}