29 TMatrixD ****C13 =
new TMatrixD ***[5];
30 TMatrixD ****b13 =
new TMatrixD ***[5];
31 TMatrixD ****C31 =
new TMatrixD ***[5];
32 TMatrixD ****b31 =
new TMatrixD ***[5];
34 for(
int whI = -2; whI < 3; ++whI) {
35 C13[whI+2] =
new TMatrixD **[4];
36 b13[whI+2] =
new TMatrixD **[4];
37 C31[whI+2] =
new TMatrixD **[4];
38 b31[whI+2] =
new TMatrixD **[4];
39 for(
int stI = 1; stI < 5; ++stI) {
40 C13[whI+2][stI-1] =
new TMatrixD * [14];
41 b13[whI+2][stI-1] =
new TMatrixD * [14];
42 C31[whI+2][stI-1] =
new TMatrixD * [14];
43 b31[whI+2][stI-1] =
new TMatrixD * [14];
44 for(
int seI = 1; seI < 15; ++seI) {
45 if(seI > 12 && stI != 4)
continue;
46 C13[whI+2][stI-1][seI-1] =
new TMatrixD(3,3);
47 b13[whI+2][stI-1][seI-1] =
new TMatrixD(3,1);
48 C31[whI+2][stI-1][seI-1] =
new TMatrixD(3,3);
49 b31[whI+2][stI-1][seI-1] =
new TMatrixD(3,1);
55 Int_t nentries = (Int_t)
tali->GetEntries();
56 for (Int_t
i=0;
i<nentries;
i++) {
61 bool repeatedHits =
false;
64 for(
int counterHi = 0; counterHi <
nhits[
counter]; counterHi++) {
65 for(
int counterHj = 0; counterHj < nhits[
counter]; counterHj++) {
66 if(counterHi == counterHj)
continue;
72 if(repeatedHits ==
true)
continue;
83 if(fabs(x_13-xp_13)< 3 && fabs(x_31-xp_31) && fabs(tanphi_13-tanphi_31)<0.06) {
85 *(C13[wheel+2][station-1][sector-1]) +=
returnCSLMatrix(x_13, xp_13, tanphi_13);
86 *(b13[wheel+2][station-1][sector-1]) +=
returnbSLMatrix(x_13, xp_13, tanphi_13);
88 *(C31[wheel+2][station-1][sector-1]) +=
returnCSLMatrix(x_31, xp_31, tanphi_31);
89 *(b31[wheel+2][station-1][sector-1]) +=
returnbSLMatrix(x_31, xp_31, tanphi_31);
94 for(
int wheel = -2; wheel < 3; ++wheel) {
96 for(
int sector = 1; sector < 15; ++sector) {
97 if(sector > 12 &&
station != 4)
continue;
98 TMatrixD solution13(3,1);
99 TMatrixD solution31(3,1);
100 TMatrixD C31_copy = *(C31[wheel+2][
station-1][sector-1]);
101 TMatrixD C13_copy = *(C13[wheel+2][
station-1][sector-1]);
102 TMatrixD b31_copy = *(b31[wheel+2][
station-1][sector-1]);
103 TMatrixD b13_copy = *(b13[wheel+2][
station-1][sector-1]);
107 solution13 = C13_copy * b13_copy;
108 solution31 = C31_copy * b31_copy;
110 dx = solution13(0,0);
dz = solution13(1,0);
111 phiy = solution13(2,0);
112 for(
int c = 0;
c < 3; ++
c) {
113 for(
int s = 0;
s < 3; ++
s) {
128 TMatrixD matrix(3,3);
131 matrix(1,0) = tanphi;
132 matrix(0,1) = tanphi;
133 matrix(1,1) = tanphi*tanphi;
134 matrix(0,2) = tanphi*xp;
135 matrix(2,0) = tanphi*xp;
136 matrix(2,2) = tanphi*tanphi*xp*xp;
137 matrix(2,1) = tanphi*tanphi*xp;
138 matrix(1,2) = tanphi*tanphi*xp;
147 TMatrixD matrix(3,1);
149 matrix(0,0) = -(x-xp);
150 matrix(1,0) = -(x-xp)*tanphi;
151 matrix(2,0) = -(x-xp)*tanphi*xp;
160 ttreeOutput =
new TTree(
"DTSLToSLResult",
"DTSLToSLResult");
float dxdzSlSL3[MAX_SEGMENT]
float xSL3SL1[MAX_SEGMENT]
float dxdzSlSL1[MAX_SEGMENT]
float xSL1SL3[MAX_SEGMENT]
DTMuonSLToSL(std::string, int, float, float, TFile *)
float xSlSL1[MAX_SEGMENT]
float zc[MAX_SEGMENT][MAX_HIT_CHAM]
float xSlSL3[MAX_SEGMENT]
TMatrixD returnCSLMatrix(float, float, float)
TMatrixD returnbSLMatrix(float, float, float)