Skip to content

Commit f0b46e6

Browse files
committed
update CVT hit banks for geometry information
1 parent 66ed259 commit f0b46e6

3 files changed

Lines changed: 41 additions & 1 deletion

File tree

‎etc/bankdefs/hipo4/bmt.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,19 @@
123123
{"name":"sector", "type":"B", "info":"hit sector"},
124124
{"name":"layer", "type":"B", "info":"hit layer"},
125125
{"name":"strip", "type":"S", "info":"hit strip"},
126-
{"name":"energy", "type":"F", "info":"energy"},
126+
{"name":"energy", "type":"F", "info":"energy"},
127127
{"name":"time", "type":"F", "info":"time (ns)"},
128128
{"name":"fitResidual", "type":"F", "info":"fitted hit residual"},
129129
{"name":"trkingStat", "type":"B", "info":"tracking status"},
130130
{"name":"clusterID", "type":"S", "info":"associated cluster ID"},
131131
{"name":"trkID", "type":"S", "info":"associated track ID"},
132132
{"name":"status", "type":"B", "info":"status (0=good)"},
133+
{"name":"xo", "type":"F", "info":"x of the origin point for the strip (cm)"},
134+
{"name":"yo", "type":"F", "info":"y of the origin point for the strip (cm)"},
135+
{"name":"zo", "type":"F", "info":"z of the origin point for the strip (cm)"},
136+
{"name":"xe", "type":"F", "info":"x of the end point for the strip (cm)"},
137+
{"name":"ye", "type":"F", "info":"y of the end point for the strip (cm)"},
138+
{"name":"ze", "type":"F", "info":"z of the end point for the strip (cm)"},
133139
{"name":"ai", "type":"B", "info":"bits [0-2] : noise flags for sections 1-3 (1 = noise, 0 = signal); bits [3-5] : hit presence for sections 1-3 (1 = hit present, 0 = no hit)"},
134140
{"name":"probability", "type":"F", "info":"Hit classification probability"}
135141
]

‎etc/bankdefs/hipo4/bst.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@
121121
{"name":"clusterID", "type":"S", "info":"associated cluster ID"},
122122
{"name":"trkID", "type":"S", "info":"associated track ID"},
123123
{"name":"status", "type":"B", "info":"status (0=good)"},
124+
{"name":"xo", "type":"F", "info":"x of the origin point for the strip (cm)"},
125+
{"name":"yo", "type":"F", "info":"y of the origin point for the strip (cm)"},
126+
{"name":"zo", "type":"F", "info":"z of the origin point for the strip (cm)"},
127+
{"name":"xe", "type":"F", "info":"x of the end point for the strip (cm)"},
128+
{"name":"ye", "type":"F", "info":"y of the end point for the strip (cm)"},
129+
{"name":"ze", "type":"F", "info":"z of the end point for the strip (cm)"},
124130
{"name":"ai", "type":"B", "info":"bits [0-2] : noise flags for sections 1-3 (1 = noise, 0 = signal); bits [3-5] : hit presence for sections 1-3 (1 = hit present, 0 = no hit)"},
125131
{"name":"probability1", "type":"F", "info":"Hit classification probability for hit in a lower-numbered section"},
126132
{"name":"probability2", "type":"F", "info":"Hit classification probability for hit in a higher-numbered section"}

‎reconstruction/cvt/src/main/java/org/jlab/rec/cvt/banks/RecoBankWriter.java‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import org.jlab.rec.cvt.trajectory.Helix;
1919
import org.jlab.rec.cvt.trajectory.StateVec;
2020
import org.jlab.geom.prim.Line3D;
21+
import org.jlab.geom.prim.Point3D;
22+
import org.jlab.geom.prim.Arc3D;
2123
import org.jlab.rec.cvt.Constants;
2224
import org.jlab.rec.cvt.bmt.BMTType;
2325
import org.jlab.rec.cvt.hit.Hit;
@@ -58,6 +60,14 @@ public static DataBank fillSVTHitBank(DataEvent event, List<Hit> hitlist, String
5860
bank.setByte("status", i, (byte) hitlist.get(i).getStrip().getStatus());
5961

6062
if(bank.getDescriptor().hasEntry("ai")){
63+
Line3D line = hitlist.get(i).getStrip().getLine();
64+
bank.setFloat("xo", i, (float)line.origin().x() / 10);
65+
bank.setFloat("yo", i, (float)line.origin().y() / 10);
66+
bank.setFloat("zo", i, (float)line.origin().z() / 10);
67+
bank.setFloat("xe", i, (float)line.end().x() / 10);
68+
bank.setFloat("ye", i, (float)line.end().y() / 10);
69+
bank.setFloat("ze", i, (float)line.end().z() / 10);
70+
6171
bank.setByte("ai", i, hitlist.get(i).getDenoiseStatus());
6272
if(hitlist.get(i).getDenoiseProbality().size() == 1)
6373
bank.setFloat("probability1", i, (float) hitlist.get(i).getDenoiseProbality().get(0));
@@ -220,6 +230,24 @@ public static DataBank fillBMTHitBank(DataEvent event, List<Hit> hitlist, String
220230
bank.setByte("status", i, (byte) hitlist.get(i).getStrip().getStatus());
221231

222232
if(bank.getDescriptor().hasEntry("ai")){
233+
Point3D originPoint, endPoint;
234+
if(hitlist.get(i).getType() == BMTType.Z) {
235+
Line3D line = hitlist.get(i).getStrip().getLine();
236+
originPoint = line.origin();
237+
endPoint = line.end();
238+
}
239+
else {
240+
Arc3D arcLine = hitlist.get(i).getStrip().getArc();
241+
originPoint = arcLine.origin();
242+
endPoint = arcLine.end();
243+
}
244+
bank.setFloat("xo", i, (float)originPoint.x() / 10);
245+
bank.setFloat("yo", i, (float)originPoint.y() / 10);
246+
bank.setFloat("zo", i, (float)originPoint.z() / 10);
247+
bank.setFloat("xe", i, (float)endPoint.x() / 10);
248+
bank.setFloat("ye", i, (float)endPoint.y() / 10);
249+
bank.setFloat("ze", i, (float)endPoint.z() / 10);
250+
223251
bank.setByte("ai", i, hitlist.get(i).getDenoiseStatus());
224252
if(hitlist.get(i).getDenoiseProbality().size() == 1)
225253
bank.setFloat("probability", i, (float) hitlist.get(i).getDenoiseProbality().get(0));

0 commit comments

Comments
 (0)