lcsim/src/org/lcsim/contrib/SODTracker
diff -u -r1.2 -r1.3
--- History 28 Jul 2006 20:21:41 -0000 1.2
+++ History 8 Aug 2006 22:56:08 -0000 1.3
@@ -3,6 +3,11 @@
## Please summarize changes to the SODTracker code here.
## Most recent first please.
+08 August 2006 Fred Blanc V01-01-01
+Test the sub-detector name using the method:
+ decoder.getSubdetector().getName()
+instead of relying on the collection number
+
28 July 2006 Fred Blanc V01-01-00
Modifications from Steve Wagner to include helix fit.
SODTrack now contains the fitted helix parameters and the
lcsim/src/org/lcsim/contrib/SODTracker
diff -u -r1.2 -r1.3
--- SODTrackFinderDriver.java 28 Jul 2006 20:21:42 -0000 1.2
+++ SODTrackFinderDriver.java 8 Aug 2006 22:56:08 -0000 1.3
@@ -8,6 +8,7 @@
import org.lcsim.event.SimTrackerHit;
import org.lcsim.event.MCParticle;
import org.lcsim.geometry.TrackerIDDecoder;
+import org.lcsim.geometry.Subdetector;
public class SODTrackFinderDriver extends Driver
{
@@ -54,7 +55,7 @@
MCParticle mcp = trackerHit.getMCParticle();
double rgauss = generator.nextGaussian();
SODHit sh=new SODHit();
- if (collection==2){
+ if (decoder.getSubdetector().getName().equals("VertexBarrel")){
// the second collection corresponds to the barrel vertex tracker
// sh.make_hit(layer,pos[0],pos[1],rgauss,trackerHit,mcp);
double rg2=generator.nextGaussian();
@@ -64,14 +65,14 @@
}
double res=-(0.1*pos[0]-sh.x())*Math.sin(sh.phi())
+(0.1*pos[1]-sh.y())*Math.cos(sh.phi());
- if (collection==2){
+ if (decoder.getSubdetector().getName().equals("VertexBarrel")){
if (layer==0){boolean success=l1vhlist.add(sh);}
if (layer==1){boolean success=l2vhlist.add(sh);}
if (layer==2){boolean success=l3vhlist.add(sh);}
if (layer==3){boolean success=l4vhlist.add(sh);}
if (layer==4){boolean success=l5vhlist.add(sh);}
}
- if (collection==3){
+ if (decoder.getSubdetector().getName().equals("TrackerBarrel")){
if (layer==0){boolean success=l1shlist.add(sh);}
if (layer==1){boolean success=l2shlist.add(sh);}
if (layer==2){boolean success=l3shlist.add(sh);}