|
43 | 43 | import org.jlab.clas.tracking.kalmanfilter.zReference.StateVecs; |
44 | 44 | import org.jlab.clas.tracking.utilities.MatrixOps.Libr; |
45 | 45 | import org.jlab.clas.tracking.utilities.RungeKuttaDoca; |
| 46 | +import org.jlab.detector.base.DetectorType; |
46 | 47 |
|
47 | 48 | public class DCTBEngine extends DCEngine { |
48 | 49 |
|
@@ -200,6 +201,24 @@ public boolean processDataEvent(DataEvent event) { |
200 | 201 | if(TrackArray==null) { |
201 | 202 | return true; // HB tracks not saved correctly |
202 | 203 | } |
| 204 | + if(Math.abs(Swimmer.getTorScale()) < 0.001 && |
| 205 | + event.hasBank(this.getBanks().getRecPartBank()) && |
| 206 | + event.hasBank(this.getBanks().getRecTrackBank())){ |
| 207 | + DataBank trackBank = event.getBank(this.getBanks().getRecTrackBank()); |
| 208 | + DataBank partBank = event.getBank(this.getBanks().getRecPartBank()); |
| 209 | + for (int i = 0; i < trackBank.rows(); i++) { |
| 210 | + if (trackBank.getByte("detector", i) == DetectorType.DC.getDetectorId()) { |
| 211 | + int pindex = trackBank.getShort("pindex", i); |
| 212 | + if(partBank.getInt("pid", i) == 11) { |
| 213 | + Track HBtrk = TrackArray[trackBank.getShort("index", i)]; |
| 214 | + HBtrk.set_pAtOrig(new Vector3D(partBank.getFloat("px", pindex), |
| 215 | + partBank.getFloat("py", pindex), |
| 216 | + partBank.getFloat("pz", pindex))); |
| 217 | + HBtrk.set_P(HBtrk.get_pAtOrig().mag()); |
| 218 | + } |
| 219 | + } |
| 220 | + } |
| 221 | + } |
203 | 222 | for(Segment seg : segments) { |
204 | 223 | if(seg.get(0).get_AssociatedHBTrackID()>0) { |
205 | 224 | TrackArray[seg.get(0).get_AssociatedHBTrackID()-1].get_ListOfHBSegments().add(seg); |
|
0 commit comments