1 package org.lcsim.recon.vertexing.billoir;
2
3
4
5
6
7
8
9
10
11
12 public class Vertex {
13 public int _ntrk;
14 public double[] _xyzf;
15 public double[] _vcov;
16
17 public double[][] _parf;
18
19
20
21 public double[][] _tcov;
22
23 public double _chi2;
24 public double[] _chi2tr;
25
26
27 public Vertex() {
28 _ntrk = 0;
29 _xyzf = new double[3];
30 _parf = new double[3][0];
31 _vcov = new double[6];
32 _tcov = new double[6][0];
33 _chi2 = 0.;
34 _chi2tr = new double[0];
35 }
36
37
38 public Vertex(int ntrk, double[] xyz, double[][] parf, double[] vcov, double[][] tcov, double chi2, double[] chi2tr) {
39 _ntrk = ntrk;
40 _xyzf = xyz;
41 _parf = parf;
42 _vcov = vcov;
43 _tcov = tcov;
44 _chi2 = chi2;
45 _chi2tr = chi2tr;
46 }
47
48 public String toString() {
49 StringBuffer sb = new StringBuffer("Vertex at : \nx= "
50 + _xyzf[0]
51 + " +/- "
52 + Math.sqrt(_vcov[0])
53 + "\ny= "
54 + _xyzf[1]
55 + " +/- "
56 + Math.sqrt(_vcov[2])
57 + "\nz= "
58 + _xyzf[2]
59 + " +/- "
60 + Math.sqrt(_vcov[5])
61 + "\nchi2 = "
62 + _chi2);
63 for (int i = 0; i < _ntrk; ++i) {
64 sb.append("\n chi2[" + i + "]= " + _chi2tr[i]);
65 }
66 return sb.toString();
67
68 }
69
70 }