Skip to content

Commit d22dc16

Browse files
authored
adapt eb to 6-dimensional covariance matrix (#1087)
1 parent 9a2b1c7 commit d22dc16

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorData.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,9 @@ public static DataBank getCovMatrixBank(List<DetectorParticle> particles, DataEv
521521
}
522522
bank.setShort("index", row, (short) p.getTrackIndex());
523523
bank.setShort("pindex", row, (short) i);
524-
for (int ii = 0; ii < 5; ii++) {
525-
for (int jj = 0; jj < 5; jj++) {
524+
for (int ii = 0; ii < 6; ii++) {
525+
for (int jj = 0; jj < 6; jj++) {
526526
String varName = String.format("C%d%d", ii + 1, jj + 1);
527-
if (bank.getDescriptor().hasEntry(varName) != true) {
528-
continue;
529-
}
530527
bank.setFloat(varName, row, p.getCovMatrix(ii, jj));
531528
}
532529
}
@@ -595,11 +592,8 @@ public static List<DetectorTrack> readDetectorTracks(DataEvent event, String ban
595592
}
596593
}
597594
if (covBank != null) {
598-
final int dimCovMat = 5;
595+
final int dimCovMat = 6;
599596
for (int ii = 0; ii < covBank.rows(); ii++) {
600-
if (covBank.getInt("id", ii) != trkId) {
601-
continue;
602-
}
603597
for (int jj = 1; jj <= dimCovMat; jj++) {
604598
for (int kk = 1; kk <= dimCovMat; kk++) {
605599
float ele = covBank.getFloat(String.format("C%d%d", jj, kk), ii);

common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorTrack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public int size() {
134134
private Vector3 trackP = new Vector3();
135135
private Vector3 trackVertex = new Vector3();
136136

137-
private float[][] covMatrix = new float[5][5];
137+
private float[][] covMatrix = new float[6][6];
138138
private List<Line3D> trackCrosses = new ArrayList<>();
139139

140140
private Trajectory trajectory=new Trajectory();

etc/bankdefs/hipo4/event-ai.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,22 @@
550550
{"name":"C13", "type":"F", "info":"C13 covariance matrix element at last superlayer used in the fit"},
551551
{"name":"C14", "type":"F", "info":"C14 covariance matrix element at last superlayer used in the fit"},
552552
{"name":"C15", "type":"F", "info":"C15 covariance matrix element at last superlayer used in the fit"},
553+
{"name":"C16", "type":"F", "info":"C16 covariance matrix element at last superlayer used in the fit"},
553554
{"name":"C22", "type":"F", "info":"C22 covariance matrix element at last superlayer used in the fit"},
554555
{"name":"C23", "type":"F", "info":"C23 covariance matrix element at last superlayer used in the fit"},
555556
{"name":"C24", "type":"F", "info":"C24 covariance matrix element at last superlayer used in the fit"},
556557
{"name":"C25", "type":"F", "info":"C25 covariance matrix element at last superlayer used in the fit"},
558+
{"name":"C26", "type":"F", "info":"C26 covariance matrix element at last superlayer used in the fit"},
557559
{"name":"C33", "type":"F", "info":"C33 covariance matrix element at last superlayer used in the fit"},
558560
{"name":"C34", "type":"F", "info":"C34 covariance matrix element at last superlayer used in the fit"},
559561
{"name":"C35", "type":"F", "info":"C35 covariance matrix element at last superlayer used in the fit"},
562+
{"name":"C36", "type":"F", "info":"C36 covariance matrix element at last superlayer used in the fit"},
560563
{"name":"C44", "type":"F", "info":"C44 covariance matrix element at last superlayer used in the fit"},
561564
{"name":"C45", "type":"F", "info":"C45 covariance matrix element at last superlayer used in the fit"},
562-
{"name":"C55", "type":"F", "info":"C55 covariance matrix element at last superlayer used in the fit"}
565+
{"name":"C46", "type":"F", "info":"C46 covariance matrix element at last superlayer used in the fit"},
566+
{"name":"C55", "type":"F", "info":"C55 covariance matrix element at last superlayer used in the fit"},
567+
{"name":"C56", "type":"F", "info":"C56 covariance matrix element at last superlayer used in the fit"},
568+
{"name":"C66", "type":"F", "info":"C66 covariance matrix element at last superlayer used in the fit"}
563569
]
564570
},
565571
{

etc/bankdefs/hipo4/event.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,16 +555,22 @@
555555
{"name":"C13", "type":"F", "info":"C13 covariance matrix element at last superlayer used in the fit"},
556556
{"name":"C14", "type":"F", "info":"C14 covariance matrix element at last superlayer used in the fit"},
557557
{"name":"C15", "type":"F", "info":"C15 covariance matrix element at last superlayer used in the fit"},
558+
{"name":"C16", "type":"F", "info":"C16 covariance matrix element at last superlayer used in the fit"},
558559
{"name":"C22", "type":"F", "info":"C22 covariance matrix element at last superlayer used in the fit"},
559560
{"name":"C23", "type":"F", "info":"C23 covariance matrix element at last superlayer used in the fit"},
560561
{"name":"C24", "type":"F", "info":"C24 covariance matrix element at last superlayer used in the fit"},
561562
{"name":"C25", "type":"F", "info":"C25 covariance matrix element at last superlayer used in the fit"},
563+
{"name":"C26", "type":"F", "info":"C26 covariance matrix element at last superlayer used in the fit"},
562564
{"name":"C33", "type":"F", "info":"C33 covariance matrix element at last superlayer used in the fit"},
563565
{"name":"C34", "type":"F", "info":"C34 covariance matrix element at last superlayer used in the fit"},
564566
{"name":"C35", "type":"F", "info":"C35 covariance matrix element at last superlayer used in the fit"},
567+
{"name":"C36", "type":"F", "info":"C36 covariance matrix element at last superlayer used in the fit"},
565568
{"name":"C44", "type":"F", "info":"C44 covariance matrix element at last superlayer used in the fit"},
566569
{"name":"C45", "type":"F", "info":"C45 covariance matrix element at last superlayer used in the fit"},
567-
{"name":"C55", "type":"F", "info":"C55 covariance matrix element at last superlayer used in the fit"}
570+
{"name":"C46", "type":"F", "info":"C46 covariance matrix element at last superlayer used in the fit"},
571+
{"name":"C55", "type":"F", "info":"C55 covariance matrix element at last superlayer used in the fit"},
572+
{"name":"C56", "type":"F", "info":"C56 covariance matrix element at last superlayer used in the fit"},
573+
{"name":"C66", "type":"F", "info":"C66 covariance matrix element at last superlayer used in the fit"}
568574
]
569575
},
570576
{

0 commit comments

Comments
 (0)