22 TMatrixD ****C13 =
new TMatrixD ***[5];
23 TMatrixD ****b13 =
new TMatrixD ***[5];
24 TMatrixD ****C31 =
new TMatrixD ***[5];
25 TMatrixD ****b31 =
new TMatrixD ***[5];
27 for (
int whI = -2; whI < 3; ++whI) {
28 C13[whI + 2] =
new TMatrixD **[4];
29 b13[whI + 2] =
new TMatrixD **[4];
30 C31[whI + 2] =
new TMatrixD **[4];
31 b31[whI + 2] =
new TMatrixD **[4];
32 for (
int stI = 1; stI < 5; ++stI) {
33 C13[whI + 2][stI - 1] =
new TMatrixD *[14];
34 b13[whI + 2][stI - 1] =
new TMatrixD *[14];
35 C31[whI + 2][stI - 1] =
new TMatrixD *[14];
36 b31[whI + 2][stI - 1] =
new TMatrixD *[14];
37 for (
int seI = 1; seI < 15; ++seI) {
38 if (seI > 12 && stI != 4)
40 C13[whI + 2][stI - 1][seI - 1] =
new TMatrixD(3, 3);
41 b13[whI + 2][stI - 1][seI - 1] =
new TMatrixD(3, 1);
42 C31[whI + 2][stI - 1][seI - 1] =
new TMatrixD(3, 3);
43 b31[whI + 2][stI - 1][seI - 1] =
new TMatrixD(3, 1);
49 Int_t nentries = (Int_t)
tali->GetEntries();
50 for (Int_t
i = 0;
i < nentries;
i++) {
56 bool repeatedHits =
false;
59 for (
int counterHi = 0; counterHi <
nhits[
counter]; counterHi++) {
60 for (
int counterHj = 0; counterHj <
nhits[
counter]; counterHj++) {
61 if (counterHi == counterHj)
68 if (repeatedHits ==
true)
82 if (fabs(x_13 - xp_13) < 3 && fabs(x_31 - xp_31) && fabs(tanphi_13 - tanphi_31) < 0.06) {
94 for (
int sector = 1; sector < 15; ++sector) {
95 if (sector > 12 &&
station != 4)
97 TMatrixD solution13(3, 1);
98 TMatrixD solution31(3, 1);
99 TMatrixD C31_copy = *(C31[
wheel + 2][
station - 1][sector - 1]);
100 TMatrixD C13_copy = *(C13[
wheel + 2][
station - 1][sector - 1]);
101 TMatrixD b31_copy = *(b31[
wheel + 2][
station - 1][sector - 1]);
102 TMatrixD b13_copy = *(b13[
wheel + 2][
station - 1][sector - 1]);
106 solution13 = C13_copy * b13_copy;
107 solution31 = C31_copy * b31_copy;
111 dx = solution13(0, 0);
112 dz = solution13(1, 0);
113 phiy = solution13(2, 0);
114 for (
int c = 0;
c < 3; ++
c) {
115 for (
int s = 0;
s < 3; ++
s) {
132 matrix(1, 1) = tanphi * tanphi;
133 matrix(0, 2) = tanphi * xp;
134 matrix(2, 0) = tanphi * xp;
135 matrix(2, 2) = tanphi * tanphi * xp * xp;
136 matrix(2, 1) = tanphi * tanphi * xp;
137 matrix(1, 2) = tanphi * tanphi * xp;
146 matrix(1, 0) = -(
x - xp) * tanphi;
147 matrix(2, 0) = -(
x - xp) * tanphi * xp;
153 ttreeOutput =
new TTree(
"DTSLToSLResult",
"DTSLToSLResult");
DTMuonSLToSL(std::string, int, float, float, TFile *)
static std::atomic< unsigned int > counter
TMatrixD returnCSLMatrix(float, float, float)
TMatrixD returnbSLMatrix(float, float, float)